/* ========================================
   CUSTOM CSS PARA ARGAY RADIO
   Diseño personalizado para argay.ar
======================================== */

/* Variables CSS para colores personalizados */
:root {
    --argay-primary: #ff6b6b;
    --argay-secondary: #4ecdc4;
    --argay-gradient: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 100%);
    --argay-dark: #1a1a1a;
    --argay-darker: #0d1117;
    --argay-light: rgba(255, 255, 255, 0.9);
    --argay-accent: #ff9ff3;
    --argay-shadow: 0 8px 32px rgba(255, 107, 107, 0.3);
}

/* ========== CONTENEDOR PRINCIPAL ========== */

/* Contenedor del plugin - POSICIONAMIENTO FIJO */
#argay-radio-container {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 2147483647 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    visibility: visible !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Contenedor principal del radio player */
.msp_radio {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    box-shadow: var(--argay-shadow);
    backdrop-filter: blur(20px);
    background: var(--argay-gradient);
    border: 1px solid rgba(255, 107, 107, 0.2);
    width: 100% !important;
    display: flex !important;
    min-height: 90px !important;
    height: auto !important;
}

.np__global_wrapper {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.np__global_player {
    width: 100% !important;
    display: flex !important;
    background: transparent;
    border-radius: 0;
    border: none;
}

.app-player {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Player principal */
.player {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    background: transparent !important;
    position: relative;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 90px !important;
}

.player.song-now {
    padding: 0.75rem 1rem !important;
}

.player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.player-wrapper {
    position: relative;
    z-index: 2;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

/* ========== LAYOUT DEL PLAYER ========== */

.player-cover {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    min-height: 80px !important;
}

.player-left {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    flex: 1;
    min-width: 0;
}

.player-controller {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-shrink: 0;
}

.player-right {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    flex-shrink: 0;
}

/* ========== ARTWORK Y LOGO ========== */

.player-artwork {
    width: 70px !important;
    height: 70px !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.player-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.player-artwork:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    border-color: var(--argay-primary);
}

.player-artwork:hover img {
    transform: scale(1.1);
}

.player-station {
    width: 45px !important;
    height: 45px !important;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.player-station img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

/* ========== INFORMACIÓN DE CANCIÓN ========== */

.player-cover-title {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
    min-width: 0;
    flex: 1;
}

#current-song {
    color: white !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    margin: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#current-artist {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500 !important;
    font-size: 0.85rem !important;
    line-height: 1.2;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    margin: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-badge {
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    width: fit-content;
}

.live-indicator {
    width: 6px;
    height: 6px;
    background: #ff4444;
    border-radius: 50%;
    animation: pulse-live 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* ========== BOTONES ========== */

.player-button-play {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: white;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    padding: 0 !important;
}

.player-button-play:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4) !important;
}

.player-button-play svg {
    width: 20px !important;
    height: 20px !important;
    fill: currentColor;
}

.player-button-play.loading {
    opacity: 0.7;
    pointer-events: none;
}

.player-button-play.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== RESPONSIVO MOBILE ========== */

@media (max-width: 768px) {
    .msp_radio {
        min-height: 80px !important;
    }

    .player {
        padding: 0.5rem 0.75rem !important;
        min-height: 80px !important;
    }

    .player-cover {
        gap: 0.75rem !important;
        min-height: 70px !important;
    }

    .player-left {
        gap: 0.75rem !important;
    }

    .player-artwork {
        width: 60px !important;
        height: 60px !important;
    }

    .player-button-play {
        width: 55px !important;
        height: 55px !important;
    }

    .player-button-play svg {
        width: 18px !important;
        height: 18px !important;
    }

    .player-station {
        width: 40px !important;
        height: 40px !important;
    }

    #current-song {
        font-size: 0.9rem !important;
    }

    #current-artist {
        font-size: 0.8rem !important;
    }

    .live-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
    }
}

/* ========== PADDING AL BODY ========== */

body {
    padding-bottom: 100px !important;
    transition: padding-bottom 0.3s ease !important;
}

@media (max-width: 768px) {
    body {
        padding-bottom: 90px !important;
    }
}

/* ========== PREVENIR CONFLICTOS ========== */

audio:not(#radio-stream) {
    display: none !important;
}

/* Resetear estilos globales que puedan interferir */
.msp_radio,
.msp_radio * {
    box-sizing: border-box !important;
}

.msp_radio button {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    font-family: inherit;
    cursor: pointer;
}

.msp_radio button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}