/* WebinarMaster Pro - Frontend Styles */

/* Reset and Base Styles */
.webinar-registration-form,
.webinar-login-form,
.webinar-room,
.webinar-list,
.webinar-countdown {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Registration Form Styles */
.webinar-registration-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.webinar-registration-form h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
}

.webinar-description {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #007cba;
}

.webinar-details {
    margin-bottom: 25px;
    padding: 15px;
    background: #f1f3f4;
    border-radius: 4px;
}

.webinar-details p {
    margin: 5px 0;
    font-size: 14px;
}

/* Form Styles */
.webinar-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.required {
    color: #e74c3c;
}

/* Button Styles */
.webinar-register-btn,
.webinar-login-btn {
    background: #007cba;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.webinar-register-btn:hover,
.webinar-login-btn:hover {
    background: #005a87;
    color: white;
}

.webinar-register-btn:disabled,
.webinar-login-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Message Styles */
.webinar-message {
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    font-weight: 500;
}

.webinar-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.webinar-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.webinar-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Webinar Room Styles */
.webinar-room {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    background: #000;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
}

.webinar-header {
    background: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    height: 60px;
}

.webinar-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.webinar-status {
    display: flex;
    align-items: center;
    gap: 10px;
}


.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e74c3c;
    animation: pulse 2s infinite;
}

.status-indicator.live {
    background: #27ae60;
}

.status-indicator.upcoming {
    background: #f39c12;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Video Section */
.webinar-content {
    display: flex;
    height: calc(100vh - 60px);
    margin-top: 60px;
    position: relative;
}

.webinar-video-section {
    flex: 2;
    background: #000;
    position: relative;
}

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 60px);
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

/* Waiting Room */
.waiting-room {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.waiting-content {
    text-align: center;
    color: white;
    padding: 40px;
}

.waiting-content h3 {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 600;
}

.countdown-timer {
    font-size: 48px;
    font-weight: bold;
    margin: 20px 0;
    color: #007cba;
}

/* Chat Section */
.webinar-chat-section {
    flex: 0 0 350px;
    background: #f8f9fa;
    border-left: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 60px);
    overflow: hidden;
    min-height: 400px;
}

.chat-container,
.qa-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #ddd;
    min-height: 200px;
}

.chat-container {
    border-bottom: 1px solid #ddd;
}

.qa-container {
    border-bottom: none;
}

.chat-container:last-child,
.qa-container:last-child {
    border-bottom: none;
}

.chat-header,
.qa-header {
    background: #e9ecef;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4,
.qa-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

.chat-controls {
    display: flex;
    gap: 10px;
}

.chat-toggle {
    background: #6c757d;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
}

.chat-messages,
.qa-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: 300px;
}

.chat-message,
.qa-message {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    border-left: 3px solid #007cba;
}

.chat-message.system {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.chat-message.private {
    background: #d1ecf1;
    border-left-color: #17a2b8;
}

.chat-input,
.qa-input {
    padding: 15px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

.chat-input input,
.qa-input textarea {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.qa-input textarea {
    resize: vertical;
    min-height: 60px;
}

.chat-input button,
.qa-input button {
    background: #007cba;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.chat-input button:hover,
.qa-input button:hover {
    background: #005a87;
}

/* Webinar List Styles */
.webinar-list {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.webinar-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.webinar-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.webinar-item h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.webinar-description {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.5;
}

.webinar-date,
.webinar-participants {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.webinar-actions {
    margin-top: 15px;
}

/* Countdown Timer Styles */
.webinar-countdown {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    margin: 20px 0;
}

.countdown-display {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}

.countdown-item {
    text-align: center;
}

.countdown-expired {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.countdown-expired p {
    margin: 10px 0;
    font-size: 1.1em;
}

.countdown-expired p:first-child {
    font-weight: bold;
    font-size: 1.3em;
}

.countdown-value {
    display: block;
    font-size: 48px;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 5px;
}

.countdown-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .webinar-content {
        flex-direction: column;
    }
    
    .webinar-chat-section {
        border-left: none;
        border-top: 1px solid #ddd;
        flex: 0 0 250px;
        max-height: 250px;
    }
    
    .webinar-header {
        height: 50px;
        padding: 10px 15px;
    }
    
    .webinar-header h2 {
        font-size: 16px;
        max-width: 70%;
    }
    
    .webinar-exit-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .webinar-content {
        height: calc(100vh - 50px);
        margin-top: 50px;
    }
    
    .video-container {
        min-height: calc(100vh - 300px);
    }
    
    .countdown-display {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .countdown-value {
        font-size: 36px;
    }
    
    .webinar-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .webinar-registration-form,
    .webinar-login-form {
        margin: 10px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .countdown-display {
        gap: 15px;
    }
    
    .countdown-value {
        font-size: 28px;
    }
    
    .countdown-label {
        font-size: 12px;
    }
    
    .webinar-item {
        padding: 15px;
    }
    
    .webinar-item h3 {
        font-size: 18px;
    }
}

/* Loading States */
.webinar-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.webinar-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Status Badges */
.status-draft { color: #6c757d; }
.status-scheduled { color: #007cba; }
.status-live { color: #28a745; }
.status-ended { color: #dc3545; }
.status-cancelled { color: #6c757d; }

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }
