/* ═══════════════════════════════════════════════════════════════════
   CABANA STAYS · search console, v2
   ───────────────────────────────────────────────────────────────────
   Loaded after the page's own styles. Covers what the console grew:
   the phone's full-screen Where, the stay-length row and keyboard
   states of the calendar, the pets row and steppers, the currency
   chip, and the Filters dialog with its price range.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Things that float over the corner step aside while the guest is
      inside a panel, the filters or a Match sheet. ── */
body.sc-open #cbn-apa-welcome, body.fm-open #cbn-apa-welcome, html.cm-lock #cbn-apa-welcome,
body.sc-sheet #cbn-sup-root, body.fm-open #cbn-sup-root, html.cm-lock #cbn-sup-root,
body.fm-open .fab-filter, body.fm-open #agent-ref{
  opacity:0!important;pointer-events:none!important;visibility:hidden!important;transition:opacity .2s,visibility .2s;
}

/* ── Spinner shared by the status line, the button and the list ── */
.sc-spin{
  display:inline-block;width:13px;height:13px;flex-shrink:0;border-radius:50%;
  border:2px solid rgba(123,47,247,.2);border-top-color:var(--violet,#7B2FF7);
  animation:scSpin .7s linear infinite;
}
@keyframes scSpin{to{transform:rotate(360deg);}}

/* ── Primary button states ── */
.sc-go.is-busy{pointer-events:none;}
.sc-go.is-busy .sc-go-ico svg{opacity:0;}
.sc-go.is-busy .sc-go-ico{position:relative;}
.sc-go.is-busy .sc-go-ico::after{
  content:'';position:absolute;inset:0;margin:auto;width:15px;height:15px;border-radius:50%;
  border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:scSpin .7s linear infinite;
}
.sc-go.is-ready{animation:scReady 1.2s cubic-bezier(.22,1,.36,1);}
@keyframes scReady{0%{box-shadow:0 0 0 0 rgba(123,47,247,.45);}100%{box-shadow:0 0 0 18px rgba(123,47,247,0);}}

/* ── Where ── */
.loc-suggestion-name mark{background:none;color:var(--violet,#7B2FF7);font-weight:800;}
.loc-suggestion.is-inert{cursor:default;}
.loc-suggestion.is-inert:hover{background:none;}
.loc-suggestion.is-inert .loc-suggestion-ico{background:rgba(229,72,77,.1);color:#C2373B;}
.loc-suggestion.is-busy .loc-suggestion-ico{background:rgba(123,47,247,.1);}
.loc-loading{
  display:flex;align-items:center;gap:10px;padding:12px 10px;
  font-family:var(--font-ui);font-size:12px;font-weight:550;color:var(--ink-faint);
}
.loc-loading.is-tail{padding:8px 10px 4px;border-top:1px solid rgba(10,10,20,.05);margin-top:4px;}
.loc-no-result b{color:var(--ink-soft);}
.loc-m-head{display:none;}
.loc-suggestion{scroll-margin:8px;}

/* ── Calendar ── */
.cal-quick-chip{display:inline-flex;align-items:baseline;gap:6px;}
.cal-quick-chip small{font-size:10.5px;font-weight:600;opacity:.6;}
.cal-quick-chip.on small{opacity:.85;}
.cal-len{
  display:flex;align-items:center;gap:6px;flex-wrap:wrap;
  margin:-6px 0 14px;padding:10px 12px;border-radius:14px;
  background:linear-gradient(90deg,rgba(123,47,247,.06),rgba(77,150,255,.05));
  border:1px solid rgba(123,47,247,.1);
  animation:calLenIn .32s cubic-bezier(.22,1,.36,1);
}
.cal-len[hidden]{display:none;}
@keyframes calLenIn{from{opacity:0;transform:translateY(-4px);}to{opacity:1;transform:none;}}
.cal-len-lbl{
  font-family:var(--font-ui);font-size:9.5px;font-weight:750;letter-spacing:.14em;text-transform:uppercase;
  color:var(--violet,#7B2FF7);margin-right:4px;
}
.cal-len-chip{
  border:1px solid rgba(10,10,20,.1);background:#fff;border-radius:100px;padding:6px 11px;cursor:pointer;
  font-family:var(--font-ui);font-size:12px;font-weight:650;color:var(--ink-soft);
  transition:all .18s cubic-bezier(.22,1,.36,1);
}
.cal-len-chip:hover{border-color:rgba(123,47,247,.4);color:var(--violet,#7B2FF7);}
.cal-len-chip.on{background:var(--ink,#0A0A14);border-color:var(--ink,#0A0A14);color:#fff;}
.cal-wd-sticky{display:none;}
.cal-day{outline:none;}
.cal-day:focus-visible span{box-shadow:0 0 0 2px #fff,0 0 0 4px rgba(123,47,247,.6);}
.cal-day-wknd:not(.cal-day-past):not(.cal-day-in):not(.cal-day-out) span{color:var(--ink);}
.cal-day-wknd:not(.cal-day-past) span{font-weight:700;}
.cal-day-off{cursor:not-allowed;}
.cal-day-off span{color:rgba(10,10,20,.22)!important;background:none!important;text-decoration:line-through;text-decoration-color:rgba(10,10,20,.15);}
.cal-day-preview::before{background:repeating-linear-gradient(90deg,rgba(123,47,247,.09) 0 6px,rgba(123,47,247,.05) 6px 12px)!important;}
.cal-sel-item{padding:6px 10px;margin:-6px -10px;border-radius:12px;transition:background .2s,box-shadow .2s;}
.cal-sel-item.is-target{background:rgba(123,47,247,.07);box-shadow:inset 0 0 0 1px rgba(123,47,247,.18);}
.cal-sel-item.is-target .cal-sel-lbl{color:var(--violet,#7B2FF7);}
.cal-nights{white-space:nowrap;}

/* ── Guests and bedrooms ── */
.g-val{display:inline-block;min-width:20px;text-align:center;font-variant-numeric:tabular-nums;}
.g-val.bump{animation:gBump .32s cubic-bezier(.34,1.56,.64,1);}
@keyframes gBump{40%{transform:scale(1.3);color:var(--violet,#7B2FF7);}}
.g-btn:focus-visible,.rooms-opt:focus-visible,.cal-len-chip:focus-visible,.cal-quick-chip:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(123,47,247,.3);}
.sf-panel-foot{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin-top:12px;padding-top:12px;border-top:1px solid rgba(10,10,20,.06);
}
.sf-panel-foot .cal-done-btn{min-width:110px;}
.sf-panel-guests{min-width:320px;}
button.rooms-opt{border:1px solid transparent;font:inherit;font-family:var(--font-ui);font-size:12.5px;font-weight:600;}
.rooms-note{font-size:11.5px;color:var(--ink-faint);margin:-4px 0 12px;line-height:1.5;max-width:250px;}
.rooms-note:empty{display:none;}

/* Field segments are focusable now. */
.sf[role="button"]:focus-visible{outline:none;box-shadow:0 0 0 2px rgba(123,47,247,.45),0 8px 26px rgba(10,10,20,.1);}

/* ── Status line ── */
.sc-status .sc-spin{width:12px;height:12px;}

/* ── Cards ── */
.card-dist{
  display:inline-flex;align-items:center;margin-left:6px;padding:2px 7px;border-radius:100px;
  background:rgba(45,212,191,.12);color:#0E7C6E;font-size:10.5px;font-weight:750;letter-spacing:.01em;white-space:nowrap;
}
.cb-fx-real{display:block;width:100%;margin-top:2px;font-size:11px;font-weight:600;color:var(--ink-faint);font-variant-numeric:tabular-nums;}

/* ── Budget chips (now buttons, rendered per currency) ── */
.fchip-budgets{display:contents;}
button.fchip{font-family:var(--font-ui);}

/* ── Currency chips ── */
.ch-fx{gap:5px!important;font-variant-numeric:tabular-nums;display:inline-flex!important;}
.ch-fx svg{width:12px!important;height:12px!important;opacity:.6;}
.ch-fx-code{font-weight:750;letter-spacing:.03em;}
.ch-fx.is-alt{border-color:rgba(123,47,247,.3)!important;color:var(--violet,#7B2FF7)!important;background:rgba(123,47,247,.05)!important;}
.fm-fx{
  display:inline-flex;align-items:center;gap:5px;flex-shrink:0;
  padding:7px 10px 7px 12px;border-radius:100px;cursor:pointer;
  border:1px solid rgba(10,10,20,.12);background:#fff;
  font-family:var(--font-ui);font-size:12px;font-weight:750;letter-spacing:.03em;color:var(--ink);
  transition:border-color .2s,color .2s;
}
.fm-fx:hover{border-color:rgba(123,47,247,.4);color:var(--violet,#7B2FF7);}
.fm-fx svg{width:12px;height:12px;opacity:.6;}

/* ══ Filters dialog ═══════════════════════════════════════════════ */
.filter-modal{display:flex;flex-direction:column;overflow:hidden;padding-bottom:0;max-height:90vh;max-height:90dvh;}
.fm-top{display:flex;align-items:center;gap:12px;padding:14px 18px 14px 24px;border-bottom:1px solid var(--line);}
.fm-top .fm-title{border:0;padding:0;margin:0;flex:1;}
.fm-x{
  width:36px;height:36px;border-radius:50%;border:0;cursor:pointer;flex-shrink:0;
  display:grid;place-items:center;background:rgba(10,10,20,.05);color:var(--ink-soft);
  transition:background .2s,transform .2s;
}
.fm-x:hover{background:rgba(10,10,20,.09);}
.fm-x:active{transform:scale(.92);}
.fm-x svg{width:15px;height:15px;}
.fm-scroll{overflow-y:auto;overscroll-behavior:contain;flex:1;padding-bottom:18px;}
.fm-section{padding:20px 24px 0;}
.fm-section-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:6px;}
.fm-section-row .fm-section-label{margin-bottom:4px;}
.fm-price-sub{font-size:12.5px;color:var(--ink-soft);line-height:1.45;}
.fm-range{margin:10px 0 4px;}
.fm-bands{margin-top:14px;display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;}
button.fm-chip{font-family:var(--font-ui);}
.fm-chip.fm-band{
  flex-direction:column;align-items:flex-start;gap:1px;border-radius:14px;padding:10px 12px;text-align:left;
}
.fm-band b{font-size:12.5px;font-weight:750;color:var(--ink);}
.fm-band span{font-size:12px;font-weight:600;color:var(--ink-soft);font-variant-numeric:tabular-nums;}
.fm-band small{font-size:10.5px;font-weight:600;color:var(--ink-faint);}
.fm-band.on b,.fm-band.on span,.fm-band.on small{color:#fff;}
.fm-fx-note{
  margin-top:12px;padding:10px 12px;border-radius:12px;background:rgba(45,212,191,.08);
  border:1px solid rgba(45,212,191,.2);font-size:11.5px;line-height:1.5;color:#0E5F55;
}
.fm-chip small{
  font-size:10.5px;font-weight:700;color:var(--ink-faint);font-variant-numeric:tabular-nums;
  background:rgba(10,10,20,.05);padding:1px 6px;border-radius:100px;
}
.fm-chip.on small{background:rgba(255,255,255,.22);color:#fff;}
.fm-chip.is-none{opacity:.55;}
.fm-chip[hidden]{display:none!important;}
.fm-chip:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(123,47,247,.3);}
.fm-footer{margin-top:0;padding:14px 24px max(16px,env(safe-area-inset-bottom));position:relative;}
.fm-apply{font-variant-numeric:tabular-nums;transition:all .2s,background .3s;}
.fm-apply.is-empty{background:var(--ink,#0A0A14);box-shadow:none;}

@media (min-width:761px){
  .filter-modal{
    left:50%;right:auto;top:50%;bottom:auto;width:min(640px,calc(100vw - 48px));
    border-radius:26px;transform:translate(-50%,-46%) scale(.97);opacity:0;visibility:hidden;
    transition:transform .36s cubic-bezier(.22,1,.36,1),opacity .25s,visibility .3s;
    box-shadow:0 10px 30px rgba(10,10,20,.1),0 40px 100px rgba(20,10,60,.25);
    max-height:min(820px,calc(100vh - 48px));
  }
  .filter-modal.open{transform:translate(-50%,-50%) scale(1);opacity:1;visibility:visible;}
  .filter-modal .fm-handle{display:none;}
}

/* ── Smart search: what was understood ── */
.ai-got{display:flex;flex-wrap:wrap;gap:7px;}
.ai-got-chip{
  display:inline-flex;flex-direction:column;gap:1px;padding:7px 11px;border-radius:12px;
  background:#fff;border:1px solid rgba(123,47,247,.15);font-size:13px;font-weight:650;color:var(--ink);
}
.ai-got-chip small{font-size:9.5px;font-weight:750;letter-spacing:.12em;text-transform:uppercase;color:var(--violet,#7B2FF7);}
.ai-got-sum{margin-top:10px;font-size:13px;color:var(--ink-soft);}

/* ══ Phones ═══════════════════════════════════════════════════════ */
@media (max-width:760px){
  /* Where becomes a full screen with its own box, so the keyboard sits
     under the answers instead of on top of them. */
  body.sc-loc-full #sfp-where{
    top:0;bottom:0;left:0;right:0;height:100vh;height:100dvh;max-height:none;border-radius:0;
    padding:0;display:flex;flex-direction:column;animation:locFullIn .28s cubic-bezier(.22,1,.36,1);
    box-shadow:none;
  }
  body.sc-loc-full #sfp-where::before{display:none;}
  @keyframes locFullIn{from{opacity:0;transform:translateY(14px);}to{opacity:1;transform:none;}}
  body.sc-loc-full #sf-scrim{opacity:0!important;}
  body.sc-loc-full .loc-m-head{
    display:flex;align-items:center;gap:8px;flex-shrink:0;
    padding:calc(10px + env(safe-area-inset-top,0px)) 12px 10px;border-bottom:1px solid rgba(10,10,20,.07);background:#fff;
  }
  .loc-m-back{
    width:42px;height:42px;border-radius:50%;border:0;background:rgba(10,10,20,.05);color:var(--ink);
    display:grid;place-items:center;flex-shrink:0;cursor:pointer;
  }
  .loc-m-back svg{width:18px;height:18px;}
  .loc-m-field{
    flex:1;min-width:0;display:flex;align-items:center;gap:9px;height:46px;padding:0 14px;border-radius:15px;
    background:#F5F3FC;border:1.5px solid rgba(123,47,247,.35);box-shadow:0 0 0 4px rgba(123,47,247,.08);
  }
  .loc-m-field svg{width:17px;height:17px;color:var(--violet,#7B2FF7);flex-shrink:0;}
  .loc-m-field input{
    flex:1;min-width:0;border:0;outline:none;background:none;font:600 16px/1.2 var(--font-ui);color:var(--ink);
  }
  .loc-m-field input::placeholder{color:rgba(10,10,20,.38);font-weight:500;}
  body.sc-loc-full #loc-suggestions{
    flex:1;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
    padding:8px 8px calc(24px + env(safe-area-inset-bottom,0px));
  }
  body.sc-loc-full .loc-suggestion{padding:12px 10px;}
  body.sc-loc-full .loc-suggestion-name{font-size:15px;}

  /* A year of months to scroll, one weekday header pinned on top. */
  #cal-months-wrap.is-scroll .cal-weekdays{display:none;}
  #cal-months-wrap.is-scroll .cal-month-label{
    text-align:left;padding:4px 4px 8px;font-size:15px;
  }
  .cal-wd-sticky{
    display:grid;grid-template-columns:repeat(7,1fr);position:sticky;top:-22px;z-index:3;
    margin:0 -14px 6px;padding:8px 14px;background:#fff;border-bottom:1px solid rgba(10,10,20,.06);
    font-family:var(--font-ui);font-size:10px;font-weight:750;letter-spacing:.08em;text-transform:uppercase;
    color:var(--ink-faint);text-align:center;
  }
  .cal-nav{display:none;}
  .cal-len{margin-top:0;}
  .cal-quick{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 -14px 12px;padding:0 14px;}
  .cal-quick::-webkit-scrollbar{display:none;}
  .cal-quick-chip{flex-shrink:0;}
  .cal-len{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;}
  .cal-len::-webkit-scrollbar{display:none;}
  .cal-len-chip{flex-shrink:0;}
  .cal-day{height:44px;}
  .cal-day span{width:40px;height:40px;}
  /* Day numbers sit on z-index 2; the pinned footer has to clear them. */
  .cal-footer{z-index:6;}
  .cal-wd-sticky{z-index:6;}
  .sf-panel-guests{min-width:0;}
  .sf-panel-foot .cal-done-btn{flex:1;}

  .filter-modal{max-height:92vh;max-height:92dvh;}
  .fm-bands{grid-template-columns:repeat(3,minmax(0,1fr));}
  .fm-chip.fm-band{padding:9px 10px;}
}
@media (prefers-reduced-motion:reduce){
  .sc-spin,.sc-go.is-busy .sc-go-ico::after{animation-duration:2s;}
  .cal-len,.g-val.bump,body.sc-loc-full #sfp-where{animation:none;}
}
