/* mySDAtv · Special offers: the banner above the header and the popup
   (src/site/offers.tsx). --offer-h is how much of the banner is on screen (set by
   the offers script); the fixed header, the phone menu and sticky bars sit below it. */

.site-header { top: var(--offer-h, 0px); }
.mobile-menu { top: calc(var(--header-h) + var(--offer-h, 0px)); }
.filterbar { top: calc(var(--header-h) + var(--offer-h, 0px)); }
html { scroll-padding-top: calc(var(--header-h) + var(--offer-h, 0px) + 16px); }

/* ---------- banner ---------- */
.offer-bar { position: relative; z-index: 101; background: var(--grad-gold); color: var(--on-gold); }
.offer-bar[hidden] { display: none; }
.offer-bar--red { background: linear-gradient(90deg, #A50E15, var(--red)); color: #fff; }
.offer-bar--blue { background: linear-gradient(90deg, var(--royal), var(--azure)); color: #fff; }
.offer-bar__inner { display: flex; align-items: center; gap: var(--s-3); min-height: 46px; padding-block: 6px; }
.offer-bar__tag {
  flex: none; padding: 3px 9px; border-radius: var(--r-pill); background: rgba(5, 10, 26, 0.12);
  font-size: var(--fs-2xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.offer-bar--red .offer-bar__tag, .offer-bar--blue .offer-bar__tag { background: rgba(255, 255, 255, 0.18); }
.offer-bar__text { flex: 1; min-width: 0; margin: 0; overflow: hidden; font-size: var(--fs-sm); white-space: nowrap; text-overflow: ellipsis; }
.offer-bar__text strong { font-weight: 800; }
.offer-bar__desc { opacity: 0.85; }
.offer-bar__cta {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 14px; border-radius: var(--r-pill);
  background: var(--bg); color: var(--text); font-size: var(--fs-sm); font-weight: 800; text-decoration: none; white-space: nowrap;
  transition: transform var(--dur) var(--ease), background-color var(--dur);
}
.offer-bar__cta:hover { color: var(--text); transform: translateX(2px); }
.offer-bar--red .offer-bar__cta, .offer-bar--blue .offer-bar__cta { background: #fff; color: var(--bg); }
.offer-bar--red .offer-bar__cta:hover, .offer-bar--blue .offer-bar__cta:hover { color: var(--bg); }
.offer-bar__cta .icon { width: 16px; height: 16px; }
.offer-bar__close {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin-right: -6px; border: 0; border-radius: 50%;
  background: transparent; color: inherit; cursor: pointer; transition: background-color var(--dur);
}
.offer-bar__close:hover { background: rgba(5, 10, 26, 0.12); }
.offer-bar--red .offer-bar__close:hover, .offer-bar--blue .offer-bar__close:hover { background: rgba(255, 255, 255, 0.16); }
.offer-bar__close .icon { width: 18px; height: 18px; }
.offer-bar a:focus-visible, .offer-bar button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (max-width: 640px) {
  .offer-bar__inner { gap: var(--s-2); }
  .offer-bar__tag, .offer-bar__desc { display: none; }
  .offer-bar__text { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
  .offer-bar__cta { padding-inline: 11px; }
}

/* ---------- popup ---------- */
.offer-pop { width: min(520px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 48px); padding: 0; overflow: visible; border: 0; background: transparent; color: var(--text); }
.offer-pop::backdrop { background: rgba(5, 10, 26, 0.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.offer-pop[open] { animation: offer-in 280ms var(--ease); }
@keyframes offer-in { from { opacity: 0; transform: translateY(12px) scale(0.97); } }
.offer-pop__card {
  position: relative; max-height: calc(100vh - 48px); overflow: hidden auto; border-radius: var(--r-xl);
  background: radial-gradient(90% 60% at 100% 0%, rgba(10, 143, 216, 0.22), rgba(10, 143, 216, 0) 60%), var(--surface-1);
  border: 1px solid var(--line-strong); border-top: 4px solid var(--gold); box-shadow: 0 40px 100px -30px #000;
}
.offer-pop--red .offer-pop__card { border-top-color: var(--red); }
.offer-pop--blue .offer-pop__card { border-top-color: var(--azure); }
.offer-pop__img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.offer-pop__body { display: grid; justify-items: start; gap: var(--s-3); padding: var(--s-6); }
.offer-pop__tag { padding: 3px 10px; border-radius: var(--r-pill); background: rgba(255, 210, 31, 0.14); color: var(--gold); font-size: var(--fs-2xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.offer-pop--red .offer-pop__tag { background: rgba(237, 28, 36, 0.16); color: var(--red-text); }
.offer-pop--blue .offer-pop__tag { background: rgba(124, 198, 234, 0.16); color: var(--sky); }
.offer-pop__title { font-size: var(--fs-2xl); line-height: var(--lh-snug); }
.offer-pop__text { display: grid; gap: var(--s-2); color: var(--muted); }
.offer-pop__text p { margin: 0; }
.offer-pop__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); }
.offer-btn { background: var(--gold); color: var(--on-gold); box-shadow: 0 10px 30px -8px var(--glow-gold); }
.offer-btn:hover { background: var(--gold-hover); color: var(--on-gold); }
.offer-pop--red .offer-btn { background: var(--red); color: #fff; box-shadow: 0 10px 30px -8px var(--red-glow); }
.offer-pop--red .offer-btn:hover { background: #FF3A41; color: #fff; }
.offer-pop--blue .offer-btn { background: var(--azure); color: #fff; box-shadow: 0 10px 30px -8px var(--glow-azure); }
.offer-pop--blue .offer-btn:hover { background: #22A2EA; color: #fff; }
.offer-btn .icon { width: 18px; height: 18px; }
.offer-pop__x {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(5, 10, 26, 0.72); color: var(--text); cursor: pointer;
}
.offer-pop__x:hover { border-color: rgba(124, 198, 234, 0.6); }
.offer-pop__x .icon { width: 18px; height: 18px; }
@media (max-width: 560px) { .offer-pop__body { padding: var(--s-5); } }

@media (prefers-reduced-motion: reduce) {
  .offer-pop[open] { animation: none; }
  .offer-bar__cta { transition: none; }
}
