/* ==========================================================================
   Ads (essentials/javascript/ads.js): video / audio ad player, banners,
   sponsored reels. Every ad carries a clear yellow "Ad" / "Sponsored" label.
   ========================================================================== */
.ad-label { display: inline-block; flex: none; padding: 2px 7px; border-radius: 5px; font: 800 11px/1.4 "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font: 800 11px/1.4 var(--tc-font-body, inherit);
  letter-spacing: 0.06em; text-transform: uppercase; color: #161200; background: #ffcc00; }

/* ---------- player (over the video, or over the music artwork) ---------- */
.ad-player { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 40; display: flex; flex-direction: column; justify-content: space-between;
  color: #fff; background: #000; cursor: pointer; overflow: hidden; border-radius: inherit; }
.ad-video { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.ad-top { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px 12px 18px;
  background: linear-gradient(rgba(0,0,0,0.72), transparent); font-size: 13px; }
.ad-time { flex: none; font-variant-numeric: tabular-nums; font-weight: 700; }
.ad-by { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e6e6e6; }
.ad-actions { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 18px 12px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.78)); }
.ad-cta { margin-right: auto; display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 10px 0 16px; border-radius: 999px;
  font: 800 14px/1 "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font: 800 14px/1 var(--tc-font-body, inherit); color: #0d0d0d; background: #fff; text-decoration: none; max-width: 60%; }
.ad-cta svg, .ad-skip svg, .ad-banner-cta svg { width: 18px; height: 18px; flex: none; }
.ad-cta:focus-visible, .ad-skip:focus-visible, .ad-sound:focus-visible, .ad-close:focus-visible, .ad-banner-link:focus-visible { outline: 2px solid #ffcc00; outline-offset: 2px; }
.ad-sound { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 50%; cursor: pointer; color: #fff;
  background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.35); }
.ad-sound svg { width: 20px; height: 20px; }
.ad-skip { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 6px; cursor: pointer;
  font: 700 14px/1 "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font: 700 14px/1 var(--tc-font-body, inherit); color: #fff; background: rgba(0,0,0,0.62); border: 1px solid rgba(255,255,255,0.45); }
.ad-skip:disabled { cursor: default; opacity: 0.85; border-color: rgba(255,255,255,0.2); }
.ad-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,0.22); }
.ad-progress span { display: block; width: 0; height: 100%; background: #ffcc00;  }
.wp.has-ad .wp-bar, .wp.has-ad .wp-center, .wp.has-ad .wp-badge, .wp.has-ad .wp-spinner { visibility: hidden; }

/* audio ad: the ad's artwork, blurred behind, sharp in the middle */
.ad-player.is-audio { background: #0b0b0b; }
.ad-art { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; background: center / cover no-repeat;  transform: scale(1.15); }
.ad-art::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; }
.ad-audio-info { position: relative; display: grid; justify-items: center; grid-gap: 4px; gap: 4px; padding: 0 16px; text-align: center; }
.ad-audio-info b { font-size: 17px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-audio-info small { font-size: 13px; color: #cfcfcf; }
.ad-cover { margin-bottom: 8px; width: 46%; width: min(46%, 180px); aspect-ratio: 1; border-radius: 12px; object-fit: cover; box-shadow: 0 2px 6px rgba(0,0,0,0.35);  }

/* ---------- banners ---------- */
.ad-slot { margin: 22px 0; }
.ad-banner { position: relative; border-radius: 14px; border: 1px solid rgba(255,204,0,0.35); background: rgba(255,255,255,0.05);
    color: #fff; }
.ad-banner-link { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 44px 10px 10px; color: inherit; text-decoration: none; border-radius: inherit; }
.ad-banner img { flex: none; width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #222; }
.ad-banner-text { flex: 1; min-width: 0; display: grid; grid-gap: 3px; gap: 3px; }
.ad-banner-text small { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: #cfcfcf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-banner-text b { font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ad-banner-cta { flex: none; display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 0 8px 0 14px; border-radius: 999px;
  font: 800 13px/1 "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font: 800 13px/1 var(--tc-font-body, inherit); color: #0d0d0d; background: #ffcc00; }
.ad-close { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 50%;
  cursor: pointer; color: #fff; background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.25); }
.ad-close svg { width: 16px; height: 16px; }
/* on the music artwork: a strip along the bottom of the picture */
.ad-banner.is-artwork { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 30; background: rgba(12,12,12,0.72); }
.ad-banner.is-artwork img { width: 48px; height: 48px; }
.ad-banner.is-artwork .ad-banner-text b { font-size: 14px; -webkit-line-clamp: 1; }
@media (max-width: 480px) {
  .ad-banner-cta { font-size: 0; gap: 0; padding: 0; width: 34px; justify-content: center; }
  .ad-banner-cta svg { width: 20px; height: 20px; }
  .ad-cta { max-width: 52%; overflow: hidden; white-space: nowrap; }
  .ad-skip { padding: 0 10px; }
}

/* ---------- sponsored reels (reel.js) ---------- */
.rl-sponsor { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.rl-sponsor-cta { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 10px 0 14px; border-radius: 999px;
  font: 800 13.5px/1 "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font: 800 13.5px/1 var(--tc-font-body, inherit); color: #0d0d0d; background: #ffcc00; text-decoration: none; pointer-events: auto; }
.rl-sponsor-cta svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .ad-progress span { transition: none; } }
/* inside articles: don't take the article's link colour / underline */
.ad-banner a.ad-banner-link, .bp-body .ad-banner a.ad-banner-link { color: #fff; text-decoration: none; border: 0; box-shadow: none; background: none; }
.ad-banner a.ad-banner-link b { color: #fff; }
.ad-banner a.ad-banner-link small { color: #cfcfcf; }
.bp-body .ad-banner img { margin: 0; max-width: none; border-radius: 10px; }
/* the "Sponsored" label and its button never fade out with the other reel controls */
.rl-reel.is-sponsored.is-playing.controls-hidden .rl-info { opacity: 1; pointer-events: auto; }

/* ---------- article banner styles (by article length) ---------- */
/* feature: big picture on top, title and a full-width button */
.ad-banner.is-feature .ad-banner-link { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 10px 14px; }
.ad-banner.is-feature img { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 10px; }
.ad-banner.is-feature .ad-banner-text b { font-size: 17px; }
.ad-banner.is-feature .ad-banner-cta { justify-content: center; height: 40px; font-size: 14px; width: auto; padding: 0 16px; }
.ad-banner.is-feature .ad-close { top: 16px; right: 16px; }
/* strip: one slim line */
.ad-banner.is-strip { border-radius: 999px; }
.ad-banner.is-strip .ad-banner-link { padding: 6px 44px 6px 6px; gap: 10px; }
.ad-banner.is-strip img { width: 36px; height: 36px; border-radius: 50%; }
.ad-banner.is-strip .ad-banner-text { grid-auto-flow: column; justify-content: start; align-items: center; grid-gap: 8px; gap: 8px; }
.ad-banner.is-strip .ad-banner-text small { display: none; }
.ad-banner.is-strip .ad-banner-text b { font-size: 14px; -webkit-line-clamp: 1; }
.ad-banner.is-strip .ad-banner-text b::before { content: "Ad"; display: inline-block; margin-right: 8px; padding: 1px 6px; border-radius: 4px; font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; vertical-align: 2px; color: #161200; background: #ffcc00; }
.ad-banner.is-strip .ad-banner-cta { height: 30px; }
.ad-banner.is-strip .ad-close { top: 50%; transform: translateY(-50%); width: 28px; height: 28px; }
@media (max-width: 480px) {
  .ad-banner.is-feature .ad-banner-cta { font-size: 14px; gap: 2px; width: auto; padding: 0 16px; }
  .ad-banner.is-feature .ad-banner-cta svg { width: 18px; height: 18px; }
}
/* custom ads: a short line under the headline */
.ad-banner-body { font-size: 13px; line-height: 1.4; color: #cfcfcf; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ad-banner.is-artwork .ad-banner-body, .ad-banner.is-strip .ad-banner-body { display: none; }

/* 13 Nov: the artwork banner covers the whole picture (same width and height), like an album-sized poster */
.ad-banner.is-artwork.is-cover { left: 0; right: auto; bottom: auto; border-radius: 20px; border-radius: var(--tc-radius-lg, 18px); overflow: hidden; background-color: #111; background-size: cover; background-position: center;
  -webkit-backdrop-filter: none; backdrop-filter: none; border-color: rgba(255,204,0,0.55); }
.ad-banner.is-cover .ad-banner-link { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 10px; padding: 16px;
  border-radius: inherit; background: linear-gradient(180deg, rgba(0,0,0,0.05) 35%, rgba(0,0,0,0.88) 100%); }
.ad-banner.is-cover .ad-banner-link > img { display: none; }
.ad-banner.is-cover .ad-banner-text { flex: none; width: 100%; }
.ad-banner.is-cover .ad-banner-text b { font-size: 16px; font-size: clamp(16px, 4.6vw, 22px); -webkit-line-clamp: 2; text-shadow: 0 1px 10px rgba(0,0,0,0.8); }
.ad-banner.is-cover .ad-banner-body { display: block; font-size: 13px; color: #e6e6e6; }
.ad-banner.is-cover .ad-banner-cta { height: 40px; padding: 0 12px 0 18px; font-size: 14px; }
.ad-banner.is-cover .ad-close { top: 10px; right: 10px; width: 36px; height: 36px; background: rgba(0,0,0,0.6); }

/* 17 Nov: the artwork banner's button — always the full label (never a bare icon on phones), a proper
   tappable button along the bottom, with the advertiser line above it */
.ad-banner.is-cover .ad-banner-link { gap: 12px; padding: 18px 16px 16px; }
.ad-banner.is-cover .ad-banner-text small { font-size: 12.5px; color: #f0f0f0; text-shadow: 0 1px 6px rgba(0,0,0,0.8); }
.ad-banner.is-cover .ad-banner-cta,
.ad-banner.is-artwork.is-cover .ad-banner-cta {
  align-self: stretch; justify-content: center; gap: 8px; width: auto; height: 46px; padding: 0 18px;
  font: 800 15px/1 "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font: 800 15px/1 var(--tc-font-body, inherit); letter-spacing: .2px; color: #111; background: linear-gradient(180deg, #ffd84d, #ffc400);
  border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,0.45), inset 0 -2px 0 rgba(0,0,0,0.12); transition: transform .12s;
}
.ad-banner.is-cover .ad-banner-cta svg { width: 20px; height: 20px; }
.ad-banner.is-cover .ad-banner-link:hover .ad-banner-cta, .ad-banner.is-cover .ad-banner-link:focus-visible .ad-banner-cta { filter: brightness(1.06); transform: translateY(-1px); }
.ad-banner.is-cover .ad-banner-link:active .ad-banner-cta { transform: scale(.985); }
@media (min-width: 700px) { .ad-banner.is-cover .ad-banner-cta { align-self: flex-start; min-width: 200px; } }
@media (prefers-reduced-motion: reduce) { .ad-banner.is-cover .ad-banner-cta { transition: none; } }
/* the artwork banner arrives softly (it waits until the song has played a little) */
.ad-banner.is-cover.is-arriving { opacity: 0; transform: scale(.98); }
.ad-banner.is-cover { transition: opacity .35s ease, transform .35s ease; }
@media (prefers-reduced-motion: reduce) { .ad-banner.is-cover { transition: none; } }
/* while an audio ad plays, the song's own controls wait */
.tc-ad-lock .control-buttons, .tc-ad-lock #progressBar, .tc-ad-lock .player-utilities { pointer-events: none; opacity: .4; transition: opacity .2s; }
.tc-ad-lock .control-buttons { filter: grayscale(.6); }
/* "Starting Vabcast ad" — a short card while the voice speaks */
.ad-intro { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(0,0,0,0.78); color: #fff; border-radius: inherit; }
.ad-intro span { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; font: 800 14px/1 "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font: 800 14px/1 var(--tc-font-body, inherit); background: rgba(255,204,0,0.16); border: 1px solid rgba(255,204,0,0.5); }
.ad-intro i { width: 10px; height: 10px; border-radius: 50%; background: #ffcc00;  }
@keyframes adPulse { 50% { opacity: .3; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .ad-intro i { animation: none; } }
.ad-sound.is-nudge { color: #111; background: #ffcc00; border-color: #ffcc00;  }

/* compat:rich:start — capable devices only (html.tc-rich, set in the head): glass blur, big soft shadows,
   filters. Weak phones and old browsers use the lighter look in the rules above. */
.tc-rich .ad-art { filter: blur(18px) brightness(0.45); }
.tc-rich .ad-cover { box-shadow: 0 18px 40px -12px rgba(0,0,0,0.8); }
.tc-rich .ad-banner { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.tc-rich .ad-banner a.ad-banner-link, .tc-rich .bp-body .ad-banner a.ad-banner-link { box-shadow: none; }
.tc-rich .ad-banner.is-artwork.is-cover { -webkit-backdrop-filter: none; backdrop-filter: none; }
/* compat:rich:end */

/* compat:motion:start — decorative movement, only when the phone isn't set to reduce motion */
@media (prefers-reduced-motion: no-preference) {
  .ad-intro i { animation: adPulse 1s ease-in-out infinite; }
  .ad-sound.is-nudge { animation: adPulse 1.2s ease-in-out 3; }
}
/* compat:motion:end */
/* Weak phones: no blurred copy of the artwork behind the ad (a big blur is the heaviest thing for a cheap GPU). */
html:not(.tc-rich) .ad-art { display: none; }
/* "Remove ads" on an ad (22 Nov): to the ad-free pass */
.ad-remove { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,0.12); color: #fff; font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.ad-remove:hover { background: rgba(57,255,106,0.25); }

/* compat:no-flexgap:start — rebuilt by tools/css_compat.py: spacing for engines without flex gap
   (html.no-flexgap, set in the head). Edit the gap in the rule above, then run the tool. */
.no-flexgap .ad-top > :not(:last-child) { margin-right: 8px; }
.no-flexgap .ad-actions > :not(:last-child) { margin-right: 8px; }
.no-flexgap .ad-cta > :not(:last-child) { margin-right: 4px; }
.no-flexgap .ad-skip > :not(:last-child) { margin-right: 6px; }
.no-flexgap .ad-banner-link > :not(:last-child) { margin-right: 12px; }
.no-flexgap .ad-banner-text small > :not(:last-child) { margin-right: 6px; }
.no-flexgap .ad-banner-cta > :not(:last-child) { margin-right: 2px; }
.no-flexgap .rl-sponsor > :not(:last-child) { margin-right: 8px; }
.no-flexgap .rl-sponsor-cta > :not(:last-child) { margin-right: 4px; }
.no-flexgap .ad-banner.is-feature .ad-banner-link > :not(:last-child) { margin-bottom: 10px; }
.no-flexgap .ad-banner.is-strip .ad-banner-link > :not(:last-child) { margin-right: 10px; }
@media (max-width: 480px) {
  .no-flexgap .ad-banner.is-feature .ad-banner-cta > :not(:last-child) { margin-right: 2px; }
}
.no-flexgap .ad-banner.is-cover .ad-banner-link > :not(:last-child) { margin-bottom: 10px; }
.no-flexgap .ad-banner.is-cover .ad-banner-link > :not(:last-child) { margin-bottom: 12px; }
.no-flexgap .ad-banner.is-cover .ad-banner-cta > :not(:last-child), .no-flexgap .ad-banner.is-artwork.is-cover .ad-banner-cta > :not(:last-child) { margin-right: 8px; }
.no-flexgap .ad-intro span > :not(:last-child) { margin-right: 10px; }
/* compat:no-flexgap:end */
