/* ==========================================================================
   Travel404 for Hosts — shell.css
   The bits of the site shell that rack.css does not cover: the EN/ES links
   in the header (rack.css only styles the homepage's <button> toggle), the
   mobile burger + panel, and the self-serve trial modal.
   Loaded by /components.js (it injects this <link> when the page has not
   already done so). Pages SHOULD link it themselves right after /rack.css:
   <link rel="stylesheet" href="/shell.css"> — then the placeholder below is
   painted before the deferred script runs and the injected header causes no
   layout shift (CLS 0). Without the link it still works, with a ~0.08 shift.
   Vocabulary: the key rack. Tokens only — never a hardcoded colour.
   ========================================================================== */

/* ---------- Header placeholder: the header's exact height (64px + 1px rule) until components.js prepends it ---------- */
body:not(.has-shell)::before { content: ""; display: block; height: calc(4rem + 1px); } /* = rack.css .hdr .wrap min-height (4rem) + 1px rule; scales with the user's type size */

/* ---------- Language toggle as links (same box as rack.css's .lang button) ---------- */
.lang a { display: inline-block; color: var(--slate); padding: .8rem .75rem; font-size: var(--t-xs); font-weight: 700; letter-spacing: .1em; text-decoration: none; cursor: pointer; }
.lang a[aria-current="true"] { background: var(--ink); color: #fff; }
.lang a:hover { color: var(--crimson); }
.lang a[aria-current="true"]:hover { color: #fff; }
.lang a:focus-visible { outline-offset: -3px; }

/* ---------- Burger: a small blank tag with three lines, under 900px only ---------- */
.burger { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; width: 44px; height: 44px; padding: 0 10px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-tag); cursor: pointer; transition: border-color .15s ease; }
.burger:hover { border-color: var(--crimson-2); }
.burger span { display: block; height: 0; border-top: 2px solid currentColor; border-radius: 1px; transition: transform .2s ease, opacity .2s ease; }
.burger[aria-expanded="true"] { border-color: var(--crimson); color: var(--crimson); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (min-width: 56.25em) { .burger { display: none; } }

/* ---------- Mobile panel: hangs under the header, full width ---------- */
.menu { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 30px 50px -30px rgba(26,26,46,.45); max-height: calc(100vh - 4rem); max-height: calc(100dvh - 4rem); overflow: auto; }
.menu[hidden] { display: none; }
.hdr .menu .wrap { display: grid; gap: var(--s-2); justify-content: stretch; min-height: 0; padding: var(--s-2) 0 var(--s-6); }
.menu-nav { display: grid; }
.menu-nav a { display: flex; align-items: center; gap: var(--s-3); padding: .9rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; font-size: var(--t-md); }
.menu-nav a::before { /* the small key tag, as in the ledger's .detail bullets */ content: ""; flex: none; width: 6px; height: 11px; border-radius: 2px; background: var(--grad); }
.menu-nav a:hover { color: var(--crimson); }
.menu-nav a:focus-visible { outline-offset: -3px; }
.menu-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-4); }
.hdr .menu .btn { display: inline-flex; }
@media (min-width: 56.25em) { .menu { display: none; } }

/* ---------- Trial signup modal: a tag on a hook ---------- */
body.su-open { overflow: hidden; } /* the page behind the dialog does not scroll under a finger */
.su { position: fixed; inset: 0; z-index: 50; background: rgba(14,14,26,.62); display: flex; align-items: center; justify-content: center; padding: var(--s-4); }
.su-card { position: relative; width: 100%; max-width: 440px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-tag); box-shadow: 0 30px 60px -30px rgba(26,26,46,.8), inset 0 -2px 0 rgba(0,0,0,.06); }
.su-card::before { /* the hook ring */ content: ""; position: absolute; top: -10px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--bg); border: 2px solid var(--crimson-2); }
.su-body { max-height: min(92vh, 92dvh); overflow: auto; padding: var(--s-8) var(--s-6) var(--s-6); }
.su-x { position: absolute; top: var(--s-3); right: var(--s-3); width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg); color: var(--slate); border: 1px solid var(--line); border-radius: var(--r-tag); font-size: 22px; line-height: 1; cursor: pointer; }
.su-x:hover { color: var(--crimson); border-color: var(--crimson-2); }
.su-title { font-size: var(--t-2xl); padding-right: var(--s-12); }
.su-sub { color: var(--slate); font-size: var(--t-sm); margin-top: var(--s-3); }
.su label { display: block; font-family: var(--f-ui); font-size: var(--t-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); margin: var(--s-4) 0 var(--s-2); }
.su input { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-tag); padding: .7rem .8rem; }
.su input:focus { border-color: var(--crimson-2); }
.su-hint { font-size: var(--t-xs); color: var(--slate); margin-top: var(--s-2); }
.su-err { color: var(--crimson); font-size: var(--t-sm); font-weight: 600; margin-top: var(--s-3); min-height: 1.4em; }
.su .btn { width: 100%; justify-content: center; margin-top: var(--s-4); }
.su .btn[disabled] { opacity: .6; cursor: default; transform: none; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.su-done { text-align: center; padding-top: var(--s-2); }
.su-done p { margin-inline: auto; }
.su-done svg { width: 52px; height: 52px; margin: 0 auto var(--s-4); color: var(--live); }
@keyframes su-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) { .su-card { animation: su-in .2s ease; } }
@media (max-width: 25em) { /* small phones: the whole form, submit included, fits above the fold */
  .su-body { padding: var(--s-6) var(--s-4) var(--s-4); }
  .su label { margin: var(--s-3) 0 var(--s-1); }
  .su-title { font-size: var(--t-xl); }
}
