/**
 * BFL V2 Reviews — front-end widget (Phase 6.4.1).
 *
 * Compact-density mockup. All selectors prefixed `bfl-rv2-` to avoid
 * collision with V1 (`rv-*`). Scoped under `.bfl-rv2-section`.
 *
 * Token system: --bfl-* from bfl-tour-v2.css. Avoid --lp-* orange tokens.
 */

/* ----------------------------------------------------------------
   Wrapper + spacing
   ---------------------------------------------------------------- */
.bfl-rv2-section {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1d2327;
    max-width: 100%;
}
.bfl-rv2-section *,
.bfl-rv2-section *::before,
.bfl-rv2-section *::after {
    box-sizing: border-box;
}

/* ----------------------------------------------------------------
   Stars (text-based, amber)
   - --pct controls the gold fill; works for any 0-5 score
   ---------------------------------------------------------------- */
.bfl-rv2-stars {
    display: inline-block;
    position: relative;
    font-size: 14px;
    letter-spacing: 2px;
    line-height: 1;
    color: #d1d5db;
}
.bfl-rv2-stars::before,
.bfl-rv2-stars::after {
    content: '★★★★★';
    display: inline-block;
}
.bfl-rv2-stars::after {
    position: absolute;
    inset: 0;
    overflow: hidden;
    width: var(--pct, 0%);
    color: #f59e0b;
    white-space: nowrap;
}
.bfl-rv2-stars--small {
    font-size: 12px;
    letter-spacing: 1.5px;
}

/* ----------------------------------------------------------------
   Summary card
   ---------------------------------------------------------------- */
.bfl-rv2-summary {
    background: linear-gradient(135deg, #ffffff 0%, var(--bfl-blue-soft, #eff6ff) 100%);
    border: 1px solid var(--bfl-border, #e2e8f0);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 16px;
}
.bfl-rv2-summary__top {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
}
.bfl-rv2-summary__score {
    min-width: 96px;
    text-align: left;
}
.bfl-rv2-summary__score-num {
    font-size: 48px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #0f172a;
}
.bfl-rv2-summary__score-of {
    font-size: 14px;
    font-style: italic;
    color: #64748b;
    margin-top: 2px;
}
/* Score number + "out of 5" — Fraunces serif. Scoped to body.bfl-v2 to
   beat the parent body.bfl-v2 div { font-family: DM Sans } leak (0,1,1). */
body.bfl-v2 .bfl-rv2-summary__score-num,
body.bfl-v2 .bfl-rv2-summary__score-of {
    font-family: 'Fraunces', Georgia, serif;
}
.bfl-rv2-summary__score .bfl-rv2-stars {
    margin-top: 8px;
}
.bfl-rv2-summary__score-count {
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
    font-weight: 500;
}

/* Histogram */
.bfl-rv2-summary__hist {
    display: grid;
    gap: 4px;
    align-self: center;
}
.bfl-rv2-hist__row {
    display: grid;
    grid-template-columns: 28px 1fr 36px;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #475569;
}
.bfl-rv2-hist__label {
    font-weight: 600;
    color: #334155;
}
.bfl-rv2-hist__track {
    position: relative;
    height: 6px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}
.bfl-rv2-hist__fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: #f59e0b;
    border-radius: 99px;
}
.bfl-rv2-hist__row--empty .bfl-rv2-hist__fill {
    background: #cbd5e1;
}
.bfl-rv2-hist__row--empty {
    color: #94a3b8;
}
.bfl-rv2-hist__count {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Trust meta strip */
.bfl-rv2-trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 12px;
    color: #475569;
    font-weight: 500;
}
.bfl-rv2-trust-strip__item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.bfl-rv2-trust-strip__icon {
    width: 14px;
    height: 14px;
    fill: #059669;
    flex-shrink: 0;
}

/* ----------------------------------------------------------------
   Sort row — text tabs with active underline
   ---------------------------------------------------------------- */
.bfl-rv2-sort {
    display: flex;
    flex-wrap: nowrap;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 1px solid var(--bfl-border, #e2e8f0);
    padding-bottom: 10px;
    margin-bottom: 14px;
}
.bfl-rv2-sort::-webkit-scrollbar {
    display: none;
}
.bfl-rv2-sort__tab {
    background: transparent !important;
    border: 0;
    padding: 4px 0;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: normal;
    white-space: nowrap;
    color: #64748b !important;
    cursor: pointer;
    position: relative;
    transition: color 0.15s ease;
}
.bfl-rv2-sort__tab:hover {
    color: #1d2327 !important;
}
.bfl-rv2-sort__tab.is-active {
    background: transparent !important;
    color: #0f172a !important;
}
.bfl-rv2-sort__tab.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -11px;
    height: 2px;
    background: #0f172a;
    border-radius: 2px;
}

/* ----------------------------------------------------------------
   Review card (compact 190px target)
   ---------------------------------------------------------------- */
.bfl-rv2-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.bfl-rv2-card {
    background: #ffffff;
    border: 1px solid var(--bfl-border, #e2e8f0);
    border-radius: 10px;
    padding: 11px 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bfl-rv2-card:hover {
    border-color: var(--bfl-blue-border, #bfdbfe);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.bfl-rv2-card__head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 7px;
}
.bfl-rv2-card__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.bfl-rv2-card__author {
    flex: 1;
    min-width: 0;
}
.bfl-rv2-card__name {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.bfl-rv2-card__tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    background: #059669;
    border-radius: 50%;
    color: #ffffff;
}
.bfl-rv2-card__tick svg {
    width: 9px;
    height: 9px;
    fill: currentColor;
}
.bfl-rv2-card__meta {
    font-size: 10.5px;
    color: #64748b;
    font-weight: 500;
    margin-top: 1px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.bfl-rv2-card__meta-sep {
    opacity: 0.6;
}

.bfl-rv2-card__score {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.bfl-rv2-card__score-num {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1;
}

.bfl-rv2-card__body {
    margin: 0;
}
.bfl-rv2-card__text {
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bfl-rv2-card__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
/* When the only footer child is the helpful pill (no chips), keep it
   right-aligned via auto-margin — preserves Phase 6.4.1 visual. */
.bfl-rv2-card__foot > .bfl-rv2-helpful:only-child {
    margin-left: auto;
}

/* ----------------------------------------------------------------
   Helpful pill
   ---------------------------------------------------------------- */
.bfl-rv2-helpful {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border: 1px solid var(--bfl-border, #e2e8f0);
    border-radius: 99px;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.2;
    background: #fafafa;
    color: #475569;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.bfl-rv2-helpful:hover {
    background: var(--bfl-border-soft, #f1f5f9);
    border-color: #cbd5e1;
    color: #1d2327;
}
.bfl-rv2-helpful:not(.is-voted) {
    background: #fafafa;
    color: #475569;
}
.bfl-rv2-helpful.is-voted {
    background: var(--bfl-blue-soft, #eff6ff);
    color: var(--bfl-blue, #2563eb);
}
.bfl-rv2-helpful.is-voted:hover {
    background: var(--bfl-blue-border, #bfdbfe);
}
.bfl-rv2-helpful__icon {
    width: 11px;
    height: 11px;
    fill: currentColor;
}
.bfl-rv2-helpful__count {
    font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------------
   Paginated "Load more" CTA (Phase 6.4.10)
   ---------------------------------------------------------------- */
.bfl-rv2-cta-row {
    margin-top: 14px;
}
.bfl-rv2-load-more {
    width: 100%;
    padding: 11px;
    background: #ffffff;
    border: 1px solid var(--bfl-border, #e2e8f0);
    border-radius: 10px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    text-transform: none !important;
    letter-spacing: normal !important;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.bfl-rv2-load-more:hover {
    background: #f1f5f9;
    border-color: var(--bfl-blue, #2563eb);
}
.bfl-rv2-load-more:disabled,
.bfl-rv2-load-more[aria-busy="true"] {
    opacity: 0.6;
    cursor: wait;
}
.bfl-rv2-loaded-notice {
    text-align: center;
    font-size: 11.5px;
    color: #94a3b8;
    padding: 12px;
}

/* ----------------------------------------------------------------
   Country flags (6 hardcoded gradients) + ISO chip
   Phase 6.3.1 column not yet on production — these only render when
   reviewer_country is populated. Forward-compat.
   ---------------------------------------------------------------- */
.bfl-rv2-flag {
    display: inline-block;
    width: 14px;
    height: 10px;
    border-radius: 1px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    vertical-align: middle;
}
.bfl-rv2-flag-gb { background: linear-gradient(135deg, #012169 0%, #fff 50%, #C8102E 100%); }
.bfl-rv2-flag-de { background: linear-gradient(180deg, #000 0 33%, #DD0000 33% 66%, #FFCE00 66% 100%); }
.bfl-rv2-flag-nl { background: linear-gradient(180deg, #AE1C28 0 33%, #fff 33% 66%, #21468B 66% 100%); }
.bfl-rv2-flag-fr { background: linear-gradient(90deg, #002395 0 33%, #fff 33% 66%, #ED2939 66% 100%); }
.bfl-rv2-flag-ru { background: linear-gradient(180deg, #fff 0 33%, #0039A6 33% 66%, #D52B1E 66% 100%); }
.bfl-rv2-flag-tr { background: linear-gradient(135deg, #E30A17 0%, #fff 100%); }
.bfl-rv2-country-code {
    font-size: 10px;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.04em;
}
.bfl-rv2-country-code--plain {
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 3px;
}

/* ----------------------------------------------------------------
   Avatar gradients (5 deterministic palettes)
   ---------------------------------------------------------------- */
.bfl-rv2-avatar-0 { background: linear-gradient(135deg, var(--bfl-blue, #2563eb) 0%, var(--bfl-indigo, #6366f1) 100%); }
.bfl-rv2-avatar-1 { background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%); }
.bfl-rv2-avatar-2 { background: linear-gradient(135deg, #059669 0%, #065f46 100%); }
.bfl-rv2-avatar-3 { background: linear-gradient(135deg, #ec4899 0%, #be185d 100%); }
.bfl-rv2-avatar-4 { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); }

/* ----------------------------------------------------------------
   Inline error notice (load-more / vote failures)
   ---------------------------------------------------------------- */
.bfl-rv2-error {
    margin-top: 8px;
    padding: 6px 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #991b1b;
    font-size: 12px;
    text-align: center;
}

/* ----------------------------------------------------------------
   Responsive — Pamukkale is 90%+ mobile
   ---------------------------------------------------------------- */
@media (max-width: 480px) {
    .bfl-rv2-summary {
        padding: 14px;
    }
    .bfl-rv2-summary__top {
        gap: 12px;
    }
    .bfl-rv2-summary__score-num {
        font-size: 40px;
    }
    .bfl-rv2-sort {
        gap: 14px;
        font-size: 12px;
    }
    .bfl-rv2-card {
        padding: 10px 11px;
    }
    .bfl-rv2-card__name {
        font-size: 12.5px;
    }
}

/* ----------------------------------------------------------------
   Phase 6.4.2 — sub-criteria
   "Rated by guests" aggregate block in the summary card +
   per-card chip row in the footer.
   ---------------------------------------------------------------- */

.bfl-rv2-criteria {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}
.bfl-rv2-criteria-head {
    margin: 0 0 10px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: #64748b !important;
}
/* Phase 6.4.11 — sub-criteria as circular progress rings.
   Visual contrast with the histogram bars above is intentional. */
body.bfl-v2 .bfl-rv2-section .bfl-rv2-criteria-rings {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    align-items: start !important;
}
body.bfl-v2 .bfl-rv2-section .bfl-rv2-criterion-ring {
    text-align: center;
}
body.bfl-v2 .bfl-rv2-section .bfl-rv2-ring-svg {
    width: 64px;
    height: 64px;
    display: block;
    margin: 0 auto;
}
body.bfl-v2 .bfl-rv2-section .bfl-rv2-ring-bg {
    stroke: #fef3c7;
}
body.bfl-v2 .bfl-rv2-section .bfl-rv2-ring-fg {
    stroke: #f59e0b;
    transition: stroke-dashoffset 0.6s ease-out;
}
body.bfl-v2 .bfl-rv2-section .bfl-rv2-ring-num {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    fill: #0f172a;
    letter-spacing: -0.01em;
}
body.bfl-v2 .bfl-rv2-section .bfl-rv2-ring-num--empty {
    fill: #94a3b8;
}
body.bfl-v2 .bfl-rv2-section .bfl-rv2-ring-label {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 500;
    margin-top: 6px;
}
/* Orphan rings — admin renamed/removed the criterion but data lingers. */
body.bfl-v2 .bfl-rv2-section .bfl-rv2-criterion-ring--orphan .bfl-rv2-ring-label {
    color: #94a3b8;
}

/* Per-card chip row — sits between photos and operator response (Phase 6.4.14). */
.bfl-rv2-card-criteria {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 6px;
    margin-top: 12px;
    font-size: 10.5px;
    line-height: 1.2;
    min-width: 0;
}
.bfl-rv2-card-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}
.bfl-rv2-card-chip-label {
    color: #64748b;
    font-weight: 500;
}
.bfl-rv2-card-chip-val {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 11.5px;
    font-weight: 600;
    color: #0f172a;
}
.bfl-rv2-card-chip-sep {
    color: #cbd5e1;
}

@media (max-width: 480px) {
    .bfl-rv2-card-criteria {
        font-size: 11px;
    }
}
@media (max-width: 360px) {
    body.bfl-v2 .bfl-rv2-section .bfl-rv2-ring-svg {
        width: 56px;
        height: 56px;
    }
    body.bfl-v2 .bfl-rv2-section .bfl-rv2-ring-num {
        font-size: 16px;
    }
}

/* ----------------------------------------------------------------
   Phase 6.4.12 — operator response block (per-card reply)
   ---------------------------------------------------------------- */
body.bfl-v2 .bfl-rv2-section .bfl-rv2-card-response {
    margin: 12px 0 4px 0 !important;
    padding: 10px 14px !important;
    background: #fefce8 !important;
    border-left: 3px solid #fde68a !important;
    border-radius: 8px !important;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
}
body.bfl-v2 .bfl-rv2-section .bfl-rv2-card-response-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}
body.bfl-v2 .bfl-rv2-section .bfl-rv2-card-response-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #92400e !important;
    line-height: 1.2 !important;
}
body.bfl-v2 .bfl-rv2-section .bfl-rv2-card-response-icon {
    flex-shrink: 0;
    color: #92400e;
}
body.bfl-v2 .bfl-rv2-section .bfl-rv2-card-response-text {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #0f172a !important;
}

/* ----------------------------------------------------------------
   Phase 6.4.3 — photo grid + lightbox
   ---------------------------------------------------------------- */

/* "With photos" tab — sits at end of sort row with a small camera icon. */
.bfl-rv2-sort__tab--photos {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.bfl-rv2-sort__tab-icon {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}
.bfl-rv2-sort__tab-icon svg {
    width: 14px;
    height: 14px;
}

/* ----------------------------------------------------------------
   Phase 6.4.9 — "Photos from guests" aggregate strip (Pattern 1)
   Sits above the sort row; aggregates photos across all reviews of
   the tour. Per-card strips (Pattern 2) below remain unchanged.
   ---------------------------------------------------------------- */
.bfl-rv2-photo-strip {
    margin-bottom: 14px;
    padding: 14px;
    background: #fafbfc;
    border: 1px solid var(--bfl-border, #e2e8f0);
    border-radius: 14px;
}
.bfl-rv2-photo-strip__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.bfl-rv2-photo-strip__title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}
body.bfl-v2 .bfl-rv2-photo-strip__title {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}
.bfl-rv2-photo-strip__title svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.bfl-rv2-photo-strip__link {
    background: transparent !important;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--bfl-blue, #2563eb) !important;
    cursor: pointer;
    text-transform: none !important;
    letter-spacing: normal !important;
}
.bfl-rv2-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.bfl-rv2-photo-grid__item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #f1f5f9;
    border: 0;
    padding: 0;
}
.bfl-rv2-photo-grid__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bfl-rv2-photo-grid__item.is-overflow::after {
    content: "+" attr(data-overflow-count);
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 18px;
    color: #fff;
    letter-spacing: -0.01em;
    border-radius: 8px;
}

/* Hidden source-card stubs for photo-bearing reviews not in the
   initial visible card list. Carry data-rv2-* attrs so the lightbox
   can find attribution when the aggregate grid is clicked. */
.bfl-rv2-card--stub {
    display: none !important;
}

/* Per-card photo strip. Compact 50×50 thumbs, flex layout (Phase 6.4.5). */
.bfl-rv2-card-photos {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.bfl-rv2-card-photo {
    position: relative;
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    aspect-ratio: auto;
    overflow: hidden;
    border-radius: 6px;
    background: #f1f5f9;
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: transform 0.15s ease;
}
.bfl-rv2-card-photo:hover {
    transform: translateY(-1px);
}
.bfl-rv2-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bfl-rv2-card-photo__overflow {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    color: #ffffff;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    pointer-events: none;
}

/* Lightbox — full-screen modal, hidden by default. */
.bfl-rv2-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}
.bfl-rv2-lightbox.is-open {
    display: flex;
}
.bfl-rv2-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: zoom-out;
}
.bfl-rv2-lightbox__stage {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bfl-rv2-lightbox__image {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

/* Counter pill top-left */
.bfl-rv2-lightbox__counter {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Close X top-right */
.bfl-rv2-lightbox__close,
.bfl-rv2-lightbox__nav {
    position: absolute;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}
.bfl-rv2-lightbox__close:hover,
.bfl-rv2-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.3);
}
.bfl-rv2-lightbox__close {
    top: 14px;
    right: 14px;
}
.bfl-rv2-lightbox__close svg {
    width: 14px;
    height: 14px;
}
.bfl-rv2-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
}
.bfl-rv2-lightbox__nav--prev {
    left: 14px;
}
.bfl-rv2-lightbox__nav--next {
    right: 14px;
}
.bfl-rv2-lightbox__nav svg {
    width: 16px;
    height: 16px;
}
.bfl-rv2-lightbox__nav[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Side attribution panel — desktop right column */
.bfl-rv2-lightbox__side {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 280px;
    max-height: 80vh;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 12px;
    padding: 16px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.bfl-rv2-lightbox__attribution {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bfl-border, #e2e8f0);
}
.bfl-rv2-lightbox__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bfl-rv2-lightbox__name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.bfl-rv2-lightbox__meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}
.bfl-rv2-lightbox__score {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}
.bfl-rv2-lightbox__text {
    font-size: 12.5px;
    line-height: 1.55;
    color: #334155;
    margin: 12px 0;
}
.bfl-rv2-lightbox__strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--bfl-border, #e2e8f0);
}
.bfl-rv2-lightbox__thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    border: 0;
    padding: 0;
    background: #f1f5f9;
    cursor: pointer;
    transition: outline-color 0.15s ease, transform 0.15s ease;
    outline: 2px solid transparent;
}
.bfl-rv2-lightbox__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bfl-rv2-lightbox__thumb:hover {
    transform: translateY(-1px);
}
.bfl-rv2-lightbox__thumb.is-active {
    outline-color: var(--bfl-blue, #2563eb);
}

/* Body scroll lock — applied by JS while lightbox is open. */
body.bfl-rv2-lightbox-open {
    overflow: hidden;
}

/* Mobile / narrow: drop the side panel below the image as a slim bar. */
@media (max-width: 768px) {
    .bfl-rv2-lightbox {
        flex-direction: column;
        padding: 60px 12px 12px;
    }
    .bfl-rv2-lightbox__stage {
        max-height: 55vh;
        margin-bottom: 12px;
    }
    .bfl-rv2-lightbox__image {
        max-height: 55vh;
    }
    .bfl-rv2-lightbox__side {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        width: 100%;
        max-width: 540px;
        max-height: none;
        padding: 12px 14px;
    }
    .bfl-rv2-lightbox__nav {
        top: 32%;
    }
}

/* Single-review variant — score column flexes to full width when histogram hides. */
.bfl-rv2-summary--single .bfl-rv2-summary__top {
    grid-template-columns: 1fr;
    text-align: center;
}
.bfl-rv2-summary--single .bfl-rv2-summary__score {
    min-width: 0;
}

/* Empty-state card */
.bfl-rv2-empty {
    background: linear-gradient(135deg, #ffffff 0%, var(--bfl-blue-soft, #eff6ff) 100%);
    border: 1px solid var(--bfl-border, #e2e8f0);
    border-radius: 14px;
    padding: 32px 22px;
    text-align: center;
}
.bfl-rv2-empty__icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    color: var(--bfl-blue, #2563eb);
}
.bfl-rv2-empty__icon svg {
    width: 100%;
    height: 100%;
}
.bfl-rv2-empty__title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}
.bfl-rv2-empty__text {
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
    margin: 0;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}
