/* Wyplatanki Reviews — masonry grid ([wr_reviews_grid] shortcode) */

/* ── Grid container ─────────────────────────────────────── */

.wr-reviews-grid {
    columns: var(--wr-grid-cols, 3);
    column-gap: var(--wr-grid-gap, 20px);
    font-family: inherit;
}

/* ── Tile ────────────────────────────────────────────────── */

.wr-review-tile {
    display: inline-block; /* ensures break-inside works across browsers */
    width: 100%;
    box-sizing: border-box;
    break-inside: avoid;
    margin-bottom: var(--wr-grid-gap, 20px);
    padding: 18px 20px;
    background: var(--wr-tile-bg, #fff);
    border: 1px solid var(--wr-tile-border, #e5e7eb);
    border-radius: 10px;
}

/* ── Product thumbnail ───────────────────────────────────── */

.wr-tile-thumb {
    margin-bottom: 14px;
}

.wr-tile-thumb-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

/* ── Header (stars · name) ───────────────────────────────── */

.wr-tile-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 10px;
}

.wr-tile-name {
    font-weight: 700;
    font-size: 14px;
    color: #1a1a1a;
    margin-left: auto;
}

/* ── Share buttons ───────────────────────────────────────── */

.wr-share-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
}

.wr-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .15s;
    line-height: 1;
}

.wr-share-btn:hover { opacity: .82; }

.wr-share-btn--fb { background: #1877f2; color: #fff; }
.wr-share-btn--tw { background: #000;    color: #fff; }

/* ── Recommendation badge ────────────────────────────────── */

.wr-rec-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    margin-top: 8px;
}

.wr-rec-badge--yes {
    color: #16a34a;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.wr-rec-badge--no {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

/* ── Review title ────────────────────────────────────────── */

.wr-review-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 5px;
}

/* ── Comment ─────────────────────────────────────────────── */

.wr-tile-comment {
    margin: 0 0 12px;
    font-size: 14px;
    color: #374151;
    line-height: 1.65;
}

/* ── Date ────────────────────────────────────────────────── */

.wr-tile-date {
    display: block;
    font-size: 12px;
    color: #9ca3af;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 900px) {
    .wr-reviews-grid { columns: 2; }
}

@media (max-width: 540px) {
    .wr-reviews-grid { columns: 1; }
}

/* ── Verified purchase badge ──────────────────────────────── */

.wr-verified-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: default;
    vertical-align: middle;
}

.wr-verified-badge::before {
    content: '';
    display: inline-block;
    width: 15px;
    height: 15px;
    background-color: var(--wr-badge-color, #f59e0b);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' fill-rule='evenodd' d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0ZM3 7.5L6.5 13L12.5 4.5L11.5 5.5L7 11L5 8.5Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' fill-rule='evenodd' d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0ZM3 7.5L6.5 13L12.5 4.5L11.5 5.5L7 11L5 8.5Z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    flex-shrink: 0;
}

.wr-verified-badge::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease;
    z-index: 10;
}

.wr-verified-badge:hover::after { opacity: 1; }


/* ── Review tags ──────────────────────────────────────────── */

.wr-review-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    margin-bottom: 2px;
}

.wr-tag {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-size: 12px;
    color: #6b7280;
    background: #f9fafb;
    line-height: 1.5;
}

/* ── Helpfulness voting ──────────────────────────────────── */

.wr-vote-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.wr-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}

.wr-vote-btn:hover {
    border-color: #8B6914;
    color: #8B6914;
    background: #fefce8;
}

.wr-vote-btn--active {
    border-color: #8B6914;
    background: #fefce8;
    color: #8B6914;
    font-weight: 600;
}

.wr-vote-btn:disabled {
    opacity: .5;
    cursor: default;
}

.wr-vote-icon { font-size: 12px; line-height: 1; }
.wr-vote-count { font-weight: 600; }

/* ===== Criteria sub-ratings ===== */
.wr-criteria-list { margin-top:8px; display:flex; flex-wrap:wrap; gap:3px 16px; }
.wr-crit-row { display:flex; align-items:center; gap:5px; font-size:11px; }
.wr-crit-label { color:#6b7280; }
.wr-crit-stars { color:#f59e0b; letter-spacing:1px; }
