
/* ==== apps/modules/web/3200/3_sinavlar_yeni_sinav_planB.php dosyasindan tasindi ==== */
/* ── chatbox.css include edilmediği için buraya taşınan temel layout kuralları ── */

*, *::before, *::after { box-sizing: border-box; }

.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);
}

.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);
}
.msg-ai--hata  { color: #dc2626; }
.msg-ai--uyari { color: #b45309; }

.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%; }
}

.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; }

.chat-input-area {
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

#kaydet_bar {
    display: flex;
    gap: 6px;
    padding: 0 0 8px 0;
}
#kaydet_bar button {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: opacity .15s;
}
#kaydet_bar #btnOnayla  { background: #16a34a; }
#kaydet_bar #btnOnayla:hover:not(.mydisable)  { background: #15803d; }
#kaydet_bar #btnUygula  { background: #7c3aed; }
#kaydet_bar #btnUygula:hover:not(.mydisable)  { background: #6d28d9; }
#kaydet_bar button.mydisable { opacity: .5; cursor: default; }

.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 .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; }

#spChatInput {
    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;
}
#spChatInput::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; }

/* ── Plan kartları — chat-history'nin üstünde sabit, scroll dışında ── */
.sp-plan-wrap {
    margin: 0;
    border: none;
    border-bottom: 1.5px solid #e2e8f0;
    border-radius: 0;
    overflow: hidden;
    flex-shrink: 0;
    order: -1; /* flex kolonunda en üste al */
}
.sp-plan-baslik {
    background: #f8fafc;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}
.sp-plan-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.sp-meta-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e2e8f0;
    color: #475569;
}
.sp-meta-pill.bag  { background: #dbeafe; color: #1d4ed8; }
.sp-meta-pill.gel  { background: #f1f5f9; color: #475569; }
.sp-meta-pill.ort  { background: #fef9c3; color: #854d0e; }

.sp-kart-grid {
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 8px;
    max-height: 340px;
    overflow-y: auto;
}
.sp-soru-kart {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color .15s, box-shadow .15s;
}
.sp-soru-kart:hover { border-color: #93c5fd; box-shadow: 0 2px 8px rgba(59,130,246,.07); }
.sp-soru-kart.tip-baglamli { border-left: 3px solid #3b82f6; }
.sp-soru-kart.tip-geleneksel { border-left: 3px solid #94a3b8; }
.sp-kart-top {
    display: flex;
    align-items: center;
    gap: 6px;
}
.sp-kart-no {
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; flex-shrink: 0;
    background: #dbeafe; color: #1d4ed8;
}
.sp-kart-no.gel { background: #f1f5f9; color: #475569; }
.sp-tip-baglamli   { background:#dbeafe;color:#1d4ed8;padding:2px 7px;border-radius:10px;font-size:11px;font-weight:600; }
.sp-tip-geleneksel { background:#f1f5f9;color:#475569;padding:2px 7px;border-radius:10px;font-size:11px;font-weight:600; }
.sp-grup-badge {
    font-size: 10px; padding: 1px 6px; border-radius: 8px;
    background: #fef3c7; color: #92400e; margin-left: auto;
}
.sp-zdot { display: flex; gap: 2px; }
.sp-zd {
    width: 7px; height: 7px; border-radius: 2px;
}
.sp-zd-k { background: #3B6D11; }
.sp-zd-o { background: #BA7517; }
.sp-zd-z { background: #A32D2D; }
.sp-zd-e { background: #e2e8f0; }
.sp-kart-kazanim {
    font-size: 12px;
    color: #374151;
    line-height: 1.45;
    flex: 1;
}
.sp-kart-foot {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.sp-kart-pill {
    font-size: 10px; padding: 1px 7px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    color: #64748b;
}
.sp-zorluk-kolay { color:#3B6D11; font-weight:700; }
.sp-zorluk-orta  { color:#BA7517; font-weight:700; }
.sp-zorluk-zor   { color:#A32D2D; font-weight:700; }

/* ── Bağlamlı grup kartı ────────────────────────────────────────────────────── */
.sp-grup-kart {
    background: #fff;
    border: 1px solid #bfdbfe;
    border-left: 3px solid #3b82f6;
    border-radius: 9px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: border-color .15s, box-shadow .15s;
}
.sp-grup-kart:hover { border-color: #60a5fa; box-shadow: 0 2px 8px rgba(59,130,246,.10); }
.sp-grup-kart-baslik {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 7px;
    margin-bottom: 4px;
    border-bottom: 1px dashed #dbeafe;
}
.sp-grup-kart-baslik .sp-grup-badge { margin-left: 0; }
.sp-grup-kart-baslik .sp-grup-soru-say {
    font-size: 10px; color: #6b7280; margin-left: auto;
}
.sp-grup-alt-soru {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 5px 0;
    border-bottom: 1px solid #f1f5f9;
}
.sp-grup-alt-soru:last-child { border-bottom: none; padding-bottom: 0; }
.sp-grup-alt-no {
    width: 20px; height: 20px; flex-shrink: 0;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700;
    background: #dbeafe; color: #1d4ed8;
}
.sp-grup-alt-bilgi {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.sp-grup-alt-kazanim {
    font-size: 11px;
    color: #374151;
    line-height: 1.4;
}
.sp-grup-alt-foot {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    align-items: center;
}
.sp-grup-alt-zdot { display: flex; gap: 2px; }

/* ── Referans sınav modalı (sp- prefix — site modal stilleriyle çakışmasın) ── */
.sp-modal-overlay {
    display: none; position:fixed; inset:0;
    background:rgba(0,0,0,.45); z-index:9999;
    align-items:center; justify-content:center;
}
.sp-modal-overlay.show { display:flex; }
.sp-modal {
    background:#fff; border-radius:14px; padding:24px 22px 20px;
    width:90%; max-width:440px;
    box-shadow:0 8px 40px rgba(0,0,0,.18); max-height:85vh; overflow-y:auto;
}
.sp-modal-sm { max-width:340px; }
.sp-modal h3 { margin:0 0 6px; font-size:16px; color:#1e293b; }
.sp-modal-aciklama { font-size:13px; color:#64748b; margin:0 0 14px; line-height:1.5; }
.sp-drop-zone {
    border:2px dashed #cbd5e1; border-radius:10px; padding:24px 16px;
    text-align:center; cursor:pointer;
    transition:border-color .15s,background .15s; color:#64748b; font-size:13.5px;
}
.sp-drop-zone:hover,.sp-drop-zone.drag-over { border-color:#2563eb; background:#eff6ff; }
.sp-drop-icon { font-size:28px; margin-bottom:6px; }
.sp-hidden-input { display:none; }
.sp-onizleme-wrap { text-align:center; margin-top:10px; }
.sp-btn-kaldir {
    background:none; border:1px solid #fca5a5; color:#ef4444;
    border-radius:6px; padding:4px 10px; font-size:12px; cursor:pointer; margin-top:8px;
}
.sp-modal-actions { display:flex; gap:8px; margin-top:16px; justify-content:flex-end; }
.sp-btn { border:none; border-radius:8px; padding:9px 18px; font-size:14px; font-weight:600; cursor:pointer; }
.sp-btn-iptal { background:#f1f5f9; color:#475569; }
.sp-btn-iptal:hover { background:#e2e8f0; }
.sp-btn-ok { background:#2563eb; color:#fff; }
.sp-btn-ok:hover:not(:disabled) { background:#1d4ed8; }
.sp-btn-ok:disabled { background:#93c5fd; cursor:not-allowed; }
.sp-token-baslik { font-size:16px; font-weight:700; color:#1e293b; text-align:center; margin:0 0 6px; }
.sp-token-mesaj  { font-size:13.5px; color:#475569; text-align:center; margin:0 0 10px; }
.sp-token-uyari  { background:#fef3c7; border:1px solid #fde68a; border-radius:8px; padding:8px 12px; font-size:13px; color:#92400e; text-align:center; }
