/* ============================================================
   UNIFIED LISTING CARD — shared structure
   (app/views/properties/_listing_card.html.erb)
   ------------------------------------------------------------
   Linked by BOTH the main site (application.html.erb) and the
   resort spin-offs (application.html+spinoff.erb), AFTER each
   site's own stylesheet. Visual identity comes entirely from the
   --lc-* tokens defined per-site in application.css / spinoff.css;
   the structure below is site-agnostic. */
@layer components {
  .lc {
    position: relative;
    display: flex;
    flex-direction: column;
    /* Fill the grid cell so cards in a row are equal height. On the main site
       .lc sits inside a wrapper grid item (location-filter / __wrapper); on the
       spin-off it is the grid item itself — 100% is correct for both. */
    height: 100%;
    background: var(--lc-card-bg);
    border-radius: 22px;
    overflow: hidden;
    font-family: var(--lc-font-body);
    box-shadow: 0 1px 2px rgba(20, 18, 15, .05), 0 12px 32px -12px rgba(20, 18, 15, .18);
    transition: transform .25s ease, box-shadow .25s ease;
  }
  .lc:hover {
    transform: translateY(-4px);
    box-shadow: 0 2px 4px rgba(20, 18, 15, .06), 0 26px 50px -18px rgba(20, 18, 15, .30);
  }
  .lc.hide, .lc.date-hide { display: none; }

  /* Whole-card link overlay; interactive children are raised above it. */
  .lc-link { position: absolute; inset: 0; z-index: 1; border-radius: 22px; }
  .lc-link:focus-visible { outline: 2px solid var(--lc-accent); outline-offset: -3px; }

  /* Media + photo carousel */
  .lc-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--lc-accent-soft); }
  .lc-slides { display: flex; width: 100%; height: 100%; transition: transform .4s cubic-bezier(.4, 0, .2, 1); }
  .lc-slides img { min-width: 100%; width: 100%; height: 100%; object-fit: cover; display: block; }

  .lc-badge {
    position: absolute; top: 14px; left: 14px; z-index: 2;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border-radius: 999px;
    background: rgba(20, 18, 15, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .01em;
  }
  .lc-badge svg { width: 14px; height: 14px; }

  .lc-heart {
    position: absolute; top: 12px; right: 12px; z-index: 3;
    width: 38px; height: 38px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
    background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    display: grid; place-items: center; transition: transform .15s ease, background .15s ease;
  }
  .lc-heart:hover { transform: scale(1.08); background: #fff; }
  .lc-heart svg { width: 20px; height: 20px; fill: none; stroke: var(--lc-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: fill .15s ease, stroke .15s ease; }
  .lc-heart--saved svg { fill: var(--lc-accent); stroke: var(--lc-accent); }

  .lc-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
    background: rgba(255, 255, 255, .9); box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
    display: grid; place-items: center; opacity: 0; transition: opacity .2s ease;
  }
  .lc:hover .lc-nav { opacity: 1; }
  .lc-nav:focus-visible { opacity: 1; outline: 2px solid var(--lc-accent); outline-offset: 2px; }
  .lc-nav--prev { left: 12px; }
  .lc-nav--next { right: 12px; }
  .lc-nav svg { width: 16px; height: 16px; stroke: var(--lc-ink); stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

  .lc-dots { position: absolute; bottom: 12px; left: 0; right: 0; z-index: 2; display: flex; gap: 6px; justify-content: center; }
  .lc-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .55); transition: width .2s ease, background .2s ease; }
  .lc-dots i.is-active { background: #fff; width: 18px; border-radius: 3px; }

  /* Body */
  .lc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; }
  .lc-title { display: block; font-family: var(--lc-font-title); font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; color: var(--lc-ink); }
  .lc-loc { display: block; margin-top: 4px; font-size: 14px; color: var(--lc-muted); }

  .lc-meta { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-size: 14px; color: var(--lc-muted); }
  .lc-amt { color: var(--lc-ink); font-weight: 600; }
  .lc-dot { opacity: .45; }
  .lc-star { display: inline-flex; align-items: center; gap: 4px; }
  .lc-star svg { width: 14px; height: 14px; fill: var(--lc-star); stroke: var(--lc-star); }

  /* Open-date pills — the signature tap-to-book feature */
  .lc-dates { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--lc-line); }
  .lc-eyebrow { display: flex; align-items: center; gap: 6px; margin-bottom: 9px; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--lc-accent); }
  .lc-eyebrow svg { width: 13px; height: 13px; stroke: var(--lc-accent); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
  .lc-pills { display: flex; flex-wrap: wrap; gap: 8px; }
  .lc-pill { position: relative; z-index: 3; border: 1.5px solid var(--lc-line); background: var(--lc-card-bg); border-radius: 999px; padding: 8px 14px; font-size: 13.5px; font-weight: 700; color: var(--lc-ink); text-decoration: none; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
  .lc-pill:hover { border-color: var(--lc-accent); background: var(--lc-accent-soft); color: var(--lc-accent); }

  /* Live trip total (spin-off date search) — replaces the pills while shown */
  .lc-price { position: relative; z-index: 2; margin-top: 12px; }
  .lc-price[hidden] { display: none; }
  .lc-price .tp { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
  .lc-price .now { font-family: var(--lc-font-title); font-size: 19px; font-weight: 700; color: var(--lc-ink); letter-spacing: -.01em; }
  .lc-price .was { font-size: 14px; color: var(--lc-muted); text-decoration: line-through; }
  .lc-price .save { font-size: 11px; font-weight: 700; color: #2f6b4f; background: #eaf5ef; border-radius: 999px; padding: 3px 9px; }
  .lc-price .lbl { margin-top: 2px; font-size: 11.5px; color: var(--lc-muted); }

  /* Giveaway tag + live-search states (spin-off only) */
  .lc.is-giveaway { box-shadow: 0 0 0 1.5px var(--lc-accent), 0 12px 32px -12px rgba(20, 18, 15, .18); }
  .lc-givetag { position: absolute; top: 12px; left: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; background: #0f1014; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 6px 12px; border-radius: 999px; }
  .lc-givetag .pulse { width: 6px; height: 6px; border-radius: 50%; background: #7ed957; animation: lc-pulse 1.8s infinite; }
  .lc.checking { pointer-events: none; animation: lc-checking 1.1s ease-in-out infinite alternate; }
  @keyframes lc-checking { from { opacity: 1; } to { opacity: .5; } }
  @keyframes lc-pulse { 0% { box-shadow: 0 0 0 0 rgba(126, 217, 87, .6); } 70% { box-shadow: 0 0 0 7px rgba(126, 217, 87, 0); } 100% { box-shadow: 0 0 0 0 rgba(126, 217, 87, 0); } }

  @media (max-width: 480px) { .lc-nav { opacity: 1; } }

  /* ============================================================
     DETAIL HERO — shared title + photo grid + lightbox + meta line
     (_detail_hero.html.erb, _detail_meta.html.erb)
     Identical structure on Stay Utah and the spin-offs; themed via the
     --lc-* tokens. The .gallery grid + .lbox carousel used to be duplicated
     in application.css and spinoff.css — consolidated here so editing one
     changes both and they can never drift. The grid layout is unchanged. */
  .detail-hero { margin-top: 8px; }
  .detail-hero__bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 6px 0 16px; }
  .detail-hero__heading { min-width: 0; }
  .detail-hero__badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--lc-accent); margin-bottom: 6px; }
  .detail-hero__title { font-family: var(--lc-font-title); font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; letter-spacing: -.025em; line-height: 1.08; color: var(--lc-ink); }
  .detail-hero__actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
  .detail-hero__action { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 8px 10px; border-radius: 10px; font-family: var(--lc-font-body); font-size: 14px; font-weight: 600; color: var(--lc-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; transition: background .15s ease; }
  .detail-hero__action:hover { background: rgba(0, 0, 0, .05); }
  .detail-hero__action svg { width: 17px; height: 17px; }
  .detail-hero__save svg { fill: none; stroke: currentColor; stroke-width: 2; }
  .detail-hero__save--saved svg { fill: var(--lc-accent); stroke: var(--lc-accent); }

  /* Photo grid — big hero + four thumbs (kept exactly as before on both sites) */
  .gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 10px; border-radius: 20px; overflow: hidden; position: relative; }
  .gallery button { border: 0; padding: 0; cursor: pointer; overflow: hidden; background: linear-gradient(145deg, #EDEFF3, #C7CCD6); }
  .gallery button:first-child { grid-row: span 2; }
  .gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
  .gallery button:hover img { transform: scale(1.04); }
  .gallery .all { position: absolute; right: 14px; bottom: 14px; background: #fff; border: 1px solid var(--lc-line); border-radius: 999px; font-size: 12.5px; font-weight: 600; padding: 8px 16px; cursor: pointer; box-shadow: 0 8px 20px -10px rgba(17, 18, 16, .3); }
  @media (max-width: 760px) {
    .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; grid-template-rows: none; height: 260px; border-radius: 16px; }
    .gallery button { flex: 0 0 88%; scroll-snap-align: start; }
    .gallery button:first-child { grid-row: auto; }
  }

  /* Photo lightbox (one-photo carousel; opens instantly, shimmer while loading) */
  .lbox { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; padding: 6vh 5vw; background: rgba(15, 12, 8, .85); backdrop-filter: blur(5px); }
  .lbox.open { display: flex; animation: lboxFade .2s ease; }
  @keyframes lboxFade { from { opacity: 0; } to { opacity: 1; } }
  .lbox-stage { position: relative; display: flex; align-items: center; justify-content: center; width: min(1100px, 90vw); height: min(82vh, 82dvh); }
  .lbox-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 12px; opacity: 0; transition: opacity .25s ease; }
  .lbox-stage img.loaded { opacity: 1; }
  .lbox-shimmer { position: absolute; inset: 0; display: none; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .06); }
  .lbox-shimmer.on { display: block; }
  .lbox-shimmer::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .14) 50%, transparent 70%); background-size: 200% 100%; animation: lboxShimmer 1.2s ease-in-out infinite; }
  @keyframes lboxShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
  .lbox-x { position: fixed; top: 16px; right: 16px; z-index: 10000; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #111210; font-size: 19px; cursor: pointer; display: grid; place-items: center; transition: background .15s ease; }
  .lbox-x:hover { background: #fff; }
  .lbox-nav { position: fixed; top: 50%; transform: translateY(-50%); z-index: 10000; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #111210; font-size: 24px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background .15s ease; }
  .lbox-nav:hover { background: #fff; }
  .lbox-nav.prev { left: 16px; }
  .lbox-nav.next { right: 16px; }
  .lbox-counter { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 10000; color: #fff; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; background: rgba(0, 0, 0, .45); border-radius: 999px; padding: 6px 14px; }
  @media (max-width: 700px) {
    .lbox { padding: 0; }
    .lbox-stage { width: 100vw; height: 100dvh; }
    .lbox-stage img { border-radius: 0; }
    .lbox-nav { width: 40px; height: 40px; font-size: 20px; }
  }

  /* Meta — "{type} in {location}" · counts · rating, under the grid */
  .detail-meta { margin-bottom: 22px; }
  .detail-meta__type { font-family: var(--lc-font-title); font-size: 21px; font-weight: 700; letter-spacing: -.015em; color: var(--lc-ink); }
  .detail-meta__counts { margin-top: 5px; font-size: 14.5px; color: var(--lc-muted); }
  .detail-meta__rating { display: flex; align-items: center; gap: 5px; margin-top: 9px; font-size: 14.5px; font-weight: 600; color: var(--lc-ink); }
  .detail-meta__star { color: var(--lc-star); }
  .detail-meta__sep { color: var(--lc-muted); }
  .detail-meta__reviews { text-decoration: underline; text-underline-offset: 2px; }

  /* ============================================================
     ABOUT — clamped preview + "Show more" that opens the full text in the
     shared editorial modal (.amodal) below. Both sites; themed via --lc-*. */
  .detail-about { margin-bottom: 28px; }
  .detail-about__title { font-family: var(--lc-font-title); font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--lc-ink); margin-bottom: 12px; }
  .detail-about__preview { font-size: 15px; line-height: 1.7; color: var(--lc-ink); }
  .detail-about__preview p { margin: 0 0 12px; }
  .detail-about__preview p:last-child { margin-bottom: 0; }
  .detail-about--clamped .detail-about__preview { position: relative; max-height: 8.4em; overflow: hidden; }
  .detail-about--clamped .detail-about__preview::after { content: ""; position: absolute; inset: auto 0 0; height: 3.2em; background: linear-gradient(transparent, var(--lc-card-bg)); pointer-events: none; }
  /* Shared "show more / show all" pill — used by the description, amenities, and
     reviews sections. Neutral grey fill, fully rounded (matches the design ref). */
  .detail-more { margin-top: 22px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 13px 26px; background: rgba(0, 0, 0, .055); border: 0; border-radius: 999px; font-family: var(--lc-font-body); font-size: 15px; font-weight: 600; color: var(--lc-ink); cursor: pointer; transition: background .15s ease, transform .08s ease; }
  .detail-more:hover { background: rgba(0, 0, 0, .09); }
  .detail-more:active { transform: scale(.985); }
  .detail-more svg { width: 15px; height: 15px; }

  /* ============================================================
     EDITORIAL MODAL (.amodal) — the shell + content styling Pecan Valley uses
     for gift-card / amenity pop-ups, now shared so the main site reuses the very
     same modal. Driven by the global spinoff--modal controller; backdrop is the
     per-site .dp-backdrop; .am-close lives per-site too. The gift-card-specific
     .smodal / .sm-* / .am-foot / .am-switch / .am-panel stay in spinoff.css. */
  /* z-index sits above BOTH sites' .dp-backdrop (spin-off 90, main site 9998),
     matching the main site's modal/lightbox convention (9999) so the dialog is
     never dimmed by its own backdrop. */
  .amodal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 9999;
    width: min(880px, calc(100vw - 40px)); height: calc(100vh - 56px); height: calc(100dvh - 56px);
    background: #fff; color: var(--lc-ink); border-radius: 24px; box-shadow: 0 40px 90px -28px rgba(0, 0, 0, .55);
    display: none; flex-direction: column; overflow: hidden; }
  .amodal.open { display: flex; animation: amIn .32s cubic-bezier(.2, .9, .3, 1.12); }
  @keyframes amIn { from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)) scale(.985); } to { opacity: 1; transform: translate(-50%, -50%); } }
  .am-kicker { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--lc-accent); text-align: center; margin: 34px 0 10px; }
  .am-title { font-size: clamp(26px, 3.2vw, 36px); font-weight: 700; letter-spacing: -.025em; text-align: center; line-height: 1.08; margin: 0 auto 6px; max-width: 18ch; color: var(--lc-ink); }
  .am-rule { width: 36px; height: 2px; background: var(--lc-accent); opacity: .55; margin: 16px auto 8px; border: 0; }
  .am-article { overflow-y: auto; overscroll-behavior: contain; flex: 1; padding: 8px max(28px, calc((100% - 660px) / 2)) 22px; }
  .am-article p { font-size: 14.5px; color: #3E3D38; line-height: 1.7; margin: 12px 0; }
  .am-article h4 { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; margin: 20px 0 2px; color: var(--lc-ink); }
  .am-article img { width: 100%; border-radius: 14px; margin: 14px 0 6px; display: block; background: linear-gradient(145deg, #EDEFF3, #C7CCD6); min-height: 120px; }
  .am-article figcaption, .am-article .cap { font-size: 11.5px; color: var(--lc-muted); margin: -2px 0 12px; }
  .am-article ul { margin: 10px 0 12px 18px; font-size: 14px; color: #3E3D38; line-height: 1.7; }
  .am-article a { color: var(--lc-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
  @media (max-width: 720px) {
    .amodal { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; height: 96vh; height: 96dvh; border-radius: 24px 24px 0 0; }
    .amodal.open { animation: amUp .35s cubic-bezier(.2, .9, .3, 1.05); }
  }
  @keyframes amUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
}

/* ───────────────────────────────────────────────────────────────────────────
   "Where you'll sleep" — Airbnb-style bedroom carousel (_detail_sleep.html.erb).
   Shared by Stay Utah and the resort spin-offs; themed per-site via the same
   --lc-* tokens as _detail_hero / _detail_meta.
   ─────────────────────────────────────────────────────────────────────────── */
@layer components {
  .detail-sleep { margin: 6px 0 28px; padding-bottom: 28px; border-bottom: 1px solid var(--lc-line); }

  .detail-sleep__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
  .detail-sleep__title { font-family: var(--lc-font-title); font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; letter-spacing: -.02em; color: var(--lc-ink); }

  .detail-sleep__arrows { display: flex; gap: 10px; flex-shrink: 0; }
  .detail-sleep__arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--lc-line); background: var(--lc-card-bg); color: var(--lc-ink); cursor: pointer; display: grid; place-items: center; transition: background .15s ease, border-color .15s ease, opacity .15s ease; }
  .detail-sleep__arrow:hover { background: var(--lc-accent-soft); border-color: var(--lc-accent); }
  .detail-sleep__arrow svg { width: 18px; height: 18px; }
  .detail-sleep__arrow:disabled { opacity: .3; cursor: default; }
  .detail-sleep__arrow:disabled:hover { background: var(--lc-card-bg); border-color: var(--lc-line); }

  /* Two cards per view on desktop; the track scroll-snaps card to card. */
  .detail-sleep__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 24px) / 2);
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .detail-sleep__track::-webkit-scrollbar { display: none; }

  .sleep-card { scroll-snap-align: start; min-width: 0; }
  .sleep-card__media { display: block; width: 100%; border: 0; padding: 0; cursor: pointer; aspect-ratio: 3 / 2; border-radius: 14px; overflow: hidden; background: linear-gradient(145deg, #EDEFF3, #C7CCD6); }
  .sleep-card__media img { transition: transform .4s ease; }
  .sleep-card:hover .sleep-card__media img { transform: scale(1.03); }
  .sleep-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .sleep-card__name { margin-top: 14px; font-family: var(--lc-font-title); font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: var(--lc-ink); }
  .sleep-card__beds { margin-top: 3px; font-size: 15px; color: var(--lc-muted); }

  /* Phones: one card peeking the next, native scroll (arrows hidden). */
  @media (max-width: 760px) {
    .detail-sleep__arrows { display: none; }
    .detail-sleep__track { grid-auto-columns: 82%; gap: 14px; }
  }
}

/* ───────────────────────────────────────────────────────────────────────────
   Amenities — a two-column preview (icon + label) and a "Show all N amenities"
   button that opens the full, categorized, searchable list in the shared
   .amodal (_detail_amenities.html.erb). Shared by Stay Utah and the resort
   spin-offs; icons come from the amenity_icon helper; themed per-site via the
   same --lc-* tokens. The modal search is driven by the amenity-search
   controller.
   ─────────────────────────────────────────────────────────────────────────── */
@layer components {
  .detail-amenities { margin: 6px 0 28px; padding-bottom: 28px; border-bottom: 1px solid var(--lc-line); }
  .detail-amenities__title { font-family: var(--lc-font-title); font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; letter-spacing: -.02em; color: var(--lc-ink); margin-bottom: 16px; }

  .detail-amenities__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 28px; }
  .detail-amenities__item { display: flex; align-items: center; gap: 16px; padding: 11px 0; font-size: 15px; color: var(--lc-ink); }

  /* The line icon next to each amenity (preview + modal). */
  .amenity-ico { width: 26px; height: 26px; flex-shrink: 0; color: var(--lc-ink); }

  /* "Show all" modal — a fixed title + search header above the scrollable list. */
  .amenity-modal__head { flex-shrink: 0; padding: 28px max(28px, calc((100% - 660px) / 2)) 14px; }
  .amenity-modal__title { font-family: var(--lc-font-title); font-size: clamp(24px, 3vw, 30px); font-weight: 700; letter-spacing: -.02em; color: var(--lc-ink); margin: 0 0 16px; }

  .amenity-search { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border: 1px solid var(--lc-line); border-radius: 14px; }
  .amenity-search svg { width: 20px; height: 20px; color: var(--lc-muted); flex-shrink: 0; }
  .amenity-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-family: var(--lc-font-body); font-size: 16px; color: var(--lc-ink); }
  .amenity-search input::placeholder { color: var(--lc-muted); }
  .amenity-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

  .amenity-modal .am-article { padding-top: 4px; }
  .amenity-group { margin-bottom: 26px; }
  .amenity-group:last-of-type { margin-bottom: 6px; }
  .amenity-group__name { font-family: var(--lc-font-title); font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: var(--lc-ink); margin: 0 0 4px; }
  .amenity-list { list-style: none; margin: 0; padding: 0; }
  .amenity-row { display: flex; align-items: center; gap: 16px; padding: 11px 0; font-size: 15px; color: var(--lc-ink); }
  .amenity-row[hidden], .amenity-group[hidden] { display: none; }
  .amenity-empty { padding: 18px 0; color: var(--lc-muted); font-size: 15px; }

  @media (max-width: 560px) {
    .detail-amenities__grid { grid-template-columns: 1fr; gap: 0; }
  }
}

/* ───────────────────────────────────────────────────────────────────────────
   Room-tabbed photo gallery (_detail_gallery.html.erb) — the full-screen
   "all photos" view. Back-arrow + centered title bar, a scrollable tab bar
   (boxed active tab), and sections laid out as title-left / photo-grid-right.
   Shared by both sites; the photo zoom reuses the .lbox styles above.
   ─────────────────────────────────────────────────────────────────────────── */
@layer components {
  .rgallery { position: fixed; inset: 0; z-index: 9990; background: var(--lc-card-bg); display: none; flex-direction: column; }
  .rgallery.open { display: flex; animation: rgFade .2s ease; }
  @keyframes rgFade { from { opacity: 0 } to { opacity: 1 } }

  .rgallery__bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 12px 18px; flex-shrink: 0; }
  .rgallery__back { justify-self: start; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--lc-accent-soft); color: var(--lc-ink); cursor: pointer; display: grid; place-items: center; transition: filter .15s ease; }
  .rgallery__back:hover { filter: brightness(.94); }
  .rgallery__back svg { width: 20px; height: 20px; }
  .rgallery__title { grid-column: 2; text-align: center; font-family: var(--lc-font-title); font-weight: 700; font-size: 17px; letter-spacing: -.01em; color: var(--lc-ink); }

  .rgallery__tabwrap { position: relative; border-bottom: 1px solid var(--lc-line); flex-shrink: 0; }
  .rgallery__tabs { display: flex; gap: 4px; padding: 9px 54px 9px 18px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
  .rgallery__tabs::-webkit-scrollbar { display: none; }
  .rgallery__tab { white-space: nowrap; border: 1px solid transparent; border-radius: 9px; background: transparent; padding: 8px 14px; font-family: var(--lc-font-body); font-size: 15px; font-weight: 600; color: var(--lc-muted); cursor: pointer; transition: color .15s ease, border-color .15s ease, background .15s ease; }
  .rgallery__tab:hover { color: var(--lc-ink); background: var(--lc-accent-soft); }
  .rgallery__tab.is-active { color: var(--lc-ink); border-color: var(--lc-ink); }
  .rgallery__tabnext { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--lc-line); background: var(--lc-card-bg); color: var(--lc-ink); cursor: pointer; display: grid; place-items: center; box-shadow: -16px 0 18px -6px var(--lc-card-bg); }
  .rgallery__tabnext svg { width: 16px; height: 16px; }
  .rgallery__tabnext[hidden] { display: none; }

  .rgallery__scroll { flex: 1; overflow-y: auto; padding: 12px clamp(18px, 4vw, 60px) 60px; }
  .rgallery__section { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; max-width: 1500px; margin: 0 auto; padding: 28px 0; scroll-margin-top: 8px; }
  .rgallery__section-title { font-family: var(--lc-font-title); font-size: 22px; font-weight: 700; letter-spacing: -.015em; color: var(--lc-ink); }
  .rgallery__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .rgallery__photo { border: 0; padding: 0; cursor: pointer; overflow: hidden; border-radius: 12px; background: linear-gradient(145deg, #EDEFF3, #C7CCD6); aspect-ratio: 3 / 2; }
  .rgallery__photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
  .rgallery__photo:hover img { transform: scale(1.03); }

  @media (max-width: 820px) {
    .rgallery__section { grid-template-columns: 1fr; gap: 12px; padding: 20px 0; }
    .rgallery__grid { grid-template-columns: 1fr; }
    .rgallery__scroll { padding: 8px 16px 48px; }
  }
}

/* ───────────────────────────────────────────────────────────────────────────
   Reviews (_detail_reviews.html.erb) + "Where you'll be" map (_detail_map).
   Both shared by Stay Utah and the spin-offs; themed per-site via --lc-*.
   ─────────────────────────────────────────────────────────────────────────── */
@layer components {
  .detail-reviews { margin: 6px 0 28px; padding-bottom: 28px; border-bottom: 1px solid var(--lc-line); }
  .detail-reviews__title { display: flex; align-items: center; gap: 8px; font-family: var(--lc-font-title); font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; letter-spacing: -.02em; color: var(--lc-ink); margin-bottom: 20px; }
  .detail-reviews__star { color: var(--lc-star); }
  .detail-reviews__sep { color: var(--lc-muted); }
  /* One review per row (vertical list), each divided like the modal. The
     preview text is clamped — the full text lives in the "Show all reviews"
     modal below. */
  .detail-reviews__grid { display: flex; flex-direction: column; }
  .detail-reviews__grid .review-card { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--lc-line); }
  .detail-reviews__grid .review-card:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
  .detail-reviews__grid .review-card__text { display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

  .review-card__head { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
  .review-card__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--lc-accent-soft); display: grid; place-items: center; font-weight: 700; font-size: 15px; color: var(--lc-ink); flex-shrink: 0; }
  .review-card__who { display: flex; flex-direction: column; min-width: 0; }
  .review-card__who b { font-size: 14.5px; font-weight: 700; color: var(--lc-ink); }
  .review-card__date { font-size: 12.5px; color: var(--lc-muted); }
  .review-card__stars { margin-left: auto; align-self: flex-start; color: var(--lc-star); font-size: 12px; letter-spacing: 1px; white-space: nowrap; }
  .review-card__text { font-size: 14.5px; color: var(--lc-ink); line-height: 1.6; }

  /* All reviews, single column, inside the shared .amodal. */
  .review-modal__list { display: flex; flex-direction: column; gap: 24px; }
  .review-modal__list .review-card { padding-bottom: 24px; border-bottom: 1px solid var(--lc-line); }
  .review-modal__list .review-card:last-child { padding-bottom: 0; border-bottom: 0; }

  /* Reviews modal header: left-aligned over a wider list (not the centered,
     narrow editorial column that .am-title / .am-article give the about /
     amenity / gift-card modals). Scoped to .am-article--reviews + the dedicated
     .review-modal__title so those other shared modals are untouched. */
  .am-article--reviews { padding-left: clamp(24px, 4vw, 44px); padding-right: clamp(24px, 4vw, 44px); }
  .review-modal__title { display: flex; align-items: center; gap: 8px; font-family: var(--lc-font-title); font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: var(--lc-ink); margin: 14px 0 22px; }

  /* "Where you'll be" — map + address (shared; moved out of application.css). */
  .detail-map { margin: 6px 0 28px; padding-bottom: 28px; border-bottom: 1px solid var(--lc-line); }
  .detail-map__title { font-family: var(--lc-font-title); font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; letter-spacing: -.02em; color: var(--lc-ink); margin-bottom: 18px; }
  .detail-map__placeholder { width: 100%; height: 320px; background: linear-gradient(135deg, #eef1f4 0%, #e8ebed 50%, #eceef0 100%); border-radius: 16px; margin-bottom: 14px; border: 1px solid var(--lc-line); }
  .detail-map__container { width: 100%; margin-bottom: 14px; }
  .detail-map__canvas { width: 100%; height: 320px; border-radius: 16px; overflow: hidden; }
  .detail-map__address { font-size: 14px; color: var(--lc-muted); }

  /* "Things to know" — cancellation / house rules / safety, each with a
     Read-more link into the shared .amodal. Shared; themed via --lc-*. */
  .detail-rules { margin: 6px 0 12px; }
  .detail-rules__title { font-family: var(--lc-font-title); font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; letter-spacing: -.02em; color: var(--lc-ink); margin-bottom: 22px; }
  .detail-rules__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 40px; }
  .detail-rules__col-title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--lc-ink); margin-bottom: 14px; }
  .detail-rules__lead { font-size: 14.5px; line-height: 1.6; color: var(--lc-ink); margin: 0 0 14px; }
  .detail-rules__list { list-style: none; margin: 0; padding: 0; }
  .detail-rules__item { display: flex; align-items: center; gap: 12px; font-size: 14.5px; line-height: 1.45; color: var(--lc-ink); padding: 7px 0; }
  .detail-rules__ic { width: 20px; height: 20px; flex-shrink: 0; color: var(--lc-muted); }
  .detail-rules__more { display: inline-block; margin-top: 14px; background: none; border: 0; padding: 0; font-family: var(--lc-font-body); font-size: 14.5px; font-weight: 600; color: var(--lc-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
  .detail-rules__more:hover { color: var(--lc-accent); }
  @media (max-width: 760px) { .detail-rules__grid { grid-template-columns: 1fr; gap: 26px; } }
}

