/* The sale bar above the floating header and the sale box on the pricing page.
   Loaded only while a sale runs on an English page (lib/promo.ts). A file of its
   own so it never depends on a cached copy of navigation.css. */
:root { --promo-h:44px; --promo-ink:#171a2e; --promo-amber:#f5b544; }

.promo-bar { position:fixed; inset:0 0 auto; z-index:61; height:var(--promo-h); background:var(--promo-ink); color:#d9dbe6; font-size:.8125rem; line-height:1.3; }
.promo-bar-inner { height:100%; width:min(1360px,calc(100% - 32px)); margin:0 auto; display:flex; align-items:center; justify-content:center; gap:10px 22px; }
.promo-bar-message { margin:0; display:flex; align-items:center; gap:8px; white-space:nowrap; color:#e9e9f2; }
.promo-bar-message strong { color:#fff; font-weight:650; }
.promo-bar-dot { display:inline-block; flex-shrink:0; width:7px; height:7px; border-radius:50%; background:var(--promo-amber); box-shadow:0 0 0 4px #f5b54426; }
.promo-bar-limited { color:#b9bccd; }
.promo-bar-actions { display:flex; align-items:center; gap:12px; white-space:nowrap; }
.promo-bar-code { color:#b9bccd; }
.promo-bar-code code, .pricing-promo-code code { font-family:inherit; font-weight:650; letter-spacing:.02em; }
.promo-bar-code code { margin-left:4px; padding:3px 8px; border:1px dashed #ffffff4d; border-radius:6px; color:#fff; }
.promo-bar-copy { min-height:28px; padding:4px 12px; border:0; border-radius:999px; background:#fff; color:var(--promo-ink); font-size:.75rem; font-weight:650; line-height:1.2; }
.promo-bar-copy:hover { background:#efeafe; }
.promo-bar-copy[data-copied] { background:#d9f4e6; color:#14603f; }
.promo-bar-link { color:#cfbdff; font-weight:650; }
.promo-bar-link:hover { color:#fff; }
.promo-bar a:focus-visible, .promo-bar button:focus-visible { outline:2px solid #cfbdff; outline-offset:3px; }

/* The bar stays at the top of the screen and the floating header sits just
   below it. --header grows by the bar's height, so the first section's
   clearance, sticky panels, menus and anchor scrolling all allow for it.
   The base values match navigation.css at each breakpoint. */
:root:has(.promo-bar) { --header:calc(104px + var(--promo-h)); }
.promo-bar ~ .site-header { top:calc(var(--nav-top) + var(--promo-h)); }
@media (max-width:1240px) { :root:has(.promo-bar) { --header:calc(92px + var(--promo-h)); } }
@media (max-width:700px) { :root:has(.promo-bar) { --header:calc(84px + var(--promo-h)); } }

/* Narrow screens: the message on one line, the code and buttons on the next. */
@media (max-width:860px) {
  :root { --promo-h:66px; }
  .promo-bar-inner { flex-direction:column; justify-content:center; gap:6px; }
  .promo-bar-actions { gap:10px; }
  .promo-bar-code code { padding:2px 7px; }
}
@media (max-width:380px) {
  .promo-bar { font-size:.75rem; }
  .promo-bar-actions { gap:8px; }
  .promo-bar-copy { padding-inline:10px; }
}

/* Pricing page: the sale box above the plans. */
.pricing-promo { display:flex; align-items:center; justify-content:space-between; gap:24px 40px; margin:0 0 26px; padding:24px 30px; border-radius:18px; background:var(--promo-ink); color:#fff; box-shadow:0 14px 34px #171a2e1f; }
.pricing-promo-copy { max-width:760px; }
.pricing-promo-eyebrow { display:flex; align-items:center; gap:9px; margin:0 0 6px; color:#f8d48c; font-size:.8125rem; font-weight:650; letter-spacing:.02em; }
.pricing-promo h2 { margin:0; color:#fff; font-size:clamp(1.5rem,2.4vw,2rem); line-height:1.15; letter-spacing:-.03em; }
.pricing-promo-copy > p:last-child { margin:8px 0 0; color:#c3c5d4; font-size:.9375rem; line-height:1.6; }
.pricing-promo-code { display:flex; align-items:center; gap:12px; flex-shrink:0; padding:8px 8px 8px 18px; border:1px dashed #ffffff59; border-radius:14px; }
.pricing-promo-code code { color:#fff; font-size:1.125rem; }
.pricing-promo-copy-button { min-height:40px; padding:8px 16px; border:0; border-radius:10px; background:#fff; color:var(--promo-ink); font-size:.875rem; font-weight:650; }
.pricing-promo-copy-button:hover { background:#efeafe; }
.pricing-promo-copy-button[data-copied] { background:#d9f4e6; color:#14603f; }
.pricing-promo-copy-button:focus-visible { outline:2px solid #cfbdff; outline-offset:3px; }

/* Pricing page: plan prices with the code applied. */
.pricing-price-sale { flex-wrap:wrap; column-gap:8px; row-gap:0; }
.pricing-price-sale > strong { font-size:2.5rem; }
.pricing-price-was { color:#8a92a6; font-size:1.25rem; font-weight:550; text-decoration-thickness:2px; text-decoration-color:#c04b4b; }
.pricing-sale-note { width:fit-content; margin:9px 0 0; padding:3px 8px; border-radius:5px; background:#fff4dd; color:#7a4b00; font-size:.75rem; font-weight:550; line-height:1.6; }
.pricing-sale-note strong { font-weight:700; }
th small .pricing-price-was { font-size:inherit; font-weight:inherit; margin-right:4px; text-decoration-thickness:1px; }

@media (max-width:760px) {
  .pricing-promo { flex-direction:column; align-items:flex-start; padding:22px; }
  .pricing-promo-code { width:100%; justify-content:space-between; }
}
@media (max-width:420px) {
  .pricing-price-sale > strong { font-size:2.25rem; }
}
