/* Text Radio: animations, stream typography, shared visual pieces Tailwind utilities cannot express (PRD 7). */

/* ------------------------------------------------------------ base, focus, a11y */
:root { --signal: #F73D62; --onair: #EF3B32; --night-950: #F6F7FB; --night-800: #FFFFFF; --night-700: #EEF1F7; --night-600: #DFE3EE; --fg: #1B2548; --fg-muted: #475379; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 10px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--signal); color: #fff; font-weight: 700; }
.skip-link:focus { top: 12px; }
.tabular, .tabular-nums, time, .countdown { font-variant-numeric: tabular-nums; }
.countdown { font-weight: 800; letter-spacing: .02em; }
[hidden] { display: none !important; }

/* Indic scripts: taller lines, never uppercase (PRD 7.2) */
:lang(te), :lang(ta), :lang(hi), :lang(kn) { line-height: 1.8; }
:lang(te) .eyebrow, :lang(ta) .eyebrow, :lang(hi) .eyebrow, :lang(kn) .eyebrow,
:lang(te) .uppercase, :lang(ta) .uppercase, :lang(hi) .uppercase, :lang(kn) .uppercase { text-transform: none; letter-spacing: 0; }

/* ------------------------------------------------------------ ON AIR badge: pulsing dot + 4-bar equalizer */
.onair-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--onair); color: #fff; font-weight: 700; font-size: 11px; line-height: 1.4; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.onair-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #fff; flex: none; }
.onair-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #fff; animation: tr-pulse 1.6s ease-out infinite; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--onair); position: relative; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--onair); animation: tr-pulse 1.6s ease-out infinite; }
@keyframes tr-pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.6); opacity: 0; } }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.eq i { display: block; width: 2px; height: 100%; background: currentColor; border-radius: 1px; transform-origin: bottom; animation: tr-eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.25s; }
.eq i:nth-child(3) { animation-delay: -.5s; }
.eq i:nth-child(4) { animation-delay: -.75s; }
@keyframes tr-eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* ------------------------------------------------------------ stream (show page) */
.stream-text { font-size: 18px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.stream-text:lang(te), .stream-text:lang(ta), .stream-text:lang(hi), .stream-text:lang(kn) { line-height: 1.75; }
/* reactions: unused emoji and an empty row stay hidden until the smile button opens the picker */
.rx-row:not(.rx-open) .rx-zero, .rx-row.rx-empty:not(.rx-open) { display: none; }
.msg-reveal { animation: tr-reveal .35s ease-out both; }
@keyframes tr-reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg-accent { border-left: 3px solid var(--accent, var(--signal)); }

/* "On the mic" ring around the next speaker's avatar */
.on-mic { position: relative; border-radius: 50%; }
.on-mic::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--accent, var(--signal)); animation: tr-mic 1.4s ease-in-out infinite; }
@keyframes tr-mic { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: .35; } }
.typing-dots { display: inline-flex; gap: 4px; }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: tr-typing 1.2s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .2s; }
.typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes tr-typing { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* Floating reactions (right edge of the stream) */
.float-layer { position: absolute; right: 8px; bottom: 0; width: 48px; height: 60%; pointer-events: none; overflow: hidden; }
.float-emoji { position: absolute; bottom: 0; font-size: 26px; animation: tr-float 2.6s ease-out forwards; will-change: transform, opacity; }
@keyframes tr-float { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 15% { opacity: 1; transform: translate(-4px, -20px) scale(1); } 100% { transform: translate(6px, -260px) scale(1.1); opacity: 0; } }

/* Segment divider */
.segment-divider { display: flex; align-items: center; gap: 12px; color: var(--fg-muted); font-weight: 600; font-size: 12px; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; }
.segment-divider::before, .segment-divider::after { content: ""; flex: 1; height: 1px; background: var(--night-600); }

/* ------------------------------------------------------------ On Air ticker (marquee) */
.ticker { position: relative; overflow: hidden; height: 36px; border-bottom: 1px solid var(--night-600); background: #fff; }
.ticker-track { display: inline-flex; align-items: center; gap: 40px; height: 36px; padding-left: 100%; white-space: nowrap; animation: tr-marquee var(--ticker-duration, 40s) linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--fg-muted); }
.ticker-item:hover { color: var(--fg); }
@keyframes tr-marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ------------------------------------------------------------ cards, posters, glows */
.poster-card { transition: transform .2s ease, box-shadow .2s ease; }
.poster-card:hover { transform: scale(1.03); }
/* light wash at the bottom of posters so overlay chips stay readable */
.poster-gradient { background: linear-gradient(180deg, rgba(16, 22, 47, 0) 45%, rgba(16, 22, 47, .45) 100%); }
/* soft pastel glow behind hero posters (channel gradient), like the NewTo hero washes */
.hero-glow { position: absolute; inset: -10%; filter: blur(90px); opacity: .22; pointer-events: none; }
/* Rails: 8px of inner room (cancelled by a negative margin) so the 1.03 hover scale and focus rings are never clipped by overflow-x */
.rail { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 8px; margin: -8px; scroll-padding-inline: 8px; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: none; }
/* Landing page live shows: swipe row on phones, side by side (up to 3 a row) from tablet width */
.live-row { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 8px; margin: -8px; scroll-padding-inline: 8px; }
.live-row::-webkit-scrollbar { display: none; }
.live-row > * { flex: none; width: min(84vw, 340px); scroll-snap-align: start; }
@media (min-width: 768px) {
  .live-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); overflow: visible; }
  .live-row > * { width: auto; }
}
.featured-card { border: 1px solid rgba(194, 120, 3, .45); box-shadow: 0 0 0 1px rgba(255, 194, 61, .18), 0 10px 30px -14px rgba(194, 120, 3, .35); }
.avatar-ring { border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent, var(--signal)); }

/* ------------------------------------------------------------ home (landing) colour */
/* hero: full-width brand gradient band with white text, radio-wave rings and a wave edge into the page */
.home-hero { color: #fff;
  background: radial-gradient(55% 80% at 88% 8%, rgba(124, 92, 255, .9), transparent 62%),
              radial-gradient(45% 70% at 5% 100%, rgba(255, 176, 32, .75), transparent 60%),
              linear-gradient(120deg, #F73D62 0%, #FF5470 38%, #FF7A59 68%, #A855F7 100%); }
.home-hero-rings { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.home-hero-rings::before, .home-hero-rings::after { content: ""; position: absolute; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 34px, rgba(255, 255, 255, .16) 34px 36px);
  mask-image: radial-gradient(circle, #000 25%, transparent 70%); -webkit-mask-image: radial-gradient(circle, #000 25%, transparent 70%); }
.home-hero-rings::before { right: -160px; top: -200px; width: 640px; height: 640px; }
.home-hero-rings::after { left: -220px; bottom: -260px; width: 560px; height: 560px; opacity: .7; }
/* glass chips floating on the hero poster (Live chat, Polls, Quizzes) */
.hero-chip { position: absolute; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #1B2548; font-size: 13px; font-weight: 700; box-shadow: 0 12px 28px -10px rgba(27, 37, 72, .45); animation: tr-bob 5s ease-in-out infinite; }
.hero-chip:nth-of-type(2) { animation-delay: -1.6s; }
.hero-chip:nth-of-type(3) { animation-delay: -3.2s; }
@keyframes tr-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
/* feature tiles under the hero */
.feature-tile { position: relative; overflow: hidden; border-radius: 22px; padding: 18px; background: linear-gradient(140deg, color-mix(in srgb, var(--c1) 14%, #fff), #fff 70%); border: 1px solid color-mix(in srgb, var(--c1) 22%, transparent); box-shadow: 0 10px 30px -18px color-mix(in srgb, var(--c1) 60%, transparent); }
.feature-tile .feature-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 8px 18px -8px var(--c1); }
/* tinted full-width-feel panels for a few home sections */
.home-band { border-radius: 28px; padding: 20px; }
@media (min-width: 640px) { .home-band { padding: 32px; } }
.home-band-violet { background: linear-gradient(135deg, rgba(124, 92, 255, .10), rgba(247, 61, 98, .07) 60%, rgba(255, 176, 32, .08)); }
.home-band-warm { background: linear-gradient(135deg, rgba(255, 194, 61, .14), rgba(255, 122, 89, .08) 60%, rgba(247, 61, 98, .06)); }

/* Off-air / no-signal static (404, empty states) */
.no-signal { background: repeating-linear-gradient(0deg, rgba(16, 22, 47, .03) 0 1px, transparent 1px 3px), radial-gradient(circle at 50% 40%, #FFFFFF, #EEF1F7 75%); }

/* ------------------------------------------------------------ skeletons */
.skeleton { position: relative; overflow: hidden; border-radius: 12px; background: var(--night-700); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); animation: tr-shimmer 1.4s infinite; }
@keyframes tr-shimmer { 100% { transform: translateX(100%); } }

/* ------------------------------------------------------------ Spotlight Slides (full screen carousel before a live show) */
.spotlight .spot-slide { opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.spotlight .spot-slide.is-on { opacity: 1; pointer-events: auto; }
.spotlight .spot-bar { position: relative; flex: 1; height: 4px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .3); }
.spotlight .spot-bar i { position: absolute; inset: 0; transform: scaleX(0); transform-origin: left; background: #fff; }
.spotlight .spot-bar.is-done i { transform: scaleX(1); }
.spotlight .spot-bar.is-on i { animation: tr-spot var(--spot-ms, 4000ms) linear forwards; }
@keyframes tr-spot { to { transform: scaleX(1); } }

/* ------------------------------------------------------------ toasts, modals, sheets */
#tr-toasts { position: fixed; left: 50%; bottom: 84px; z-index: 120; display: flex; flex-direction: column; gap: 8px; transform: translateX(-50%); width: min(92vw, 420px); }
@media (min-width: 1024px) { #tr-toasts { bottom: 24px; } }
.tr-toast { padding: 12px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--night-600); color: var(--fg); font-weight: 600; box-shadow: 0 2px 4px rgba(16, 22, 47, .04), 0 16px 40px -12px rgba(16, 22, 47, .22); animation: tr-reveal .25s ease-out both; }
.tr-toast.success { border-color: rgba(22, 163, 74, .5); }
.tr-toast.error { border-color: rgba(220, 38, 38, .55); }
.tr-toast.warning { border-color: rgba(194, 120, 3, .55); }
.tr-modal-backdrop { position: fixed; inset: 0; z-index: 110; display: flex; align-items: flex-end; justify-content: center; background: rgba(16, 22, 47, .45); backdrop-filter: blur(4px); padding: 0; }
@media (min-width: 640px) { .tr-modal-backdrop { align-items: center; padding: 24px; } }
.tr-invalid { border-color: #DC2626 !important; }

/* Mobile bottom tab bar spacing */
body.has-tabbar { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
@media (min-width: 1280px) { body.has-tabbar { padding-bottom: 0; } }
.tabbar { padding-bottom: env(safe-area-inset-bottom); }

/* Team console */
.console-body { background: var(--night-950); }

/* ------------------------------------------------------------ reduced motion (PRD 7.3) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .eq i { animation: none; transform: scaleY(.7); }
  .onair-dot::after, .live-dot::after, .on-mic::before { animation: none; }
  .float-layer { display: none; }
  .ticker-track { animation: none; padding-left: 16px; }
  .ticker { overflow-x: auto; }
  .poster-card:hover { transform: none; }
}
