/* RTCStream Player CSS - Versión unificada para todos los dispositivos */
.rtc-player-container {
    margin: 1.5rem 0;
    width: 100%;
}

.rtc-player {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.1);
    max-width: 100%;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Efecto hover solo en escritorio */
@media (min-width: 768px) {
    .rtc-player {
        padding: 1.5rem;
    }
    
    .rtc-player:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    }
}

/* Contenido del reproductor */
.rtc-player h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Estados del reproductor */
.player-status {
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    margin: 0;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

.status-info { 
    background-color: #e5f2ff; 
    color: #0369a1; 
    border-left: 4px solid #3b82f6;
}
.status-error { 
    background-color: #fef2f2; 
    color: #b91c1c;
    border-left: 4px solid #ef4444;
}
.status-ok { 
    background-color: #ecfdf5; 
    color: #047857;
    border-left: 4px solid #10b981;
}
.status-wait { 
    background-color: #fffbeb; 
    color: #b45309;
    border-left: 4px solid #f59e0b;
}

/* Botones del reproductor */
.rtc-player button {
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    white-space: nowrap;
}

.rtc-player button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.rtc-player button i {
    font-size: 1em;
    width: 1.25em;
    text-align: center;
}

/* Botón de reproducción principal */
#btnPlay, #play-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

#btnPlay:hover, #play-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

#btnPlay:active, #play-btn:active {
    transform: translateY(0);
}

/* Botón de detener */
#btnStop {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

#btnStop:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#btnStop:active {
    transform: translateY(0);
}

/* Controles del reproductor */
.rtc-player-controls {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Temporizador */
.player-timer {
    font-family: 'Roboto Mono', monospace, monospace;
    font-size: 0.9rem;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 0.25rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.player-timer i {
    color: #94a3b8;
    font-size: 0.75em;
}

/* Efectos visuales */
.rtc-player::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.rtc-player:hover::before {
    opacity: 1;
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
    .rtc-player {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-color: #334155;
    }
    
    .rtc-player h3 {
        color: #f1f5f9;
    }
    
    #btnStop {
        background: #334155;
        color: #e2e8f0;
        border-color: #475569;
    }
    
    #btnStop:hover {
        background: #3e4c6b;
    }
    
    .player-timer {
        background: #1e293b;
        border-color: #334155;
        color: #cbd5e1;
    }
    
    .player-timer i {
        color: #64748b;
    }
}

/* Ajustes para móviles */
@media (max-width: 767px) {
    .rtc-player {
        padding: 1rem;
        border-radius: 0.75rem;
    }
    
    .rtc-player-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .rtc-player button {
        width: 100%;
        padding: 0.875rem 1rem;
    }
    
    .player-status {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .player-timer {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 400px) {
    .rtc-player h3 {
        font-size: 1rem;
    }
    
    .rtc-player button {
        font-size: 0.9rem;
    }
}

/* Indicador de carga */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
}

/* .hidden utility removed - conflicts with Tailwind's responsive hidden/flex classes */
