/* AfricaTV Core — component styles. Colours inherit from the AfricaTV theme variables
   and fall back to the brand palette with any other theme. */
.atv-player, .atv-live, .atv-map, .atv-prog, .atv-nl { --_gold: var(--atv-gold, #ffb400); --_ink: var(--atv-ink, #fff); --_line: var(--atv-line, rgba(255,255,255,.16)); --_panel: var(--atv-panel, #111c2a); }

/* Player ------------------------------------------------------------------ */
.atv-player { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; border-radius: inherit; }
.atv-player iframe, .atv-player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.atv-player--embed { aspect-ratio: auto; }
.atv-player--embed iframe { position: static; aspect-ratio: 16 / 9; height: auto; }
.atv-facade.is-playing::after { display: none; }
.atv-facade__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.atv-facade::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.1) 45%, rgba(0,0,0,.2) 100%); pointer-events: none; }
.atv-facade__play { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; width: 100%; border: 0; background: none; cursor: pointer; color: #111; }
.atv-facade__icon { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--_gold); box-shadow: 0 12px 40px rgba(0,0,0,.45); transition: transform .2s; }
.atv-facade__icon svg { margin-left: 5px; }
.atv-facade__play:hover .atv-facade__icon, .atv-facade__play:focus-visible .atv-facade__icon { transform: scale(1.08); }
.atv-facade__play:focus-visible { outline: 3px solid var(--_gold); outline-offset: -6px; }
.atv-facade__notice { position: absolute; z-index: 3; left: 16px; right: 16px; bottom: 12px; margin: 0; font-size: 12px; line-height: 1.4; color: rgba(255,255,255,.85); text-align: center; pointer-events: none; }
.atv-facade__notice a { color: #fff; text-decoration: underline; pointer-events: auto; }
.wp-block-embed .atv-player { border-radius: 12px; }
.wp-block-embed.is-type-video .wp-block-embed__wrapper::before { display: none; }

/* Live -------------------------------------------------------------------- */
.atv-live { position: relative; border-radius: 16px; overflow: hidden; background: #000; }
.atv-live--off { aspect-ratio: 16 / 9; display: grid; place-items: center; text-align: center; background: radial-gradient(ellipse at 50% 120%, #3a1d05 0%, #0b131e 70%); }
.atv-live__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.atv-live__off { position: relative; padding: 24px; max-width: 520px; color: var(--_ink); }
.atv-live__msg { font-family: var(--atv-display, inherit); font-size: clamp(22px, 3vw, 32px); font-weight: 700; margin: 14px 0 8px; }
.atv-live__next { color: #d6dde6; margin: 0; }
.atv-live__badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; background: #e6232e; color: #fff; font-size: 12px; font-weight: 700; font-family: var(--atv-display, inherit); line-height: 1.4; vertical-align: middle; }
.atv-live__badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: atv-pulse 1.4s ease-in-out infinite; }
.atv-live__badge.is-off { background: rgba(255,255,255,.14); }
.atv-live__badge.is-off::before { animation: none; opacity: .6; }
@keyframes atv-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .atv-live__badge::before { animation: none; } }

/* Programme --------------------------------------------------------------- */
.atv-prog__tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; scrollbar-width: thin; }
.atv-prog__tabs button { flex: none; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--_line); background: transparent; color: var(--_ink); font: 600 14px/1.2 var(--atv-display, inherit); cursor: pointer; }
.atv-prog__tabs button[aria-selected="true"] { background: var(--_gold); border-color: var(--_gold); color: #111; }
.atv-prog__short { display: none; }
.atv-prog__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--_line); }
.atv-prog__item { display: grid; grid-template-columns: 76px 1fr auto; gap: 18px; align-items: start; padding: 16px 12px; border-bottom: 1px solid var(--_line); }
.atv-prog__item.is-now { background: linear-gradient(90deg, rgba(230,35,46,.16), transparent 70%); border-left: 3px solid #e6232e; }
.atv-prog__time { font: 700 18px/1.3 var(--atv-display, inherit); color: var(--_gold); font-variant-numeric: tabular-nums; }
.atv-prog__title { margin: 0; font: 600 17px/1.35 var(--atv-display, inherit); color: var(--_ink); }
.atv-prog__desc { margin: 4px 0 0; font-size: 14px; color: var(--atv-muted, #c3cbd6); }
.atv-prog__cat { font: 600 12px/1 var(--atv-display, inherit); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--chip); color: var(--chip); white-space: nowrap; text-decoration: none; }
.atv-empty { color: var(--atv-muted, #8d99a8); }
@media (max-width: 600px) {
	.atv-prog__long { display: none; }
	.atv-prog__short { display: inline; }
	.atv-prog__tabs button { padding: 8px 13px; }
	.atv-prog__item { grid-template-columns: 58px 1fr; }
	.atv-prog__cat { grid-column: 2; justify-self: start; }
}

/* Map --------------------------------------------------------------------- */
.atv-map { position: relative; }
.atv-map svg { display: block; width: 100%; height: auto; overflow: visible; }
.atv-map__c path, .atv-map__c.is-neutral { fill: #1c2838; stroke: var(--atv-night, #08101b); stroke-width: 1.2; stroke-linejoin: round; transition: fill .15s; }
.atv-map__c.is-active path { fill: var(--_gold); }
.atv-map__c.is-active:hover path, .atv-map__c.is-active:focus path { fill: #fff; }
.atv-map__c.is-active:focus { outline: none; }
.atv-map__c.is-active:focus-visible path { stroke: #fff; stroke-width: 3; }
.atv-map__c.is-current path { fill: #fff; }
.atv-map__dot { fill: none; stroke: #2b3a4f; stroke-width: 2; }
.atv-map__c.is-active .atv-map__dot { stroke: var(--_gold); }
.atv-map__tip { position: absolute; z-index: 5; transform: translate(-50%, calc(-100% - 14px)); padding: 8px 12px; border-radius: 10px; background: #fff; color: #111; box-shadow: 0 10px 28px rgba(0,0,0,.4); pointer-events: none; white-space: nowrap; font-size: 13px; line-height: 1.3; }
.atv-map__tip strong { display: block; font: 700 14px/1.3 var(--atv-display, inherit); }
.atv-map__select select { width: 100%; margin-top: 16px; height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--_line); background: var(--_panel); color: var(--_ink); font-size: 15px; }
.atv-map--compact .atv-map__select { display: none; }

/* Newsletter -------------------------------------------------------------- */
.atv-nl { width: 100%; max-width: 480px; }
.atv-nl__row { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: rgba(255,255,255,.9); }
.atv-nl__email { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 16px; font-size: 16px; color: #111; }
.atv-nl__email:focus { outline: none; }
.atv-nl__row:focus-within { box-shadow: 0 0 0 3px #111; }
.atv-nl__submit { flex: none; border: 0; border-radius: 999px; padding: 13px 22px; background: var(--atv-night, #08101b); color: #fff; font: 700 15px/1 var(--atv-display, inherit); cursor: pointer; }
.atv-nl__submit:hover { background: #1c2838; }
.atv-nl__submit:disabled { opacity: .7; cursor: progress; }
.atv-nl__consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: 13px; line-height: 1.45; }
.atv-nl__consent input { margin-top: 3px; flex: none; accent-color: var(--atv-night, #08101b); width: 16px; height: 16px; }
.atv-nl__consent a { color: inherit; text-decoration: underline; }
.atv-nl__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.atv-nl__msg { margin: 10px 0 0; font-weight: 600; font-size: 14px; min-height: 1.4em; }
.atv-nl.is-error .atv-nl__msg { color: #7a0b12; }
.atv-newsbox { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 36px 40px; border-radius: 24px; background: linear-gradient(110deg, #ffb900, #ff6a1f 70%, #ed233c); color: #1a1208; }
.atv-newsbox h2 { margin: 0 0 6px; font: 800 clamp(24px, 3vw, 34px)/1.12 var(--atv-display, inherit); color: #111; letter-spacing: -.02em; }
.atv-newsbox p { margin: 0; }
@media (max-width: 760px) { .atv-newsbox { display: block; padding: 28px 22px; } .atv-newsbox .atv-nl { margin-top: 20px; } }
@media (max-width: 420px) { .atv-nl__row { flex-direction: column; border-radius: 18px; } .atv-nl__email { height: 44px; } }

/* Fallback list (other themes) ------------------------------------------- */
.atv-video-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.atv-video-list img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 8px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.atv-map--compact .atv-map__c.is-active path { fill: #3a4a60; }
.atv-map--compact .atv-map__c.is-active:hover path { fill: #fff; }
.atv-map--compact .atv-map__c.is-current path { fill: var(--_gold); }
