/*
 * December holiday banner: a 64px night-sky strip with a holly garland along the top, gentle snow,
 * "24 days till Christmas" and a gold "Claim free Pro" button. Used by the marketing pages
 * (markup from scripts/xmas-banner-build.mjs, behavior in public/xmas-banner.js) and by the app's
 * Home screen (src/holiday/HolidayBand.tsx). While it shows (html.vs-xmas) the support and invite
 * banners step aside, so there is one offer at the top.
 * Retire with the holiday campaign (see scripts/xmas-banner-build.mjs).
 */
html.vs-xmas .support-banner { display: none !important; }

.xmas-banner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, #0a1030 0%, #1a2a5c 70%, #2d4678 100%);
  color: #fff1cf;
  border-bottom: 1px solid rgba(236, 234, 242, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
.xmas-banner[hidden] { display: none; }
/* Translated pages keep the English text out of sight until public/xmas-banner.js has put theirs in. */
html:not([lang^="en"]) .xmas-banner:not(.is-ready) .xmas-banner-inner { visibility: hidden; }
/* Aurora: a soft green-blue-pink band drifting behind everything. */
.xmas-banner::before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  top: 18px;
  height: 26px;
  z-index: 0;
  background: linear-gradient(90deg, rgba(61, 245, 168, 0.55), rgba(106, 139, 255, 0.55) 50%, rgba(255, 122, 217, 0.5));
  filter: blur(12px);
  opacity: 0.55;
  animation: xmas-aurora 11s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes xmas-aurora { from { transform: translateX(-40px); opacity: 0.4; } to { transform: translateX(40px); opacity: 0.7; } }
.xmas-garland { position: absolute; left: 0; top: 0; width: 100%; height: 64px; z-index: 1; pointer-events: none; display: block; }
.xmas-snow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.xmas-banner-inner {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  min-height: 64px;
  margin-inline: auto;
  padding: 8px 24px 0 21px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.xmas-count { margin: 0; display: flex; align-items: center; gap: 10px; white-space: nowrap; min-width: 0; }
.xmas-num {
  text-box: trim-both cap alphabetic;
  font-family: Fredoka, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  color: #f6fbff;
  text-shadow: 0 0 10px rgba(130, 195, 255, 0.95), 0 0 2px rgba(210, 235, 255, 0.9);
  font-variant-numeric: tabular-nums;
}
.xmas-num[hidden], .xmas-unit[hidden] { display: none; }
.xmas-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.xmas-unit {
  text-box: trim-both cap alphabetic;
  font-family: Fredoka, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #e8f3ff;
}
.xmas-till {
  text-box: trim-both cap alphabetic;
  font-family: Pacifico, "Brush Script MT", cursive;
  font-weight: 400;
  font-size: 15px;
  line-height: 1;
  color: #fff1cf;
  text-shadow: 0 0 12px rgba(255, 214, 150, 0.45);
}
.xmas-spacer { flex: 1 1 auto; }
.xmas-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #ffc857;
  color: #0a0a0a;
  font: 600 13.5px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(255, 200, 87, 0.4);
  transition: transform 0.15s, box-shadow 0.2s;
}
.xmas-cta:hover { transform: translateY(-1px); box-shadow: 0 0 22px rgba(255, 200, 87, 0.6); color: #0a0a0a; }
.xmas-close {
  flex: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff1cf;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.xmas-close:hover { background: rgba(255, 255, 255, 0.08); }
.xmas-cta:focus-visible, .xmas-close:focus-visible { outline: 2px solid #6cd6e8; outline-offset: 3px; }
/* Inside the app it is a taller card in the Home list (about 130px), sized by the width it gets there
   rather than the window's, since the Home list can be narrow on a wide screen. The card sits in a frame
   (.xmas-app) whose padding leaves room for the garland (.xmas-wreath, drawn 30px up and left of the card)
   to wrap its top edge and corners and spill past them; the card itself clips, for the snow.
   flex: none: the Home list is a scrolling flex column, and without it the list squeezes the card down to
   its border once the list is taller than the screen. */
.xmas-app { position: relative; flex: none; padding: 18px 14px 0; }
.xmas-app[hidden] { display: none; }
.xmas-wreath { position: absolute; left: -16px; top: -12px; z-index: 3; pointer-events: none; overflow: visible; }
.xmas-banner.is-app { flex: none; container-type: inline-size; border-radius: 16px; border: 1px solid rgba(255, 196, 87, 0.28); box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.6); }
.xmas-banner.is-app::before { top: 48px; height: 40px; }
.xmas-banner.is-app .xmas-banner-inner { max-width: none; min-height: 120px; padding: 42px 38px 22px 34px; gap: 18px; }
.xmas-count[hidden] { display: none; }
/* Left: one line in one font. The offer leads in white with "3 free days" in gold; the deadline (or the holiday greeting) follows, softer. */
.xmas-lead { flex: 1 1 auto; min-width: 0; }
.xmas-head { margin: 0; font-family: Fredoka, "Arial Rounded MT Bold", system-ui, sans-serif; font-weight: 700; font-size: 22px; line-height: 1.2; color: #f6fbff; text-shadow: 0 0 14px rgba(130, 195, 255, 0.3); }
.xmas-head em { font-style: normal; color: #ffc857; text-shadow: 0 0 14px rgba(255, 200, 87, 0.4); }
.xmas-sep, .xmas-left { font-weight: 600; color: #cfd9ff; text-shadow: none; }
.xmas-left { white-space: nowrap; }
/* Not wide enough for one line next to the two buttons: the deadline moves under the offer, without the dot. */
@container (max-width: 899px) {
  .xmas-sep { display: none; }
  .xmas-left { display: block; font-size: 17px; margin-top: 4px; }
}
.xmas-banner.is-app .xmas-cta { height: 42px; padding: 0 22px; font-size: 14.5px; }
/* Right: a small open gift with the gift card's "3 DAYS" badge, next to the button. */
.xmas-gift { flex: none; display: block; width: 64px; height: 56px; margin-right: -6px; }
.xmas-gift svg { display: block; width: 100%; height: 100%; overflow: visible; }
.xmas-gift-badge { animation: xmas-bob 3.2s ease-in-out infinite alternate; }
@keyframes xmas-bob { from { transform: translateY(1px); } to { transform: translateY(-2px); } }
/* Bottom: a soft snow drift. */
.xmas-scene { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 40px; z-index: 1; pointer-events: none; display: block; }
/* The button pair, as on the app's What's New cards: the gold pill and an outlined "Not now" (hides it for 7 days). */
.xmas-actions { flex: none; display: flex; align-items: center; gap: 8px; }
.xmas-notnow { height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14); background: transparent; color: #e7ebf0; font: 600 14px/1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.xmas-notnow:hover { background: rgba(255, 255, 255, 0.06); }
.xmas-notnow:focus-visible { outline: 2px solid #6cd6e8; outline-offset: 3px; }
/* Narrower cards: the gift steps out first, then the text shrinks. */
@container (max-width: 560px) {
  .xmas-banner.is-app .xmas-gift { display: none; }
}
@container (max-width: 440px) {
  .xmas-banner.is-app .xmas-banner-inner { padding: 42px 32px 20px 28px; gap: 10px; }
  .xmas-head { font-size: 18px; line-height: 1.15; }
  /* Too narrow for one line: it breaks at natural points, "3 free days" / "of Pro" / "Claim by Dec 31". */
  .xmas-head em { display: block; }
  .xmas-sep { display: none; }
  .xmas-left { display: block; font-size: 15px; margin-top: 4px; }
  .xmas-banner.is-app .xmas-cta { height: 38px; padding: 0 14px; font-size: 13px; justify-content: center; }
  /* Not enough room side by side: the buttons stack, the same width. */
  .xmas-actions { flex-direction: column; align-items: stretch; gap: 6px; }
  .xmas-notnow { height: 34px; font-size: 13px; }
}

@media (max-width: 720px) {
  .xmas-banner-inner { gap: 8px; padding: 8px 6px 0 12px; }
  .xmas-count { gap: 8px; }
  .xmas-num { font-size: 27px; }
  .xmas-stack { gap: 4px; }
  .xmas-unit { font-size: 11.5px; }
  .xmas-till { font-size: 13px; }
  .xmas-cta { height: 32px; padding: 0 12px; font-size: 12.5px; }
  .xmas-close { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .xmas-banner::before, .xmas-gift-badge { animation: none; }
  .xmas-cta { transition: none; }
  .xmas-cta:hover { transform: none; }
}
