/* ==========================================================================
   TERFIUI v5 — Sınav (exam.php) Modüler Sayfa Stilleri
   ========================================================================== */

/* Sayfa Gövdesi — 8px Boşluklu Hizalama Kuralı */
/* ── Sınav Üst Bilgi Kartı ── */
.gd-exam-header-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    flex-wrap: wrap;
}

.gd-exam-header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 260px;
}

.gd-exam-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}

.gd-exam-subtitle {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gd-exam-badge {
    font-size: 11px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
}

/* Sayaç Alanı */
.gd-exam-timer-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.gd-exam-timer {
    min-width: 100px;
    text-align: center;
    font-weight: 800;
    font-size: 20px;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
    letter-spacing: 0.5px;
    font-variant-numeric: tabular-nums;
    transition: all 0.2s ease;
}

.gd-exam-timer.paused {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #475569;
}

.gd-exam-timer.warning {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
    animation: timerPulse 1s infinite;
}

@keyframes timerPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.gd-exam-timer-sub {
    font-size: 11px;
    color: #64748b;
}

/* ── 2 Kolonlu Düzen ── */
.gd-exam-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 12px;
    align-items: start;
    width: 100%;
}

.gd-exam-main-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Soru Kartları ── */
.gd-exam-question-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    scroll-margin-top: 80px;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.gd-exam-question-card.highlight {
    background-color: #f0f9ff;
    border-color: #93c5fd;
}

.gd-exam-question-text {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.gd-exam-question-num {
    font-weight: 800;
    color: #1e293b;
    flex-shrink: 0;
}

.gd-exam-question-body {
    flex: 1;
}

.gd-premise-item {
    font-weight: 800;
    color: #0f172a;
    display: inline-block;
    min-width: 24px;
}

.gd-exam-question-body p {
    margin: 0 0 8px 0;
}

.gd-exam-question-body p:last-child {
    margin-bottom: 0;
}

.gd-exam-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gd-exam-option-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.gd-exam-option-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.gd-exam-option-item.selected {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1d4ed8;
}

.gd-exam-option-radio {
    margin-top: 3px;
    accent-color: #2563eb;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.gd-exam-option-text {
    font-size: 14px;
    line-height: 1.5;
    color: #334155;
}

.gd-exam-option-letter {
    font-weight: 800;
    margin-right: 4px;
    color: #1e293b;
}

/* Sınav Alt Aksiyonlar */
.gd-exam-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
}

/* Mola Bildirimi */
.gd-exam-pause-notice {
    display: none;
    padding: 40px 24px;
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    text-align: center;

}

.gd-exam-pause-icon {
    width: 56px;
    height: 56px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.gd-exam-pause-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px;
}

.gd-exam-pause-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* ── Optik Form Yan Panel ── */
.gd-exam-sticky-sidebar {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.gd-exam-optic-card {
    background: #fff5f5; /* Görseldeki yumuşak pembe zemin */
    border: 1.5px solid #fecaca;
    border-radius: 16px;
    padding: 20px 18px;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.04);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gd-exam-optic-header {
    font-weight: 800;
    font-size: 16px;
    color: #dc2626; /* Canlı kitle kırmızısı */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #fca5a5;
    margin: 0;
}

.gd-exam-optic-count {
    font-size: 13px;
    color: #2563eb; /* Görseldeki mavi 1/20 sayacı */
    background: transparent;
    padding: 0;
    font-weight: 800;
}

.gd-exam-optic-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gd-exam-optic-progress-label {
    font-size: 12px;
    font-weight: 700;
    color: #e11d48;
}

.gd-exam-optic-progress-bg,
.gd-exam-optic-progress-bar {
    height: 4px;
    background: #fecaca;
    border-radius: 4px;
    position: relative;
    overflow: visible;
}

.gd-exam-optic-progress-fill {
    height: 100%;
    background: #e11d48;
    border-radius: 4px;
    width: 0%;
    position: relative;
    transition: width 0.3s ease;
}

.gd-exam-optic-progress-fill::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #e11d48;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(225, 29, 72, 0.4);
}

.gd-exam-optic-grid,
.gd-exam-optic-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 6px;
    margin-top: 4px;
}

.gd-exam-optic-grid::-webkit-scrollbar,
.gd-exam-optic-list::-webkit-scrollbar { width: 4px; }
.gd-exam-optic-grid::-webkit-scrollbar-track,
.gd-exam-optic-list::-webkit-scrollbar-track { background: #ffe4e6; }
.gd-exam-optic-grid::-webkit-scrollbar-thumb,
.gd-exam-optic-list::-webkit-scrollbar-thumb { background: #fda4af; border-radius: 4px; }

.gd-exam-optic-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gd-exam-optic-num,
.gd-exam-optic-qno {
    width: 24px;
    font-size: 13px;
    font-weight: 800;
    color: #e11d48;
    cursor: pointer;
    text-align: right;
    flex-shrink: 0;
    user-select: none;
}

.gd-exam-optic-num:hover,
.gd-exam-optic-qno:hover {
    color: #9f1239;
}

.gd-exam-optic-bubbles {
    display: flex;
    gap: 8px;
    flex: 1;
    align-items: center;
}

.gd-exam-optic-bubble,
.gd-optic-bubble {
    width: 32px;
    height: 32px;
    border: 1.5px solid #fca5a5;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #e11d48;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.gd-exam-optic-bubble:hover,
.gd-optic-bubble:hover {
    background: #ffe4e6;
    border-color: #e11d48;
}

/* İşaretlenmiş Koyu Lacivert Baloncuk (#1e293b) */
.gd-exam-optic-bubble.active,
.gd-exam-optic-bubble.selected,
.gd-optic-bubble.active,
.gd-optic-bubble.selected {
    background: #1e293b !important;
    border-color: #0f172a !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.2) !important;
}

/* ── Mobil Optik Form Butonu & Overlay ── */
.gd-exam-mobile-optic-btn {
    display: none;
    position: fixed;
    right: 18px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    z-index: 999;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.gd-exam-mobile-optic-btn:active {
    transform: scale(0.95);
}

.gd-exam-optic-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.gd-exam-optic-overlay-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    overflow: hidden;
}

.gd-exam-optic-overlay-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 15px;
    color: #1e293b;
}

.gd-exam-optic-overlay-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

/* ── Modern Confirmation Modal (Rule 16) ── */
.gd-exam-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.gd-exam-confirm-modal {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: examModalSlideUp 0.22s ease-out;
}

@keyframes examModalSlideUp {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.gd-exam-confirm-body {
    padding: 24px 20px 16px;
    text-align: center;
}

.gd-exam-confirm-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    color: #2563eb;
}

.gd-exam-confirm-title {
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 6px;
}

.gd-exam-confirm-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.gd-exam-confirm-footer {
    display: flex;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid #f1f5f9;
}

.gd-exam-confirm-footer .gd-btn {
    flex: 1;
    justify-content: center;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .gd-exam-layout {
        grid-template-columns: 1fr;
    }

    .gd-exam-sticky-sidebar,
    .gd-exam-mobile-optic-btn,
    .gd-exam-optic-overlay,
    .gd-exam-optic-card {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .gd-exam-header-card {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .gd-exam-timer-box {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid #f1f5f9;
        padding-top: 12px;
    }

    .gd-exam-footer-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .gd-exam-footer-actions .gd-btn {
        justify-content: center;
    }
}
