/* AUDITFIX-8765 (2026-09-29) — header fit at every width (layout ported from AUDITFIX glass1, NO glass styling),
   [hidden] fix for #addTruckBtn, <=720 discovery/Signature carousel full width, hero controls above mobile dock,
   a11y helpers. Loaded after gold-orb.css so it wins source order at equal specificity. */

.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important;
  margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important; border: 0 !important;
}
/* `.action { display:inline-flex }` beat the UA [hidden] rule, so ADD FOOD TRUCK showed while hidden */
[hidden], .action[hidden], #addTruckBtn[hidden] { display: none !important; }

/* ---------- header: icon buttons + tooltips (title), labels kept for screen readers ---------- */
.header { min-width: 0; gap: 12px; }
.brand.brand--hero { min-height: 0; margin-right: 0; flex: 0 0 auto; }
.brand.brand--hero .brand-logo,
.brand.brand--hero img { height: 48px !important; width: auto !important; max-width: 220px !important; }
.header .search { flex: 1 1 200px; min-width: 150px; max-width: 420px; }
.header .nav { flex: 0 0 auto; margin-left: 0; gap: 14px; }
.header .nav a { font-size: 13px; }
.actions { flex: 0 1 auto; min-width: 0; margin-left: auto; gap: 6px; }
.action { height: 38px; padding: 0 11px; font-size: 11.5px; letter-spacing: 0.02em; }
.action .action-ico { font-size: 15px; line-height: 1; }
.action.gold .action-ico { font-weight: 900; }
.action.live-bell { min-width: 38px; padding: 0; justify-content: center; }
.action--compact { width: 38px; padding: 0; justify-content: center; }
.action--compact .action-label {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.nav-fav-btn { width: 42px; min-width: 42px; }

@media (max-width: 1250px) {
  .header { gap: 10px; padding: 0 12px; }
  .brand.brand--hero .brand-logo, .brand.brand--hero img { height: 42px !important; max-width: 180px !important; }
  .header .nav { gap: 10px; }
  .header .nav a { font-size: 12px; }
}
@media (max-width: 1180px) and (min-width: 901px) {
  /* icon-only CTAs; the strip scrolls as a last-resort safety net (never widens the page) */
  #listRestBtn, #promoteBtn, #addTruckBtn { width: 38px; padding: 0; justify-content: center; }
  #listRestBtn .action-label, #promoteBtn .action-label, #addTruckBtn .action-label {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
  }
  .header .search { min-width: 130px; }
  .actions { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 6px 2px; }
  .actions::-webkit-scrollbar { display: none; }
}

/* ---------- <=900: brand + swipeable action strip / search row / nav row, 44px targets ---------- */
@media (max-width: 900px) {
  .header { gap: 6px 10px; flex-wrap: wrap; align-items: center; padding-bottom: 6px; }
  .brand.brand--hero { padding: 0; }
  .brand.brand--hero .brand-logo, .brand.brand--hero img { height: 38px !important; max-width: 150px !important; }
  .actions {
    order: 2; flex: 1 1 0; min-width: 0; margin-left: 0; justify-content: flex-start;
    overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
    scroll-snap-type: x proximity; scrollbar-width: none; padding: 4px 2px;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  }
  .actions::-webkit-scrollbar { display: none; }
  .actions > * { flex: 0 0 auto; scroll-snap-align: start; }
  .actions > :last-child { margin-right: 22px; }
  .action { height: 44px; min-height: 44px; font-size: 11px; padding: 0 12px; }
  .action--compact, .action.live-bell { width: 44px; min-width: 44px; padding: 0; }
  .nav-fav-btn { width: 44px; min-width: 44px; height: 44px; }
  .header .search { order: 3; flex: 1 1 100%; max-width: none; min-width: 0; height: 44px; }
  /* nav links were display:none at <=900 — keep them visible as a swipeable row */
  .header .nav {
    display: flex !important; order: 4; flex: 1 1 100%; margin: 0; gap: 2px;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  }
  .header .nav::-webkit-scrollbar { display: none; }
  .header .nav a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
    font-size: 13px; border-bottom-width: 2px;
  }
}
@media (max-width: 560px) {
  .brand.brand--hero .brand-logo, .brand.brand--hero img { height: 34px !important; max-width: 120px !important; }
}
@media (max-width: 720px) {
  .actions #tripBtn, .actions #worldTripBtn { min-width: 44px; min-height: 44px; padding: 0 10px; }
}

/* ---------- <=720: discovery carousels + Signature full width (app.css:2988 re-added 36px arrow columns
   while the arrows themselves are display:none, squeezing the track into the middle column) ---------- */
@media (max-width: 720px) {
  .discovery-stack .disc-carousel,
  .disc-dish-carousel .dish-carousel { grid-template-columns: minmax(0, 1fr) !important; padding: 0 !important; }
  .discovery-stack .disc-carousel > .disc-arrow,
  .discovery-stack .disc-arrow,
  .disc-dish-carousel .dish-carousel-arrow { display: none !important; }
  .discovery-stack .disc-track,
  .disc-track { grid-column: 1 / -1; width: 100%; min-width: 0; }
}

/* ---------- hero carousel controls above the fixed mobile dock (dock = bottom 8px + 55px) ---------- */
@media (max-width: 900px) {
  .promo-hero-controls { bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; }
  .promo-hero-inner { padding-bottom: calc(136px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ---------- header More overflow (Trip / World trip / Promote) ---------- */
.header-more { position: relative; flex: 0 0 auto; }
.header-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 194, 74, 0.4);
  background: rgba(12, 28, 40, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 4px;
  z-index: 80;
}
.header-more-menu[hidden] { display: none !important; }
.header-more-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text, #fff8ea);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 10px 12px;
  cursor: pointer;
}
.header-more-item:hover,
.header-more-item:focus-visible {
  background: rgba(255, 194, 74, 0.14);
  outline: none;
}
.header-more.is-open #headerMoreBtn {
  border-color: var(--cyan, #3ad8ff);
  box-shadow: 0 0 14px #20cfff66;
}
@media (max-width: 560px) {
  .header-more-menu { right: auto; left: 0; min-width: 180px; }
}

/* Boot splash — visible until app.js hideBootSplash(); prevents "endless black" with no feedback */
.wte-boot-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: #082030;
  color: #fff8ea;
  font-family: Inter, system-ui, sans-serif;
}
.wte-boot-splash[hidden] { display: none !important; }
.wte-boot-card {
  display: grid;
  gap: 8px;
  text-align: center;
  padding: 22px 26px;
  border-radius: 16px;
  border: 1px solid rgba(255, 194, 74, 0.45);
  background: rgba(12, 42, 58, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  max-width: min(420px, calc(100vw - 32px));
}
.wte-boot-card strong { color: #ffe199; font-size: 1.05rem; }
.wte-boot-card span { color: #b7c8d2; font-size: 0.9rem; line-height: 1.4; }
.wte-boot-splash.is-error .wte-boot-card { border-color: #ff6b7a; }
.wte-boot-splash.is-error button {
  margin-top: 10px;
  border: 1px solid #ffc24a;
  border-radius: 999px;
  background: linear-gradient(#ffd77a, #d98f14);
  color: #181006;
  font-weight: 800;
  padding: 10px 16px;
  cursor: pointer;
}
