/* =====================================================================
   SOHBET EKRANI
   Sol menü 240 px (daraltılabilir) + ana alan. Boş ekranda ortada karşılama ve
   mesaj kutusu; sohbet başlayınca mesajlar 760 px sütunda akar, kutu altta sabit.
   Mesaj kutusu: yazı alanı en az 48 px, iç boşluk 12/16, satır 24 px.
   ===================================================================== */
#view-chat { padding: 0; gap: 0; background: #0f1011; }

/* ---------------- sol menü ---------------- */
.cs {
  width: 240px; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px;
  padding: 10px 8px 8px; background: #131517; border-right: 1px solid rgba(255, 255, 255, .06);
  transition: margin-left .3s ease-in-out, opacity .2s;
}
#view-chat.cs-collapsed .cs { margin-left: -240px; opacity: 0; pointer-events: none; }

.cs-top { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.cs-new {
  flex: 1; min-width: 0; height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 10px;
  border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .06);
  color: #fff; font-size: 14px; font-weight: 600; transition: background .15s;
}
.cs-new:hover { background: rgba(255, 255, 255, .09); }
.cs-new svg { width: 18px; height: 18px; color: var(--accent); }
.cs-new span { flex: 1; text-align: left; }
.cs-new kbd {
  font: 600 11px "Inter", sans-serif; color: #898a8b; padding: 2px 6px; border-radius: 6px;
  background: rgba(255, 255, 255, .06);
}
.cs-icon {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center;
  color: #898a8b; transition: background .15s, color .15s;
}
.cs-icon:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.cs-icon svg { width: 18px; height: 18px; }

.cs-nav { display: flex; flex-direction: column; gap: 2px; }
.cs-item {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border-radius: 8px;
  color: #cfd0d2; font-size: 14px; font-weight: 500; text-align: left; transition: background .15s, color .15s;
}
.cs-item:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.cs-item svg { width: 17px; height: 17px; color: #898a8b; }
.cs-dim { color: #898a8b; }
.cs-search {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; margin: 2px 0 4px; border-radius: 8px;
  background: #1c1e20; border: 1px solid rgba(255, 255, 255, .08);
}
.cs-search[hidden] { display: none; }
.cs-search svg { width: 15px; height: 15px; color: #898a8b; }
.cs-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: #fff; font: 400 13.5px "Inter", sans-serif; }
.cs-search:focus-within { border-color: rgba(30, 155, 255, .45); }

.cs-scroll { flex: 1; min-height: 0; overflow-y: auto; margin-top: 10px; scrollbar-width: thin; scrollbar-color: #2a2b2e transparent; }
.cs-section { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }
.cs-label { padding: 0 10px 6px; font-size: 12px; font-weight: 600; color: #6d6e72; }
.cs-history { display: flex; flex-direction: column; gap: 1px; }
.cs-hist { position: relative; display: flex; align-items: center; border-radius: 8px; transition: background .15s; }
.cs-hist:hover { background: rgba(255, 255, 255, .05); }
.cs-hist.on { background: rgba(255, 255, 255, .08); }
.cs-hist-open {
  flex: 1; min-width: 0; height: 34px; padding: 0 10px; text-align: left; color: #cfd0d2; font-size: 13.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cs-hist.on .cs-hist-open { color: #fff; }
.cs-hist-del {
  width: 28px; height: 28px; margin-right: 3px; border-radius: 7px; display: grid; place-items: center;
  color: #898a8b; opacity: 0; transition: opacity .15s, background .15s, color .15s;
}
.cs-hist:hover .cs-hist-del, .cs-hist-del:focus-visible { opacity: 1; }
.cs-hist-del:hover { background: rgba(255, 70, 90, .14); color: #ff8a95; }
.cs-hist-del svg { width: 15px; height: 15px; }
.cs-empty { padding: 4px 10px; font-size: 13px; color: #5c5d61; }
.cs-empty[hidden] { display: none; }

.cs-upgrade {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(30, 155, 255, .14), rgba(30, 155, 255, .04));
  border: 1px solid rgba(30, 155, 255, .18);
}
.cs-upgrade div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cs-upgrade b { font-size: 13.5px; color: #fff; }
.cs-upgrade span { font-size: 11.5px; line-height: 15px; color: #9fb4c9; }
.cs-upgrade button {
  flex-shrink: 0; height: 30px; padding: 0 12px; border-radius: 9px; font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(180deg, #3cb8ff 0%, #1e8fff 55%, #1a6dff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}

/* ---------------- ana alan ---------------- */
.cm { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.cm-top { display: flex; align-items: center; justify-content: center; height: 56px; padding: 0 12px; flex-shrink: 0; position: relative; }
.cm-expand { position: absolute; left: 12px; display: none; }
#view-chat.cs-collapsed .cm-expand { display: grid; }
.cm-temp { position: absolute; right: 12px; }
.cm .mode-switch { background: #17191b; border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px; padding: 3px; }
.cm .mode-switch button { min-width: 96px; height: 32px; border-radius: 9px; font-size: 14px; font-weight: 600; }

.cm-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 16px 24px; }
.cm-stage.active { justify-content: flex-end; }

.cm-home { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 28px; text-align: center; }
.cm-logo { width: 44px; height: 44px; }
.cm-hello { font-family: "Inter Tight", "Inter", sans-serif; font-weight: 800; font-size: 32px; letter-spacing: -0.6px; color: #fff; }
.cm-hello span { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cm-stage.active .cm-home { display: none; }

/* ---------------- mesajlar ---------------- */
.cm-log {
  display: none; flex: 1; min-height: 0; width: 100%; overflow-y: auto;
  padding: 8px max(16px, calc((100% - 760px) / 2)) 24px; flex-direction: column; gap: 22px;
  scrollbar-width: thin; scrollbar-color: #2a2b2e transparent;
}
.cm-stage.active .cm-log { display: flex; }
.cm-log .msg { max-width: 100%; font-size: 15px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; animation: msg-in .3s ease; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cm-log .msg.user {
  align-self: flex-end; max-width: 80%; padding: 10px 16px; border-radius: 18px 18px 6px 18px;
  background: #232427; border: 1px solid rgba(255, 255, 255, .06); color: #f2f2f2;
}
.cm-log .msg.bot { align-self: stretch; display: flex; gap: 12px; color: #dcdcdc; }
.cm-log .bot-ava {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center;
  background: #1c1e20; border: 1px solid rgba(255, 255, 255, .08);
}
.cm-log .bot-ava img { width: 18px; height: 18px; }
.cm-log .bot-body { flex: 1; min-width: 0; padding-top: 3px; }
.bot-actions { display: flex; gap: 2px; margin-top: 8px; opacity: 0; transition: opacity .15s; }
.msg.bot:hover .bot-actions, .msg.bot:last-child .bot-actions { opacity: 1; }
.msg.bot.typing .bot-actions { opacity: 0; pointer-events: none; }
.bot-actions button { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #898a8b; }
.bot-actions button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.bot-actions svg { width: 16px; height: 16px; }
.dots { display: inline-flex; gap: 4px; padding-top: 8px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: #898a8b; animation: dot 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------------- mesaj kutusu ---------------- */
.cm-dock { width: min(760px, 100%); display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.cb {
  width: 100%; display: flex; flex-direction: column; border-radius: 22px;
  background: #1c1e20; border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35); transition: border-color .15s, box-shadow .15s;
}
.cb:focus-within { border-color: rgba(30, 155, 255, .35); box-shadow: 0 0 0 4px rgba(30, 155, 255, .06), 0 12px 40px rgba(0, 0, 0, .35); }
.cb-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px 0; }
.cb-tags[hidden] { display: none; }
.cb-tag {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 10px; border-radius: 8px;
  background: rgba(30, 155, 255, .12); color: var(--accent); font-size: 13px; font-weight: 600;
}
.cb-tag svg { width: 13px; height: 13px; }
.cb-tag:hover { background: rgba(30, 155, 255, .2); }
.cb textarea {
  width: 100%; min-height: 48px; max-height: 240px; padding: 12px 16px 0; resize: none; border: 0; outline: none;
  background: transparent; color: #f2f2f2; font: 400 15px/24px "Inter", sans-serif;
}
.cb textarea::placeholder { color: #6d6e72; }
.cb-actions { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 10px; }
.cb-left, .cb-right { display: flex; align-items: center; gap: 6px; }
.cb-icon {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #cfd0d2;
  border: 1px solid rgba(255, 255, 255, .08); transition: background .15s;
}
.cb-icon:hover { background: rgba(255, 255, 255, .06); }
.cb-icon svg { width: 18px; height: 18px; }

.cb-model-wrap { position: relative; }
.cb-model {
  display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 12px; border-radius: 10px;
  color: #e6e6e6; font-size: 13.5px; font-weight: 600; transition: background .15s;
}
.cb-model:hover { background: rgba(255, 255, 255, .06); }
.cb-model i { width: 3px; height: 3px; border-radius: 50%; background: #6d6e72; }
.cb-model em { font-style: normal; color: #898a8b; font-weight: 500; }
.cb-model svg { width: 14px; height: 14px; color: #898a8b; }
.cb-menu {
  position: absolute; right: 0; bottom: 44px; z-index: 20; width: 250px; padding: 6px; border-radius: 14px;
  background: rgba(28, 30, 32, .98); border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
}
.cb-menu[hidden] { display: none; }
.cb-menu p { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 600; color: #6d6e72; }
.cb-menu [data-set-model] { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; border-radius: 9px; text-align: left; }
.cb-menu [data-set-model]:hover { background: rgba(255, 255, 255, .05); }
.cb-menu [data-set-model] b { font-size: 13.5px; color: #fff; }
.cb-menu [data-set-model] span { font-size: 12px; color: #898a8b; }
.cb-menu [data-set-model].on b { color: var(--accent); }
.cb-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 2px 4px 4px; padding: 3px; border-radius: 10px; background: #131517; }
.cb-seg button { height: 30px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: #898a8b; }
.cb-seg button.on { background: rgba(255, 255, 255, .1); color: #fff; }

.cb-send {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle, #6fd0ff 30%, #1e8fff 100%); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .35);
  transition: opacity .15s, transform .12s, background .2s;
}
.cb-send:active { transform: scale(.94); }
.cb-send:disabled { background: #2a2b2e; color: #6d6e72; box-shadow: none; cursor: default; }
.cb-send svg { width: 18px; height: 18px; stroke-width: 2.2; }
.cb-send .i-stop { display: none; fill: currentColor; stroke: none; width: 14px; height: 14px; }
.cb-send.stop .i-send { display: none; }
.cb-send.stop .i-stop { display: block; }
.cb-send.stop { background: #e8e8e8; color: #111; box-shadow: none; }

/* çipler ve ilham önerileri (yalnızca boş ekranda) */
.cm-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.cm-chips button {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .09); color: #cfd0d2; font-size: 13.5px; font-weight: 500;
  transition: background .15s, border-color .15s, color .15s;
}
.cm-chips button:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.cm-chips button.on { border-color: rgba(30, 155, 255, .45); background: rgba(30, 155, 255, .1); color: var(--accent); }
.cm-chips svg { width: 16px; height: 16px; }
.cm-ideas { width: 100%; display: flex; flex-direction: column; gap: 2px; margin-top: 28px; }
.cm-ideas-title { display: flex; align-items: center; gap: 6px; padding: 0 12px 6px; font-size: 12.5px; font-weight: 600; color: #6d6e72; }
.cm-ideas-title svg { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.cm-ideas button {
  text-align: left; padding: 11px 12px; border-radius: 12px; color: #b9babd; font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .04); transition: background .15s, color .15s;
}
.cm-ideas button:hover { background: rgba(255, 255, 255, .04); color: #fff; }
.cm-stage.active .cm-chips, .cm-stage.active .cm-ideas { display: none; }

/* ---------------- dar ekran ---------------- */
@media (max-width: 1100px) {
  #view-chat { flex-direction: row; min-height: calc(100vh - 40px); }
}
@media (max-width: 720px) {
  .cs { position: absolute; z-index: 40; top: 0; bottom: 0; left: 0; box-shadow: 20px 0 50px rgba(0, 0, 0, .5); }
  #view-chat:not(.cs-collapsed) .cm { pointer-events: none; opacity: .35; }
  .cm-hello { font-size: 24px; }
  .cm .mode-switch button { min-width: 80px; }
  .cm-ideas { display: none; }
  .cb-model em, .cb-model i { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cs, .cm-log .msg { transition: none; animation: none; }
}

/* ---- maskot yerleşimi ---- */
.cm-mascot { display: block; width: 60px; height: 60px; }
.cm-log .msg.bot .bot-ava { width: 32px; height: 32px; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.cm-log .msg.bot .bot-ava img { width: 18px; height: 18px; }
.cm-log .msg.bot .bot-ava .bloub svg { width: 100%; height: 100%; }

/* ---- mesaj aralıkları: şablondaki satır sonları boşluk üretmesin ----
   Satır koruma (pre-wrap) yalnızca mesaj METNİNE uygulanır; yapay zekânın paragrafları korunur,
   HTML şablonundaki girinti/satır sonları ise yok sayılır. Butonlar metnin hemen altında durur. */
.cm-log .msg.bot { white-space: normal; }
.cm-log .msg.bot .bot-text { white-space: pre-wrap; }
.cm-log .msg.bot .bot-text:empty { display: none; }
.cm-log .bot-actions { margin-top: 4px; margin-left: -6px; }
.cm-log .bot-actions button { width: 28px; height: 28px; }

/* ---- "Düşünüyor / Thinking" etiketi ----
   Maskot düşünürken (üç nokta) yanında belirir; maskot yazmaya geçince kaybolur.
   Ampul ikonu + üzerinden parlama geçen yazı. Görünürlük maskotun durumuna bağlı (JS akışına dokunmaz). */
.cm-log .bot-think {
  display: none; align-items: center; gap: 7px; height: 32px; margin-top: -3px;
  font-size: 14px; font-weight: 500; letter-spacing: .1px; white-space: nowrap;
}
.cm-log .msg.bot:has(.bloub[data-state="thinking"]) .bot-think,
.cm-log .msg.bot.typing:not(:has(.bloub)) .bot-think { display: inline-flex; animation: bt-in .35s ease both; }
@keyframes bt-in { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
.bt-icon { width: 16px; height: 16px; color: #1e6bff; stroke-width: 1.8; flex-shrink: 0; animation: bt-glow 1.6s ease-in-out infinite; }
@keyframes bt-glow { 50% { filter: drop-shadow(0 0 5px rgba(30, 107, 255, .7)); color: #6fb4ff; } }
.bt-text {
  color: transparent;
  background: linear-gradient(90deg, #6d6e72 0%, #6d6e72 35%, #f2f2f2 50%, #6d6e72 65%, #6d6e72 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text;
  animation: bt-shimmer 1.8s linear infinite;
}
@keyframes bt-shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) {
  .bt-text { animation: none; color: #898a8b; background: none; }
  .bt-icon, .cm-log .bot-think { animation: none; }
}

/* ---- sohbet model butonu (model-picker.js açar) ---- */
.cb-model-ico { display: grid; place-items: center; width: 18px; height: 18px; color: var(--accent); }
.cb-model-ico svg { width: 16px; height: 16px; }
.cb-model-ico img { width: 16px; height: 16px; }

/* ---- güvenli, zengin yanıt sunumu: yalnızca asistan mesajının içi ---- */
.cm-log .msg.bot .bot-text {
  white-space: normal; line-height: 1.7; color: #dedee3; overflow-wrap: anywhere;
}
.cm-log .bot-text > :first-child { margin-top: 0; }
.cm-log .bot-text > :last-child { margin-bottom: 0; }
.cm-log .bot-text p { margin: 0 0 14px; }
.cm-log .bot-text h1, .cm-log .bot-text h2, .cm-log .bot-text h3,
.cm-log .bot-text h4, .cm-log .bot-text h5, .cm-log .bot-text h6 {
  font-family: "Inter Tight", "Inter", sans-serif; color: #f6f3ff;
  font-weight: 750; line-height: 1.35; letter-spacing: -.025em; margin: 24px 0 10px;
}
.cm-log .bot-text h1 { font-size: 1.45rem; }
.cm-log .bot-text h2 { font-size: 1.45rem; }
.cm-log .bot-text h3 { font-size: 1.25rem; }
.cm-log .bot-text h4 { font-size: 1.08rem; }
.cm-log .bot-text h5, .cm-log .bot-text h6 { font-size: 1rem; }
.cm-log .bot-text strong { color: #f4f0ff; font-weight: 700; }
.cm-log .bot-text em { color: #dbd4e9; }
.cm-log .bot-text .yr-accent { color: #c3acff; font-weight: 650; }
.cm-log .bot-text a { color: #b9a0fc; text-decoration: underline; text-underline-offset: 3px; }
.cm-log .bot-text a:hover { color: #d8c9ff; }
.cm-log .bot-text ul, .cm-log .bot-text ol { padding-left: 24px; margin: 10px 0 16px; }
.cm-log .bot-text li { padding-left: 3px; margin: 5px 0; }
.cm-log .bot-text li::marker { color: #aa92e5; }
.cm-log .bot-text li > p { margin-bottom: 6px; }
.cm-log .bot-text blockquote {
  margin: 16px 0; padding: 10px 15px; border-left: 3px solid #8b6cc4; border-radius: 0 8px 8px 0;
  background: rgba(30, 107, 255, .065); color: #b9c4d4;
}
.cm-log .bot-text blockquote > :last-child { margin-bottom: 0; }
.cm-log .bot-text hr { border: 0; border-top: 1px solid rgba(220, 205, 255, .12); margin: 24px 0; }
.cm-log .bot-text code {
  padding: 2px 5px; border-radius: 5px; color: #d9c9ff; background: rgba(174, 135, 245, .09);
  font: 12.5px/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.cm-log .bot-text pre {
  max-width: 100%; overflow-x: auto; margin: 15px 0 18px; padding: 15px 17px; border-radius: 12px;
  border: 1px solid rgba(223, 210, 255, .1); background: #141518; scrollbar-width: thin;
}
.cm-log .bot-text pre code { padding: 0; border: 0; border-radius: 0; background: none; color: #d5d3e1; white-space: pre; overflow-wrap: normal; }
.cm-log .bot-text .yr-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; margin: 16px 0 20px; border: 1px solid rgba(223, 210, 255, .11); border-radius: 12px; scrollbar-width: thin; }
.cm-log .bot-text table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.55; }
.cm-log .bot-text th, .cm-log .bot-text td { padding: 11px 13px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(223, 210, 255, .08); }
.cm-log .bot-text th { color: #e3edff; font-weight: 650; background: rgba(30, 107, 255, .07); }
.cm-log .bot-text td { min-width: 100px; color: #cdcad5; }
.cm-log .bot-text tbody tr:last-child td { border-bottom: 0; }
.cm-log .bot-text tbody tr:nth-child(even) { background: rgba(255, 255, 255, .018); }

/* Widgets use fixed shapes and palettes; response data cannot supply styles. */
.cm-log .bot-text .yr-widget { margin: 18px 0 22px; }
.cm-log .bot-text .yr-widget > .yr-widget-title { margin-top: 0; }
.cm-log .bot-text .yr-callout, .cm-log .bot-text .yr-card,
.cm-log .bot-text .yr-bars, .cm-log .bot-text .yr-metric, .cm-log .bot-text .yr-timeline {
  --yr-tone: #ad90ed; --yr-tint: rgba(155, 112, 224, .065);
  min-width: 0; border: 1px solid rgba(218, 200, 255, .12); background: #1b1b21;
  border-radius: 14px; padding: 16px 18px;
}
.cm-log .bot-text .tone-info { --yr-tone: #b39aed; --yr-tint: rgba(155, 112, 224, .07); }
.cm-log .bot-text .tone-success { --yr-tone: #7bceba; --yr-tint: rgba(86, 179, 154, .07); }
.cm-log .bot-text .tone-warning { --yr-tone: #dfbb77; --yr-tint: rgba(212, 166, 78, .07); }
.cm-log .bot-text .yr-callout {
  margin: 18px 0; border-left: 3px solid var(--yr-tone); background: var(--yr-tint);
}
.cm-log .bot-text .yr-widget-title { margin: 0 0 10px; color: #eee8fa; font-size: 15px; font-weight: 700; line-height: 1.4; letter-spacing: -.015em; }
.cm-log .bot-text .yr-callout .yr-widget-title { color: var(--yr-tone); }
.cm-log .bot-text .yr-callout p, .cm-log .bot-text .yr-card p { font-size: 14px; line-height: 1.65; color: #cbc6d4; }
.cm-log .bot-text .yr-callout > :last-child, .cm-log .bot-text .yr-card > :last-child { margin-bottom: 0; }
.cm-log .bot-text .yr-comparison { margin: 18px 0 22px; }
.cm-log .bot-text .yr-comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cm-log .bot-text .yr-card { position: relative; padding: 17px; border-top: 2px solid var(--yr-tone); background: linear-gradient(150deg, var(--yr-tint), #1b1b21 65%); }
.cm-log .bot-text .yr-card .yr-widget-title { margin: 7px 0 8px; font-size: 15px; }
.cm-log .bot-text .yr-card h4 { margin: 7px 0 8px; font-size: 15px; color: #eee8fa; }
.cm-log .bot-text .yr-badge {
  display: inline-flex; align-items: center; width: fit-content; max-width: 100%;
  padding: 3px 8px; border-radius: 6px; background: var(--yr-tint); border: 1px solid rgba(212, 189, 253, .1);
  color: var(--yr-tone); font-size: 10.5px; font-weight: 650; line-height: 1.5; letter-spacing: .025em;
}
.cm-log .bot-text .yr-bars { margin: 18px 0 22px; }
.cm-log .bot-text .yr-bar-row { margin-top: 15px; }
.cm-log .bot-text .yr-bar-label { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 6px; font-size: 13px; color: #cfc9dc; }
.cm-log .bot-text .yr-bar-value { flex-shrink: 0; font-size: 13px; color: #eee7fb; font-variant-numeric: tabular-nums; font-weight: 600; }
.cm-log .bot-text .yr-bar-track { height: 7px; overflow: hidden; border-radius: 5px; background: rgba(214, 195, 252, .075); }
.cm-log .bot-text .yr-bar-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8762c8, #b090e1); }
.cm-log .bot-text .yr-metrics { margin: 18px 0 22px; }
.cm-log .bot-text .yr-metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 11px; }
.cm-log .bot-text .yr-metric { padding: 15px; }
.cm-log .bot-text .yr-metric-value { display: block; margin: 3px 0 6px; color: #e5d8ff; font: 750 1.6rem/1.2 "Inter Tight", "Inter", sans-serif; letter-spacing: -.035em; }
.cm-log .bot-text .yr-muted { color: #9b94aa; font-size: 12px; line-height: 1.6; }
.cm-log .bot-text .yr-timeline { margin: 18px 0 22px; }
.cm-log .bot-text ol.yr-timeline-list { list-style: none; padding: 0; margin: 0; }
.cm-log .bot-text .yr-step { position: relative; display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 11px; padding: 12px 0; }
.cm-log .bot-text .yr-step:not(:last-child)::after { content: ""; position: absolute; top: 39px; bottom: -9px; left: 13px; width: 1px; background: rgba(184, 154, 231, .17); }
.cm-log .bot-text .yr-step-number {
  position: relative; z-index: 1; display: grid; place-items: center; width: 27px; height: 27px;
  border-radius: 8px; border: 1px solid rgba(175, 139, 231, .2); background: #282032;
  color: #cbb1f2; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.cm-log .bot-text .yr-step .yr-widget-title { margin: 2px 0 5px; font-size: 14px; }
.cm-log .bot-text .yr-step h4 { margin: 2px 0 5px; font-size: 14px; }
.cm-log .bot-text .yr-step p { margin: 0; font-size: 13.5px; line-height: 1.6; color: #b7b0c4; }

/* Choice cards use native radio groups and leave sending to the chat composer. */
.cm-log .bot-text .yr-questions { display: grid; gap: 14px; }
.cm-log .bot-text .yr-questions > .yr-widget-title { margin-bottom: 0; }
.cm-log .bot-text .yr-question-card {
  min-inline-size: 0; width: 100%; max-width: 100%; margin: 0; padding: 16px;
  border: 1px solid rgba(218, 200, 255, .13); border-radius: 14px; background: #1b1b21;
}
.cm-log .bot-text .yr-question-title {
  float: left; display: flex; align-items: baseline; gap: 9px; width: 100%; padding: 0; margin: 0 0 12px;
  font-size: 15px; font-weight: 650; line-height: 1.6; color: #eee8fa;
}
.cm-log .bot-text .yr-question-number { flex-shrink: 0; color: #bba0ea; font-variant-numeric: tabular-nums; }
.cm-log .bot-text .yr-question-text { min-width: 0; }
.cm-log .bot-text .yr-question-options { clear: both; display: grid; gap: 8px; }
.cm-log .bot-text .yr-question-option {
  display: grid; grid-template-columns: 17px 20px minmax(0, 1fr); align-items: start; gap: 8px;
  min-width: 0; min-height: 44px; padding: 10px 11px; border: 1px solid rgba(218, 200, 255, .09);
  border-radius: 9px; background: rgba(255, 255, 255, .018); color: #cec9d8;
  cursor: pointer; font-size: 14px; line-height: 1.65; transition: background .12s, border-color .12s;
}
.cm-log .bot-text .yr-question-option:hover { border-color: rgba(190, 157, 241, .3); background: rgba(168, 130, 227, .045); }
.cm-log .bot-text .yr-question-option:has(input:checked) {
  border-color: rgba(186, 149, 239, .5); background: rgba(155, 112, 224, .1); color: #eee5fb;
}
.cm-log .bot-text .yr-question-option:has(input:focus-visible) { outline: 2px solid #b79adf; outline-offset: 2px; }
.cm-log .bot-text .yr-question-radio {
  appearance: auto; width: 16px; height: 16px; padding: 0; margin: 4px 0 0; accent-color: #b79adf; cursor: pointer;
}
.cm-log .bot-text .yr-question-letter { color: #a79aae; font-size: 12px; font-weight: 650; line-height: 23px; }
.cm-log .bot-text .yr-question-answer { min-width: 0; overflow-wrap: anywhere; }
.cm-log .bot-text .yr-question-option:has(input:disabled) { opacity: .62; cursor: default; }
.cm-log .bot-text .yr-question-radio:disabled { cursor: default; }
.cm-log .bot-text .yr-question-title .yr-math-display,
.cm-log .bot-text .yr-question-answer .yr-math-display { margin: 6px 0; padding: 8px 10px; }
@media (max-width: 580px) {
  .cm-log .bot-text .yr-comparison-grid { grid-template-columns: minmax(0, 1fr); }
  .cm-log .bot-text .yr-callout, .cm-log .bot-text .yr-card,
  .cm-log .bot-text .yr-bars, .cm-log .bot-text .yr-timeline { padding: 14px; }
  .cm-log .bot-text th, .cm-log .bot-text td { padding: 9px 11px; }
  .cm-log .bot-text .yr-question-card { padding: 13px; }
  .cm-log .bot-text .yr-question-option { grid-template-columns: 17px 17px minmax(0, 1fr); gap: 6px; padding: 10px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .cm-log .bot-text .yr-question-option { transition: none; }
}

/* Quiet, accessible mathematics; long equations scroll within the reply. */
.cm-log .bot-text .yr-math { color: #e5e1ec; }
.cm-log .bot-text .yr-math .katex { font-size: 1.08em; }
.cm-log .bot-text .yr-math-display {
  display: block; max-width: 100%; overflow-x: auto; overflow-y: hidden;
  margin: 14px 0 18px; padding: 12px 16px; border-radius: 10px;
  background: rgba(174, 154, 218, .035); border: 1px solid rgba(218, 205, 242, .09);
  scrollbar-width: thin; overscroll-behavior-x: contain; overflow-wrap: normal;
}
.cm-log .bot-text .yr-math-display .katex-display { margin: 0; text-align: left; }
.cm-log .bot-text .yr-math-display .katex-display > .katex { text-align: left; }
.cm-log .bot-text .yr-math-display:focus-visible { outline: 2px solid #a58acb; outline-offset: 2px; }
.cm-log .bot-text .yr-math-fallback { font-family: ui-monospace, Consolas, monospace; font-size: .92em; white-space: pre-wrap; }
@media (max-width: 580px) {
  .cm-log .bot-text .yr-math-display { padding: 12px 10px; }
}

/* =====================================================================
   YANIT BİLEŞENLERİ — yeni tasarım (v2)
   Tek bir kart sistemi: koyu zemin, ince çerçeve, 14px köşe, tutarlı başlık ve boşluk.
   Etkileşimli yerler (sorular) sitenin mavi vurgusunu kullanır; tonlar (info/success/warning) sadece işaret rengidir.
   ===================================================================== */
.cm-log .bot-text .yr-widget {
  --w-bg: #16171a; --w-line: rgba(255, 255, 255, .075); --w-muted: #8e8f96; --w-text: #d4d4da;
  --w-accent: #1e9bff; --w-accent-soft: rgba(30, 155, 255, .12);
  margin: 18px 0 22px; padding: 16px 18px; border-radius: 14px;
  background: var(--w-bg); border: 1px solid var(--w-line); box-shadow: none;
}
.cm-log .bot-text .yr-widget > .yr-widget-title {
  margin: 0 0 12px; color: #f3f3f6; font: 650 14.5px/1.4 "Inter", sans-serif; letter-spacing: -.01em;
}
.cm-log .bot-text .tone-info    { --yr-tone: #5cb6ff; --yr-tint: rgba(30, 155, 255, .08); }
.cm-log .bot-text .tone-success { --yr-tone: #4fd1a5; --yr-tint: rgba(46, 196, 145, .08); }
.cm-log .bot-text .tone-warning { --yr-tone: #f2bf5e; --yr-tint: rgba(232, 170, 60, .09); }

/* ---- callout: ikonlu bilgi kutusu ---- */
.cm-log .bot-text .yr-callout {
  position: relative; padding: 14px 16px 14px 50px; border-left: 1px solid var(--w-line);
  background: linear-gradient(0deg, var(--yr-tint), var(--yr-tint)), var(--w-bg);
  border-color: color-mix(in srgb, var(--yr-tone) 28%, transparent);
}
.cm-log .bot-text .yr-callout::before {
  position: absolute; left: 15px; top: 14px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font: 800 12px/1 "Inter", sans-serif;
  color: var(--yr-tone); background: color-mix(in srgb, var(--yr-tone) 16%, transparent); content: "i";
}
.cm-log .bot-text .yr-callout.tone-success::before { content: "✓"; }
.cm-log .bot-text .yr-callout.tone-warning::before { content: "!"; }
.cm-log .bot-text .yr-callout > .yr-widget-title { margin-bottom: 4px; color: #f3f3f6; }
.cm-log .bot-text .yr-callout p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--w-text); }

/* ---- karşılaştırma: kart ızgarası ---- */
.cm-log .bot-text .yr-comparison-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 10px; }
.cm-log .bot-text .yr-card {
  padding: 14px 15px; border-radius: 11px; border: 1px solid var(--w-line); border-top: 1px solid var(--w-line);
  background: rgba(255, 255, 255, .025);
}
.cm-log .bot-text .yr-card h4 { margin: 0 0 6px; font-size: 14px; color: #f3f3f6; letter-spacing: -.01em; }
.cm-log .bot-text .yr-card p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--w-text); }
.cm-log .bot-text .yr-badge {
  display: inline-block; margin-bottom: 8px; padding: 2px 8px; border-radius: 999px; border: 0;
  background: color-mix(in srgb, var(--yr-tone) 15%, transparent); color: var(--yr-tone);
  font-size: 11px; font-weight: 650; letter-spacing: .02em;
}

/* ---- çubuklar ---- */
.cm-log .bot-text .yr-bar-row { margin-top: 12px; }
.cm-log .bot-text .yr-bar-row:first-of-type { margin-top: 2px; }
.cm-log .bot-text .yr-bar-label { margin-bottom: 6px; font-size: 13px; color: var(--w-text); }
.cm-log .bot-text .yr-bar-value { color: #f3f3f6; font-weight: 650; font-variant-numeric: tabular-nums; }
.cm-log .bot-text .yr-bar-track { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.cm-log .bot-text .yr-bar-fill {
  border-radius: 999px; background: linear-gradient(90deg, #1a6dff, #3cb8ff);
  transform-origin: left center; animation: yr-grow .7s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes yr-grow { from { transform: scaleX(0); } }

/* ---- metrikler ---- */
.cm-log .bot-text .yr-metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.cm-log .bot-text .yr-metric {
  display: flex; flex-direction: column; gap: 2px; padding: 13px 14px; border-radius: 11px;
  border: 1px solid var(--w-line); background: rgba(255, 255, 255, .025);
}
.cm-log .bot-text .yr-metric > .yr-muted:first-child { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--w-muted); }
.cm-log .bot-text .yr-metric-value { margin: 2px 0; color: #fff; font: 750 1.55rem/1.2 "Inter Tight", "Inter", sans-serif; letter-spacing: -.03em; }
.cm-log .bot-text .yr-muted { color: var(--w-muted); font-size: 12px; line-height: 1.5; }

/* ---- zaman çizelgesi ---- */
.cm-log .bot-text .yr-step { grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding: 8px 0; }
.cm-log .bot-text .yr-step:not(:last-child)::after { top: 38px; bottom: -6px; left: 12.5px; width: 1px; background: var(--w-line); }
.cm-log .bot-text .yr-step-number {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(30, 155, 255, .45); background: var(--w-accent-soft); color: #8cc9ff;
  font: 700 12px/1 "Inter", sans-serif;
}
.cm-log .bot-text .yr-step h4 { margin: 3px 0 3px; font-size: 14px; color: #f3f3f6; }
.cm-log .bot-text .yr-step p { color: var(--w-text); font-size: 13.5px; }

/* ---- sorular ---- */
.cm-log .bot-text .yr-questions { display: block; padding: 18px; }
.cm-log .bot-text .yr-question-card { margin: 0; padding: 0; border: 0; background: none; min-width: 0; }
.cm-log .bot-text .yr-questions:not(.yr-stepper) .yr-question-card + .yr-question-card {
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--w-line);
}
.cm-log .bot-text .yr-question-title {
  display: flex; gap: 10px; align-items: baseline; float: none; width: 100%; padding: 0; margin: 0 0 14px;
  color: #f3f3f6; font-size: 15.5px; font-weight: 600; line-height: 1.5;
}
.cm-log .bot-text .yr-question-number {
  flex-shrink: 0; display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: 7px; background: var(--w-accent-soft); color: #8cc9ff; font-size: 12.5px; font-weight: 700;
  transform: translateY(-1px);
}
.cm-log .bot-text .yr-question-options { display: grid; gap: 8px; }
.cm-log .bot-text .yr-question-option {
  position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 12px;
  padding: 11px 14px 11px 11px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--w-line); background: rgba(255, 255, 255, .02); color: var(--w-text);
  font-size: 14px; line-height: 1.5; transition: border-color .15s, background .15s, transform .1s;
}
.cm-log .bot-text .yr-question-option:hover { border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .045); }
.cm-log .bot-text .yr-question-option:active { transform: scale(.995); }
.cm-log .bot-text .yr-question-radio {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;
}
.cm-log .bot-text .yr-question-letter {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255, 255, 255, .06); color: var(--w-muted); font-size: 12.5px; font-weight: 700; line-height: 1;
  transition: background .15s, color .15s;
}
.cm-log .bot-text .yr-question-option:has(input:checked) {
  border-color: rgba(30, 155, 255, .6); background: rgba(30, 155, 255, .1); color: #fff;
}
.cm-log .bot-text .yr-question-option:has(input:checked) .yr-question-letter { background: var(--w-accent); color: #fff; }
.cm-log .bot-text .yr-question-option:has(input:focus-visible) { outline: 2px solid var(--w-accent); outline-offset: 2px; }
.cm-log .bot-text .yr-question-option:has(input:disabled) { opacity: .55; cursor: default; }

/* adım adım (çok sorulu) */
.cm-log .bot-text .yr-q-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 10px; font-size: 12.5px; font-weight: 600; }
.cm-log .bot-text .yr-q-counter { color: var(--w-muted); font-variant-numeric: tabular-nums; }
.cm-log .bot-text .yr-q-answered { color: #8cc9ff; font-variant-numeric: tabular-nums; }
.cm-log .bot-text .yr-q-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--w-line); }
.cm-log .bot-text .yr-q-tab {
  position: relative; display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 9px;
  border: 1px solid var(--w-line); background: rgba(255, 255, 255, .03); color: var(--w-muted);
  font-size: 12.5px; font-weight: 650; cursor: pointer; user-select: none; transition: background .15s, color .15s, border-color .15s;
}
.cm-log .bot-text .yr-q-tab:hover { color: #fff; border-color: rgba(255, 255, 255, .16); }
.cm-log .bot-text .yr-q-tab.is-done { color: #8cc9ff; background: var(--w-accent-soft); border-color: rgba(30, 155, 255, .28); }
.cm-log .bot-text .yr-q-tab.is-done::after {
  content: ""; position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%;
  background: #4fd1a5; box-shadow: 0 0 0 2px var(--w-bg);
}
.cm-log .bot-text .yr-q-tab.is-active { color: #fff; background: var(--w-accent); border-color: transparent; }
.cm-log .bot-text .yr-q-tab:focus-visible { outline: 2px solid var(--w-accent); outline-offset: 2px; }
.cm-log .bot-text .yr-stepper .yr-question-card { display: none; }
.cm-log .bot-text .yr-stepper .yr-question-card.is-active { display: block; animation: yr-step-in .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes yr-step-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.cm-log .bot-text .yr-q-complete { display: none; margin: 16px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; color: #9ee6c9; background: rgba(46, 196, 145, .09); }
.cm-log .bot-text .yr-stepper.is-complete .yr-q-complete { display: block; animation: yr-step-in .3s ease both; }

@media (max-width: 720px) {
  .cm-log .bot-text .yr-widget { padding: 14px; }
  .cm-log .bot-text .yr-questions { padding: 14px; }
  .cm-log .bot-text .yr-question-option { grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 10px 12px 10px 10px; }
  .cm-log .bot-text .yr-callout { padding-left: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .cm-log .bot-text .yr-bar-fill, .cm-log .bot-text .yr-stepper .yr-question-card.is-active, .cm-log .bot-text .yr-q-complete { animation: none; }
}
