/* Black Friday bar across the top of every page. Loaded from <head> on every page; js/deal-boot.js and js/deal-banner.js
   decide whether it shows. Self-contained: it runs on both flo.css pages and the older legal pages, so it sets its own colours.

   The bar is one line at every width and always --deal-h tall. While the offer could be live, <html> carries
   "deal-pending" and a strip of the same height is held at the top of <body>, so the real bar replaces it with no shift. */

:root { --deal-h: 52px; }

/* The height the page above the hero is taller by, for rules that size to the viewport (the hero). */
html.deal-pending, html.deal-on { --deal-offset: var(--deal-h); }

html.deal-pending body::before {
  content: "";
  display: block;
  box-sizing: border-box;
  height: var(--deal-h);
  background: #15171c;
  border-bottom: 1px solid rgba(240, 178, 50, 0.45);
}

.deal {
  display: grid;
  grid-template-rows: 1fr;
  position: relative;
  z-index: 40;
  background: #15171c;
  color: #f2f3f5;
  font: 600 0.9375rem/1.2 "Archivo", system-ui, sans-serif;
  transition: grid-template-rows 260ms cubic-bezier(0.23, 1, 0.32, 1);
}
.deal.is-closing { grid-template-rows: 0fr; }

.deal-clip { min-height: 0; overflow: hidden; }

.deal-in {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0 18px;
  box-sizing: border-box;
  height: var(--deal-h);
  max-width: 1320px;
  margin-inline: auto;
  padding: 0 56px 0 clamp(12px, 4.2vw, 64px);
  border-bottom: 1px solid rgba(240, 178, 50, 0.45);
}

.deal-msg { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-msg b { color: #f0b232; font-weight: 800; }

.deal-clock {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #f2f3f5;
  white-space: nowrap;
}

.deal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0 1.2em;
  border-radius: 8px;
  background: #f0b232;
  color: #15171c;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, transform 160ms ease;
}
.deal-cta:active { transform: scale(0.97); }
.deal-short { display: none; }

.deal-x {
  position: absolute;
  top: 50%;
  right: clamp(4px, 1.5vw, 20px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #9ba1ae;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}
.deal-x svg { width: 16px; height: 16px; }

.deal a:focus-visible, .deal button:focus-visible { outline: 2px solid #9aa4ff; outline-offset: 2px; }

@media (hover: hover) and (pointer: fine) {
  .deal-cta:hover { background: #ffc857; }
  .deal-x:hover { color: #f2f3f5; background: rgba(255, 255, 255, 0.08); }
}

.deal-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Phones: one short line, message and button. The countdown is back from 561px up. */
@media (max-width: 560px) {
  .deal { font-size: 0.8125rem; }
  .deal-in { gap: 0 10px; }
  .deal-long, .deal-clock { display: none; }
  .deal-short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  .deal, .deal.is-closing { transition: none; }
}
