/* ==========================================================================
   FE-CIVIL CBT EXAM SIMULATOR & DIAGNOSTIC REPORT STYLES
   ========================================================================== */

.fe-cbt-fullscreen-workspace {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #f8fafc;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #0f172a;
}

.cbt-top-header {
    background: #ffffff;
    border-bottom: 2px solid #e2e8f0;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    user-select: none;
}

.cbt-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cbt-brand-box {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #38bdf8;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 16px;
}

.cbt-title-h1 {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.cbt-subtitle-info {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 600;
}

.cbt-timer-box {
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cbt-timer-digits {
    font-family: 'Courier New', Courier, monospace;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.cbt-flag-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: #1d4ed8;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cbt-flag-toggle-label:hover {
    background: #dbeafe;
}

/* CBT Main Layout */
.cbt-body-container {
    flex: 1;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    position: relative;
}

.cbt-question-pane {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
    background: #ffffff;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.cbt-area-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid;
    margin-bottom: 16px;
}

.cbt-bottom-bar {
    background: #ffffff;
    border-top: 2px solid #e2e8f0;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.02);
    user-select: none;
}

.cbt-btn {
    appearance: none;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
    font-family: inherit;
}

.cbt-btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1.5px solid #cbd5e1;
}

.cbt-btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
    color: #0f172a;
}

.cbt-btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cbt-btn-primary {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.cbt-btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.cbt-btn-finish {
    background: #059669;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.cbt-btn-finish:hover {
    background: #047857;
}

/* Review Screen Modal */
.cbt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 100050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cbt-modal-box {
    background: #ffffff;
    border-radius: 16px;
    max-width: 850px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.cbt-modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cbt-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.cbt-review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

/* Print Rules for Diagnostic Report */
@media print {
    body * {
        visibility: hidden;
    }
    #feExamReportWorkspace, #feExamReportWorkspace * {
        visibility: visible;
    }
    #feExamReportWorkspace {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: #ffffff;
    }
    button, .dialog-actions, .cbt-top-header {
        display: none !important;
    }
}
