/* ====== TML SORULAR QUIZ – Frontend Styles ====== */
#tml-quiz-wrap * { box-sizing: border-box; }

#tml-quiz-wrap {
    max-width: 680px;
    margin: 24px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* CARD */
.tml-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.10);
    overflow: hidden;
}
.tml-card-header {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.tml-card-header.success { background: linear-gradient(135deg, #059669, #047857); }
.tml-card-header .tml-icon { font-size: 28px; }
.tml-card-header h2 { margin: 0; font-size: 22px; font-weight: 700; }
.tml-card-body { padding: 28px; }

/* FIELD */
.tml-field { margin-bottom: 28px; }
.tml-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.tml-hint { font-size: 12px; color: #9ca3af; margin-top: 6px; display: block; }
.tml-hint-sub { font-size: 12px; color: #6b7280; margin: -4px 0 10px; }

/* NUMBER PICKER */
.tml-number-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    width: fit-content;
}
.tml-num-btn {
    background: #f3f4f6;
    border: none;
    padding: 10px 18px;
    font-size: 20px;
    cursor: pointer;
    color: #374151;
    transition: background .2s;
    font-weight: 700;
}
.tml-num-btn:hover { background: #2563eb; color: #fff; }
#tml-soru-sayisi {
    border: none;
    outline: none;
    width: 72px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #1d4ed8;
    background: #fff;
    -moz-appearance: textfield;
}
#tml-soru-sayisi::-webkit-outer-spin-button,
#tml-soru-sayisi::-webkit-inner-spin-button { -webkit-appearance: none; }

/* TOGGLE GRUP */
.tml-toggle-group {
    display: flex;
    gap: 10px;
}
.tml-toggle {
    flex: 1;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    transition: all .2s;
}
.tml-toggle:hover { border-color: #93c5fd; }
.tml-toggle.active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

/* PUAN GRUP */
.tml-puan-group {
    display: flex;
    gap: 10px;
}
.tml-puan-btn {
    flex: 1;
    padding: 10px 6px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
    transition: all .2s;
}
.tml-puan-btn:hover { border-color: #fbbf24; }
.tml-puan-btn.active {
    border-color: #d97706;
    background: #fffbeb;
    color: #b45309;
}
.tml-puan-btn.tml-puan-hepsi {
    border-style: dashed;
    font-weight: 700;
}
.tml-puan-btn.tml-puan-hepsi.active {
    border-style: solid;
}

/* BUTONLAR */
.tml-btn-primary {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
}
.tml-btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.tml-btn-primary:active { transform: translateY(0); }

.tml-btn-sec {
    padding: 12px 24px;
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}
.tml-btn-sec:hover { background: #e5e7eb; }

.tml-btn-success {
    padding: 12px 28px;
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
}
.tml-btn-success:hover { opacity: .9; }

.tml-hata { color: #dc2626; font-size: 14px; margin-top: 10px; }

/* QUIZ HEADER */
.tml-quiz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}
.tml-progress-wrap { flex: 1; }
.tml-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 4px;
}
#tml-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    border-radius: 99px;
    transition: width .4s ease;
    width: 0%;
}
#tml-progress-text { font-size: 13px; color: #6b7280; font-weight: 600; }
.tml-puan-goster { font-size: 14px; color: #374151; }
.tml-puan-goster strong { color: #2563eb; font-size: 18px; }

/* SORU ALANI */
#tml-soru-alani {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.09);
    padding: 28px;
    min-height: 220px;
    margin-bottom: 16px;
}
.tml-soru-no {
    font-size: 12px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 12px;
}
.tml-soru-metni {
    font-size: 17px;
    color: #111827;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* AÇIK UÇLU */
.tml-acik-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    resize: vertical;
    outline: none;
    transition: border-color .2s;
}
.tml-acik-textarea:focus { border-color: #2563eb; }

/* AÇIK UÇLU — ZORLUK DEĞERLENDİRME BUTONLARI */
.tml-acik-hint {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 14px;
    line-height: 1.5;
}
.tml-zorluk-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.tml-zorluk-btn {
    flex: 1 1 0;
    min-width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    cursor: pointer;
    transition: all .2s;
}
.tml-zorluk-btn:hover:not(.tml-zorluk-disabled) { border-color: #93c5fd; background: #eff6ff; }
.tml-zorluk-sayi {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px; color: #374151;
}
.tml-zorluk-etiket { font-size: 13px; font-weight: 600; color: #374151; }

.tml-zorluk-1:hover:not(.tml-zorluk-disabled) .tml-zorluk-sayi { background: #059669; color: #fff; }
.tml-zorluk-2:hover:not(.tml-zorluk-disabled) .tml-zorluk-sayi { background: #d97706; color: #fff; }
.tml-zorluk-3:hover:not(.tml-zorluk-disabled) .tml-zorluk-sayi { background: #dc2626; color: #fff; }

.tml-zorluk-1.tml-zorluk-secili { border-color: #059669; background: #ecfdf5; }
.tml-zorluk-2.tml-zorluk-secili { border-color: #d97706; background: #fffbeb; }
.tml-zorluk-3.tml-zorluk-secili { border-color: #dc2626; background: #fef2f2; }
.tml-zorluk-1.tml-zorluk-secili .tml-zorluk-sayi { background: #059669; color: #fff; }
.tml-zorluk-2.tml-zorluk-secili .tml-zorluk-sayi { background: #d97706; color: #fff; }
.tml-zorluk-3.tml-zorluk-secili .tml-zorluk-sayi { background: #dc2626; color: #fff; }

.tml-zorluk-disabled { cursor: default !important; }
.tml-zorluk-disabled:not(.tml-zorluk-secili) { opacity: .5; }


/* TEST ŞIKLAR */
.tml-siklar { display: flex; flex-direction: column; gap: 10px; }
.tml-sik {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
    background: #f9fafb;
}
.tml-sik:hover { border-color: #93c5fd; background: #eff6ff; }
.tml-sik.secili { border-color: #2563eb; background: #eff6ff; }
.tml-sik.dogru  { border-color: #059669; background: #ecfdf5; }
.tml-sik.yanlis { border-color: #dc2626; background: #fef2f2; }
.tml-sik-harf {
    width: 32px; height: 32px;
    background: #e5e7eb;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: #374151;
    flex-shrink: 0;
}
.tml-sik.secili .tml-sik-harf { background: #2563eb; color: #fff; }
.tml-sik.dogru  .tml-sik-harf { background: #059669; color: #fff; }
.tml-sik.yanlis .tml-sik-harf { background: #dc2626; color: #fff; }
.tml-sik-txt { font-size: 15px; color: #374151; }

/* NAV BTNS */
.tml-nav-btns {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

/* SONUÇ */
#tml-sonuc-detay { margin-bottom: 24px; }
.tml-sonuc-puan {
    font-size: 52px;
    font-weight: 800;
    color: #2563eb;
    text-align: center;
    margin: 8px 0;
}
.tml-sonuc-altyazi {
    text-align: center;
    color: #6b7280;
    font-size: 15px;
    margin-bottom: 20px;
}
.tml-sonuc-istatistik {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
.tml-stat-kutu {
    text-align: center;
    padding: 14px;
    border-radius: 10px;
    background: #f3f4f6;
}
.tml-stat-kutu .tml-stat-sayi { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.tml-stat-kutu .tml-stat-etiket { font-size: 12px; color: #9ca3af; font-weight: 600; }
.tml-stat-kutu.dogru  .tml-stat-sayi { color: #059669; }
.tml-stat-kutu.yanlis .tml-stat-sayi { color: #dc2626; }
.tml-stat-kutu.bos    .tml-stat-sayi { color: #d97706; }

/* LOADING */
.tml-loading {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-size: 15px;
}
.tml-loading::before {
    content: '';
    display: block;
    width: 36px; height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: tml-spin 0.7s linear infinite;
}
@keyframes tml-spin { to { transform: rotate(360deg); } }

/* KATEGORİ ETİKETİ */
.tml-kategori-etiket {
    display: inline-block;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* SORU GÖRSELİ */
.tml-soru-img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 16px;
    display: block;
}

/* İPUCU */
.tml-btn-ipucu {
    margin-top: 12px;
    padding: 8px 16px;
    background: #fffbeb;
    border: 2px solid #fbbf24;
    border-radius: 8px;
    color: #92400e;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.tml-btn-ipucu:hover { background: #fef3c7; }
.tml-ipucu {
    margin-top: 10px;
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: 14px;
    color: #166534;
    line-height: 1.6;
}

/* OPSİYONEL BADGE */
.tml-opsiyonel {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .tml-card-body { padding: 18px; }
    #tml-soru-alani { padding: 18px; }
    .tml-toggle-group { flex-direction: column; }
    .tml-sonuc-istatistik { grid-template-columns: 1fr; }
}

/* ── FEEDBACK KUTUSU ── */
.tml-feedback {
    margin-top: 18px;
    padding: 16px 20px;
    border-radius: 12px;
    border-left: 5px solid;
    animation: tml-fadeIn .3s ease;
}
.tml-feedback.dogru  { background: #f0fdf4; border-color: #22c55e; }
.tml-feedback.yanlis { background: #fff1f2; border-color: #f43f5e; }
.tml-feedback.bilgi  { background: #eff6ff; border-color: #3b82f6; }

.tml-feedback-baslik {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}
.tml-feedback.dogru  .tml-feedback-baslik { color: #15803d; }
.tml-feedback.yanlis .tml-feedback-baslik { color: #be123c; }
.tml-feedback.bilgi  .tml-feedback-baslik { color: #1d4ed8; }

.tml-feedback-dogru {
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
}
.tml-feedback-aciklama {
    font-size: 14px;
    color: #374151;
    line-height: 1.7;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,.08);
}
.tml-feedback-aciklama.tml-long {
    margin-top: 8px;
    padding-top: 8px;
}

/* Şık ikonu (✓ / ✗) */
.tml-sik-icon {
    margin-left: auto;
    font-size: 18px;
    font-weight: 700;
    color: #059669;
    flex-shrink: 0;
}
.tml-sik-icon.red { color: #dc2626; }

/* Kilitli şık */
.tml-sik-disabled { cursor: default !important; }
.tml-sik-disabled:hover {
    border-color: inherit !important;
    background: inherit !important;
}
.tml-sik.dogru.tml-sik-disabled:hover  { background: #ecfdf5 !important; border-color: #059669 !important; }
.tml-sik.yanlis.tml-sik-disabled:hover { background: #fef2f2 !important; border-color: #dc2626 !important; }

/* Cevapla butonu */
.tml-btn-cevapla {
    margin-top: 12px;
    padding: 11px 24px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
}
.tml-btn-cevapla:hover { opacity: .88; }

@keyframes tml-fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════
   SORU BİLDİR BUTONU & PANELİ
══════════════════════════════════════════════ */

.tml-soru-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.tml-bildir-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1.5px solid rgba(156,163,175,.25);
    border-radius: 8px;
    color: #9ca3af;
    padding: 0;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    flex-shrink: 0;
}
.tml-bildir-btn:hover {
    background: rgba(239,68,68,.08);
    border-color: rgba(239,68,68,.45);
    color: #ef4444;
}
.tml-bildir-btn.tml-bildir-btn--active {
    background: rgba(239,68,68,.1);
    border-color: #ef4444;
    color: #ef4444;
}

/* Panel */
.tml-bildir-panel {
    display: none;
    background: #1e2535;
    border: 1px solid rgba(239,68,68,.3);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    animation: tml-bildir-in .2s ease;
}
.tml-bildir-panel.tml-bildir-panel--open {
    display: block;
}
@keyframes tml-bildir-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tml-bildir-baslik {
    font-size: 11px;
    font-weight: 700;
    color: #f87171;
    text-transform: uppercase;
    letter-spacing: .7px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tml-bildir-nedenler {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.tml-bildir-neden-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    padding: 4px 11px;
    font-size: 12px;
    font-weight: 500;
    color: #cbd5e1;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}
.tml-bildir-neden-item:hover {
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.4);
    color: #fca5a5;
}
.tml-bildir-neden-item:has(input:checked) {
    background: rgba(239,68,68,.15);
    border-color: #ef4444;
    color: #fca5a5;
}
.tml-bildir-neden-item input[type="radio"] {
    accent-color: #ef4444;
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.tml-bildir-aciklama {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    color: #e2e8f0;
    background: rgba(255,255,255,.05);
    resize: vertical;
    min-height: 52px;
    outline: none;
    font-family: inherit;
    margin-bottom: 10px;
    transition: border-color .15s;
}
.tml-bildir-aciklama::placeholder { color: #64748b; }
.tml-bildir-aciklama:focus {
    border-color: rgba(239,68,68,.5);
    box-shadow: 0 0 0 2px rgba(239,68,68,.12);
}

.tml-bildir-footer {
    display: flex;
    gap: 8px;
}
.tml-bildir-gonder {
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.tml-bildir-gonder:hover    { background: #dc2626; }
.tml-bildir-gonder:disabled { opacity: .6; cursor: not-allowed; }

.tml-bildir-iptal {
    background: transparent;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    color: #94a3b8;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}
.tml-bildir-iptal:hover {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.25);
}

.tml-bildir-tesekkur {
    color: #4ade80;
    font-size: 13px;
    font-weight: 600;
    padding: 2px 0;
}
