/* exam-shared.css — 3 HTML dosyasında ortak patch CSS */
/* 2021-2, 2022-2, 2023-1 — birebir aynı blok */

/* ════════════════════════════════════════════════════════
   1) HIT-ZONE GENİŞLETMELERİ — görünmez ::after katmanları
   ════════════════════════════════════════════════════════ */
.chrono-fab,
.sticky-fab,
.optic-fab,
.km-toggle-fab,
.chrono-modal-close,
.sticky-modal-close,
.optic-modal-close,
.exam-nav-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.chrono-fab,
.sticky-fab,
.optic-fab,
.km-toggle-fab,
.chrono-modal-close,
.sticky-modal-close,
.optic-modal-close,
.exam-nav-btn { isolation: isolate; }

.chrono-fab::after,
.sticky-fab::after,
.optic-fab::after,
.km-toggle-fab::after,
.chrono-modal-close::after,
.sticky-modal-close::after,
.optic-modal-close::after {
    content: '';
    position: absolute;
    inset: -22px;
    border-radius: 50%;
    background: transparent;
    pointer-events: auto;
    z-index: 0;
}
.chrono-fab::before,
.sticky-fab::before,
.optic-fab::before,
.km-toggle-fab::before,
.chrono-modal-close::before,
.sticky-modal-close::before,
.optic-modal-close::before { pointer-events: none; }

/* Kronometre 3D eğimi sıfırla — hit-test hayaletini engeller */
.mini-chrono-tilt,
.mini-chrono-tilt:hover { transform: none !important; }

/* Mini-kronometre butonlarına geniş hit alanı */
.mini-chrono-step { position: relative; }
.mini-chrono-step::after {
    content: ''; position: absolute; inset: -12px;
    background: transparent; pointer-events: auto;
}
.mini-chrono-btn { position: relative; }
.mini-chrono-btn::after {
    content: ''; position: absolute; inset: -10px -8px;
    background: transparent; pointer-events: auto;
}

/* Masaüstü kronometre tune/preset butonları */
.chrono-tune-btn { position: relative; }
.chrono-tune-btn::after {
    content: ''; position: absolute; inset: -10px;
    background: transparent; pointer-events: auto;
}
.chrono-preset { position: relative; }
.chrono-preset::after {
    content: ''; position: absolute; inset: -6px -8px;
    background: transparent; pointer-events: auto;
}


/* ════════════════════════════════════════════════════════
   2) OPTIC PANEL — dar ekran adaptasyon onarımı
   ────────────────────────────────────────────────────────
   Mevcut paneller şu kuralla çakışıyordu (kaynak sırası
   sonradan gelen kazandığı için optic-panel <720px'te bile
   görünür kalıyordu). En sonda tanımlanan kural her zaman
   kazanır — onun için bu blok DOSYANIN EN ALTINDA.
   ════════════════════════════════════════════════════════ */

/* <760px → optic-panel gizle, optic-fab göster.
   (Krono ile aynı eşik; rev13'teki 760 ile uyumlu) */
@media (max-width: 760px) {
    .optic-panel { display: none !important; }
    .optic-fab   { display: flex !important; }
}
/* <1400px ile <720px'te değiştirenleri net hale getirmek için
   ek savunma — optic-fab'i <760px üzerinde her zaman gizle */
@media (min-width: 761px) {
    .optic-fab { display: none !important; }
}

/* Optic FAB — krono FAB'inin tarzında ama açık-mavi (--lb-sky)
   ile fark edilebilir. (Mevcut renk değişkenlerini kullanır.) */
.optic-fab {
    display: none;
    position: fixed;
    bottom: calc(156px + env(safe-area-inset-bottom));
    right: calc(20px + env(safe-area-inset-right));
    width: 58px;
    height: 58px;
    border-radius: 50%;
    font-size: 1.55rem;
    z-index: 9998;
    cursor: pointer;
    transition: transform 0.2s ease;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    border: 2px solid var(--lb-sky, #6ea8d8);
    background:
        linear-gradient(160deg,
            var(--lb-sky-soft, #cfe1f2) 0%,
            var(--lb-sky, #6ea8d8) 60%,
            #4a8bbe 100%);
    color: var(--lb-ink, #1e2a3a);
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.55),
        0 0 0 4px rgba(110, 168, 216, 0.15),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    font-weight: 800;
}
.optic-fab:hover  { transform: scale(1.06); }
.optic-fab:active { transform: scale(0.94); }

/* Optic modal — kronometre modalıyla aynı tarz */
.optic-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.78);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 9990;
    animation: optic-fade-in 0.22s ease;
}
@keyframes optic-fade-in { from { opacity: 0; } to { opacity: 1; } }

.optic-modal-close {
    display: none;
    position: fixed;
    top: calc(16px + env(safe-area-inset-top));
    right: calc(16px + env(safe-area-inset-right));
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.92);
    color: #f4ebd9;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.optic-modal-close:active { transform: scale(0.94); }

/* Modal AÇIKKEN: optic-panel ortalanmış görünür */
body.optic-modal-open { overflow: hidden; }
body.optic-modal-open .optic-modal-overlay { display: block; }
body.optic-modal-open .optic-modal-close   { display: flex; }
body.optic-modal-open .optic-panel {
    display: block !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) scale(1) !important;
    width: min(400px, calc(100vw - 24px)) !important;
    max-width: min(400px, calc(100vw - 24px)) !important;
    max-height: calc(100dvh - 96px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    z-index: 10000 !important;
    transition: none !important;
}
/* Modal açıkken karşılığı olan FAB'i gizle */
body.optic-modal-open  .optic-fab     { display: none !important; }
body.chrono-modal-open .optic-fab,
body.sticky-modal-open .optic-fab { display: none !important; }
body.optic-modal-open  .chrono-fab,
body.optic-modal-open  .sticky-fab    { display: none !important; }


/* ════════════════════════════════════════════════════════
   3) ÜST BANER — Önceki / Sonraki butonları
   ════════════════════════════════════════════════════════ */
.exam-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border-radius: 13px;
    background: linear-gradient(165deg,
        var(--gold-light, #dcc282) 0%,
        var(--gold, #c9a961) 55%,
        var(--gold-dark, #a08443) 100%);
    color: var(--primary, #3d342a);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    cursor: pointer;
    text-decoration: none;
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.35),
        0 0 0 4px rgba(201, 169, 97, 0.12),
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    transition:
        transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.25s ease;
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
    position: relative;
}
.exam-nav-btn::after {
    content: '';
    position: absolute;
    inset: -10px;
    background: transparent;
    pointer-events: auto;
    z-index: -1;
}
.exam-nav-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow:
        0 12px 24px rgba(201, 169, 97, 0.5),
        0 0 0 4px rgba(201, 169, 97, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.5);
}
.exam-nav-btn:active { transform: translateY(0) scale(0.98); }

.exam-nav-btn .enb-label {
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.exam-nav-btn .enb-arrow {
    font-size: 1.15rem;
    line-height: 1;
    display: inline-block;
    transition: transform 0.25s ease;
}
.exam-nav-btn.prev { margin-right: 12px; }
.exam-nav-btn.next { margin-left: 12px; }
.exam-nav-btn.prev:hover .enb-arrow { transform: translateX(-4px); }
.exam-nav-btn.next:hover .enb-arrow { transform: translateX(4px); }

@media (max-width: 720px) {
    .exam-nav-btn {
        height: 38px;
        padding: 0 13px;
        font-size: 0.85rem;
        gap: 6px;
    }
    .exam-nav-btn.prev { margin-right: 8px; }
    .exam-nav-btn.next { margin-left: 8px; }
    .exam-nav-btn .enb-arrow { font-size: 1rem; }
}
@media (max-width: 460px) {
    .exam-nav-btn {
        height: 34px;
        padding: 0 9px;
        font-size: 0.74rem;
    }
    /* Çok dar ekranda etiketi sakla, sadece okları göster */
    .exam-nav-btn .enb-label { display: none; }
    .exam-nav-btn { gap: 0; }
}
