/**
 * Live Stream Styles
 * Responsive, No Gradients
 * Simple Events Manager
 */

/* ======================
   LIVE STREAM BANNER
   ====================== */

.sem-live-stream-banner {
    background: #ffffff;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    margin: 0 0 30px 0;
    padding: 0;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.15);
    overflow: hidden;
}

/* ======================
   STREAM HEADER
   ====================== */

.sem-stream-header {
    background: #000000;
    padding: 20px;
    border-bottom: 2px solid #e74c3c;
}

.sem-live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.sem-live-dot {
    width: 12px;
    height: 12px;
    background: #e74c3c;
    border-radius: 50%;
    animation: pulseDot 1.5s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.sem-live-text {
    color: #e74c3c;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sem-stream-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

/* ======================
   CODE ENTRY (LOCKED)
   ====================== */

.sem-stream-locked {
    padding: 0;
}

.sem-code-entry {
    padding: 40px 20px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.sem-lock-icon {
    margin-bottom: 20px;
}

.sem-lock-icon svg {
    stroke: #6c757d;
}

.sem-code-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
}

.sem-code-description {
    font-size: 15px;
    color: #6c757d;
    margin: 0 0 25px 0;
}

.sem-code-input-wrapper {
    margin-bottom: 20px;
}

.sem-code-input {
    width: 100%;
    max-width: 200px;
    height: 60px;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 10px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    
}

.sem-code-input:focus {
    outline: none;
    border-color: #0073e6;
    box-shadow: 0 0 0 3px rgba(0, 115, 230, 0.1);
}

.sem-join-stream-btn {
    background: #0073e6;
    color: #ffffff;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    
}


.sem-join-stream-btn:active {
    
}

.sem-join-stream-btn:disabled {
    background: #dee2e6;
    cursor: not-allowed;
    transform: none;
}

.sem-code-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
}

.sem-code-help {
    margin-top: 20px;
    font-size: 14px;
    color: #6c757d;
}

.sem-code-help a {
    color: #0073e6;
    text-decoration: none;
    font-weight: 600;
}


/* ======================
   STREAM PLAYER (UNLOCKED)
   ====================== */

.sem-stream-unlocked {
    padding: 0;
}

.sem-stream-container {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.sem-stream-player {
    flex: 1;
    min-width: 0;
}

.sem-stream-iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 6px;
    background: #000000;
}

/* ======================
   CHAT SIDEBAR
   ====================== */

.sem-stream-chat {
    width: 350px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.sem-chat-header {
    background: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    font-weight: 700;
    font-size: 16px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sem-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #ffffff;
    max-height: 550px;
}

.sem-chat-welcome {
    color: #6c757d;
    font-size: 14px;
    text-align: center;
    margin: 20px 0;
}

/* ======================
   STREAM FOOTER
   ====================== */

.sem-stream-footer {
    background: #f8f9fa;
    padding: 12px 20px;
    margin: 0;
    font-size: 13px;
    color: #6c757d;
    text-align: center;
    border-top: 1px solid #dee2e6;
}

/* ======================
   LOADING STATE
   ====================== */

.sem-stream-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.sem-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073e6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ======================
   RESPONSIVE - TABLET
   ====================== */

@media (max-width: 1024px) {
    .sem-stream-container {
        gap: 15px;
        padding: 15px;
    }
    
    .sem-stream-chat {
        width: 300px;
    }
    
    .sem-stream-iframe {
        height: 500px;
    }
}

/* ======================
   RESPONSIVE - MOBILE
   ====================== */

@media (max-width: 768px) {
    .sem-live-stream-banner {
        margin: 0 -15px 20px -15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .sem-stream-header {
        padding: 15px;
    }
    
    .sem-stream-title {
        font-size: 20px;
    }
    
    .sem-code-entry {
        padding: 30px 15px;
    }
    
    .sem-code-title {
        font-size: 20px;
    }
    
    .sem-code-input {
        max-width: 180px;
        height: 55px;
        font-size: 28px;
    }
    
    .sem-join-stream-btn {
        padding: 12px 30px;
        font-size: 15px;
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    /* Stack stream and chat vertically */
    .sem-stream-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .sem-stream-chat {
        width: 100%;
        max-height: 300px;
    }
    
    .sem-stream-iframe {
        height: 400px;
    }
    
    .sem-chat-messages {
        max-height: 250px;
    }
}

/* ======================
   RESPONSIVE - SMALL MOBILE
   ====================== */

@media (max-width: 480px) {
    .sem-stream-header {
        padding: 12px;
    }
    
    .sem-stream-title {
        font-size: 18px;
    }
    
    .sem-live-text {
        font-size: 12px;
    }
    
    .sem-code-entry {
        padding: 20px 15px;
    }
    
    .sem-code-title {
        font-size: 18px;
    }
    
    .sem-code-description {
        font-size: 14px;
    }
    
    .sem-code-input {
        max-width: 160px;
        height: 50px;
        font-size: 24px;
        letter-spacing: 8px;
    }
    
    .sem-join-stream-btn {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    .sem-stream-container {
        padding: 10px;
    }
    
    .sem-stream-iframe {
        height: 300px;
    }
    
    .sem-stream-footer {
        font-size: 12px;
        padding: 10px 15px;
    }
}

/* ======================
   PRINT STYLES
   ====================== */

@media print {
    .sem-live-stream-banner {
        display: none;
    }
}

/* ======================
   ACCESSIBILITY
   ====================== */

.sem-code-input:focus,
.sem-join-stream-btn:focus {
    outline: 2px solid #0073e6;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .sem-live-dot,
    .sem-join-stream-btn,
    .sem-spinner {
        animation: none !important;
        
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .sem-live-stream-banner {
        border-width: 3px;
    }
    
    .sem-code-input {
        border-width: 3px;
    }
}
