/**
 * WP Live Stream - Frontend Player Styles
 */

.wp-live-stream-container {
    position: relative;
    margin: 20px 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.wp-live-stream-player {
    display: block;
    width: 100%;
    background: #000;
}

.stream-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(to right, #1a1a1a, #2d2d2d);
    color: #fff;
    font-size: 14px;
}

.stream-name {
    font-weight: 600;
    color: #fff;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e74c3c;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Offline State */
.wp-live-stream-offline {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    color: #6c757d;
}

.wp-live-stream-offline p {
    margin: 10px 0;
    font-size: 16px;
}

.wp-live-stream-offline .stream-name {
    font-weight: 600;
    color: #495057;
}

/* Error State */
.wp-live-stream-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 15px;
    color: #856404;
    font-size: 14px;
}

/* Stream Grid */
.wp-live-stream-grid {
    margin: 20px 0;
}

.stream-grid-item {
    position: relative;
}

/* Loading Spinner */
.wp-live-stream-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Video Controls Enhancements */
.wp-live-stream-player::-webkit-media-controls-panel {
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
}

/* Responsive Design */
@media (max-width: 768px) {
    .stream-info {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }
    
    .live-indicator {
        width: 100%;
        justify-content: center;
    }
    
    .wp-live-stream-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .wp-live-stream-offline {
        padding: 40px 15px;
    }
    
    .wp-live-stream-offline p {
        font-size: 14px;
    }
}

/* Fullscreen Styles */
.wp-live-stream-container:-webkit-full-screen .wp-live-stream-player {
    width: 100%;
    height: 100%;
}

.wp-live-stream-container:-moz-full-screen .wp-live-stream-player {
    width: 100%;
    height: 100%;
}

.wp-live-stream-container:fullscreen .wp-live-stream-player {
    width: 100%;
    height: 100%;
}

/* Accessibility */
.wp-live-stream-player:focus {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .wp-live-stream-offline {
        background: #1a1a1a;
        border-color: #333;
        color: #aaa;
    }
    
    .wp-live-stream-offline .stream-name {
        color: #fff;
    }
}
