/* ============================================================
   SHARED TRIP PICKER  (dates + guests modal, and the search pill)
   ------------------------------------------------------------
   One component, both sites. Loaded by BOTH layouts via
   stylesheet_link_tag (like listing_card.css). The markup lives in
   app/views/shared/_trip_picker.html.erb and _search_bar.html.erb;
   behaviour in javascript/controllers/trip_picker_controller.js.

   ONLY colours/typography differ per site — each site maps the
   --tp-* tokens in its own :root (application.css for Stay Utah,
   spinoff.css for the resort spin-offs). The fallbacks below are the
   original spin-off palette, so the component still renders correctly
   if a site forgets to map a token.

   The shared shell .dp-backdrop is defined in each site's own
   stylesheet (it's also used by the auth/account modals), so it is
   intentionally NOT redefined here.
   ============================================================ */

/* ===================== dates + guests picker ===================== */
.dp { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 95; display: none; width: min(640px, calc(100vw - 32px));
  /* Cap to the viewport and scroll inside, so a tall picker (e.g. the Where tab
     with many destinations) never spills past the top/bottom out of reach. */
  max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto;
  background: #fff; color: var(--tp-ink, #111210); border-radius: var(--tp-radius, 24px); padding: 16px 24px; box-shadow: 0 40px 90px -28px rgba(0, 0, 0, .55); font-family: var(--tp-font, inherit); }
.dp.open { display: block; animation: dpIn .3s cubic-bezier(.2, .9, .3, 1.12); }
@keyframes dpIn { from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)) scale(.985); } to { opacity: 1; transform: translate(-50%, -50%); } }
.dp-tabs { display: flex; gap: 4px; background: var(--tp-tint, #F6F5F2); border-radius: 999px; padding: 4px; width: max-content; margin: 0 auto 16px; }
.dp-tabs button { border: 0; background: none; padding: 8px 26px; border-radius: 999px; font-family: var(--tp-font, inherit); font-weight: 600; font-size: 13px; cursor: pointer; color: var(--tp-mute, #73716B); transition: color .15s ease; }
.dp-tabs button.on { background: #fff; color: var(--tp-ink, #111210); box-shadow: 0 2px 10px rgba(15, 16, 20, .1); }
.dp-pane-dates { position: relative; padding-top: 2px; }
.dp-nav { position: absolute; top: 0; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--tp-line, #E8E6E1); background: #fff; cursor: pointer; font-size: 14px; display: grid; place-items: center; transition: background .15s ease; color: var(--tp-ink, #111210); }
.dp-nav:hover:not(:disabled) { background: var(--tp-tint, #F6F5F2); }
.dp-nav:disabled { opacity: .3; cursor: default; }
.dp-nav.prev { left: 0; }
.dp-nav.next { right: 0; }
.dp-months { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.dp-mlabel { font-weight: 600; font-size: 14px; text-align: center; margin-bottom: 12px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.dp-dow { font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--tp-mute, #73716B); text-align: center; padding-bottom: 6px; }
.dp-day { aspect-ratio: 1; display: grid; place-items: center; font-size: 13px; font-weight: 500; border-radius: 50%; cursor: pointer; border: 0; background: none; font-family: var(--tp-font, inherit); color: var(--tp-ink, #111210); transition: box-shadow .1s ease; min-height: 38px; }
.dp-day:hover:not(:disabled):not(.start):not(.end) { box-shadow: inset 0 0 0 1.5px var(--tp-ink, #111210); }
.dp-day:disabled { color: #CEC9C0; cursor: default; text-decoration: line-through; }
/* The first booked morning after an open night — a stay can end here but not start.
   Rendered apart from booked nights, with a tooltip saying why. */
.dp-day.co { position: relative; }
.dp-day.co:disabled:not(.end) { color: var(--tp-mute, #73716B); text-decoration: none; }
.dp-day.co::after { content: "Checkout only"; position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%);
  padding: 4px 9px; border-radius: 7px; background: var(--tp-ink, #111210); color: #fff; font-size: 10.5px; font-weight: 600;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s ease; z-index: 2; }
.dp-day.co:hover::after, .dp-day.co:focus-visible::after { opacity: 1; }
.dp-day.in { background: var(--tp-tint, #F6F5F2); border-radius: 0; }
/* A checkout on a booked morning re-renders disabled — keep it looking selected, not struck-through. */
.dp-day.start, .dp-day.end { background: var(--tp-ink, #111210); color: #fff; text-decoration: none; }
.gp-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 4px; }
.gp-label b { display: block; font-size: 15px; font-weight: 700; }
.gp-label span { font-size: 12.5px; color: var(--tp-mute, #73716B); }
.gp-hint { font-size: 12px; color: var(--tp-mute, #73716B); background: var(--tp-tint, #F6F5F2); border-radius: 12px; padding: 11px 14px; margin: 0 0 8px; }
.step { display: flex; align-items: center; gap: 14px; }
.step button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--tp-line, #E8E6E1); background: #fff; cursor: pointer; font-size: 16px; line-height: 1; display: grid; place-items: center; color: var(--tp-ink, #111210); transition: border-color .15s ease; }
.step button:hover:not(:disabled) { border-color: var(--tp-ink, #111210); }
.step button:disabled { opacity: .3; cursor: default; }
.step b { font-size: 16px; font-weight: 600; min-width: 20px; text-align: center; }
.dp-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; border-top: 1px solid var(--tp-line, #E8E6E1); padding-top: 13px; gap: 10px;
  position: sticky; bottom: 0; background: #fff; }
.dp-nights { font-size: 12.5px; color: var(--tp-mute, #73716B); font-weight: 600; }
.dp-clear { background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--tp-font, inherit); margin-right: 12px; color: var(--tp-ink, #111210); }
.dp-error { font-size: 12px; color: var(--tp-mute, #73716B); background: var(--tp-tint, #F6F5F2); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; display: none; }
.dp-error.show { display: block; }
/* The picker's confirm/search button. Was the spin-off's .btn.btn-grad.btn-sm —
   now site-themed so the main site styles it too (red CTA vs champagne gradient). */
.dp-done { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; cursor: pointer;
  font-family: var(--tp-font, inherit); font-weight: 600; font-size: 13px; padding: 8px 16px; border-radius: 999px;
  background: var(--tp-cta, var(--tp-accent, #c4a265)); color: var(--tp-on-cta, #171511); transition: opacity .15s ease; }
.dp-done:hover { opacity: .88; }
.dp-done:focus-visible { outline: 2px solid var(--tp-ink, #111210); outline-offset: 2px; }

@media (max-width: 720px) {
  .dp { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: 88vh; max-height: 88dvh; overflow-y: auto;
    border-radius: 24px 24px 0 0; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); }
  .dp.open { animation: dpUp .35s cubic-bezier(.2, .9, .3, 1.05); }
  @keyframes dpUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
  .dp-months { grid-template-columns: 1fr; }
  .dp-months > div:nth-child(2) { display: none; }
  .dp-day { min-height: 44px; font-size: 14px; }
  .dp-foot { position: sticky; bottom: 0; background: #fff; padding-bottom: 4px; }
}

/* ===================== booking card =====================
   The shared booking card (app/views/shared/_booking_card.html.erb). Visual
   only — stickiness/placement is the container's concern (Stay Utah's sticky
   sidebar; the spin-off scopes `.bk-card { position: sticky }` in its own
   stylesheet). The controller writes the price breakdown into .bk-price. */
.bk-card { border: 1px solid var(--tp-line, #E8E6E1); border-radius: var(--tp-radius, 20px); padding: 22px; box-shadow: 0 28px 60px -32px rgba(17, 18, 16, .28); background: #fff; color: var(--tp-ink, #111210); font-family: var(--tp-font, inherit); }

/* host row (Stay Utah) */
.bk-host { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--tp-line, #E8E6E1); }
.bk-host-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--tp-ink, #111210); flex-shrink: 0; }
.bk-host-info { display: flex; flex-direction: column; }
.bk-host-name { font-size: 14px; font-weight: 600; }
.bk-host-sub { font-size: 12px; color: var(--tp-mute, #73716B); }

/* promo banner (spin-offs) */
.bk-deal { background: var(--tp-tint, #F6F5F2); border: 1px solid var(--tp-line, #E8E6E1); border-radius: 12px; font-size: 12.5px; font-weight: 600; padding: 9px 13px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.bk-deal .d { color: var(--tp-accent, #9C8553); }

/* dates + guests fields — open the shared picker */
.bk-fields { border: 1px solid var(--tp-line, #E8E6E1); border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.bk-fields button { display: flex; flex-direction: column; width: 100%; border: 0; background: #fff; text-align: left; padding: 11px 16px; cursor: pointer; font-family: var(--tp-font, inherit); }
.bk-fields button:first-child { border-bottom: 1px solid var(--tp-line, #E8E6E1); }
.bk-fields button:hover { background: var(--tp-tint, #F6F5F2); }
.bk-fields span { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--tp-mute, #73716B); }
.bk-fields b { font-size: 14px; font-weight: 500; color: var(--tp-ink, #111210); }
.bk-fields b.empty { color: var(--tp-mute, #73716B); font-weight: 400; }

/* price (written by the controller; .show toggles it on) */
.bk-price { display: none; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.bk-price.show { display: block; }
.bk-prompt { font-size: 17px; font-weight: 600; color: var(--tp-ink, #111210); }
.bk-price .amount { font-weight: 700; font-size: 24px; }
.bk-price .nights { font-size: 13px; color: var(--tp-mute, #73716B); }
.bk-price > .nights { display: block; text-align: center; }
.bk-total { display: grid; gap: 4px; padding: 14px; margin-bottom: 8px; border: 1px solid color-mix(in srgb, var(--tp-accent, #9C8553) 28%, var(--tp-line, #E8E6E1)); border-radius: 14px; background: color-mix(in srgb, var(--tp-accent, #9C8553) 8%, #fff); }
.bk-total-label { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tp-mute, #73716B); }
.bk-total-main { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bk-total-amount { font-size: 27px; line-height: 1; font-weight: 700; color: var(--tp-ink, #111210); }
.bk-total-nights { font-size: 13px; color: var(--tp-mute, #73716B); }
.bk-total-copy { font-size: 12.5px; line-height: 1.35; color: var(--tp-ink, #111210); }
.bk-breakdown { border: 1px solid var(--tp-line, #E8E6E1); border-radius: 12px; overflow: hidden; background: #fff; }
.bk-breakdown summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--tp-ink, #111210); }
.bk-breakdown summary::-webkit-details-marker { display: none; }
.bk-breakdown summary::after { content: "↓"; font-size: 14px; line-height: 1; color: var(--tp-accent, #9C8553); transition: transform .16s ease; }
.bk-breakdown[open] summary { border-bottom: 1px solid var(--tp-line, #E8E6E1); }
.bk-breakdown[open] summary::after { transform: rotate(180deg); }
.bk-price-lines { width: 100%; display: grid; gap: 7px; font-size: 13.5px; }
.bk-price-lines div { display: flex; justify-content: space-between; gap: 12px; }
.bk-breakdown .bk-price-lines { padding: 12px 13px; }
.bk-price-lines span { min-width: 0; }
.bk-price-lines small { display: block; margin-top: 2px; max-width: 180px; font-size: 11px; line-height: 1.3; font-weight: 400; color: var(--tp-mute, #73716B); }
.bk-price-lines b { font-weight: 600; }
.bk-price-total { border-top: 1px solid var(--tp-line, #E8E6E1); padding-top: 9px; margin-top: 2px; font-weight: 700; }

/* reserve CTA — themed (red on Stay Utah, gradient on spin-offs) */
.bk-reserve { width: 100%; border: 0; cursor: pointer; font-family: var(--tp-font, inherit); font-weight: 600; font-size: 15px; padding: 14px; border-radius: 12px; background: var(--tp-cta, var(--tp-accent, #9C8553)); color: var(--tp-on-cta, #171511); transition: opacity .15s ease; }
.bk-reserve:hover { opacity: .9; }
.bk-reserve:disabled { opacity: .55; cursor: default; }
.bk-note { text-align: center; font-size: 12px; color: var(--tp-mute, #73716B); margin-top: 10px; }

/* included-with-stay list (spin-offs) */
.bk-incl { margin-top: 16px; border-top: 1px solid var(--tp-line, #E8E6E1); padding-top: 14px; display: grid; gap: 7px; }
.bk-incl div { display: flex; gap: 9px; font-size: 12.5px; color: var(--tp-ink, #111210); }
.bk-incl .d { color: var(--tp-accent, #9C8553); font-weight: 700; }

/* price-match guarantee (Stay Utah) */
.bk-guarantee { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 14px; background: var(--tp-tint, #F6F5F2); border-radius: 12px; }
.bk-guarantee svg { flex-shrink: 0; color: var(--tp-accent, #9C8553); margin-top: 2px; }
.bk-guarantee strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.bk-guarantee p { font-size: 12px; color: var(--tp-mute, #73716B); }

/* ===================== mobile booking bar =====================
   Self-contained fixed bottom bar (app/views/shared/_booking_bar.html.erb),
   shown only on small screens where the inline .bk-card is hidden. Visual only
   and themed via --tp-* tokens; each site flips `display` to flex at its own
   breakpoint (Stay Utah ≤1024px in application.css, the spin-offs ≤920px in
   spinoff.css) and reserves the matching bottom padding there. Sits below the
   trip-picker modal/backdrop (z-index 90–95) so opening the picker covers it. */
.booking-bar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  align-items: center; gap: 14px; padding: 11px 16px calc(11px + env(safe-area-inset-bottom, 0px));
  background: #fff; border-top: 1px solid var(--tp-line, #E8E6E1);
  box-shadow: 0 -10px 30px -20px rgba(17, 18, 16, .4); font-family: var(--tp-font, inherit); color: var(--tp-ink, #111210); }
.bb-summary { flex: 1 1 auto; min-width: 0; display: block; text-align: left; border: 0; background: none; padding: 0; cursor: pointer; font-family: inherit; color: inherit; }
.bb-info { display: flex; flex-direction: column; gap: 1px; font-variant-numeric: tabular-nums; }
.bb-prompt { font-size: 15px; font-weight: 600; color: var(--tp-ink, #111210); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-prompt b { font-weight: 700; }
/* Tap-to-edit cue (underlined): "Add dates" before a selection, "Change dates" after. */
.bb-cue { color: var(--tp-ink, #111210); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.bb-sub { font-size: 12px; color: var(--tp-mute, #73716B); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-cta { flex: 0 0 auto; border: 0; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 15px; padding: 13px 26px; border-radius: 12px;
  background: var(--tp-cta, var(--tp-accent, #9C8553)); color: var(--tp-on-cta, #171511); transition: opacity .15s ease; }
.bb-cta:hover { opacity: .9; }

/* ===================== search pill =====================
   The shared, self-contained search bar (app/views/shared/_search_bar.html.erb +
   search_bar_controller.js). Decoupled from layout: intrinsic look only. Sticky
   / scroll-collapse behaviour belongs to the container it's dropped into — the
   header-scoped overrides below apply only inside a <header.mini> (Pecan Valley);
   they're inert anywhere else (e.g. Stay Utah's hero). */
.nav-mini { position: relative; display: flex; align-items: stretch; justify-content: space-between; border: 1px solid var(--tp-line, #E8E6E1); background: #fff; border-radius: 999px;
  padding: 0 6px 0 12px; font-family: var(--tp-font, inherit); cursor: pointer; white-space: nowrap; color: var(--tp-ink, #111210);
  flex: 1 1 auto; min-width: 120px; max-width: 520px; margin: 0 18px;
  box-shadow: 0 6px 22px -14px rgba(17, 18, 16, .22); transition: box-shadow .2s ease, border-color .2s ease, max-width .28s cubic-bezier(.4, 0, .2, 1), padding .28s ease; }
.nav-mini:hover { box-shadow: 0 12px 30px -16px rgba(17, 18, 16, .32); border-color: #d8d4cc; }
.nm-prompt { display: none; font-size: 14px; font-weight: 600; color: var(--tp-ink, #111210); background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left; }
.nm-combo { display: flex; align-items: stretch; flex: 1; min-width: 0; }
/* Legs carry the bar's height as their own padding (nav-mini has none), so each
   pill is a full-height button — the hand cursor shows and a click lands across
   the whole pill, not just the text. The seps sit flush between them (no margin),
   leaving no dead gaps to click into. */
.nm-leg { display: flex; flex-direction: column; gap: 1px; align-items: flex-start; justify-content: center; line-height: 1.18; flex: 1; min-width: 0; background: none; border: 0; padding: 12px 14px; cursor: pointer; font-family: inherit; text-align: left; }
.nm-leg .nm-k { font-size: 9px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--tp-mute, #73716B); }
.nm-leg b { font-size: 14px; font-weight: 600; color: var(--tp-ink, #111210); }
.nm-leg b.need { color: var(--tp-accent, #9C8553); }
.nm-leg b, .nm-leg .nm-k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nav-mini .nm-sep { width: 1px; height: 24px; background: var(--tp-line, #E8E6E1); margin: 0; flex-shrink: 0; align-self: center; }
.nav-mini .nm-go { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--tp-cta, var(--tp-accent, #9C8553)); color: var(--tp-on-cta, #171511); display: grid; place-items: center; font-size: 16px; margin-left: 18px; flex-shrink: 0; align-self: center; cursor: pointer; transition: width .28s ease, height .28s ease; }
@keyframes navFlash { 0%, 100% { box-shadow: 0 0 0 0 rgba(160, 135, 90, 0); } 40% { box-shadow: 0 0 0 4px rgba(160, 135, 90, .7); } }
.nav-mini.flash { animation: navFlash 1s ease 2; }

/* sticky-header collapse — only inside a Pecan Valley header that has gone .mini */
header.mini .nav-mini { max-width: 440px; padding: 0 5px 0 8px; }
header.mini .nm-leg { padding-block: 8px; }
header.mini .nav-mini .nm-go { width: 34px; height: 34px; }

/* the where (destinations) tab — Stay Utah only, inside the shared picker */
.dp-pane-where { padding-top: 2px; }
.dp-where-title { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tp-mute, #73716B); margin-bottom: 10px; }
.dp-where-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; }
.dp-where-item { display: flex; flex-direction: column; gap: 1px; padding: 11px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--tp-ink, #111210); cursor: pointer; }
.dp-where-item:hover { background: var(--tp-tint, #F6F5F2); }
.dp-where-item.on { background: var(--tp-tint, #F6F5F2); box-shadow: inset 0 0 0 1.5px var(--tp-ink, #111210); }
.dp-where-desc { font-size: 12px; font-weight: 400; color: var(--tp-mute, #73716B); }

@media (max-width: 760px) {
  .nav-mini { flex: 1 1 auto; max-width: none; margin: 0; min-height: 42px; padding: 0 6px 0 16px; }
  .nm-combo { display: none; }
  .nm-prompt { display: flex; align-items: center; flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nm-prompt::before { content: ""; width: 15px; height: 15px; margin-right: 10px; flex-shrink: 0; background: var(--tp-ink, #111210);
    -webkit-mask: var(--tp-mag, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.5' y2='16.5'/%3E%3C/svg%3E")) center / contain no-repeat;
    mask: var(--tp-mag, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.5' y2='16.5'/%3E%3C/svg%3E")) center / contain no-repeat; }
  .nav-mini .nm-go { width: 34px; height: 34px; font-size: 14px; margin-left: 8px; }
}

/* ===================== shared site footer ===================== */
/* One minimal bar, both sites (markup: shared/_footer.html.erb). Only
   colours/typography differ per site — themed via the --tp-* tokens. */
.ft { border-top: 1px solid var(--tp-line, #E8E6E1); font-family: var(--tp-font, inherit); }
.ft-wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
  max-width: var(--tp-max, 1240px); margin-inline: auto; padding: 34px 28px; font-size: 13px; color: var(--tp-mute, #73716B); }
.ft-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.ft-nav a { color: var(--tp-mute, #73716B); transition: color .15s ease; }
.ft-nav a:hover { color: var(--tp-ink, #111210); }
