/**
 * AI Exam Agent Styles
 * Version: 1.0.0
 */

.ai-exam-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ai-exam-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.ai-exam-title-main {
    display: block;
    font-size: 28px;
    font-weight: 700;
}

.ai-exam-title-sub {
    display: block;
    margin-top: 4px;
    font-size: 18px;
    font-weight: 500;
}

.ai-exam-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.ai-avatar-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ai-avatar-video {
    width: 100%;
    height: 450px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 8px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-avatar-video iframe,
.ai-avatar-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

.avatar-placeholder {
    text-align: center;
    color: white;
    padding: 20px;
}

.avatar-placeholder-icon {
    font-size: 80px;
    margin-bottom: 15px;
}

.ai-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 10px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dc3545;
    animation: pulse 2s infinite;
}

.status-dot.active {
    background: #28a745;
}

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

.ai-exam-panel {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.monitoring-section {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.monitoring-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.monitor-preview {
    position: relative;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.monitor-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.exam-timer {
    text-align: center;
    font-size: 48px;
    font-weight: bold;
    color: #667eea;
    margin: 20px 0;
    font-family: "Courier New", monospace;
}

.question-container {
    margin: 30px 0;
}

.question-text {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #2c3e50;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.answer-option:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.answer-option.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.permission-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.8) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 999999 !important;
}

.permission-modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    text-align: center;
}

/* Exam Timer - styles are now inline in template */

/* Question Container */
.question-container {
    min-height: 100vh;
    padding: 40px 20px;
    background: #f8f9fa;
}

/* Question Card Styles */
.question-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 900px;
    margin: 0 auto;
}

.answer-options {
    margin: 20px 0;
}

.answer-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.2s;
    cursor: pointer;
}

.answer-option:hover {
    background: #FFF5E6;
    border-color: #EE9C1D;
}

.answer-option input[type="radio"]:checked + span {
    color: #EE9C1D;
    font-weight: 600;
}

.answer-option:has(input[type="radio"]:checked) {
    background: #FFF5E6;
    border-color: #EE9C1D;
}

.question-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.question-number {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-text h3 {
    font-size: 22px;
    line-height: 1.6;
    color: #2c3e50;
    margin: 0 0 25px 0;
}

.answer-option label {
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
}

.answer-option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.answer-option span {
    flex: 1;
    font-size: 16px;
    line-height: 1.5;
}

.question-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #EE9C1D;
}

.btn-secondary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.verify-btn-hover:hover:not(:disabled) {
    background: #EE9C1D !important;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* Exam rule icons (no mobile / no headset) under validation indicator */
.exam-rule-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f4f4f4;
    border: 3px solid #999;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.exam-rule-emoji {
    font-size: 26px;
    position: relative;
    z-index: 2;
}

.exam-rule-emoji-mobile {
    filter: grayscale(1) brightness(1.1);
}

.exam-rule-slash {
    position: absolute;
    width: 4px;
    height: 66px;
    background: #e53935;
    transform: rotate(-45deg);
    top: -5px;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
    z-index: 3;
}

.exam-sidebar-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.exam-rules-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 8px;
}

.exam-rules-text {
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
    color: #555;
}

.exam-allowed {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.exam-allowed-title {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #777;
}

.exam-allowed-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}

.exam-allowed-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.exam-allowed-emoji {
    font-size: 18px;
}

.exam-allowed-text {
    font-size: 11px;
    line-height: 1.4;
    color: #555;
}

@media (max-width: 1024px) {
    .ai-exam-grid {
        grid-template-columns: 1fr;
    }
    
    .ai-avatar-video {
        height: 300px;
    }
    
    .question-card {
        padding: 20px;
    }
    
    .question-navigation {
        flex-direction: column;
    }
}
