/* ============================================================
   03_sorularim_yapayzeka.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }


.gorsel-modal { max-width: 420px; width: 94vw; }

.gorsel-drop-zone {
    border: 2px dashed #94a3b8;
    border-radius: 10px;
    padding: 32px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    margin-top: 12px;
    background: #f8fafc;
}
.gorsel-drop-zone:hover,
.gorsel-drop-zone.drag-over {
    border-color: #2563eb;
    background: #eff6ff;
}
.gorsel-drop-zone .drop-icon { font-size: 36px; margin-bottom: 8px; }
.gorsel-drop-zone p { margin: 0; font-size: 14px; color: #64748b; line-height: 1.5; }

.baglam-gorsel-alan { margin-top: 10px; }
.baglam-gorsel-ekli {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 10px 12px;
}
.gorsel-etiket { font-size: 12px; color: #15803d; font-weight: 600; margin-bottom: 4px; }
.btn-gorsel-kaldir {
    margin-top: 8px;
    font-size: 12px;
    padding: 4px 10px;
    background: #fee2e2;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #dc2626;
}

/* ── Global MathJax temel hizalama ──
   MathJax her render sonrasında SVG'ye negatif vertical-align inline style yazar.
   Bunu CSS !important ile 0'a sabitleyip hizalamayı container üzerinden
   vertical-align:middle ile yönetiyoruz. Böylece ilk yüklemede de
   resize beklemeden doğru görünür.                                   */
mjx-container {
    overflow: visible !important;
    max-width: 100%;
    display: inline-block !important;
    box-sizing: border-box;
    vertical-align: middle !important;
}

mjx-container svg {
    overflow: visible !important;
    vertical-align: 0 !important;   /* MathJax'ın negatif inline değerini ezer */
}

/* Display (blok) formüller için container hizalamasını sıfırla */
mjx-container[display="true"] {
    display: block !important;
    vertical-align: unset !important;
    text-align: center !important;
    margin: 8px auto !important;
}

.btn-gorsel-kaldir:hover { background: #fecaca; }

/* Görsel Yükle butonu rengi */
.btn-upload-img {
    background: #7e22ce !important;
    color: #fff !important;
}
.btn-upload-img:hover { background: #6b21a8 !important; }


/* ── Chat kapsayıcı ── */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 50px);
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,.07);
}

/* ── Mesaj alanı ── */
.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #f9fafb;
}

.message {
    padding: 14px 18px;
    border-radius: 14px;
    line-height: 1.7;
    font-size: 15px;
}

.msg-user {
    align-self: flex-end;
    max-width: 80%;
    background: #e0f2fe;
    color: #0369a1;
    border-bottom-right-radius: 3px;
}

.msg-ai {
    align-self: flex-start;
    width: 100%;
    background: #fff;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 3px;
    box-shadow: 0 2px 5px rgba(0,0,0,.03);
}

/* ── Dosya rozetleri ── */
.file-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}
.file-badge.ref { background:#eff6ff; border:1px solid #bae6fd; color:#0284c7; }
.file-badge.dir { background:#fdf4ff; border:1px solid #e9d5ff; color:#7e22ce; }

/* ── Önizleme ── */
.preview-box {
    margin-top: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}
.preview-actions {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}
.btn-action {
    flex: 1;
    padding: 9px 0;
    border: none;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
}
.btn-action:hover { opacity: .82; }
.btn-approve  { background:#dcfce7; color:#15803d; }
.btn-revise   { background:#fef9c3; color:#92400e; }
.btn-open-new { background:#eff6ff; color:#1d4ed8; }

/* ── İçerik blokları ── */
.result-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    padding: 12px 16px 8px;
    border-bottom: 2px solid #e2e8f0;
}
.result-inner {
    padding: 10px 16px 12px;
    background: #fff;
    scroll-behavior: smooth;
}
.blok-baslik {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #64748b;
    margin: 14px 0 5px;
}

/* ── İçerik kutuları ── */
.blok-baglam,
.blok-soru,
.blok-cozum {
    text-align: left;
    font-size: 15px;
    line-height: 1.8;
}
.blok-baglam *,
.blok-soru *,
.blok-cozum * {
    font-size: 15px !important;
    line-height: 1.8 !important;
    text-align: left !important;
}
.blok-baglam h4,
.blok-soru h4,
.blok-cozum h4 {
    font-size: 15px !important;
    font-weight: 700 !important;
    margin: 0 0 8px 0 !important;
}

/* MathJax — blok (display) formüller */
.blok-baglam mjx-container[jax="SVG"][display="true"],
.blok-soru   mjx-container[jax="SVG"][display="true"],
.blok-cozum  mjx-container[jax="SVG"][display="true"] {
    display: block !important;
    text-align: center !important;
    margin: 8px auto !important;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
}
/* MathJax — inline formüller */
.blok-baglam mjx-container:not([display="true"]),
.blok-soru   mjx-container:not([display="true"]),
.blok-cozum  mjx-container:not([display="true"]) {
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 0 2px !important;
    line-height: normal !important;
    overflow: visible !important;
    max-width: 100%;
}
.blok-baglam svg,
.blok-soru   svg,
.blok-cozum  svg {
    vertical-align: 0 !important;
    overflow: visible !important;
    max-width: 100%;
}

/* Seçeneklerin başındaki nokta/liste işaretini kaldır */
.blok-soru ul,
.blok-soru ol,
.blok-cozum ul,
.blok-cozum ol,
.blok-baglam ul,
.blok-baglam ol {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}
.blok-soru li::before,
.blok-cozum li::before,
.blok-baglam li::before {
    content: none !important;
}
.blok-soru li,
.blok-cozum li,
.blok-baglam li {
    padding-left: 0 !important;
    list-style: none !important;
}

/* Soru seçeneklerindeki p/div içindeki bullet benzeri karakter kalıpları */
.blok-soru p::before,
.blok-cozum p::before {
    content: none !important;
}

/* ── Seçenek Grid ── */
.secenekler-grid {
    margin-top: 10px;
}
.secenek-kutu {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 8px 11px;
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: #1e293b;
}
.secenek-kutu * {
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}
/* n=5: 3+2 → son satırdaki 2 kutu ortalı görünsün */
.secenekler-grid.cols-3 .secenek-kutu:nth-child(4) { grid-column: 1 / 2; }
.secenekler-grid.cols-3 .secenek-kutu:nth-child(5) { grid-column: 2 / 3; }


.blok-baglam {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px 14px;
    color: #0c4a6e;
}
.soru-blok-wrap { margin-bottom: 10px; }
.blok-soru {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    color: #1e293b;
}
.blok-cozum {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 12px 14px;
    color: #14532d;
    margin-top: 6px;
    display: none;
}
.blok-cozum.acik { display: block; }

.btn-cozum-goster {
    margin-top: 7px;
    padding: 6px 16px;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.btn-cozum-goster:hover { background: #bbf7d0; }

/* ── Görsel prompt ── */
.gorsel-prompt-box {
    margin-top: 8px;
    padding: 10px 12px;
    background: #fdf4ff;
    border: 1px dashed #c084fc;
    border-radius: 8px;
    font-size: 13.5px;
    color: #6b21a8;
}
.gorsel-prompt-box strong { display: block; margin-bottom: 4px; }

/* ── Progress bar ── */
.progress-bar-wrap {
    height: 4px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}
.progress-bar-fill {
    height: 100%;
    background: #3b82f6;
    border-radius: 4px;
    animation: indeterminate 1.6s ease infinite;
}
@keyframes indeterminate {
    0%   { transform: translateX(-100%); width: 60%; }
    100% { transform: translateX(180%);  width: 60%; }
}

/* ── Loader ── */
.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}
.dot {
    width: 7px; height: 7px;
    background: #9ca3af;
    border-radius: 50%;
    animation: blink 1.4s infinite both;
}
.dot:nth-child(2) { animation-delay: .2s; }
.dot:nth-child(3) { animation-delay: .4s; }
@keyframes blink {
    0%,80%,100% { opacity: .2; transform: scale(.8); }
    40%         { opacity: 1;  transform: scale(1.2); }
}
.loader-label { font-size: 13px; color: #6b7280; margin-left: 8px; }

/* ── Input alanı ── */
.chat-input-area {
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}
.staged-files {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.staged-file {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}
.staged-file.ref-type { background:#dbeafe; color:#1e40af; border:1px solid #bfdbfe; }
.staged-file.dir-type { background:#f3e8ff; color:#6b21a8; border:1px solid #e9d5ff; }
.staged-file.id-type  { background:#fef9c3; color:#92400e; border:1px solid #fde68a; }
.staged-file .remove  { cursor: pointer; color: #ef4444; font-weight: 700; }

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: #f3f4f6;
    border-radius: 22px;
    padding: 8px 12px;
    border: 1.5px solid transparent;
    transition: border-color .25s, background .25s, box-shadow .25s;
}
.input-wrapper:focus-within {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}

.attachment-container { position: relative; }
.btn-attach {
    background: none; border: none; cursor: pointer; color: #6b7280;
    padding: 7px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s, color .2s;
}
.btn-attach:hover { background: #e5e7eb; color: #374151; }

.attachment-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
    width: 270px;
    overflow: hidden;
    z-index: 100;
}
.attachment-menu.show { display: block; }

.attach-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    transition: background .15s;
}
.attach-option:last-child { border-bottom: none; }
.attach-option:hover { background: #f9fafb; color: #2563eb; }

/* ── Soru ID modal ── */
.soru-id-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9000;
    align-items: center;
    justify-content: center;
}
.soru-id-overlay.show { display: flex; }
.soru-id-modal {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    width: 340px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.soru-id-modal h3 { margin: 0 0 12px; font-size: 16px; color: #1e293b; }
.soru-id-modal input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color .2s;
}
.soru-id-modal input:focus { border-color: #3b82f6; }
.soru-id-modal .modal-actions { display: flex; gap: 8px; margin-top: 14px; }
.soru-id-modal .btn-modal {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.btn-modal-ok     { background: #2563eb; color: #fff; }
.btn-modal-ok:hover { background: #1d4ed8; }
.btn-modal-cancel { background: #f1f5f9; color: #64748b; }
.btn-modal-cancel:hover { background: #e2e8f0; }

textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    min-height: 24px;
    max-height: 150px;
    font-family: inherit;
    font-size: 15px;
    padding: 5px 0;
    color: #1f2937;
    line-height: 1.5;
}
textarea::placeholder { color: #9ca3af; }

.btn-send {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .2s, transform .15s;
}
.btn-send:hover:not(:disabled) { background: #1d4ed8; transform: scale(1.06); }
.btn-send:disabled { background: #c7d2fe; cursor: not-allowed; }

/* ── İllüstrasyon & Word stilleri (PHP'den taşındı) ── */
/* ── Yer tutucu kutu ─────────────────────────────────────────────── */
.illus-placeholder {
    border: 2px dashed #94a3b8;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 10px 0;
    background: #f8fafc;
    transition: border-color .2s, background .2s;
    text-align: center;
}
.illus-placeholder-icerik {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.illus-ikon { font-size: 28px; }
.illus-bilgi strong { font-size: 13px; color: #374151; display: block; margin-bottom: 4px; }
.illus-bilgi small  { font-size: 11px; color: #9ca3af; }

/* "Görsel Oluştur" ana butonu */
.btn-illus-olustur {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(99,102,241,.3);
    transition: opacity .15s, transform .1s;
}
.btn-illus-olustur:hover  { opacity: .88; transform: translateY(-1px); }
.btn-illus-olustur:active { transform: translateY(0); }

/* ── İllüstrasyon Modal ──────────────────────────────────────────── */
.illus-modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.illus-modal-overlay.show { display: flex; }

.illus-modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 480px;
    padding: 22px 20px 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 90vh;
    overflow-y: auto;
}
.illus-modal h3 {
    margin: 0;
    font-size: 15px;
    color: #1e293b;
}

/* Prompt bölümü */
.illus-modal-prompt-wrap {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    color: #374151;
    line-height: 1.6;
    position: relative;
}
.illus-modal-prompt-label {
    font-size: 11px;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 5px;
}
.illus-modal-prompt-text {
    word-break: break-word;
    white-space: pre-wrap;
    overflow-y: auto;
    height: 100px;
    border: 1px solid;
}
.btn-illus-kopyala {
    margin-top: 8px;
    font-size: 11px;
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    color: #374151;
    transition: background .15s;
}
.btn-illus-kopyala:hover { background: #f3f4f6; }

/* Yönlendirme yazısı */
.illus-modal-yonerge {
    font-size: 12px;
    color: #4b5563;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 0 6px 6px 0;
    padding: 8px 10px;
    line-height: 1.55;
}

/* Drop/upload alanı */
.illus-modal-drop {
    border: 2px dashed #c7d2fe;
    border-radius: 10px;
    padding: 18px 12px;
    text-align: center;
    background: #eef2ff;
    font-size: 12px;
    color: #4b5563;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.illus-modal-drop:focus { outline: none; border-color: #6366f1; background: #e0e7ff; }
.illus-modal-drop.drag-over {
    border-color: #6366f1;
    background: #e0e7ff;
}
.illus-modal-drop p { margin: 6px 0 10px; }
.illus-modal-drop .drop-icon { font-size: 26px; margin-bottom: 4px; }

.illus-modal-onizleme { display: none; text-align: center; }
.illus-modal-onizleme img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-bottom: 6px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.illus-modal-onizleme small { font-size: 11px; color: #6b7280; }

/* Alt butonlar */
.illus-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.btn-illus-iptal {
    font-size: 13px; padding: 7px 14px;
    border: 1px solid #d1d5db; border-radius: 8px;
    background: #fff; cursor: pointer; color: #374151;
}
.btn-illus-iptal:hover { background: #f9fafb; }
.btn-illus-yukle {
    font-size: 13px; font-weight: 600; padding: 7px 16px;
    border: none; border-radius: 8px;
    background: #2563eb; color: #fff; cursor: pointer;
    transition: opacity .15s;
}
.btn-illus-yukle:disabled { opacity: .45; cursor: default; }
.btn-illus-yukle:not(:disabled):hover { opacity: .88; }
.btn-illus-sil {
    font-size: 11px; padding: 4px 10px;
    border: 1px solid #fca5a5; border-radius: 6px;
    background: #fff; cursor: pointer; color: #dc2626;
    margin-top: 6px;
}
.btn-illus-sil:hover { background: #fef2f2; }

/* Yer tutucu üzerindeki "Görsel İptal" butonu */
.btn-illus-kaldir {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    padding: 4px 10px;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    background: #fff;
    color: #dc2626;
    cursor: pointer;
    transition: background .15s;
}
.btn-illus-kaldir:hover { background: #fef2f2; }

/* Yüklü görsel sarmalayıcı — pozisyonlu, X butonu için */
.illus-yuklu-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
}
.illus-yuklu-wrap img {
    max-width: 100%;
    border-radius: 8px;
    display: block;
    margin: 8px 0;
}
/* Sağ üst X butonu */
.btn-illus-x {
    position: absolute;
    top: 14px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    z-index: 10;
}
.btn-illus-x:hover { background: rgba(220,38,38,.85); }
.btn-illus-x.yukleniyor { opacity: .5; cursor: default; pointer-events: none; }

/* MS Word butonu */
.btn-word {
    background: #87CEEB !important;
    color: #1a3a5c !important;
    border: none !important;
    font-weight: 600 !important;
}
.btn-word:hover { background: #6bb8d8 !important; }

/* ══════════════════════════════════════════════════════════════════
   YZ SORUVIEW — SORU & ÇÖZÜM FRAME STILLERI
   class_soruviews.php tarafından üretilen .yz-html-frame içindeki
   tüm yapısal bileşenler buradan yönetilir.
   ══════════════════════════════════════════════════════════════════ */

/* ── Frame kapsayıcı: max yükseklik + scroll ──
   overflow-x: hidden — MathJax SVG taşmasını dışarı yansıtmaz,
   sadece blok formüller kendi içinde overflow-x:auto alır.       */
.yz-html-frame {
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding: 0 !important;
    background: #fff;
}

/* ── İçerik sarmalayıcı ── */
.yz-icerik-wrap {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-family: inherit;
    /* Taşma önleme: MathJax SVG içerik genişliğini aşmasın */
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

/* ── Bağlam bloğu ── */
.yz-baglam {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-left: 4px solid #38bdf8;
    border-radius: 8px;
    padding: 13px 16px;
    color: #0c4a6e;
    font-size: 14.5px;
    line-height: 1.85;
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}
.yz-baglam p { margin: 0 0 8px; }
.yz-baglam p:last-child { margin-bottom: 0; }
.yz-baglam strong { color: #0369a1; }
.yz-baglam ul,
.yz-baglam ol {
    margin: 8px 0 4px 18px;
    padding: 0;
}
.yz-baglam li { margin-bottom: 4px; }
.yz-baglam img {
    max-width: 100%;
    border-radius: 6px;
    margin: 10px 0;
    display: block;
}

/* ── Sorular bloğu ── */
.yz-sorular {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Tek soru maddesi ── */
.yz-soru-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 13px 15px;
    font-size: 14.5px;
    line-height: 1.85;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}
.yz-soru-item h4 {
    font-size: 14px !important;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px !important;
    display: inline;
}
.yz-soru-item .sb-kodu {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
    margin-left: 6px;
    vertical-align: middle;
}
.yz-soru-item p { margin: 4px 0 10px; }

/* Seçenekler listesi */
.yz-soru-item .secenekler {
    list-style: none !important;
    padding: 6px 0 0 0 !important;
    margin: 0 !important;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
}
.yz-soru-item .secenekler li {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #1e293b;
    cursor: default;
    transition: background .12s, border-color .12s;
}
.yz-soru-item .secenekler li:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}
.yz-soru-item .secenekler li strong {
    color: #2563eb;
    margin-right: 4px;
}

/* ── Çözümler bloğu ── */
.yz-cozumler {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── Tek çözüm maddesi ── */
.yz-cozum-item {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #22c55e;
    border-radius: 8px;
    padding: 13px 15px;
    font-size: 14.5px;
    line-height: 1.85;
    color: #14532d;
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}
.yz-cozum-item h4 {
    font-size: 14px !important;
    font-weight: 700;
    color: #166534;
    margin: 0 0 10px !important;
    padding-bottom: 7px;
    border-bottom: 1px dashed #86efac;
}

/* ── Çözüm adım kartları ── */
.cozum-adim {
    background: #fff;
    border: 1px solid #dcfce7;
    border-radius: 7px;
    padding: 9px 13px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.8;
    color: #1e293b;
}
.cozum-adim:last-of-type { margin-bottom: 0; }

/* Adım başlıkları (emoji + metin) */
.adim-baslik {
    display: block;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #0f766e;
    margin-bottom: 5px;
    letter-spacing: .01em;
}

/* Çözüm içindeki liste */
.cozum-adim ul,
.cozum-adim ol {
    margin: 4px 0 0 18px;
    padding: 0;
}
.cozum-adim li {
    margin-bottom: 5px;
    font-size: 14px !important;
    line-height: 1.75 !important;
}

/* "Doğru Cevap: X" satırı */
.yz-cozum-item > strong:last-child,
.cozum-maddesi > strong:last-child {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 14px;
    background: #166534;
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    letter-spacing: .03em;
}

/* ── Genel font boyutu override'larını kaldır — doğal cascade bırak ── */
.yz-baglam *,
.yz-soru-item *,
.yz-cozum-item * {
    font-size: inherit;
    line-height: inherit;
    text-align: left;
}

.tab-radio {
    display: inline-block;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 2px solid currentColor;
    margin-right: 6px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}
.geo-illus-tab-btn.aktif .tab-radio {
    background: currentColor;
    box-shadow: inset 0 0 0 2px #fff;
}
/* ── MathJax YZ frame içinde ──────────────────────────────────────
   Tüm mjx-container'lar için ortak sıfırlama.
   SVG'nin vertical-align'ı 0 !important ile sabitlenir;
   container vertical-align:middle ile hizalanır.
   Bu sayede ilk yüklemede de resize beklemeden doğru görünür.
   ────────────────────────────────────────────────────────────────── */

/* Tüm mjx-container'lar için ortak sıfırlama */
.yz-baglam mjx-container,
.yz-soru-item mjx-container,
.yz-cozum-item mjx-container {
    font-size: unset;
    line-height: normal;
    overflow: visible !important;
    max-width: 100%;
    box-sizing: border-box;
}

/* Display (blok) formüller */
.yz-baglam mjx-container[display="true"],
.yz-soru-item mjx-container[display="true"],
.yz-cozum-item mjx-container[display="true"] {
    display: block !important;
    text-align: center !important;
    margin: 10px auto !important;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    vertical-align: unset !important;
}

/* Inline formüller */
.yz-baglam mjx-container:not([display="true"]),
.yz-soru-item mjx-container:not([display="true"]),
.yz-cozum-item mjx-container:not([display="true"]) {
    display: inline-block !important;
    vertical-align: baseline !important;
    margin: 0 2px !important;
    line-height: normal !important;
    overflow: visible !important;
    max-width: 100%;
}

/* SVG — vertical-align:0 ile MathJax'ın negatif inline değerini ezer */
.yz-baglam svg,
.yz-soru-item svg,
.yz-cozum-item svg {
    vertical-align: 0 !important;
    overflow: visible !important;
    max-width: 100%;
    height: auto;
}

/* ── Scrollbar stilleri (WebKit) ── */
.yz-html-frame::-webkit-scrollbar { width: 6px; }
.yz-html-frame::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 3px; }
.yz-html-frame::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.yz-html-frame::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ══════════════════════════════════════════════════════════════════
   YAN YANA KART YÜKSEKLİK EŞİTLEME
   .twoperpage altındaki .soruedit kartları inline-flex ile
   yan yana dizilir; Container_Resize() JS tarafından yönetilir.
   ══════════════════════════════════════════════════════════════════ */

/* Sadece YZ kartı flex kolon yapısına ihtiyaç duyar */
.yz-soruedit {
    display: flex;
    flex-direction: column;
}

/* twoperpage içinde her iki kart tipi de inline-flex + üstten hizalı */
.twoperpage > .soruedit,
.twoperpage > .yz-soruedit {
    display: inline-flex !important;
    flex-direction: column;
    vertical-align: top;
}

/* Tab kontrol alanı */
.yz-soruedit .tabcontrol {
    display: flex;
    flex-direction: column;
    flex: 1;
    background: lightsteelblue;
}

/* soruedit_frames: JS'in height:auto / px döngüsünden korunmak için
   height'ı !important ile auto'ya sabitle — JS override edemez */
.yz-soruedit .soruedit_frames {
    height: auto !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.yz-soruedit .soruedit_frames > .frame {
    flex: 1;
    min-height: 0;
}

/* yz-html-frame: sayfanın %90'ı ile sınırla, kendi scroll'u var */
.yz-soruedit .yz-html-frame {
    max-height: 90vh;
    overflow-y: auto;
    height: auto !important;
}
/* MathJax konteynerinin satır içinde kalmasını sağlar */
mjx-container[jax="SVG"] {
    display: inline-block !important;
    vertical-align: top !important;
    margin: 0 2px !important;
    line-height: normal !important;
}

/* SVG içindeki ifadelerin hizalamasını düzeltir */
mjx-container[jax="SVG"] svg {
    vertical-align: middle !important;
    margin-top: -2px; /* İhtiyaca göre 1-2px yukarı/aşağı oynatabilirsiniz */
}

/* Liste öğesi (li) içindeki metinle uyumu artırır */
li strong mjx-container {
    padding: 0 !important;
}
/* ── Geo Görsel Wrapper: X (Kaldır) + Redo (Yeniden Çiz) ──────────────────── */
.geo-img-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin: 8px 0;
}

.geo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    color: #94a3b8;
    font-size: 13px;
    padding: 16px;
    margin: 4px 0;
}

.geo-btn-wrap {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
    z-index: 10;
}

.geo-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    line-height: 1;
    opacity: 1;
    transition: opacity .15s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,.25);
    padding: 0;
}

/* geo-btn her zaman görünür — hover kuralı kaldırıldı */

.geo-btn-x {
    background: #e53935;
    color: #fff;
}
.geo-btn-x:hover { background: #b71c1c; }

.geo-btn-redo {
    background: #1e88e5;
    color: #fff;
}
.geo-btn-redo:hover { background: #1565c0; }

.geo-btn svg { pointer-events: none; }

.geo-loading-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 11;
    background: rgba(255,255,255,0.82);
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
    pointer-events: none;
}
.geo-loading-overlay.active {
    display: flex;
}
@keyframes geo-spin { to { transform: rotate(360deg); } }
.geo-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid #d1d5db;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: geo-spin .7s linear infinite;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════
   SORU DÜZENLEYİCİ — inline stillerden taşınan kurallar
   (3_sorularim_soru_duzenle.php ve diğer chatbox sayfaları)
   ══════════════════════════════════════════════════════════════════ */

/* ── Token durum etiketi (appbar sağ) ── */
#token-status {
    position: absolute;
    right: 12px;
    font-size: 11px;
    color: #94a3b8;
}

/* ── Modal scroll — illus-modal zaten max-height:90vh alıyor,
   overflow-y:auto ekleniyordu inline; artık CSS'den gelir ── */
.illus-modal {
    overflow-y: auto;
}

/* ── Gizli dosya input'u ── */
input[type="file"].hidden-file-input {
    display: none;
}

/* ── Kaydet / Onay buton barı ── */
#kaydet_bar {
    padding: 6px 8px 4px 8px;
    display: flex;
    gap: 6px;
}

/* ── Yüklü görsel iç sarmalayıcı (position wrapper) ──
   illus, geo, doğrudan görsellerde tekrar eden:
   position:relative; display:inline-block; width:100%           */
.gorsel-yuklu-ic {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* ── Yüklü görsel img ──
   max-width:100%;border-radius:8px;display:block;margin:8px 0  */
.gorsel-yuklu-img {
    max-width: 100%;
    border-radius: 8px;
    display: block;
    margin: 8px 0;
}

/* ── İllüstrasyon buton grubu (Yükle + Kaldır yan yana) ── */
.illus-btn-grup {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Kaydet buton icon'ları ── */
#btn_degisikilik_kaydet .btn-ikon,
#btn_onaya_gonder .btn-ikon {
    color: #fff;
    font-size: 15px;
}
#btn_degisikilik_kaydet .btn-ikon { font-size: 16px; }

/* ── Chat mesaj renk varyantları ── */
.msg-ai--hata  { color: #dc2626; }
.msg-ai--uyari { color: #b45309; }
.msg-ai--basari { color: #15803d; }

/* ── Revizyon bekleme durum satırı ── */
.revizyon-durum-span {
    font-size: 14px;
    color: #6b7280;
}

/* ── Soru yüklenemedi alt notu ── */
.msg-ai .ai-alt-not {
    color: #6b7280;
    display: block;
    margin-top: 6px;
}

/* ── Soru içeriği yüklenemedi hata paragrafı ── */
.icerik-yuklenemedi {
    color: #dc2626;
    padding: 8px 0;
}

/* ── Spinner icon (Kaydediliyor durumu) ── */
.spinner-ikon {
    font-size: 14px;
}

/* ── Yoğun sunucu uyarı span ── */
.yogun-sunucu-detay {
    font-size: 13px;
    color: #92400e;
}

/* ── Kaydet / Onaya Gönder butonları ──
   !important ile framework (mytoolbtnsv vb.) override'larını engeller */
.btn-kaydet,
.btn-onaya-gonder {
    flex: 1;
    height: 44px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    border: none !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #fff !important;
    cursor: pointer;
    transition: opacity .15s;
}
.btn-kaydet {
    background: #2563eb !important;
}
.btn-kaydet:hover:not(.mydisable) {
    background: #1d4ed8 !important;
}
.btn-onaya-gonder {
    background: #16a34a !important;
}
.btn-onaya-gonder:hover:not(.mydisable) {
    background: #15803d !important;
}
.btn-kaydet.mydisable,
.btn-onaya-gonder.mydisable {
    opacity: .5;
    cursor: default;
}
#kaydet_bar .btn-kaydet,
#kaydet_bar .btn-onaya-gonder {
    flex: 1;
    height: 44px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    border: none !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: opacity .15s;
}
#kaydet_bar .btn-kaydet {
    background: #2563eb !important;
    color: #fff !important;
}
#kaydet_bar .btn-onaya-gonder {
    background: #16a34a !important;
    color: #fff !important;
}
/* ══════════════════════════════════════════════════════════════════
   SORU + ÇÖZÜM TOGGLE — class_soruviews.php (YZ kaydı)
   Çözüm ayrı sekmede değil, her sorunun altında gizli olarak durur;
   "Çözümü Göster" butonuna tıklayınca açılır/kapanır.
   ══════════════════════════════════════════════════════════════════ */

/* ── Çözümü Göster / Gizle butonu — modern pill ── */
.yz-czm-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 10px 0 2px;
    padding: 7px 18px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #bbf7d0 0%, white 100%);
    color: blue;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(22,163,74,.25);
    transition: opacity .15s, transform .12s, box-shadow .15s;
    user-select: none;
}
.yz-czm-btn:hover {
    opacity: .9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22,163,74,.35);
}
.yz-czm-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(22,163,74,.2);
}
/* Gizle modunda rengi değiştir */
.yz-czm-btn.acik {
    background: linear-gradient(135deg, green 0%, lightGreen 100%);
    box-shadow: 0 2px 8px rgba(71, 85, 105, .2);
    color: white;
}

/* ── Çözüm içerik bloğu — varsayılan gizli ── */
.yz-czm-blok {
    display: none !important;
    margin-top: 8px;
    padding: 14px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #22c55e;
    border-radius: 0 10px 10px 0;
    font-size: 13.5px;
    line-height: 1.75;
    animation: czm-slide-in .2s ease;
}
.yz-czm-blok.yz-czm-acik {
    display: block !important;
}
@keyframes czm-slide-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Soru maddeleri arası ayırıcı (son hariç) ── */
.yz-soru-item {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 6px;
}
.yz-soru-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}