/* ============================================================================
   PayWindow — ported from the ZZAZZ plug-and-play extension (ContentGate/paywindow.css)
   Bloomberg-style live-pricing paywall surface. All classes prefixed `zzazz-pw-`
   to avoid colliding with the theme's own CSS.
   The price band stays dark in both themes (editorial-terminal feel).
   ============================================================================ */

/* ── Overlay + slide host (mirrors the extension's paywall-overlay/slide) ── */
.pw-overlay{
  position:fixed; inset:0; z-index:100000;
  display:none; align-items:flex-start; justify-content:center;
  padding:0; background:rgba(0,0,0,0);
  -webkit-backdrop-filter:blur(0px); backdrop-filter:blur(0px);
  transition:background-color .28s ease, backdrop-filter .28s ease;
  overflow-y:auto;
}
.pw-overlay.open{
  display:flex; background:rgba(0,0,0,0.28);
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
}
.pw-host{
  width:100%; display:flex; justify-content:center;
  padding:32px 16px;
  transform:translate3d(0,8%,0); opacity:0;
  transition:transform .34s cubic-bezier(.25,.8,.25,1), opacity .24s ease;
}
.pw-overlay.open .pw-host{ transform:translate3d(0,0,0); opacity:1; }

.zzazz-pw {
  /* === Light theme (default) === */
  --zz-bg: rgb(255 255 255);
  --zz-bg-soft: rgb(242 242 243);
  --zz-bg-cream: #faf6ec;
  --zz-text: rgb(45 51 58);
  --zz-text-muted: rgb(102 102 102);
  --zz-text-faint: rgb(128 128 128);
  --zz-border: rgb(236 236 237);
  --zz-border-soft: rgba(0, 0, 0, 0.06);
  --zz-up: #2ABA7E;
  --zz-down: #F0616D;
  --zz-mid: #FEA01C;
  --zz-amber: rgb(255 170 0);
  --zz-accent: #c8442f;
  --zz-rail-timepay: var(--zz-up);
  --zz-rail-tpc: rgb(133 45 255);
  --zz-rail-cash: #b8893a;
  --zz-band-bg: #08080A;
  --zz-band-bg-soft: #161616;
  --zz-band-text: #ffffff;
  --zz-band-muted: rgba(255, 255, 255, 0.55);
  --zz-band-faint: rgba(255, 255, 255, 0.35);

  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  background: var(--zz-bg);
  color: var(--zz-text);
  font-family: 'Geist', 'Geist Mono', -apple-system, BlinkMacSystemFont, sans-serif;
  border-radius: 8px;
  border: 1px solid var(--zz-border);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
}

.zzazz-pw[data-theme="dark"] {
  --zz-bg: rgb(28 28 30);
  --zz-bg-soft: rgb(44 44 46);
  --zz-bg-cream: rgb(38 38 38);
  --zz-text: rgb(245 245 247);
  --zz-text-muted: rgb(161 161 166);
  --zz-text-faint: rgb(128 128 128);
  --zz-border: rgb(58 58 60);
  --zz-border-soft: rgba(255, 255, 255, 0.08);
  --zz-up: #30D158;
  --zz-down: #FF453A;
  --zz-mid: #FEA01C;
}

.zzazz-pw *, .zzazz-pw *::before, .zzazz-pw *::after { box-sizing: border-box; }

/* ── HEADER ── */
.zzazz-pw-header { padding: 24px 28px 20px; background: var(--zz-bg); border-bottom: 1px solid var(--zz-border); position:relative; }
.zzazz-pw-header-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; min-height: 18px; }
.zzazz-pw-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 10px; font-weight: 600; letter-spacing: 0.18em; color: var(--zz-accent); text-transform: uppercase; }
.zzazz-pw-tag-sep { color: var(--zz-text-faint); font-weight: 400; }
.zzazz-pw-auth { display: inline-flex; align-items: center; gap: 6px; font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 10px; letter-spacing: 0.12em; color: var(--zz-text-muted); text-transform: uppercase; }
.zzazz-pw-auth-balance { color: var(--zz-up); font-weight: 600; }
.zzazz-pw-auth-divider { color: var(--zz-text-faint); margin: 0 2px; }
.zzazz-pw-auth-btn { appearance: none; background: transparent; border: 1px solid var(--zz-border); border-radius: 999px; color: var(--zz-text-muted); font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 9px; cursor: pointer; line-height: 1; transition: color 0.18s ease, border-color 0.18s ease; }
.zzazz-pw-auth-btn:hover { color: var(--zz-text); border-color: var(--zz-text); }
.zzazz-pw-signin-cta { appearance: none; background: var(--zz-text); color: var(--zz-bg); border: none; border-radius: 999px; font-family: 'Geist', -apple-system, sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; padding: 7px 14px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; transition: opacity 0.18s ease; }
.zzazz-pw-signin-cta:hover { opacity: 0.85; }
.zzazz-pw-source { font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 10px; font-weight: 500; letter-spacing: 0.12em; color: var(--zz-text-muted); text-transform: uppercase; margin-bottom: 14px; }
.zzazz-pw-headline { font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 28px; font-weight: 600; line-height: 1.15; letter-spacing: -0.4px; color: var(--zz-text); margin: 0 0 12px; }
.zzazz-pw-description { font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 14px; font-weight: 400; font-style: italic; line-height: 1.55; color: var(--zz-text-muted); max-width: 720px; margin: 0; }
.zzazz-pw-close { position:absolute; top:16px; right:16px; width:30px; height:30px; border-radius:999px; border:1px solid var(--zz-border); background:var(--zz-bg-soft); color:var(--zz-text-muted); font-size:18px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; z-index:3; transition:background .15s, color .15s; }
.zzazz-pw-close:hover{ background:var(--zz-text); color:var(--zz-bg); }

/* ── PRICE BAND (always dark) ── */
.zzazz-pw-price-band { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; padding: 22px 28px; background: var(--zz-band-bg); color: var(--zz-band-text); border-bottom: 1px solid var(--zz-border); }
.zzazz-pw-price-left { display: flex; flex-direction: column; gap: 8px; }
.zzazz-pw-price-label { font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 10px; font-weight: 600; letter-spacing: 0.16em; color: var(--zz-amber); text-transform: uppercase; }
.zzazz-pw-price-big { font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 48px; font-weight: 500; line-height: 1; letter-spacing: -1px; color: var(--zz-band-text); margin: 2px 0 4px; }
.zzazz-pw-price-tail { background: rgba(240, 97, 109, 0.22); color: var(--zz-down); border-radius: 4px; padding: 1px 6px; margin-left: 2px; transition: background .25s ease, color .25s ease; }
/* Live tick flash on the whole price */
.zzazz-pw-price-big.flash-up  { animation: zzPwFlashUp 1s ease-out; }
.zzazz-pw-price-big.flash-down{ animation: zzPwFlashDown 1s ease-out; }
.zzazz-pw-price-big.flash-up .zzazz-pw-price-tail  { background: rgba(48,209,88,0.30); color: var(--zz-up); }
@keyframes zzPwFlashUp { 0%,55%{ color:#30D158 } 100%{ color:var(--zz-band-text) } }
@keyframes zzPwFlashDown { 0%,55%{ color:#FF453A } 100%{ color:var(--zz-band-text) } }
.zzazz-pw-price-meta { font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 11px; letter-spacing: 0.04em; color: var(--zz-band-muted); }
.zzazz-pw-price-meta strong { color: var(--zz-up); font-weight: 600; }
.zzazz-pw-price-stats { display: flex; gap: 18px; flex-wrap: wrap; font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 11px; letter-spacing: 0.08em; color: var(--zz-band-faint); text-transform: uppercase; margin-top: 4px; }
.zzazz-pw-price-stats strong { color: var(--zz-band-text); font-weight: 600; }
.zzazz-pw-price-right { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.zzazz-pw-chart { width: 100%; height: 110px; position: relative; }
.zzazz-pw-chart svg { width: 100%; height: 100%; display: block; }
.zzazz-pw-chart-axis { position: absolute; right: 4px; font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 9px; letter-spacing: 0.06em; color: var(--zz-band-faint); }
.zzazz-pw-chart-axis.top { top: 0; }
.zzazz-pw-chart-axis.bot { bottom: 0; }
.zzazz-pw-chart-labels { display: flex; justify-content: space-between; font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 9px; font-weight: 600; letter-spacing: 0.16em; color: var(--zz-band-faint); text-transform: uppercase; margin-top: 6px; }

/* ── OPTIONS GRID ── */
.zzazz-pw-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 22px 28px 16px; }
.zzazz-pw-option { appearance: none; background: var(--zz-bg); border: 1px solid var(--zz-border); border-radius: 8px; padding: 18px 18px 16px; position: relative; cursor: pointer; text-align: left; color: inherit; font-family: inherit; transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease; display: flex; flex-direction: column; gap: 6px; }
.zzazz-pw-option:hover { border-color: var(--zz-text); transform: translateY(-1px); }
.zzazz-pw-option[disabled] { opacity: 0.55; cursor: progress; }
.zzazz-pw-option.primary { border-color: var(--zz-up); background: linear-gradient(180deg, rgba(42, 186, 126, 0.06) 0%, rgba(42, 186, 126, 0) 100%); }
.zzazz-pw-option.primary::before { content: "RECOMMENDED"; position: absolute; top: -9px; left: 14px; background: var(--zz-up); color: #fff; font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.16em; padding: 3px 7px; border-radius: 3px; }
.zzazz-pw-option-head { display: flex; align-items: center; gap: 8px; font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.zzazz-pw-option-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.zzazz-pw-option.timepay .zzazz-pw-option-dot, .zzazz-pw-option.timepay .zzazz-pw-option-head { color: var(--zz-rail-timepay); }
.zzazz-pw-option.timepay .zzazz-pw-option-dot { background: var(--zz-rail-timepay); }
.zzazz-pw-option.tpc .zzazz-pw-option-dot, .zzazz-pw-option.tpc .zzazz-pw-option-head { color: var(--zz-rail-tpc); }
.zzazz-pw-option.tpc .zzazz-pw-option-dot { background: var(--zz-rail-tpc); }
.zzazz-pw-option.cash .zzazz-pw-option-dot, .zzazz-pw-option.cash .zzazz-pw-option-head { color: var(--zz-rail-cash); }
.zzazz-pw-option.cash .zzazz-pw-option-dot { background: var(--zz-rail-cash); }
.zzazz-pw-option-cost { font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 22px; font-weight: 500; line-height: 1.1; color: var(--zz-text); letter-spacing: -0.4px; margin-top: 2px; }
.zzazz-pw-option-detail { font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 12.5px; line-height: 1.45; color: var(--zz-text-muted); }
.zzazz-pw-error { margin: 0 28px 12px; padding: 8px 12px; border: 1px solid var(--zz-down); background: color-mix(in srgb, var(--zz-down) 8%, transparent); border-radius: 4px; color: var(--zz-down); font-family: 'Geist', system-ui, sans-serif; font-size: 12px; line-height: 1.4; }

/* ── TRUST GRID ── */
.zzazz-pw-trust { padding: 8px 28px 18px; }
.zzazz-pw-trust-head { display: flex; justify-content: space-between; align-items: baseline; font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 10px; font-weight: 700; letter-spacing: 0.16em; color: var(--zz-text-muted); text-transform: uppercase; margin-bottom: 10px; }
.zzazz-pw-trust-conf { color: var(--zz-up); font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 12px; }
.zzazz-pw-trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.zzazz-pw-trust-tile { background: var(--zz-bg-soft); border-radius: 6px; padding: 10px 12px; font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; }
.zzazz-pw-trust-name { font-size: 9px; font-weight: 600; letter-spacing: 0.14em; color: var(--zz-text-muted); text-transform: uppercase; margin-bottom: 4px; }
.zzazz-pw-trust-value { font-size: 13px; font-weight: 600; letter-spacing: -0.2px; color: var(--zz-text); }
.zzazz-pw-trust-tile.high .zzazz-pw-trust-value { color: var(--zz-up); }
.zzazz-pw-trust-tile.mid  .zzazz-pw-trust-value { color: var(--zz-mid); }
.zzazz-pw-trust-tile.low  .zzazz-pw-trust-value { color: var(--zz-down); }

/* ── METADATA PILLS ── */
.zzazz-pw-pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 28px 14px; border-bottom: 1px solid var(--zz-border); }
.zzazz-pw-pill { background: var(--zz-bg-cream); border: 1px solid var(--zz-border-soft); border-radius: 4px; padding: 5px 10px; font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 10px; letter-spacing: 0.12em; color: var(--zz-text-muted); text-transform: uppercase; }
.zzazz-pw-pill-label { color: var(--zz-accent); margin-right: 4px; font-weight: 600; }
.zzazz-pw[data-theme="dark"] .zzazz-pw-pill { background: var(--zz-bg-soft); }

/* ── COMMENTARY ── */
.zzazz-pw-commentary { padding: 18px 28px 22px; font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 13.5px; line-height: 1.6; color: var(--zz-text-muted); font-style: italic; background: var(--zz-bg); }
.zzazz-pw-commentary-label { display: block; font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 10px; font-weight: 700; letter-spacing: 0.18em; color: var(--zz-text-faint); text-transform: uppercase; margin-bottom: 6px; font-style: normal; }
.zzazz-pw-commentary strong { color: var(--zz-text); font-weight: 600; font-style: normal; }

/* ── AD PLAYBACK ── */
/* Ad served in place of the option buttons — full width, filling the space
   below the QAP price band. Header + price band above stay put; the options,
   trust grid and pills are hidden while the ad plays. position:relative anchors
   the close / verify overlays. */
.zzazz-pw-ad { position: relative; width: 100%; height: 100%; background: #0d0d0d; }
.zzazz-pw-ad iframe { width:100%; height:100%; border:0; display:block; }

/* Ad view: clicking "unlock by watching ad" keeps the title/header and serves
   the ad below it — same paywindow width, no full-screen takeover, no footer.
   The modal HUGS its content (header + ad) so there's no empty space at the
   bottom. The ad area is sized to the player's content (the player is a fixed,
   bottom-anchored layout); #0d0d0d matches it so any minor slack blends in. */
.zzazz-pw-adview .zzazz-pw-ad { height: 720px; max-height: calc(100dvh - 64px); }
/* Drop the description line in the ad view — that space goes to the ad. */
.zzazz-pw-adview .zzazz-pw-description { display: none; }
/* Top-LEFT so it never collides with the player's own mute button (top-right). */
.zzazz-pw-ad-close { position: absolute; top: 12px; left: 12px; width: 30px; height: 30px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(0, 0, 0, 0.55); color: #fff; font-family: 'Geist', -apple-system, sans-serif; font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; z-index: 10; transition: background 0.18s ease, border-color 0.18s ease; }
.zzazz-pw-ad-close:hover { background: rgba(0, 0, 0, 0.8); border-color: rgba(255, 255, 255, 0.5); }
.zzazz-pw-ad-verify { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.6); color: #fff; font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; pointer-events: none; }

/* ── FOOTER ── */
.zzazz-pw-foot { padding: 12px 28px; background: var(--zz-bg-soft); border-top: 1px solid var(--zz-border); display: flex; align-items: center; justify-content: space-between; font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; font-size: 9px; letter-spacing: 0.16em; color: var(--zz-text-faint); text-transform: uppercase; }
.zzazz-pw-brand-mark { color: var(--zz-text); font-weight: 700; letter-spacing: 0.2em; }

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
  .zzazz-pw-price-band { grid-template-columns: 1fr; gap: 16px; }
  .zzazz-pw-trust-grid { grid-template-columns: repeat(2, 1fr); }
  .zzazz-pw-options { grid-template-columns: 1fr; }
  .zzazz-pw-headline { font-size: 22px; }
  .zzazz-pw-price-big { font-size: 38px; }
  .zzazz-pw-header, .zzazz-pw-price-band, .zzazz-pw-options, .zzazz-pw-trust, .zzazz-pw-pills, .zzazz-pw-commentary, .zzazz-pw-foot { padding-left: 20px; padding-right: 20px; }
}
