/* dealroom.co Wrapped 26 — the advent-calendar countdown card in the news hub's right column.
   Rendered by renderWrappedCta() in functions/lib/news-hub.js, driven by js/wrapped-cta.js.
   It stays hidden outside the campaign window (the script shows it). */
@font-face {
  font-family: "BBH Bartle"; /* theme-guardrail-allow: @font-face for the Wrapped 26 campaign face */
  src: url(/wrapped/assets/fonts/BBHBartle-Regular.ttf) format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

.wr-cta {
  /* the Wrapped 26 campaign palette: a fixed brand card, the same in every context */
  --wr-navy: #071637; /* theme-guardrail-allow: Wrapped 26 campaign palette */
  --wr-blue: #16306a; /* theme-guardrail-allow: Wrapped 26 campaign palette */
  --wr-glow-blue: rgba(50, 99, 187, .55); /* theme-guardrail-allow: Wrapped 26 campaign palette */
  --wr-glow-red: rgba(198, 0, 33, .22); /* theme-guardrail-allow: Wrapped 26 campaign palette */
  --wr-data: #8eb5fc; /* theme-guardrail-allow: Wrapped 26 campaign palette */
  --wr-gift: #44d180; /* theme-guardrail-allow: Wrapped 26 campaign palette */
  --wr-read: #ff8a9c; /* theme-guardrail-allow: Wrapped 26 campaign palette */
  --wr-game: #f9c043; /* theme-guardrail-allow: Wrapped 26 campaign palette */
  --wr-font: "BBH Bartle", var(--font-display); /* theme-guardrail-allow: Wrapped 26 campaign display face */
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-sizing: border-box;
  min-width: 0;
  padding: 1.15rem 1.25rem 1.1rem;
  border-radius: 8px;
  overflow: hidden;
  isolation: isolate;
  color: var(--text-on-inverse);
  background:
    radial-gradient(120% 140% at 100% 0%, var(--wr-glow-blue), transparent 55%),
    radial-gradient(90% 120% at 0% 110%, var(--wr-glow-red), transparent 60%),
    linear-gradient(160deg, var(--wr-blue), var(--wr-navy) 70%);
}
.wr-cta[hidden] { display: none; }
/* the campaign pattern, faint and soft */
.wr-cta::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background: url(/wrapped/assets/pattern.svg) 0 0 / 220px auto repeat;
  opacity: .07;
  filter: grayscale(1) blur(1.5px);
  transform: rotate(-8deg);
  pointer-events: none;
}

.wr-cta-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.wr-cta-top .wr-cta-day { text-align: right; padding-top: .15rem; }
.wr-cta-logo { display: block; width: clamp(130px, 46%, 170px); height: auto; }
.wr-cta-count { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; min-width: 0; }
.wr-cta-label { font: 600 .78rem/1.2 var(--font-sans, sans-serif); color: var(--text-on-inverse-muted); white-space: nowrap; }
.wr-cta-time {
  display: inline-flex;
  font-family: var(--wr-font);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
  line-height: 1;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wr-cta-time i { display: inline-block; font-style: normal; }
.wr-cta-time i.sp { width: .45em; }
.wr-cta-time.is-long { font-size: clamp(1.15rem, 1.6vw, 1.4rem); }
.wr-cta-time i.in { animation: wr-cta-in .42s cubic-bezier(.22, .8, .25, 1) both; }
@keyframes wr-cta-in {
  from { transform: translateY(65%) scale(.85); opacity: 0; filter: blur(4px); }
  to { transform: none; opacity: 1; filter: none; }
}

.wr-cta-bottom { display: flex; align-items: center; justify-content: space-between; gap: .9rem 1rem; }
.wr-cta-day { font: 700 .9rem/1.2 var(--font-sans, sans-serif); }
.wr-cta-day span { font-weight: 500; color: var(--text-on-inverse-muted); }
/* 25 small doors: opened ones in the four campaign colours */
.wr-cta-doors { display: grid; grid-template-columns: repeat(25, 1fr); gap: 2px; flex: 1 1 auto; min-width: 0; max-width: 200px; }
.wr-cta-doors i { height: 6px; border-radius: 1.5px; background: var(--border-on-inverse); }
.wr-cta-doors i.on:nth-child(4n + 1) { background: var(--wr-data); }
.wr-cta-doors i.on:nth-child(4n + 2) { background: var(--wr-gift); }
.wr-cta-doors i.on:nth-child(4n + 3) { background: var(--wr-read); }
.wr-cta-doors i.on:nth-child(4n + 4) { background: var(--wr-game); }
.wr-cta-doors i.today { box-shadow: 0 0 0 1.5px var(--text-on-inverse); }

.wr-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  flex: none;
  padding: .7rem 1.15rem;
  border-radius: 999px;
  background: var(--text-on-inverse);
  color: var(--surface-inverse);
  font: 700 .9rem/1 var(--font-sans, sans-serif);
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s, box-shadow .15s;
}
.wr-cta-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md, none); }
.wr-cta-btn:focus-visible { outline: 2px solid var(--accent-on-inverse); outline-offset: 3px; }
.wr-cta-btn span { transition: transform .15s; }
.wr-cta-btn:hover span { transform: translateX(2px); }

@media (prefers-reduced-motion: reduce) {
  .wr-cta-time i.in { animation: none; }
  .wr-cta-btn, .wr-cta-btn span { transition: none; }
}

/* Placement: a one-row banner across the page above the top stories (renderWrappedCta in
   functions/lib/news-hub.js). It used to sit in the right column, which made the rail taller
   than the story grid and left a gap under the stories. */
.wr-cta--banner { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .75rem 1.75rem; padding: .85rem 1.25rem; margin: 0 0 1.25rem; }
.wr-cta--banner .wr-cta-top { align-items: center; gap: 1.25rem; flex: none; }
.wr-cta--banner .wr-cta-top .wr-cta-day { text-align: left; padding-top: 0; }
.wr-cta--banner .wr-cta-logo { width: 128px; }
.wr-cta--banner .wr-cta-count { flex-direction: row; align-items: baseline; gap: .6rem; flex: 1 1 auto; }
.wr-cta--banner .wr-cta-time { font-size: clamp(1.2rem, 1.6vw, 1.45rem); }
.wr-cta--banner .wr-cta-bottom { flex: none; gap: 1.5rem; }
.wr-cta--banner .wr-cta-doors { width: 200px; flex: none; }
@media (max-width: 760px) {
  .wr-cta--banner { gap: .7rem 1rem; }
  .wr-cta--banner .wr-cta-count { flex-basis: 100%; flex-direction: column; align-items: flex-start; gap: .3rem; }
  .wr-cta--banner .wr-cta-bottom { flex-basis: 100%; justify-content: space-between; }
  .wr-cta--banner .wr-cta-doors { width: auto; flex: 1 1 auto; max-width: 200px; }
}
