/* ==========================================================================
   m_radio.css — visão Rádio (m_radio.js) + player de rádio (#layer-radio)
   Mesma linguagem visual do app: fundo escuro, foco em anel branco, vermelho
   #e50914 para "ao vivo".
   ========================================================================== */

/* ---- cabecalho da view: pill de busca + contador ------------------------ */
.catalog--radio .radio-head {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 106px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    padding: 0 30px;
}
.radio-search {
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    max-width: 480px;
    height: 48px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    padding: 0 18px;
    -webkit-border-radius: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.07);
    -webkit-transition: background-color 0.12s ease;
    transition: background-color 0.12s ease;
}
.radio-search .ic { margin-right: 10px; opacity: 0.7; }
.radio-search-ph {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.radio-search.is-filled .radio-search-ph { color: #fff; font-weight: 600; }
.radio-search.is-focused { background: #fff; }
.radio-search.is-focused .radio-search-ph,
.radio-search.is-focused .ic { color: #000; opacity: 1; }
.radio-count {
    margin-left: auto;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
}
.catalog--radio .grid-vp { top: 120px; }

/* ---- rail: secoes Gênero / Cidade --------------------------------------- */
.cat-sec {
    height: 36px;
    padding: 16px 28px 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.32);
}

/* ---- dialogo de busca ---------------------------------------------------- */
.dialog--search { left: 400px; width: 480px; text-align: left; }
.dialog--search .dialog-title { text-align: center; }
.radio-dlg-field {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    height: 48px;
    margin: 18px 0 12px;
    padding: 0 14px;
    -webkit-border-radius: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}
.radio-dlg-field .ic { margin-right: 10px; opacity: 0.7; }
.radio-dlg-val { font-size: 15px; font-weight: 600; color: #fff; }
.dlg-hint {
    margin-top: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
}

/* ======================================================================
   Player de rádio (#layer-radio)
   ====================================================================== */
#layer-radio .rp {
    position: absolute;
    left: 0;
    top: 0;
    width: 1280px;
    height: 720px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 42%, #16131a 0%, #0a0a0c 62%, #050506 100%);
}
.rp-glow {
    position: absolute;
    left: 50%;
    top: 46%;
    width: 920px;
    height: 920px;
    margin: -460px 0 0 -460px;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.2) 0%, rgba(229, 9, 20, 0.05) 46%, rgba(0, 0, 0, 0) 70%);
    -webkit-animation: rppulse 3.2s ease-in-out infinite;
    animation: rppulse 3.2s ease-in-out infinite;
    pointer-events: none;
}
@-webkit-keyframes rppulse { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }
@keyframes rppulse { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }

.rp-card {
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
}
.rp-logo {
    width: 218px;
    height: 218px;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    background-color: #1c1c1f;
    -webkit-background-size: contain;
    background-size: contain;
    -webkit-background-position: center center;
    background-position: center center;
    -webkit-background-repeat: no-repeat;
    background-repeat: no-repeat;
    border: 3px solid rgba(255, 255, 255, 0.16);
    -webkit-box-shadow: 0 20px 70px rgba(0, 0, 0, 0.65);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.65);
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}
.rp-logo.is-fallback:after {
    content: "\1F4FB";   /* 📻 */
    font-size: 92px;
    line-height: 1;
    opacity: 0.85;
}
.rp-live {
    position: absolute;
    right: -66px;
    top: -14px;
    padding: 5px 12px;
    -webkit-border-radius: 20px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(229, 9, 20, 0.55);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    color: #fff;
}
.rp-live i {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 7px;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    background: #e50914;
    vertical-align: 1px;
    -webkit-animation: lbpulse 1.6s ease-in-out infinite;
    animation: lbpulse 1.6s ease-in-out infinite;
}
.rp-name {
    margin-top: 28px;
    max-width: 820px;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.3px;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rp-meta {
    margin-top: 9px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}
.rp-status {
    margin-top: 26px;
    min-width: 300px;
    height: 40px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
}
.rp-status.is-loading span { color: rgba(255, 255, 255, 0.55); }
.rp-status .spinner { margin: 0 12px 0 0; }
.rp-status .spinner--sm { width: 22px; height: 22px; }
.rp-status.is-on { color: #fff; }
.rp-dot {
    width: 9px;
    height: 9px;
    margin-right: 10px;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    background: #e50914;
    -webkit-animation: lbpulse 1.6s ease-in-out infinite;
    animation: lbpulse 1.6s ease-in-out infinite;
}
.rp-status.is-err span { color: #ff8f8f; }

/* ---- efeitos de reproducao: equalizer + batida no logo ------------------ */
.rp-eq {
    margin-top: 30px;
    height: 34px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: end;
    -webkit-align-items: flex-end;
    align-items: flex-end;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}
.rp-eq i {
    width: 5px;
    height: 20%;
    margin: 0 3px;
    -webkit-border-radius: 3px 3px 0 0;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(to top, #e50914 0%, #ff7a5c 100%);
    opacity: 0.45;
    -webkit-transition: opacity 0.4s ease;
    transition: opacity 0.4s ease;
}
.rp.is-playing .rp-eq i {
    opacity: 1;
    -webkit-animation: rq 0.9s ease-in-out infinite alternate;
    animation: rq 0.9s ease-in-out infinite alternate;
}
.rp.is-playing .rp-eq i:nth-child(1) { -webkit-animation-delay: -0.65s; animation-delay: -0.65s; }
.rp.is-playing .rp-eq i:nth-child(2) { -webkit-animation-delay: -0.20s; -webkit-animation-duration: 0.75s; animation-duration: 0.75s; }
.rp.is-playing .rp-eq i:nth-child(3) { -webkit-animation-delay: -0.45s; -webkit-animation-duration: 1.05s; animation-duration: 1.05s; }
.rp.is-playing .rp-eq i:nth-child(4) { -webkit-animation-delay: -0.30s; animation-delay: -0.30s; }
.rp.is-playing .rp-eq i:nth-child(5) { -webkit-animation-delay: -0.80s; -webkit-animation-duration: 0.80s; animation-duration: 0.80s; }
.rp.is-playing .rp-eq i:nth-child(6) { -webkit-animation-delay: -0.10s; -webkit-animation-duration: 1.15s; animation-duration: 1.15s; }
.rp.is-playing .rp-eq i:nth-child(7) { -webkit-animation-delay: -0.55s; -webkit-animation-duration: .82s; animation-delay: -.55s; animation-duration: .82s; }
.rp.is-playing .rp-eq i:nth-child(8) { -webkit-animation-delay: -.25s; -webkit-animation-duration: 1.08s; animation-delay: -.25s; animation-duration: 1.08s; }
.rp.is-playing .rp-eq i:nth-child(9) { -webkit-animation-delay: -.72s; -webkit-animation-duration: .94s; animation-delay: -.72s; animation-duration: .94s; }
@-webkit-keyframes rq { from { height: 18%; } to { height: 100%; } }
@keyframes rq { from { height: 18%; } to { height: 100%; } }

.rp.is-playing .rp-logo {
    -webkit-animation: rpbeat 1.1s ease-in-out infinite;
    animation: rpbeat 1.1s ease-in-out infinite;
}
@-webkit-keyframes rpbeat { 0%, 100% { -webkit-transform: scale(1); } 50% { -webkit-transform: scale(1.035); } }
@keyframes rpbeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
.rp-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 62px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}
.rp-actions .btn + .btn { margin-left: 16px; }

/* ---- modo celular --------------------------------------------------------- */
body.is-phone #layer-radio .rp { height: 100vh; }
body.is-phone .rp-logo { width: 148px; height: 148px; }
body.is-phone .rp-logo.is-fallback:after { font-size: 62px; }
body.is-phone .rp-live { right: -52px; top: -10px; font-size: 10px; }
body.is-phone .rp-name { margin-top: 20px; max-width: 86vw; font-size: 25px; }
body.is-phone .rp-meta { font-size: 13px; }
body.is-phone .rp-status { margin-top: 18px; min-width: 0; font-size: 13px; }
body.is-phone .rp-eq { margin-top: 20px; height: 24px; }
body.is-phone .rp-eq i { width: 4px; margin: 0 2px; }
body.is-phone .rp-actions { bottom: calc(34px + env(safe-area-inset-bottom)); }

body.is-phone .catalog--radio .radio-head { position: relative; top: auto; height: 64px; padding: 12px 16px 0; }
body.is-phone .catalog--radio .grid-vp { top: auto; padding-top: 6px; }
body.is-phone .radio-search { height: 44px; max-width: none; }
body.is-phone .cat-sec { padding: 12px 16px 0; }

/* Player de radio: visual de estúdio com fundo da estação e controles completos. */
#layer-radio { overflow: hidden; background: #050506; }
#layer-radio .rp {
    overflow: hidden;
    isolation: isolate;
    background: radial-gradient(ellipse at 50% 38%, #251117 0%, #0b0b0e 55%, #040405 100%);
}
.rp-backdrop {
    position: absolute;
    inset: -36px;
    z-index: 0;
    background-position: center;
    background-size: cover;
    opacity: 0;
    filter: blur(36px) saturate(1.28);
    transform: scale(1.14);
    transition: opacity .7s ease;
    pointer-events: none;
}
.rp-backdrop.is-loaded { opacity: .23; }
#layer-radio .rp:after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.3), rgba(0,0,0,.58)),
        radial-gradient(ellipse at 50% 45%, transparent 0%, rgba(0,0,0,.46) 75%);
    pointer-events: none;
}
.rp-glow { z-index: 0; background: radial-gradient(circle, rgba(229,9,20,.26) 0%, rgba(229,9,20,.07) 48%, transparent 72%); }
.rp-card {
    z-index: 1;
    box-sizing: border-box;
    min-width: 580px;
    padding: 36px 56px 30px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(24,24,28,.75), rgba(8,8,10,.54));
    box-shadow: 0 28px 90px rgba(0,0,0,.44), inset 0 1px rgba(255,255,255,.08);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}
.rp-logo {
    border-color: rgba(255,255,255,.3);
    box-shadow: 0 0 0 8px rgba(255,255,255,.035), 0 20px 70px rgba(0,0,0,.58), 0 0 48px rgba(229,9,20,.2);
}
.rp-name {
    max-width: 720px;
    line-height: 1.12;
    white-space: normal;
    overflow-wrap: anywhere;
    text-shadow: 0 3px 22px rgba(0,0,0,.65);
}
.rp-meta {
    max-width: 90%;
    padding: 7px 14px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    background: rgba(255,255,255,.055);
    line-height: 1.35;
}
.rp-status {
    min-width: 0;
    min-height: 38px;
    padding: 0 18px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    background: rgba(0,0,0,.24);
}
.rp-status.is-paused { color: rgba(255,255,255,.75); }
.rp-eq { height: 40px; }
.rp-eq i { width: 6px; margin: 0 3px; box-shadow: 0 0 12px rgba(229,9,20,.35); }
.rp.is-paused .rp-eq i { animation-play-state: paused; opacity: .35; }
.rp.is-paused .rp-logo { animation-play-state: paused; }
.rp-actions { z-index: 2; bottom: 38px; }
.rp-actions .btn {
    min-width: 148px;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 14px;
    background: rgba(20,20,23,.88);
    box-shadow: 0 12px 36px rgba(0,0,0,.3);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.rp-actions .btn--primary { background: linear-gradient(120deg,#f01824,#b90814); border-color: rgba(255,70,80,.5); }
.rp-actions .btn.is-focused { transform: translateY(-3px) scale(1.035); box-shadow: 0 0 0 2px #fff, 0 14px 38px rgba(229,9,20,.24); }
body.is-phone #layer-radio .rp { height: 100vh; height: 100dvh; }
body.is-phone .rp-card { width: calc(100vw - 28px); min-width: 0; padding: 28px 18px 24px; border-radius: 24px; }
body.is-phone .rp-logo { width: 148px; height: 148px; }
body.is-phone .rp-name { max-width: 100%; font-size: clamp(21px,6vw,27px); }
body.is-phone .rp-meta { max-width: 100%; font-size: 12px; }
body.is-phone .rp-actions { bottom: calc(24px + env(safe-area-inset-bottom)); gap: 10px; }
body.is-phone .rp-actions .btn { min-width: 0; min-height: 48px; padding: 0 18px; border-radius: 12px; }
@media (prefers-reduced-motion: reduce) {
    .rp-glow, .rp-live i, .rp.is-playing .rp-eq i, .rp.is-playing .rp-logo { animation: none !important; }
    .rp-backdrop, .rp-actions .btn { transition: none !important; }
}
.rp-live {
    top: 10px;
    right: 50%;
    z-index: 2;
    transform: translateX(50%);
    white-space: nowrap;
    box-shadow: 0 6px 22px rgba(0,0,0,.3);
}
.rp-actions .btn.is-focused,
.rp-actions .btn.is-focused span,
.rp-actions .btn.is-focused svg {
    color: #fff !important;
}
.rp-actions .btn.is-focused svg { stroke: #fff !important; }
.rp-actions .btn.is-focused {
    background: linear-gradient(120deg,#f01824,#b90814);
    border-color: rgba(255,255,255,.9);
}
.rp-actions .btn--primary.is-focused {
    color: #fff !important;
    background: linear-gradient(120deg,#ff2634,#c90815) !important;
}
.rp.is-playing .rp-glow { animation: rpGlowBeat 1.35s ease-in-out infinite; }
.rp.is-playing .rp-backdrop.is-loaded { opacity: .31; }
@-webkit-keyframes rpGlowBeat {
    0%,100% { -webkit-transform: scale(.92); opacity: .58; }
    50% { -webkit-transform: scale(1.08); opacity: 1; }
}
@keyframes rpGlowBeat {
    0%,100% { transform: scale(.92); opacity: .58; }
    50% { transform: scale(1.08); opacity: 1; }
}
.rp-eq i:nth-child(1),.rp-eq i:nth-child(5),.rp-eq i:nth-child(9),.rp-eq i:nth-child(13) { height: 42%; }
.rp-eq i:nth-child(2),.rp-eq i:nth-child(6),.rp-eq i:nth-child(10) { height: 72%; }
.rp-eq i:nth-child(3),.rp-eq i:nth-child(7),.rp-eq i:nth-child(11) { height: 56%; }
.rp-eq i:nth-child(4),.rp-eq i:nth-child(8),.rp-eq i:nth-child(12) { height: 88%; }
.rp.is-playing .rp-eq i:nth-child(10) { animation-delay: -.43s; animation-duration: .77s; }
.rp.is-playing .rp-eq i:nth-child(11) { animation-delay: -.18s; animation-duration: 1.12s; }
.rp.is-playing .rp-eq i:nth-child(12) { animation-delay: -.61s; animation-duration: .86s; }
.rp.is-playing .rp-eq i:nth-child(13) { animation-delay: -.32s; animation-duration: .98s; }
body.is-phone .rp-live { top: 8px; right: 50%; transform: translateX(50%); }
body.is-phone .rp-actions .btn.is-focused { transform: translateY(-2px) scale(1.02); }
@media (prefers-reduced-motion: reduce) {
    .rp.is-playing .rp-glow, .rp-glow, .rp-live i, .rp.is-playing .rp-eq i, .rp.is-playing .rp-logo { animation: none !important; }
}
