/* Black Friday 2026: the dated strip above the header (site-spec Part 1 item 9;
   direction 2 of Black-Friday-Banner-Round-2.png, Ale 2026-11-24). Markup:
   frontend/views/layouts/_black_friday_banner.php. One centered line on a
   near-black strip, 52px tall on desktop; on a phone it stacks into three short
   rows with a 44px button. Red is the label only, never a field. No motion:
   nothing here animates or transitions. Loaded only while the banner shows. */

.fx-bf {
  --fx-bf-ground: #0b0c0e;
  --fx-bf-line: #26282d;
  --fx-bf-red: #EA3000;
  --fx-bf-ink: #ffffff;
  --fx-bf-ink-2: #d2d4d8;
  --fx-bf-muted: #a0a3a8;
  --fx-bf-rule: #3a3d44;
  --fx-bf-display: "FX Oswald", Oswald, "Arial Narrow", system-ui, sans-serif;
  --fx-bf-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fx-bf-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  padding: 8px 24px;
  margin: 0;
  background: var(--fx-bf-ground);
  border-bottom: 1px solid var(--fx-bf-line);
  color: var(--fx-bf-ink);
  font-family: var(--fx-bf-body);
  font-size: 12.5px;
  line-height: 1.3;
  text-align: center;
  transition: none;
}
.fx-bf *, .fx-bf *::before, .fx-bf *::after { box-sizing: border-box; transition: none; animation: none; }
.fx-bf p { margin: 0; padding: 0; }

.fx-bf__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 18px;
  max-width: 100%;
}
.fx-bf__lead, .fx-bf__meta, .fx-bf__actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
/* Code, deadline and button travel together: one line when it all fits,
   otherwise this whole group drops to a second centered row. Only if even
   the group is too wide does it split, between the deadline and the button. */
.fx-bf__rest {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 18px;
  min-width: 0;
  max-width: 100%;
}
.fx-bf__lead { max-width: 100%; }

.fx-bf__label {
  display: inline-block;
  flex: 0 0 auto;
  padding: 5px 9px 4px;
  background: var(--fx-bf-red);
  color: #ffffff;
  font: 600 12px/1.1 var(--fx-bf-display);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}
.fx-bf__offer {
  color: var(--fx-bf-ink);
  font: 600 13.5px/1.25 var(--fx-bf-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* The code in its own slot ("code BLACKFRIDAY", Ale 2026-11-25, as the first
   strip had it): a small word, then the code in mono type inside a dashed
   outline, so it reads at a glance as something to type and never as a
   second button (the button's outline is solid). */
.fx-bf__code {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--fx-bf-ink-2);
  font: 500 12px/1.2 var(--fx-bf-body);
  white-space: nowrap;
}
.fx-bf__codevalue {
  display: inline-block;
  padding: 3px 7px;
  border: 1px dashed var(--fx-bf-ink-2);
  color: var(--fx-bf-ink);
  font: 600 13px/1.2 var(--fx-bf-mono);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.fx-bf__rule {
  display: inline-block;
  flex: 0 0 auto;
  width: 1px;
  height: 18px;
  background: var(--fx-bf-rule);
}
.fx-bf__deadline {
  color: var(--fx-bf-muted);
  font: 500 11px/1.2 var(--fx-bf-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  /* fixed-width digits, so a countdown never nudges the line sideways */
  font-variant-numeric: tabular-nums;
}
/* Read by screen readers, never seen (the countdown's real deadline). */
.fx-bf__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.fx-bf a.fx-bf__link,
.fx-bf a.fx-bf__signin {
  color: var(--fx-bf-ink);
  font: 500 12.5px/1.2 var(--fx-bf-body);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  white-space: nowrap;
}
.fx-bf a.fx-bf__link:hover,
.fx-bf a.fx-bf__signin:hover { color: var(--fx-bf-ink); text-decoration-thickness: 2px; }

.fx-bf a.fx-bf__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 14px;
  border: 1px solid var(--fx-bf-ink);
  border-radius: 0;
  background: transparent;
  color: var(--fx-bf-ink);
  font: 600 12px/1.15 var(--fx-bf-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.fx-bf a.fx-bf__button:hover { background: var(--fx-bf-ink); color: var(--fx-bf-ground); text-decoration: none; }
.fx-bf a:focus-visible { outline: 2px solid #f06946; outline-offset: 3px; }
/* Tablet widths (768 to 1023 px) are touched, not clicked: the button is a
   44px target there, as on phones (2026-11-25 review). */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .fx-bf a.fx-bf__button { min-height: 44px; }
  /* With the code in its own slot, Cyber Monday's second row (code, link,
     deadline, button) only just fits at 768: slightly tighter gaps keep it to
     the two-row wrap. */
  .fx-bf { padding-left: 16px; padding-right: 16px; }
  .fx-bf__rest { column-gap: 12px; }
  .fx-bf__meta { gap: 10px; }
}

/* Light theme (html[data-theme="light"], theme-light.v1.css): the strip stays
   a near-black strip above the light header, a kept-dark island declared with
   Theme::windowAttr() and painted with the light ladder's kept-dark tokens
   (parts/00-ladder.css). The ladder frames a window with a border and an
   8px radius; a full-width strip keeps its square edges and its one bottom
   line instead (the ladder's framed rule leaves .fx-bf out). Every colour
   inside reads these variables, so no light rule repaints its text, links,
   button or divider. */
html[data-theme="light"] .fx-bf[data-fnx-window] {
  --fx-bf-ground: var(--fnx-dark-window);
  --fx-bf-line: var(--fnx-window-line);
  --fx-bf-ink: var(--fnx-window-ink);
  --fx-bf-ink-2: var(--fnx-window-ink);
  --fx-bf-muted: var(--fnx-window-ink-2);
  --fx-bf-rule: var(--fnx-window-line);
  background: var(--fnx-dark-window);
  color: var(--fnx-window-ink);
  border: 0;
  border-bottom: 1px solid var(--fnx-window-line);
  border-radius: 0;
  overflow: visible;
}
/* The light ladder's focus ring is dark ink with a ground-coloured halo,
   drawn for a light page; on the strip it is the window ink instead. */
html[data-theme="light"] .fx-bf a:focus-visible {
  outline: 2px solid var(--fnx-window-ink);
  outline-offset: 3px;
  box-shadow: none;
}

/* Phone (under 768 px, the storefront's phone break): short rows, all
   centered: the label; the offer; the code and the deadline; the button
   (at least 44px tall) with Sign in. Nothing is wider than the screen. Kept in
   this sheet rather than frontend/web/css/fx/ so it holds whether or not the
   phone look (html.fx-phone, FNX_PHONE_LOOK) is on. */
@media (max-width: 767.98px) {
  .fx-bf {
    min-height: 0;
    padding: 12px 16px 14px;
  }
  /* Spacing on a phone (Ale, 2026-11-25): the label, the line and the code
     row read as one group, close together; the deadline follows; then a
     clear gap before the button. The rows set their own gaps below. */
  .fx-bf__inner {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .fx-bf__lead {
    display: block;
    text-align: center;
  }
  /* On a phone the group's two parts are rows of the column like the lead. */
  .fx-bf__rest { display: contents; }
  /* The label sits alone on its own centered row, above the line (Ale,
     2026-11-25); the line is balanced so no word is left alone on a row. */
  .fx-bf__label {
    display: block;
    width: -moz-fit-content;
    width: fit-content;
    margin: 0 auto 8px;
    padding: 4px 8px 3px;
    font-size: 11px;
  }
  .fx-bf__offer {
    display: block;
    max-width: 30em;
    margin: 0 auto;
    font-size: 13px;
    line-height: 1.3;
    letter-spacing: 0.05em;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }
  /* The code row sits right under the line; the deadline takes its own row
     under the code, a little apart. */
  .fx-bf .fx-bf__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 9px 12px;
    margin-top: 8px;
  }
  /* With the Cyber Monday link in the row, the deadline takes its own row
     under the code; without it, the deadline sits beside the code. */
  .fx-bf__meta:has(.fx-bf__link) .fx-bf__deadline {
    flex: 0 0 100%;
    text-align: center;
  }
  /* No divider on a phone: when the row wraps it is left dangling at an end. */
  .fx-bf__rule { display: none; }
  .fx-bf .fx-bf__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
    margin-top: 18px;
  }
  .fx-bf a.fx-bf__button {
    flex: 1 1 200px;
    max-width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    white-space: normal;
    text-align: center;
    font-size: 12.5px;
  }
  .fx-bf a.fx-bf__signin,
  .fx-bf a.fx-bf__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 6px;
  }
  /* The link in the code row keeps its 44px tap area but takes only a text
     row's height, so it does not push the line and the deadline apart. */
  .fx-bf a.fx-bf__link { margin: -11px 0; }
}
