/* ═══════════════════════════════════════════════════════════════
   SlitherBR — radio.css  (widget rádio flutuante)
   ═══════════════════════════════════════════════════════════════ */

/* ── Wrapper ──────────────────────────────────────────────────── */
#radio-wrap {
    position: fixed;
    bottom: 60px;
    right: 180px;    /* fica à esquerda do minimap (160px + gap) */
    z-index: 60;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 6px;
}

/* ── Toggle button ───────────────────────────────────────────── */
#radio-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.15);
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s, background .2s, transform .15s;
    box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
#radio-toggle:hover  { border-color: rgba(46,213,115,.6); background: rgba(10,14,26,.8); }
#radio-toggle.radio-on {
    border-color: #2ED573;
    box-shadow: 0 0 0 3px rgba(46,213,115,.25), 0 4px 16px rgba(0,0,0,.5);
    animation: radio-pulse 2s ease-in-out infinite;
}
@keyframes radio-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(46,213,115,.25), 0 4px 16px rgba(0,0,0,.5); }
    50%       { box-shadow: 0 0 0 6px rgba(46,213,115,.1),  0 4px 16px rgba(0,0,0,.5); }
}

/* ── Panel ───────────────────────────────────────────────────── */
#radio-panel {
    display: none;   /* oculto por padrão — classe .radio-panel-open ativa */
    flex-direction: column;
    gap: 10px;
    width: 260px;
    background: rgba(10,14,26,.92);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    padding: 14px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0,0,0,.6);
    pointer-events: auto;
}
#radio-panel.radio-panel-open {
    display: flex;
    animation: radio-slide .2s ease;
}
@keyframes radio-slide {
    from { opacity: 0; transform: translateY(10px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Header ──────────────────────────────────────────────────── */
.radio-header {
    display: flex;
    align-items: center;
    gap: 8px;
}
.radio-icon  { font-size: 18px; }
.radio-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #2ED573;
    flex: 1;
}
#radio-close {
    background: none;
    border: none;
    color: rgba(255,255,255,.4);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    transition: color .2s;
}
#radio-close:hover { color: #fff; }

/* ── Station info ────────────────────────────────────────────── */
.radio-station-name {
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.radio-genre {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,.35);
    margin-top: -6px;
}

/* ── Controls ────────────────────────────────────────────────── */
.radio-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.rc-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.06);
    color: #e2e8f0;
    font-size: 14px;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s, transform .12s;
    user-select: none;
}
.rc-btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); }
.rc-btn:active { transform: scale(.92); }
.rc-play {
    width: 44px;
    height: 44px;
    font-size: 18px;
    background: rgba(46,213,115,.15);
    border-color: #2ED573;
    color: #2ED573;
}
.rc-play.rc-playing {
    background: rgba(46,213,115,.25);
    box-shadow: 0 0 14px rgba(46,213,115,.35);
}

/* ── Volume ──────────────────────────────────────────────────── */
.radio-vol-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.vol-icon { font-size: 14px; }
#radio-vol {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,.15);
    outline: none;
    cursor: pointer;
}
#radio-vol::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2ED573;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(46,213,115,.5);
}

/* ── Station list ────────────────────────────────────────────── */
.radio-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 160px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.2) transparent;
    border-top: 1px solid rgba(255,255,255,.07);
    padding-top: 8px;
}
.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    border: none;
    background: none;
    color: rgba(232,234,237,.7);
    font-size: 12px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background .15s, color .15s;
}
.radio-item:hover  { background: rgba(255,255,255,.06); color: #e2e8f0; }
.radio-item.active { background: rgba(46,213,115,.1);   color: #2ED573;  }
.ri-dot   { font-size: 10px; flex-shrink: 0; color: #2ED573; }
.ri-name  { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ri-genre { font-size: 9px; letter-spacing: 1px; text-transform: uppercase;
            color: rgba(255,255,255,.3); flex-shrink: 0; }

/* ══════════════════════════════════════════
   MOBILE — Radio compacto
══════════════════════════════════════════ */
@media (max-width: 600px), (pointer: coarse) {
    #radio-wrap {
        right: 10px;
        bottom: 170px; /* acima do botão boost */
    }
    #radio-toggle {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }
    #radio-panel {
        width: 220px;
    }
}
