/* markdown.js çıktısı: QPilot sayfası (.ai-bubble) ve fırsat sohbetindeki QPilot yanıtı (.qpilot-text). Yardım kendi stilini (help.css) kullanır. */
:is(.ai-bubble, .qpilot-text) :is(h1, h2, h3, h4, h5, h6) { margin: 14px 0 6px; color: var(--ink); font-family: Manrope, sans-serif; line-height: 1.3; }
:is(.ai-bubble, .qpilot-text) > :first-child { margin-top: 0; }
:is(.ai-bubble, .qpilot-text) > :last-child { margin-bottom: 0; }
.ai-bubble h1 { font-size: 19px; font-weight: 800; }
.ai-bubble h2 { font-size: 16.5px; font-weight: 800; }
.ai-bubble h3 { font-size: 14.5px; font-weight: 700; }
.ai-bubble :is(h4, h5, h6) { font-size: 13.5px; font-weight: 700; }
.qpilot-text h1 { font-size: 15px; font-weight: 800; }
.qpilot-text h2 { font-size: 14px; font-weight: 800; }
.qpilot-text :is(h3, h4, h5, h6) { font-size: 13px; font-weight: 700; }

:is(.ai-bubble, .qpilot-text) ol { margin: 4px 0 10px; padding-left: 22px; }
:is(.ai-bubble, .qpilot-text) li > :is(ul, ol) { margin: 2px 0; }
:is(.ai-bubble, .qpilot-text) li > p { margin: 0; }
/* Görev listesi: - [x] yapıldı */
:is(.ai-bubble, .qpilot-text) li:has(> input[type="checkbox"]) { list-style: none; margin-left: -18px; }
:is(.ai-bubble, .qpilot-text) li > input[type="checkbox"] { margin: 0 6px 0 0; vertical-align: -2px; }

:is(.ai-bubble, .qpilot-text) blockquote { margin: 8px 0 10px; padding: 8px 12px; border-left: 4px solid #8578f4; border-radius: 8px; color: #3b4058; background: #f6f5ff; }
:is(.ai-bubble, .qpilot-text) blockquote > :last-child { margin-bottom: 0; }
:is(.ai-bubble, .qpilot-text) hr { margin: 14px 0; border: 0; border-top: 1px solid var(--line); }
:is(.ai-bubble, .qpilot-text) pre { margin: 6px 0 10px; padding: 9px 12px; overflow-x: auto; border-radius: 8px; background: #f4f5fa; font: 12px/1.5 ui-monospace, Consolas, monospace; }
:is(.ai-bubble, .qpilot-text) pre code { padding: 0; background: none; font-size: inherit; }
:is(.ai-bubble, .qpilot-text) del { color: var(--muted); }

/* Kod bloğu + "Kopyala" düğmesi (markdown.js ekler). Düğme sağ üstte durur; metin altından geçmesin diye üst boşluk. */
.md-code { position: relative; }
.md-code > pre { padding-top: 30px !important; }
.md-code-copy { position: absolute; top: 5px; right: 6px; z-index: 1; padding: 3px 9px; border: 1px solid #dcdff0; border-radius: 6px; color: #4b4f6b; background: #fff; font: 600 11.5px/1.4 Manrope, sans-serif; cursor: pointer; opacity: .85; }
.md-code-copy:hover { opacity: 1; color: #5b4ee6; border-color: #b9b2f7; }
.md-code-copy.copied { color: #1d8a4e; border-color: #9fd8b5; opacity: 1; }
.ai-msg.user .md-code-copy { color: inherit; background: #ffffff26; border-color: #ffffff55; }

.md-table-wrap { max-width: 100%; margin: 6px 0 12px; overflow-x: auto; border: 1px solid #e3e6f5; border-radius: 10px; }
.md-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.45; }
/* overflow-wrap: sohbet balonunun "anywhere" ayarı hücrede kelimeyi harf harf bölmesin; dar alanda tablo yatay kayar. */
.md-table th, .md-table td { padding: 7px 11px; border-bottom: 1px solid #edeff7; text-align: left; vertical-align: top; overflow-wrap: normal; }
.md-table th + th, .md-table td + td { border-left: 1px solid #edeff7; }
.md-table thead th { color: #3f4360; background: #f1f2fb; font-weight: 700; white-space: nowrap; }
.md-table tbody tr:nth-child(even) { background: #fafbfe; }
.md-table tbody tr:last-child td { border-bottom: 0; }
.md-table tbody tr:hover { background: #f4f3ff; }
.md-table [align="center"] { text-align: center; }
.md-table [align="right"] { text-align: right; }
/* Kullanıcı balonu (mor zemin) içinde tablo okunur kalsın. */
.ai-msg.user .md-table-wrap { border-color: #ffffff55; }
.ai-msg.user .md-table :is(th, td) { border-color: #ffffff33; }
.ai-msg.user .md-table thead th, .ai-msg.user .md-table tbody tr:nth-child(even), .ai-msg.user .md-table tbody tr:hover { color: inherit; background: #ffffff1f; }
.ai-msg.user blockquote { color: inherit; background: #ffffff1f; border-left-color: #ffffff99; }
