/* Adar Radio Topbar
 * Estética alinhada com o tema "Sony Music Style" (preto + vermelho).
 */

:root {
    --art-bg: #0a0a0a;
    --art-bg-gradient: linear-gradient(90deg, #000 0%, #1a1a1a 50%, #000 100%);
    --art-accent: #e60012;
    --art-text: #ffffff;
    --art-text-dim: rgba(255,255,255,0.65);
    --art-border: rgba(255,255,255,0.08);
    --art-height: 101px;
    --art-height-mobile: 86px;
}

.adar-radio-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--art-height);
    background: var(--art-bg-gradient);
    border-bottom: 1px solid var(--art-border);
    box-shadow: 0 4px 18px rgba(0,0,0,0.4);
    z-index: 99999;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(320px, 2fr) auto auto;
    align-items: center;
    gap: 16px;
    padding: 0 18px;
    color: var(--art-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transform: translateY(0);
    transition: transform 0.35s ease;
}

.adar-radio-topbar[hidden] {
    display: none !important;
}

.adar-radio-topbar[data-state="loading"] .art-player::before {
    content: "Carregando rádio...";
    color: var(--art-text-dim);
    font-size: 13px;
    display: block;
    text-align: center;
    line-height: 96px;
}

.art-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.art-live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--art-accent);
    box-shadow: 0 0 0 0 rgba(230,0,18,0.6);
    animation: art-pulse 1.8s infinite;
    flex-shrink: 0;
}

@keyframes art-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(230,0,18,0.6); }
    70%  { box-shadow: 0 0 0 10px rgba(230,0,18,0); }
    100% { box-shadow: 0 0 0 0 rgba(230,0,18,0); }
}

.art-brand-label {
    color: var(--art-text);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.art-brand-label:hover {
    color: var(--art-accent);
}

.art-player {
    min-width: 0;
}

.art-player iframe {
    width: 100%;
    height: 96px;
    border-radius: 12px;
    border: 0;
    display: block;
}

.art-cta {
    display: flex;
    align-items: center;
}

.art-open-spotify {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1DB954;
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}

.art-open-spotify:hover {
    background: #1ed760;
    transform: translateY(-1px);
    color: #fff;
}

.art-close,
.art-reopen {
    background: transparent;
    border: 1px solid var(--art-border);
    color: var(--art-text);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    font-size: 18px;
    line-height: 1;
}

.art-close:hover,
.art-reopen:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.25);
}

.art-reopen {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 99999;
    background: var(--art-accent);
    border-color: var(--art-accent);
    width: 44px;
    height: 44px;
    box-shadow: 0 4px 14px rgba(230,0,18,0.45);
}

.art-reopen[hidden] {
    display: none !important;
}

/* Estado escondido — topbar oculta mas botão reabrir disponível */
body.art-hidden-topbar .adar-radio-topbar {
    transform: translateY(-100%);
    pointer-events: none;
}

/* Responsivo */
@media (max-width: 900px) {
    .art-cta {
        display: none;
    }
    .adar-radio-topbar {
        grid-template-columns: minmax(140px, 1fr) minmax(220px, 2fr) auto;
    }
}

@media (max-width: 768px) {
    .adar-radio-topbar {
        height: var(--art-height-mobile);
        padding: 0 10px;
        gap: 10px;
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .art-brand {
        display: none;
    }
    .art-player iframe {
        height: 77px;
    }
}

.adar-radio-topbar.art-hide-mobile {
    /* respeitado quando admin desliga mobile */
}
@media (max-width: 768px) {
    .adar-radio-topbar.art-hide-mobile {
        display: none !important;
    }
    body.has-art-topbar.art-mobile-disabled {
        padding-top: 0 !important;
    }
}
