/**
 * Player flutuante de rádio — canto inferior direito.
 * Usa tokens do design-tokens.css quando disponíveis.
 */

#cidades-radio-player {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 280px;
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, rgba(0,0,0,0.1));
    border-radius: 14px;
    box-shadow: var(--shadow-card-hover, 0 8px 24px rgba(0,0,0,0.12));
    z-index: 1040;
    font-family: var(--bs-body-font-family, system-ui, sans-serif);
    font-size: 0.9rem;
    overflow: hidden;
}

#cidades-radio-player .rp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    background: var(--bs-tertiary-bg, rgba(0,0,0,0.02));
    border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0,0,0,0.06));
}

#cidades-radio-player .rp-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    color: var(--bs-body-color, #1a1a1a);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
#cidades-radio-player .rp-title .rp-pulse {
    color: #dc3545;
    animation: rp-pulse 2s ease-in-out infinite;
}

#cidades-radio-player .rp-actions {
    display: flex; gap: 4px;
}
#cidades-radio-player .rp-icon-btn {
    background: transparent;
    border: 0;
    color: var(--bs-secondary-color, #6c757d);
    padding: 2px 6px;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1;
    font-size: 0.85rem;
}
#cidades-radio-player .rp-icon-btn:hover {
    background: rgba(0,0,0,0.06);
    color: var(--bs-body-color);
}

#cidades-radio-player .rp-body {
    padding: 0.85rem;
}

#cidades-radio-player .rp-select {
    width: 100%;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 6px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
}

#cidades-radio-player .rp-controls {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
#cidades-radio-player .rp-play-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--bs-primary);
    color: #fff;
    border: 0;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
#cidades-radio-player .rp-play-btn:hover {
    transform: scale(1.05);
}

#cidades-radio-player .rp-status {
    flex: 1; min-width: 0;
}
#cidades-radio-player .rp-on-air-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #dc3545;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
#cidades-radio-player .rp-pulse-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #dc3545;
    animation: rp-pulse 1.5s ease-in-out infinite;
}
#cidades-radio-player .rp-on-air-title {
    font-size: 0.82rem;
    color: var(--bs-body-color);
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#cidades-radio-player .rp-profile-link {
    display: block;
    margin-top: 0.7rem;
    font-size: 0.78rem;
    color: var(--bs-primary);
    text-align: center;
    text-decoration: none;
}
#cidades-radio-player .rp-profile-link:hover { text-decoration: underline; }

@keyframes rp-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.9); }
}

/* Minimizado */
#cidades-radio-player .rp-body[hidden] { display: none; }

/* Mobile: menor */
@media (max-width: 576px) {
    #cidades-radio-player {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
        max-width: 320px;
    }
}

/* Dark mode */
[data-bs-theme="dark"] #cidades-radio-player .rp-header {
    background: rgba(255,255,255,0.04);
}
