/* ==========================================================================
   Review Section — rv-* design system
   ========================================================================== */

:root {
    --lp-accent: rgb(255, 138, 53);
    --lp-accent-2: rgb(255, 112, 28);
    --lp-accent-soft: rgba(255, 138, 53, .18);
    --lp-ink: #0f172a;
    --lp-muted: rgba(15,23,42,.72);
    --lp-faint: rgba(15,23,42,.55);
    --lp-border: rgba(15,23,42,.10);
    --lp-soft: rgba(15,23,42,.04);
    --lp-card-shadow: 0 20px 45px rgba(0,0,0,0.08), 0 6px 18px rgba(0,0,0,0.05);
}

.reviews-section {
    max-width: 1100px;
    margin: 34px auto;
    padding: 0 16px;
}

/* ---------- Summary Panel ---------- */

.rv-summary {
    background: rgba(255,255,255,.92);
    border: 1px solid var(--lp-border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--lp-card-shadow);
    margin-bottom: 14px;
}

.rv-summary__head {
    padding: 18px 18px 16px;
    border-bottom: 1px solid rgba(15,23,42,.10);
    background: #eef4fa;
}

.rv-summary__kicker {
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(15,23,42,.62);
    background: rgba(15,23,42,.04);
    border: 1px solid rgba(15,23,42,.10);
    border-radius: 999px;
    padding: 6px 10px;
}

.rv-summary__title {
    margin: 10px 0 0;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 900;
    color: var(--lp-ink);
}

.rv-score-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.rv-score-box {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255,138,53,.14);
    border: 1px solid rgba(255,138,53,.22);
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 16px;
    color: rgba(15,23,42,.92);
}

.rv-score-stars {
    --pct: 80%;
    position: relative;
    display: inline-block;
    font-size: 16px;
    letter-spacing: 2px;
    line-height: 1;
}
.rv-score-stars::before { content: "★★★★★"; color: rgba(15,23,42,.22); }
.rv-score-stars::after {
    content: "★★★★★";
    position: absolute; inset: 0;
    width: var(--pct);
    overflow: hidden;
    white-space: nowrap;
    color: var(--lp-accent);
}

.rv-score-meta { display: grid; gap: 2px; }
.rv-score-meta strong { font-size: 14px; font-weight: 900; color: rgba(15,23,42,.92); }
.rv-score-meta small { font-size: 12.5px; color: rgba(15,23,42,.66); }

.rv-summary__body { padding: 16px 18px 18px; }

.rv-section + .rv-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(15,23,42,.08);
}

.rv-section__title {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(15,23,42,.62);
    margin-bottom: 10px;
}

/* ---------- Distribution ---------- */

.rv-dist { display: grid; grid-template-columns: 30px 1fr 24px; gap: 8px; align-items: center; margin-bottom: 5px; }
.rv-dist__label { font-size: 13px; font-weight: 700; color: rgba(15,23,42,.70); text-align: right; }
.rv-dist__track { height: 7px; background: rgba(15,23,42,.06); border-radius: 4px; overflow: hidden; }
.rv-dist__fill { height: 100%; background: var(--lp-accent); border-radius: 4px; }
.rv-dist__num { font-size: 12px; color: rgba(15,23,42,.55); font-weight: 600; }

/* ---------- Categories ---------- */

.rv-cat { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; }
.rv-cat + .rv-cat { border-top: 1px solid rgba(15,23,42,.06); }
.rv-cat__name { font-size: 14px; color: rgba(15,23,42,.82); font-weight: 600; }
.rv-cat__right { display: flex; align-items: center; gap: 5px; }
.rv-cat__star { color: var(--lp-accent); font-size: 14px; }
.rv-cat__val { font-weight: 900; font-size: 15px; color: rgba(15,23,42,.92); }

/* ---------- Sort ---------- */

.rv-sort {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--lp-border);
    border-radius: 16px;
    font-size: 14px;
    font-family: inherit;
    color: var(--lp-ink);
    background: rgba(15,23,42,.03);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(15,23,42,0.45)'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

/* ---------- Filter Chips ---------- */

.rv-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.reviews-section .rv-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(15,23,42,.12);
    background: rgba(15,23,42,.03);
    color: rgba(15,23,42,.82);
    font-family: inherit;
    font-weight: 900;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: none;
    transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.reviews-section .rv-chip:hover { transform: translateY(-2px); background: rgba(15,23,42,.05); border-color: rgba(15,23,42,.16); }
.reviews-section .rv-chip.is-active {
    border-color: rgba(255,138,53,.55);
    background: rgba(255,138,53,.14);
    box-shadow: 0 14px 28px rgba(255,138,53,.12);
}
.reviews-section .rv-chip .ct { font-weight: 800; opacity: 0.6; }

/* ---------- Review List ---------- */

.rv-list { display: grid; gap: 12px; }

/* ---------- Review Card ---------- */

.rv-card {
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.90);
    border-radius: 18px;
    overflow: hidden;
    transition: transform .18s ease, border-color .2s ease, box-shadow .2s ease;
}

@media (hover: hover) {
    .rv-card:hover {
        transform: translateY(-2px);
        border-color: rgba(15,23,42,.14);
        box-shadow: 0 16px 34px rgba(0,0,0,.08);
    }
}

.rv-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 14px;
    background: rgba(15,23,42,.03);
    border-bottom: 1px solid rgba(15,23,42,.06);
}

.rv-card__user { display: flex; gap: 10px; align-items: center; }

.rv-card__avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 900; font-size: 14px; flex-shrink: 0; position: relative;
}

.rv-card__tick {
    position: absolute; bottom: -1px; right: -1px;
    width: 14px; height: 14px; background: #22c55e; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.90);
    display: flex; align-items: center; justify-content: center;
}
.rv-card__tick svg { width: 7px; height: 7px; stroke: #fff; stroke-width: 3; fill: none; }

.rv-card__name { font-weight: 900; font-size: 14px; color: rgba(15,23,42,.92); }
.rv-card__type { font-size: 12.5px; color: rgba(15,23,42,.62); }

.rv-card__meta { text-align: right; flex-shrink: 0; }
.rv-card__date { font-size: 12px; color: rgba(15,23,42,.55); }
.rv-card__stars {
    --pct: 100%;
    position: relative; display: inline-block;
    font-size: 14px; letter-spacing: 1px; line-height: 1; margin-top: 2px;
}
.rv-card__stars::before { content: "★★★★★"; color: rgba(15,23,42,.22); }
.rv-card__stars::after {
    content: "★★★★★"; position: absolute; inset: 0;
    width: var(--pct); overflow: hidden; white-space: nowrap; color: var(--lp-accent);
}

.rv-card__body { padding: 14px 14px; }

/* ---------- Feedback Blocks ---------- */

.rv-fb {
    padding: 10px 0 10px 16px;
    border-left: 3px solid;
    margin-bottom: 10px;
}
.rv-fb:last-of-type { margin-bottom: 12px; }

.rv-fb--pos { border-color: #22c55e; }
.rv-fb--neg { border-color: #ef4444; }

.rv-fb__label {
    font-size: 12px; font-weight: 900; text-transform: uppercase;
    letter-spacing: .06em; margin-bottom: 4px;
    display: flex; align-items: center; gap: 5px;
}
.rv-fb--pos .rv-fb__label { color: #16a34a; }
.rv-fb--neg .rv-fb__label { color: #dc2626; }
.rv-fb__label svg { width: 13px; height: 13px; fill: currentColor; }

.rv-fb__text { font-size: 14px; line-height: 1.7; color: rgba(15,23,42,.74); }

/* ---------- Photos ---------- */

.rv-photos {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.rv-photos__thumb {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(15,23,42,.10);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}
.rv-photos__thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
}
.rv-photos__more {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(15,23,42,.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    color: rgba(15,23,42,.55);
    cursor: pointer;
    transition: background .15s ease;
}
.rv-photos__more:hover { background: rgba(15,23,42,.07); }

/* ---------- Sub-ratings ---------- */

.rv-card__subs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; }
.rv-sub { display: flex; align-items: center; gap: 4px; color: rgba(15,23,42,.70); }
.rv-sub__star { color: var(--lp-accent); }
.rv-sub__val { font-weight: 900; color: rgba(15,23,42,.92); }

/* ---------- Vote Actions ---------- */

.rv-card__actions {
    display: flex; align-items: center; gap: 8px;
    padding-top: 12px; border-top: 1px solid rgba(15,23,42,.06);
}
.reviews-section .rv-vote {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px; border-radius: 999px;
    border: 1px solid rgba(15,23,42,.12); background: rgba(15,23,42,.03);
    font-size: 12px; font-family: inherit; font-weight: 900;
    color: rgba(15,23,42,.70); cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: none;
    transition: all .15s;
}
.reviews-section .rv-vote:hover { transform: translateY(-1px); background: rgba(15,23,42,.06); border-color: rgba(15,23,42,.16); }
.reviews-section .rv-vote svg { width: 13px; height: 13px; fill: currentColor; }
.reviews-section .rv-vcount { font-size: 12px; color: rgba(15,23,42,.55); margin-left: auto; }

/* Voted states */
.reviews-section .rv-vote.voted-helpful {
    border-color: #22c55e;
    color: #fff;
    background: #22c55e;
}
.reviews-section .rv-vote.voted-not-helpful {
    border-color: #ef4444;
    color: #fff;
    background: #ef4444;
}
.reviews-section .rv-vote.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

/* ---------- Operator Response ---------- */

.rv-card__op {
    margin-top: 12px; padding: 14px;
    background: rgba(255,138,53,.06);
    border: 1px solid rgba(255,138,53,.15);
    border-radius: 14px;
}
.rv-card__op-head {
    font-size: 12px; font-weight: 900; color: var(--lp-accent);
    margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}
.rv-card__op-text { font-size: 13.5px; color: rgba(15,23,42,.74); line-height: 1.65; }

/* ---------- Pagination ---------- */

.rv-pager { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.reviews-section .rv-pg {
    width: 38px; height: 38px; border-radius: 999px;
    border: 1px solid rgba(15,23,42,.12); background: rgba(15,23,42,.03);
    font-size: 13px; font-family: inherit; font-weight: 900;
    color: rgba(15,23,42,.70); cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.reviews-section .rv-pg:hover { transform: translateY(-2px); background: rgba(15,23,42,.06); }
.reviews-section .rv-pg.is-active {
    background: linear-gradient(135deg, var(--lp-accent), var(--lp-accent-2));
    color: #fff; border-color: rgba(255,138,53,.35);
    box-shadow: 0 12px 24px var(--lp-accent-soft);
}

/* ---------- Loading State ---------- */

.rv-list.loading {
    opacity: 0.3;
    pointer-events: none;
    transition: opacity .2s;
}

/* ---------- Lightbox (independent overlay) ---------- */

.bfl-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .85);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}

.bfl-lightbox.open {
    opacity: 1;
    visibility: visible;
}

.bfl-lightbox__img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    opacity: 0;
    transition: opacity .3s;
    user-select: none;
    -webkit-user-drag: none;
}

.bfl-lightbox__img.loaded {
    opacity: 1;
}

.bfl-lightbox__close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.bfl-lightbox__close:hover {
    background: rgba(255, 255, 255, .3);
}

.bfl-lightbox__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.bfl-lightbox__arrow:hover {
    background: rgba(255, 255, 255, .3);
}

.bfl-lightbox__arrow.hide {
    display: none;
}

.bfl-lightbox__arrow--prev { left: 18px; }
.bfl-lightbox__arrow--next { right: 18px; }

/* ---------- Responsive ---------- */

@media (max-width: 680px) {
    .rv-summary__head { padding: 14px 14px 12px; }
    .rv-summary__body { padding: 14px 14px 16px; }
    .rv-card__head { padding: 12px 12px; }
    .rv-card__body { padding: 12px 12px; }

    .rv-card__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .rv-card__meta {
        text-align: left;
    }
    .rv-card__actions {
        flex-wrap: wrap;
    }
    .rv-vcount {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
    }
}

/* ---------- Desktop Two-Column Layout ---------- */
@media (min-width: 900px) {
    .reviews-section {
        display: grid;
        grid-template-columns: 1fr 300px;
        grid-template-rows: auto;
        gap: 20px;
        align-items: start;
    }
    .rv-summary {
        grid-column: 2;
        grid-row: 1 / 20;
        position: sticky;
        top: 24px;
        margin-bottom: 0;
    }
    .rv-filters { grid-column: 1; }
    .rv-list { grid-column: 1; }
    .rv-pager { grid-column: 1; }
}

/* ---------- Hide Original TourMaster Review Section ---------- */
.tourmaster-single-review-container {
    display: none !important;
}
