/* =============================================================================
   WHAT TRAVELLERS SAID — the review block on a listing page.

   Chiran 2026-07-30: nobody writes a review here. The Traveler theme's own
   review section — its scorecard, its "Write a review" button and the comment
   form behind it — is gone, because comments are now closed on our listing
   types. This block replaces it with the approved reviews from the post-tour
   form, and nothing else.

   WARM IN FRONT — the criteria read "Spotless", not "Cleanliness". A listing
   page is read by travellers and by the partner; the formal names belong in the
   back office.

   Sarisara design system: violet #7700FF, green #30B300, gold #FFB700,
   navy #090920, rounded cards, generous spacing, DM Sans.
   ========================================================================== */

.sr-display {
    --sr-violet: #7700FF;
    --sr-violet-tint: rgba(119, 0, 255, .06);
    --sr-gold: #FFB700;
    --sr-ink: #090920;
    --sr-ink-2: #4b5563;
    --sr-ink-3: #6b7280;
    --sr-line: #ececef;

    font-family: 'Google Sans', system-ui, -apple-system, sans-serif;
    color: var(--sr-ink);
    max-width: 860px;
    margin: 40px 0 0;
}

/* The page's other section headings measure 26px/700 — ours rendered at 36px
   because the theme's own h2 rule won (Chiran 2026-07-31). */
.sr-display .sr-display-heading {
    font-size: 26px !important;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.02em;
    margin: 0 0 18px;
    color: var(--sr-ink);
}

/* ── the summary card: score on the left, warm criteria on the right ────── */
.sr-display-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 28px;
    padding: 20px 24px;
    margin: 0 0 20px;
    background: #fff;
    border: 1px solid var(--sr-line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(9, 9, 32, .03), 0 6px 16px rgba(9, 9, 32, .04);
}
.sr-display-score { display: flex; align-items: center; gap: 10px; flex: none; }
.sr-display-avg { font-size: 32px; font-weight: 800; letter-spacing: -.03em; }
.sr-display-count { font-size: 14px; color: var(--sr-ink-2); }

.sr-dstar { color: #d8d8de; font-size: 18px; }
.sr-dstar.is-filled { color: var(--sr-gold); }
.sr-display-stars { font-size: 18px; letter-spacing: 1px; }

/* Warm criteria bars — two columns on a roomy screen, one on a phone. */
.sr-display-criteria {
    list-style: none; margin: 0; padding: 0;
    flex: 1 1 320px; min-width: 260px;
    /* auto-fit, not a fixed 2 columns: inside a narrow theme column two
       columns squeezed "Slept like a baby" down to "Slept like…". */
    display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px 24px;
}
.sr-display-criterion {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64px 30px;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
/* The warm word is the point of the row — let it wrap rather than clip. */
.sr-display-criterion-label { color: var(--sr-ink-2); font-weight: 600; }
.sr-display-bar {
    height: 6px; border-radius: 9999px; background: #f0f0f5; overflow: hidden;
}
.sr-display-bar i {
    display: block; height: 100%; border-radius: 9999px;
    background: linear-gradient(90deg, #7700FF, #B44DFF);
}
.sr-display-criterion-avg { font-weight: 700; text-align: right; }

/* ── one review ─────────────────────────────────────────────────────────── */
.sr-display-list { list-style: none; margin: 0; padding: 0; }
.sr-display-item { border-top: 1px solid var(--sr-line); padding: 20px 0; }
.sr-display-item:first-child { border-top: 0; padding-top: 4px; }

.sr-display-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sr-display-name { font-weight: 700; letter-spacing: -.01em; }
.sr-display-rating { margin-left: auto; }
.sr-display-badge {
    font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    padding: 3px 9px; border-radius: 9999px;
    background: var(--sr-violet-tint); color: #5C00CC;
}

.sr-display-title { font-weight: 700; margin: 10px 0 2px; }
.sr-display-comment { margin: 8px 0 0; color: #374151; line-height: 1.6; text-wrap: pretty; }

/* ── her memories ───────────────────────────────────────────────────────── */
.sr-display-photos {
    list-style: none; margin: 14px 0 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 8px;
}
.sr-display-photo { margin: 0; }
/* 100x100, deliberately small (Chiran 2026-07-31). The note lives in the
   overlay, where there is room to read it. !important on the fill and border
   because the Traveler theme paints every <button> with its gold. */
.sr-display .sr-display-photo-btn {
    display: block; position: relative;
    width: 100px; height: 100px;
    padding: 0 !important; cursor: pointer;
    border: 1px solid #f0ecec !important;
    background: #1a1a24 !important;
    border-radius: 10px; overflow: hidden;
    text-shadow: none; box-shadow: none;
    transition: border-color 150ms, box-shadow 150ms;
}
.sr-display .sr-display-photo-btn:hover { border-color: #D9C7F7 !important; box-shadow: 0 2px 10px rgba(9, 9, 32, .08) !important; }
.sr-display .sr-display-photo-btn:focus-visible { outline: 3px solid var(--sr-violet); outline-offset: 2px; }
.sr-display-photo-frame { position: relative; display: block; width: 100%; height: 100%; }
.sr-display-photo-frame img,
.sr-display-photo-frame video {
    display: block; width: 100%; height: 100%; object-fit: cover;
    background: #1a1a24; pointer-events: none;
}
.sr-display-photo-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255, 255, 255, .18); border: 1.5px solid rgba(255, 255, 255, .7);
    color: #fff; font-size: 12px; padding-left: 2px;
}

/* ── date + the vote ────────────────────────────────────────────────────── */
.sr-display-meta {
    display: flex; align-items: center; gap: 14px; margin: 12px 0 0; flex-wrap: wrap;
}
.sr-display-date { font-size: 12.5px; color: var(--sr-ink-3); }

/* THUMBS UP / THUMBS DOWN, one vote per reader. "Helpful" only ever recorded
   agreement, so it could not say whether people liked a review (Chiran
   2026-07-31). !important throughout because the Traveler theme fills every
   <button> with its gold. */
.sr-display-votes { display: inline-flex; align-items: center; gap: 8px; }
.sr-display .sr-display-vote {
    appearance: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    font-family: inherit; font-size: 12.5px; font-weight: 700; line-height: 1;
    padding: 6px 13px; border-radius: 9999px;
    background: #fff !important;
    color: var(--sr-ink-2) !important;
    border: 1px solid var(--sr-line) !important;
    text-shadow: none;
    transition: border-color 160ms, color 160ms, background 160ms;
}
.sr-display .sr-display-vote svg { display: block; }
.sr-display .sr-display-vote:hover:not(:disabled) {
    border-color: #D9C7F7 !important; color: #5C00CC !important;
}
.sr-display .sr-display-vote:focus-visible { outline: 3px solid var(--sr-violet); outline-offset: 2px; }
.sr-display .sr-display-vote:disabled { cursor: default; opacity: .75; }
/* The one they picked stays lit: green for up, red for down. */
.sr-display .sr-display-vote--up.is-chosen {
    background: rgba(48, 179, 0, .10) !important; color: #1E7A00 !important; border-color: #A8E39A !important; opacity: 1;
}
.sr-display .sr-display-vote--down.is-chosen {
    background: rgba(229, 36, 59, .08) !important; color: #B91C2F !important; border-color: #F3B6BE !important; opacity: 1;
}
.sr-display-vote-count { font-variant-numeric: tabular-nums; }
.sr-display-vote-said { font-size: 12px; color: var(--sr-ink-3); }

/* ── the memory overlay ─────────────────────────────────────────────────── */
body.srd-open { overflow: hidden; }
.srd-overlay {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    background: rgba(9, 9, 32, .9);
}
.srd-overlay[hidden] { display: none; }
.srd-dialog {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    grid-template-areas: 'prev stage next' 'cap cap cap' 'count count count';
    align-items: center; gap: 10px;
    width: min(1100px, 92vw);
    font-family: 'Google Sans', system-ui, -apple-system, sans-serif;
}
.srd-stage { grid-area: stage; display: flex; align-items: center; justify-content: center; }
/* A picture and a video at the same scale — never filling the screen. */
.srd-stage img, .srd-stage video {
    max-width: 100%; max-height: 74vh; width: auto; height: auto;
    border-radius: 12px; background: #000; display: block;
}
/* Transparent, like the trace page's carousel — the theme's gold button fill
   was winning here and the arrows came out yellow (Chiran 2026-07-31). */
.srd-overlay .srd-nav {
    appearance: none; cursor: pointer;
    width: 46px; height: 46px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .35) !important;
    background: rgba(255, 255, 255, .10) !important;
    color: #fff !important; font-size: 26px; line-height: 1;
    padding: 0 !important; text-shadow: none; box-shadow: none;
}
.srd-nav--prev { grid-area: prev; justify-self: start; }
.srd-nav--next { grid-area: next; justify-self: end; }
.srd-overlay .srd-nav:hover { background: rgba(255, 255, 255, .2) !important; }
.srd-nav:focus-visible, .srd-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.srd-overlay .srd-close {
    position: absolute; top: -46px; right: 0;
    appearance: none; cursor: pointer;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .35) !important;
    background: rgba(255, 255, 255, .10) !important;
    color: #fff !important; font-size: 22px; line-height: 1;
    padding: 0 !important; text-shadow: none; box-shadow: none;
}
.srd-caption { grid-area: cap; margin: 0; text-align: center; color: #fff; font-size: 14px; line-height: 1.5; }
.srd-counter { grid-area: count; margin: 0; text-align: center; color: rgba(255, 255, 255, .6); font-size: 12px; }

@media (max-width: 640px) {
    .srd-dialog { grid-template-columns: 40px minmax(0, 1fr) 40px; width: 94vw; }
    .srd-nav { width: 38px; height: 38px; font-size: 22px; }
}

/* ── the partner's reply ────────────────────────────────────────────────── */
.sr-display-response {
    margin: 14px 0 0;
    padding: 12px 15px;
    background: var(--sr-violet-tint);
    border-left: 3px solid var(--sr-violet);
    border-radius: 10px;
    font-size: 14px; line-height: 1.55; color: #374151;
}
.sr-display-response strong { color: #5C00CC; }

/* ── sort + show more ───────────────────────────────────────────────────── */
.sr-display-sort { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.sr-display-sort[hidden] { display: none; }
.sr-display-sort-label { font-size: 13px; font-weight: 600; color: var(--sr-ink-2); }
.sr-display .sr-display-sort-select {
    font-family: inherit; font-size: 13px; font-weight: 600;
    padding: 7px 32px 7px 12px; border-radius: 9999px;
    border: 1px solid var(--sr-line) !important;
    background: #fff !important; color: var(--sr-ink) !important;
    min-height: 0; height: auto; line-height: 1.3;
}
.sr-display .sr-display-more {
    display: inline-flex; align-items: center; gap: 7px;
    margin: 18px 0 0; cursor: pointer;
    font-family: inherit; font-size: 13px; font-weight: 700;
    padding: 10px 22px; border-radius: 9999px;
    border: 1px solid var(--sr-violet) !important;
    background: #fff !important; color: var(--sr-violet) !important;
    text-shadow: none; box-shadow: none;
    transition: background 150ms;
}
.sr-display .sr-display-more:hover { background: rgba(119, 0, 255, .06) !important; }
.sr-display .sr-display-more:focus-visible { outline: 3px solid var(--sr-violet); outline-offset: 2px; }

.sr-display-empty { color: var(--sr-ink-2); }

@media (max-width: 640px) {
    .sr-display-criteria { grid-template-columns: minmax(0, 1fr); }
    .sr-display-summary { gap: 18px; padding: 18px; }
    .sr-display-rating { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .sr-display .sr-display-vote { transition: none; }
}

/* The block now renders at the FOOT of a listing page (Chiran 2026-08-12), after
   the last section the page builder drew, rather than inside the description.
   It sits outside the builder's wrappers, so it brings its own breathing room. */
.sr-display-foot {
  margin-top: 34px;
  margin-bottom: 44px;
}
