/* CSExams Exam Mode Styles */

/* Additional exam mode enhancements */
.csexams-exam-mode-active {
    position: relative;
}

.csexams-exam-mode-active::before {
    content: '⏱️ EXAM MODE ACTIVE';
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 9998;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

/* Exam mode quiz wrapper styling */
body.csexams-exam-mode .tutor-quiz-body {
    border: 3px solid #e74c3c;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
}

/* Exam mode focus enhancements */
body.csexams-exam-mode .tutor-quiz-question {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Timer pulse effect for urgent time */
@keyframes urgent-pulse {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(231, 76, 60, 0.3);
    }
    50% {
        box-shadow: 0 8px 32px rgba(231, 76, 60, 0.6);
    }
}

.csexams-exam-timer-display.timer-warning {
    animation: urgent-pulse 1s infinite;
}

/* ========================================
   QUESTION FLAGGING FEATURE STYLES
   ======================================== */

/* Flag button styling */
.csexams-flag-question-btn {
    background: transparent;
    border: 1px solid #ddd;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.csexams-flag-question-btn:hover {
    background: #f9f9f9;
    border-color: #ffc107;
    color: #333;
}

.csexams-flag-question-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Flagged state */
.csexams-flag-question-btn.flagged,
.csexams-flag-question-btn[data-flagged="1"] {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
    font-weight: 600;
}

.csexams-flag-question-btn.flagged:hover,
.csexams-flag-question-btn[data-flagged="1"]:hover {
    background: #ffe69c;
    border-color: #ffb300;
}

/* Flag icon */
.csexams-flag-question-btn .flag-icon {
    font-size: 16px;
    line-height: 1;
}

/* Pagination indicator flagged state */
.tutor-quiz-question-paginate-item.flagged {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #fff !important;
    position: relative;
    font-weight: 700;
}

.tutor-quiz-question-paginate-item .flag-emoji {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 12px;
    background: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Flag message notifications */
.csexams-flag-message {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    z-index: 99999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.csexams-flag-message.show {
    opacity: 1;
    transform: translateX(0);
}

.csexams-flag-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.csexams-flag-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Flag indicators in review page */
.csexams-flag-indicator {
    display: inline-block;
    margin-left: 8px;
    font-size: 16px;
    vertical-align: middle;
}

.csexams-flagged-label {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Flagged row highlighting in attempt details */
.csexams-flagged-row {
    background-color: #fffbf0 !important;
    border-left: 4px solid #ffc107 !important;
}

.csexams-flagged-row th,
.csexams-flagged-row td {
    background-color: #fffbf0 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .csexams-flag-question-btn .flag-text {
        display: none;
    }
    
    .csexams-flag-question-btn {
        padding: 6px 8px;
    }
    
    .csexams-flag-message {
        right: 10px;
        left: 10px;
        top: 60px;
    }
}

/* Print styles - hide flag buttons when printing */
@media print {
    .csexams-flag-question-btn {
        display: none;
    }
    
    .csexams-flag-indicator,
    .csexams-flagged-label {
        display: inline-block !important;
    }
}

