/* ============================================================
   PLAYER DE RÁDIO — CSS SEPARADO
   Inclui: Botão "Ouvir Rádio", Player fixo (overlay + controles)
   
   Dependências:
   - Variáveis CSS definidas em :root (ver abaixo)
   - Font Awesome (ícones)
   - Fonte 'Outfit' (font-family)
   ============================================================ */

/* ============ VARIÁVEIS NECESSÁRIAS ============
   Se a página já possui essas variáveis no :root,
   este bloco pode ser removido para evitar duplicação.
   ================================================ */
:root {
    --cor-accent:        #e94560;
    --cor-accent-hover:  #ff6b81;
    --cor-accent-glow:   rgba(233, 69, 96, .35);
    --cor-branco:        #ffffff;
    --cor-fundo:         #f0f2f5;
    --transicao:         .3s cubic-bezier(.4, 0, .2, 1);
    --player-height:     80px;
}


/* ============================================================
   BOTÃO RÁDIO (no header)
   ============================================================ */

@keyframes pulseBtn {
    0%, 100% { box-shadow: 0 0 0 0 var(--cor-accent-glow); }
    50% { box-shadow: 0 0 0 12px rgba(233,69,96,0); }
}


/* ============================================================
   MODO RÁDIO — iframe + player fixo no topo
   ============================================================ */
.radio-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s ease, visibility .4s ease;
}

.radio-overlay.ativo {
    opacity: 1;
    visibility: visible;
}

.radio-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: var(--cor-fundo);
    order: 2; /* iframe fica ABAIXO do player */
}

/* -------- PLAYER — barra slim no topo -------- */
.radio-player {
    background: linear-gradient(90deg,rgba(89, 110, 228, 1) 0%, rgba(109, 194, 254, 0.43) 100%);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    order: 1; /* player fica ACIMA do iframe */
    transform: translateY(-100%);
    transition: transform .4s cubic-bezier(.4, 0, .2, 1);
}

.radio-overlay.ativo .radio-player {
    transform: translateY(0);
}

/* Fundo decorativo com gradiente animado */
.radio-player::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, .04) 25%,
        rgba(255, 255, 255, .08) 50%,
        rgba(255, 255, 255, .04) 75%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: bgShimmer 6s ease-in-out infinite;
    z-index: 0;
}

@keyframes bgShimmer {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 200% 0%; }
}

.radio-player-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 4px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 2;
}

.radio-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Badge AO VIVO */
.radio-live-badge {
    background: #00000054;
    padding: 5px 6px;
    border-radius: 6px;
    text-transform: uppercase;
    font-family: 'Outfit-SemiBold', sans-serif;
    font-size: 10px;
    line-height: 9px;
    font-weight: 600;
    color: #FFFFFF;
    white-space: nowrap;
}
.radio-live-badge b {
    font-family: 'Outfit-Bold', sans-serif;
    font-weight: 700;
}

/* -------- Música Atual -------- */
.radio-song {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 300px;
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    font-family: 'Outfit-SemiBold', sans-serif;
    font-size: 12px;
    line-height: 10px;
    font-weight: 600;
    color: #fff;
}

.radio-song i {
    color: rgba(255,255,255,.5);
    font-size: .75rem;
    flex-shrink: 0;
    animation: musicPulse 1.5s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

.radio-song span {
    display: inline-block;
    padding-right: 40px;
}

@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* -------- Controles -------- */
.radio-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    order: -1; /* Play/pause fica antes de tudo */
    border-radius: 50%;
    border: 1px solid #FFFFFF;
}

.radio-btn {
    background: rgba(255,255,255,.1);
    border: none;
    color: var(--cor-branco);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    cursor: pointer;
    transition: var(--transicao);
}

.radio-btn:hover {
    background: rgba(255,255,255,.2);
}

.radio-btn.principal {
    width: 24px;
    height: 24px;
    background: transparent;
    font-size: .9rem;
    box-shadow: none;
}

.radio-btn.principal:hover {
    background: rgba(255,255,255,.25);
    transform: scale(1.08);
}

.radio-btn-icon {
    width: 8px;
    height: auto;
    display: block;
}

/* -------- Botão fechar -------- */
.btn-fechar-radio {
    background: #0A4EA3;
    border: none;
    color: var(--cor-branco);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    cursor: pointer;
    transition: var(--transicao);
    flex-shrink: 0;
    margin-left: auto;
}

.btn-fechar-radio > img {
    width: 8px;
    height: 8px;
}

.btn-fechar-radio:hover {
    background: var(--cor-accent);
    transform: rotate(90deg);
}


/* ============================================================
   RESPONSIVO — PLAYER
   ============================================================ */
@media (max-width: 768px) {
    /* Player responsivo — slim bar */
    .radio-player-inner {
        gap: 10px;
        padding: 8px 12px;
    }

    .radio-song {
        max-width: 160px;
    }

    .radio-btn.principal {
        width: 32px;
        height: 32px;
        font-size: .8rem;
    }
    .radio-song span {
        animation: marquee 12s linear infinite;
    }
}

@media (max-width: 540px) {
    /* Botão de rádio compacto */
    .btn-radio span { display: none; }
    .btn-radio { padding: 10px 14px; }

    /* Volume menor */
    .slider-volume { width: 60px; }

    /* Player ultra compacto */
    .radio-player-inner { gap: 8px; }
}