/* ============================================
   public/css/classroom.css
   Francophone Academy — Live Classroom Styles
   ============================================ */

.classroom-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    background: #0a1628;
    color: #f5f5f0;
}

.classroom-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 24px;
    background: #1a2a4a;
    border-bottom: 1px solid rgba(201, 162, 39, 0.2);
    flex-shrink: 0;
}

.btn-back {
    background: transparent;
    border: 1px solid #c9a227;
    color: #c9a227;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-back:hover {
    background: rgba(201, 162, 39, 0.1);
}

.classroom-meta {
    flex: 1;
}

.classroom-meta h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #f5f5f0;
}

.classroom-status {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-upcoming { background: rgba(201, 162, 39, 0.15); color: #c9a227; }
.status-live { background: rgba(220, 53, 69, 0.2); color: #ff6b6b; animation: pulse-live 2s infinite; }
.status-ended { background: rgba(108, 117, 125, 0.2); color: #adb5bd; }
.status-cancelled { background: rgba(108, 117, 125, 0.2); color: #adb5bd; }

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.classroom-timer {
    font-size: 14px;
    color: #e8d5a3;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    min-width: 180px;
    text-align: right;
}

.classroom-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.classroom-main {
    flex: 1;
    min-width: 0;
    padding: 16px;
}

.video-container {
    width: 100%;
    height: 100%;
    background: #0a1628;
    border-radius: 12px;
    border: 1px solid rgba(201, 162, 39, 0.15);
    overflow: hidden;
    position: relative;
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px;
}

.placeholder-icon {
    font-size: 64px;
    color: #c9a227;
    margin-bottom: 16px;
    opacity: 0.7;
}

.video-placeholder p {
    font-size: 18px;
    color: #f5f5f0;
    margin: 0 0 8px;
}

.placeholder-sub {
    font-size: 14px !important;
    color: #d0d5dd !important;
}

.classroom-sidebar {
    width: 320px;
    border-left: 1px solid rgba(201, 162, 39, 0.15);
    display: flex;
    flex-direction: column;
    background: #0f1d30;
    flex-shrink: 0;
}

.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(201, 162, 39, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: #f5f5f0;
}

.chat-online {
    font-size: 12px;
    color: #4ade80;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    background: rgba(255,255,255,0.05);
    padding: 10px 12px;
    border-radius: 8px;
    border-left: 3px solid #c9a227;
}

.chat-message.chat-own {
    border-left-color: #4ade80;
    background: rgba(74, 222, 128, 0.05);
}

.chat-author {
    font-size: 12px;
    font-weight: 600;
    color: #c9a227;
}

.chat-time {
    font-size: 11px;
    color: #6b7280;
    margin-left: 8px;
}

.chat-text {
    font-size: 13px;
    color: #f5f5f0;
    margin: 4px 0 0;
    line-height: 1.4;
}

.chat-input-area {
    padding: 12px;
    border-top: 1px solid rgba(201, 162, 39, 0.1);
    display: flex;
    gap: 8px;
}

#chat-input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(201, 162, 39, 0.2);
    border-radius: 6px;
    padding: 10px 12px;
    color: #f5f5f0;
    font-size: 13px;
}

#chat-input:focus {
    outline: none;
    border-color: #c9a227;
}

#chat-input::placeholder {
    color: #6b7280;
}

#chat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#chat-send {
    background: #c9a227;
    color: #0a1628;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

#chat-send:hover:not(:disabled) {
    background: #e8d5a3;
}

#chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.class-info-panel {
    padding: 16px;
    border-top: 1px solid rgba(201, 162, 39, 0.1);
    background: #0a1628;
}

.class-info-panel h3 {
    font-size: 13px;
    font-weight: 600;
    color: #c9a227;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 13px;
}

.info-label {
    color: #6b7280;
}

.info-value {
    color: #f5f5f0;
    font-weight: 500;
}

.classroom-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    padding: 40px;
}

.classroom-error h2 {
    color: #ff6b6b;
    margin-bottom: 12px;
}

.classroom-error a {
    color: #c9a227;
    text-decoration: none;
    margin-top: 16px;
    font-weight: 600;
}

@media (max-width: 900px) {
    .classroom-body {
        flex-direction: column;
    }
    .classroom-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(201, 162, 39, 0.15);
        max-height: 40vh;
    }
    .classroom-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    .classroom-timer {
        width: 100%;
        text-align: left;
    }
}
