/* ==========================================================================
   TV Split :: assets/css/radio.css - the radio page (templates/radio.php)
   The stations docked beside (as on the TV page), and a player: the
   station's artwork, its name, play / pause, previous / next and volume, with
   every station as a logo underneath. No split screen - one station at a time.
   ========================================================================== */

@font-face {
    font-family: 'Heebo';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url(../fonts/heebo-hebrew.woff2) format('woff2');
    unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
    font-family: 'Heebo';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url(../fonts/heebo-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.tvs-app--radio { background: var(--bg); }
.tvs-rstage {
    overflow-y: auto; overscroll-behavior: contain;
    background:
        radial-gradient(900px 420px at 85% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
        radial-gradient(700px 380px at 0% 110%, rgba(214, 0, 28, .12), transparent 70%),
        var(--bg);
    font-family: 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}
.tvs-radio { width: min(1100px, 100% - 40px); margin: 0 auto; padding: 28px 0 40px; }
.tvs-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #d6001c; flex: 0 0 auto; }

/* -- the player card -------------------------------------------------------- */
.tvs-radio__card {
    display: grid; gap: 28px; align-items: center;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    padding: 22px; border-radius: 22px;
    background: var(--surface); box-shadow: 0 10px 40px rgba(0, 0, 0, .12), 0 0 0 1px var(--line);
}
.tvs-radio__art { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
.tvs-radio__art .stv_host, .tvs-radio__art .stv_host.stv_host_fill { height: 100% !important; min-height: 0; aspect-ratio: auto; margin: 0; border-radius: 16px; }

/* The wall is only the artwork here: no header, no window controls. */
.tvs-radio-page #stv_wrap { --stv-exact-bg: #000; --stv-gap: 0px; }
.tvs-radio-page #stv_wrap.stv_inline .stv_hd,
.tvs-radio-page #stv_wrap.stv_inline .stv_tile .stv_bar,
.tvs-radio-page #stv_wrap.stv_inline .stv_tile .stv_foot,
.tvs-radio-page #stv_wrap.stv_inline .stv_tile .stv_grip_se,
.tvs-radio-page #stv_wrap.stv_inline .stv_tile .stv_t_info { display: none !important; }
/* While it floats, the card says where it went, with the way back. */
.tvs-radio__art .stv_host.stv_host_away .stv_host_ph_away { position: absolute; inset: 0; min-height: 0; justify-content: center; align-content: center; gap: 10px; text-align: center; }
@media (max-width: 600px) { .tvs-radio__float { display: none; } }
.tvs-radio-page #stv_wrap.stv_exact .stv_wall { padding: 0; }
.tvs-radio-page #stv_wrap .stv_tile .stv_ov { cursor: default; }
.tvs-radio-page #stv_wrap .stv_tile .stv_radio_art {
    padding: 9% 14% 12%;
    background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--accent) 38%, #0b1016) 0%, #05070a 72%);
}
.tvs-radio-page #stv_wrap .stv_tile .stv_radio_nm { font-size: 15px; color: rgba(255, 255, 255, .78); }
.tvs-radio-page #stv_wrap .stv_tile .stv_radio_logo { font-size: 64px; }
.tvs-radio-page #stv_wrap .stv_tile .stv_radio_logo.stv_haslogo { filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .55)); }

.tvs-radio__info { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
.tvs-radio__live {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 4px 12px; border-radius: 999px;
    background: rgba(214, 0, 28, .1); color: #d6001c; font-weight: 800; font-size: 13.5px;
}
.tvs-radio[data-state="play"] .tvs-radio__live .tvs-dot { animation: tvs-rpulse 1.6s infinite; }
@keyframes tvs-rpulse { 0% { box-shadow: 0 0 0 0 rgba(214, 0, 28, .55); } 70% { box-shadow: 0 0 0 9px rgba(214, 0, 28, 0); } 100% { box-shadow: 0 0 0 0 rgba(214, 0, 28, 0); } }
.tvs-radio__name { margin: 0; font-size: clamp(28px, 3vw, 40px); font-weight: 900; line-height: 1.12; color: var(--text); }
.tvs-radio__about { margin: 0; color: var(--text-2); font-size: 15.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tvs-radio__about[hidden] { display: none; }

/* Equaliser bars - moving while there is sound. */
.tvs-radio__eq { display: flex; align-items: flex-end; gap: 4px; height: 30px; }
.tvs-radio__eq i { display: block; width: 6px; height: 20%; border-radius: 3px; background: var(--accent); opacity: .35; transition: opacity .2s; }
.tvs-radio[data-state="play"]:not(.is-muted) .tvs-radio__eq i { opacity: 1; animation: tvs-eq 1.1s ease-in-out infinite; }
.tvs-radio__eq i:nth-child(2) { animation-delay: -.9s !important; }
.tvs-radio__eq i:nth-child(3) { animation-delay: -.5s !important; }
.tvs-radio__eq i:nth-child(4) { animation-delay: -.2s !important; }
.tvs-radio__eq i:nth-child(5) { animation-delay: -.7s !important; }
.tvs-radio__eq i:nth-child(6) { animation-delay: -.35s !important; }
.tvs-radio__eq i:nth-child(7) { animation-delay: -1s !important; }
@keyframes tvs-eq { 0%, 100% { height: 20%; } 25% { height: 95%; } 50% { height: 45%; } 75% { height: 75%; } }

.tvs-radio__ctl { display: flex; align-items: center; gap: 16px; margin-top: 4px; }
.tvs-radio__btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; border-radius: 50%;
    border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
    cursor: pointer; transition: transform .12s, background .15s, border-color .15s;
}
.tvs-radio__btn:hover { border-color: var(--accent); color: var(--accent); }
.tvs-radio__btn:active { transform: scale(.95); }
[dir="rtl"] .tvs-radio__prev svg, [dir="rtl"] .tvs-radio__next svg { transform: scaleX(-1); }
.tvs-radio__play {
    position: relative; width: 78px; height: 78px; border: 0;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000));
    color: #fff; box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 45%, transparent);
}
.tvs-radio__play:hover { color: #fff; filter: brightness(1.08); }
.tvs-radio__i-pause { display: none; }
.tvs-radio[data-state="play"] .tvs-radio__i-play, .tvs-radio[data-state="load"] .tvs-radio__i-play { display: none; }
.tvs-radio[data-state="play"] .tvs-radio__i-pause, .tvs-radio[data-state="load"] .tvs-radio__i-pause { display: block; }
.tvs-radio__spin { position: absolute; inset: -5px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--accent); display: none; animation: tvs-spin .9s linear infinite; }
.tvs-radio[data-state="load"] .tvs-radio__spin { display: block; }
@keyframes tvs-spin { to { transform: rotate(360deg); } }
.tvs-radio[data-state="tap"] .tvs-radio__play { animation: tvs-nudge 1.6s ease-in-out infinite; }
@keyframes tvs-nudge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }

.tvs-radio__vol { display: flex; align-items: center; gap: 10px; width: min(340px, 100%); }
.tvs-radio__mute, .tvs-radio__reload {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); cursor: pointer;
}
.tvs-radio__mute:hover, .tvs-radio__reload:hover { background: var(--surface-2); color: var(--text); }
.tvs-radio__i-off { display: none; }
.tvs-radio.is-muted .tvs-radio__i-vol { display: none; }
.tvs-radio.is-muted .tvs-radio__i-off { display: block; color: #d6001c; }
.tvs-radio__range { flex: 1 1 auto; accent-color: var(--accent); height: 28px; }
.tvs-radio__msg { margin: 0; min-height: 1.4em; color: var(--text-3); font-size: 14px; font-weight: 600; }
/* A station in its own site's player: the page's play and volume cannot reach it. */
.tvs-radio[data-state="frame"] .tvs-radio__play,
.tvs-radio[data-state="frame"] .tvs-radio__vol { opacity: .35; pointer-events: none; }

/* -- every station ------------------------------------------------------------ */
.tvs-radio__all { margin-top: 30px; }
.tvs-radio__all h2 { margin: 0 0 14px; font-size: 24px; font-weight: 900; color: var(--text); }
.tvs-radio__grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); margin: 0; padding: 0; list-style: none; }
.tvs-st {
    position: relative; width: 100%;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 16px 10px 14px; border-radius: 16px;
    border: 1px solid var(--line); background: var(--surface); color: var(--text);
    font: inherit; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s;
}
.tvs-st:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 8px 22px rgba(0, 0, 0, .1); }
.tvs-st.is-on { border-color: var(--accent); background: var(--accent-bg); }
.tvs-st__logo {
    display: flex; align-items: center; justify-content: center;
    width: 76px; height: 76px; border-radius: 50%; overflow: hidden;
    background: var(--logo-bg); color: var(--accent); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line-2);
}
.tvs-st.is-on .tvs-st__logo { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.tvs-st__logo img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.tvs-st__nm { max-width: 100%; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvs-st__eq { position: absolute; top: 10px; inset-inline-end: 12px; display: none; align-items: flex-end; gap: 2px; height: 14px; }
.tvs-st__eq i { display: block; width: 3px; height: 30%; border-radius: 2px; background: var(--accent); }
.tvs-st.is-on .tvs-st__eq { display: flex; }
.tvs-radio[data-state="play"]:not(.is-muted) .tvs-st.is-on .tvs-st__eq i { animation: tvs-eq 1s ease-in-out infinite; }
.tvs-st__eq i:nth-child(2) { animation-delay: -.6s !important; }
.tvs-st__eq i:nth-child(3) { animation-delay: -.3s !important; }

@media (prefers-reduced-motion: reduce) {
    .tvs-radio__eq i, .tvs-st__eq i, .tvs-radio__play, .tvs-radio__live .tvs-dot { animation: none !important; }
}

/* -- narrower ------------------------------------------------------------------ */
@media (max-width: 1100px) {
    .tvs-radio__card { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .tvs-radio__info { align-items: center; text-align: center; }
    .tvs-radio__vol { margin-inline: auto; }
}
@media (max-width: 899px) {
    .tvs-app--radio { height: auto; min-height: 0; }
    .tvs-rstage { overflow: visible; }
    .tvs-radio { width: calc(100% - 24px); padding: 12px 0 28px; }
    .tvs-radio__card { padding: 12px; border-radius: 18px; }
    .tvs-radio__name { font-size: 28px; }
    .tvs-radio__grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
    .tvs-st__logo { width: 64px; height: 64px; }
    .tvs-st__nm { font-size: 13px; }
}

/* "Stations" beside "Live": the stations list (docked beside on a computer, a sheet on a phone). */
.tvs-radio__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tvs-radio__top .tvs-chbtn { min-height: 36px; }
