/* ==========================================================================
   Brand strip (index.html #bstrip, strip.js): a slim bar fixed at the bottom
   of the screen, above the dock, that now and then shows slides of the Mega
   brands, with an X to close it. Tokens from app.css only, so it follows the
   dark and the light theme; each slide takes its product color from data-k.
   ========================================================================== */
.bstrip { --bs-h: 76px; position: fixed; z-index: 38; left: 0; right: 0; bottom: calc(var(--dock-h) + var(--safe-b)); height: var(--bs-h); border-top: 1px solid var(--hair); background: var(--surface); box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.28); animation: bsIn 0.45s var(--ease); }
.bstrip[hidden] { display: none; }
html[data-theme="light"] .bstrip { box-shadow: 0 -8px 24px rgba(15, 18, 34, 0.08); }
@keyframes bsIn { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

.bs-track { position: relative; height: 100%; overflow: hidden; }
.bs-slide { position: absolute; inset: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s3); padding: 0 var(--s4) 4px; color: var(--text); text-decoration: none; opacity: 0; visibility: hidden; transform: translateX(24px); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0s linear 0.45s; -webkit-tap-highlight-color: transparent; }
.bs-slide::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--k, var(--accent)); }
.bs-slide.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.bs-slide.is-out { transform: translateX(-24px); }
.bs-slide:focus-visible { outline-offset: -3px; }

.bs-logo { display: grid; place-items: center; width: 92px; height: 52px; padding: 6px 8px; border: 1px solid var(--k-line, var(--hair)); border-radius: var(--r-sm); background: var(--k-tint, var(--surface-2)); }
.bs-logo img { width: auto; height: auto; max-width: 100%; max-height: 38px; object-fit: contain; }
.bs-slide[data-bs="flights"] .bs-logo img { max-height: 30px; }

.bs-txt { display: grid; gap: 2px; min-width: 0; }
.bs-txt b { overflow: hidden; font: 700 0.9rem/1.25 var(--font-ui); white-space: nowrap; text-overflow: ellipsis; }
.bs-txt b em { font-style: normal; color: var(--k, var(--accent-hi)); letter-spacing: 0.02em; }
.bs-txt small { overflow: hidden; color: var(--text-2); font-size: var(--fs-xs); white-space: nowrap; text-overflow: ellipsis; }

/* on phones the button is only its arrow; the words show from 600 px */
.bs-go { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); width: 40px; height: 40px; border-radius: var(--pill); background: var(--k, var(--accent)); color: var(--k-ink, var(--ink)); font-weight: 700; font-size: var(--fs-sm); white-space: nowrap; transition: transform var(--t1) var(--ease); }
.bs-go span { display: none; }
.bs-go svg { width: 18px; height: 18px; }
.bs-slide:hover .bs-go { transform: translateX(2px); }

.bs-dots { position: absolute; left: 50%; bottom: 2px; display: flex; transform: translateX(-50%); }
.bs-dots button { display: grid; place-items: center; width: 20px; height: 14px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bs-dots button::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); opacity: 0.55; transition: width var(--t2) var(--ease), opacity var(--t2); }
.bs-dots button[aria-current="true"]::before { width: 14px; border-radius: 3px; opacity: 1; background: var(--text-2); }

/* the X: a small round badge on the top edge, as on news sites, with a 44 px tap area around it */
.bs-x { position: absolute; z-index: 2; top: -22px; right: 2px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bs-x::before { content: ""; position: absolute; width: 26px; height: 26px; border: 1px solid var(--hair-2); border-radius: 50%; background: var(--surface-2); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
.bs-x svg { position: relative; width: 14px; height: 14px; }
.bs-x:hover::before { border-color: var(--text-3); }

/* the page's last lines stay readable above the strip */
html.bs-on .site-foot { padding-bottom: calc(var(--dock-h) + var(--safe-b) + 40px + 76px); }

@media (min-width: 600px) {
  .bs-go { width: auto; padding: 0 var(--s4); }
  .bs-go span { display: inline; }
  .bs-logo { width: 132px; }
  .bs-txt { padding-right: var(--s5); }
}

/* computers (the dock is gone from 960 px): a card floating at the bottom, centred */
@media (min-width: 960px) {
  html:not([data-shell="ios"]) .bstrip { left: 50%; right: auto; bottom: calc(var(--s4) + var(--safe-b)); width: min(calc(100% - 32px), 760px); border: 1px solid var(--hair-2); border-radius: var(--r); transform: translateX(-50%); box-shadow: var(--sh-2); animation-name: bsInWide; }
  html:not([data-shell="ios"]) .bs-track { border-radius: inherit; }
  html:not([data-shell="ios"]) .bs-x { top: -18px; right: -18px; }
  html:not([data-shell="ios"]).bs-on .site-foot { padding-bottom: calc(var(--s6) + 96px); }
  /* inside the app shell the dock floats as a pill from 960 px: the strip floats just above it */
  html[data-shell="ios"] .bstrip { left: 50%; right: auto; bottom: calc(var(--dock-h) + 24px + var(--safe-b)); width: min(calc(100% - 24px), 720px); border: 1px solid var(--hair-2); border-radius: var(--r); transform: translateX(-50%); animation-name: bsInWide; }
  html[data-shell="ios"] .bs-track { border-radius: inherit; }
}
@keyframes bsInWide { from { transform: translate(-50%, 16px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .bstrip { animation: none; }
  .bs-slide, .bs-slide.is-out { transform: none; transition: opacity 0.2s linear, visibility 0s linear 0.2s; }
  .bs-slide.is-on { transition-delay: 0s; }
}
