/* Diaplas Asistan: başlıktaki düğme + sağ üstte açılan sohbet penceresi (tüm temalar; renkler temanın değişkenlerinden). */
.dp-ai-btn { display: inline-flex; align-items: center; gap: .4rem; height: 40px; padding: 0 .9rem; border-radius: 999px;
  border: 1px solid var(--color-brand, #0b6bcb); background: var(--color-brand, #0b6bcb); color: #fff;
  font-family: inherit; font-size: .9rem; font-weight: 600; line-height: 1; cursor: pointer; white-space: nowrap; }
.dp-ai-btn:hover { filter: brightness(1.08); }
.dp-ai-btn:focus-visible, .dp-ai button:focus-visible, .dp-ai textarea:focus-visible { outline: 3px solid var(--color-brand-glow, rgba(11, 107, 203, .35)); outline-offset: 2px; }
.dp-ai-btn svg { width: 18px; height: 18px; flex: none; }
/* Telefonda da "Asistan" yazısı görünür (yalnız simge kalınca ziyaretçi düğmeyi fark etmiyordu); düğme küçülür. */
@media (max-width: 640px) { .dp-ai-btn { height: 36px; padding: 0 .65rem; gap: .3rem; font-size: .82rem; } .dp-ai-btn svg { width: 16px; height: 16px; } }
/* Dar telefonda yer açmak için başlıktaki arama simgesi gizlenir; arama mobil menüde (☰) zaten var. */
@media (max-width: 480px) { :is(.p-header-actions, .header-actions) > a[href$="/ara"] { display: none; } }
@media (max-width: 359px) { .dp-ai-btn svg, :is(.p-header-actions, .header-actions) .lang-chevron { display: none; } }

.dp-ai { position: fixed; z-index: 1200; top: 84px; right: 16px; width: min(430px, calc(100vw - 32px)); height: min(660px, calc(100vh - 104px));
  display: flex; flex-direction: column; background: var(--color-surface, #fff); color: var(--color-text, #10202e);
  border: 1px solid var(--color-surface-border, #dde5ee); border-radius: 18px; box-shadow: 0 24px 64px rgba(10, 31, 61, .22); overflow: hidden; }
.dp-ai[hidden] { display: none; }
.dp-ai-head { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; background: var(--color-brand, #0b6bcb); color: #fff; }
.dp-ai-head strong { display: block; font-size: 1rem; }
.dp-ai-head small { opacity: .85; font-size: .78rem; }
.dp-ai-head button { margin-left: auto; background: transparent; border: 0; color: #fff; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 1.4rem; line-height: 1; }
.dp-ai-head button:hover { background: rgba(255, 255, 255, .15); }
.dp-ai-head .dp-ai-new { width: auto; height: 30px; padding: 0 .65rem; font-family: inherit; font-size: .78rem; font-weight: 600;
  border: 1px solid rgba(255, 255, 255, .55); border-radius: 999px; }
.dp-ai-head .dp-ai-new + button { margin-left: .25rem; }
.dp-ai-head .dp-ai-new { white-space: nowrap; flex: none; }
.dp-ai-head > div { min-width: 0; }
[dir="rtl"] .dp-ai-head .dp-ai-new + button { margin-left: 0; margin-right: .25rem; }
.dp-ai-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .75rem; background: var(--color-bg-subtle, #f5f8fb); }
.dp-ai-msg { max-width: 88%; padding: .65rem .85rem; border-radius: 14px; font-size: .93rem; line-height: 1.55; overflow-wrap: anywhere; }
.dp-ai-msg p { margin: 0 0 .5rem; }
.dp-ai-msg ul { margin: 0 0 .5rem; padding-left: 1.15rem; }
.dp-ai-msg p:last-child, .dp-ai-msg ul:last-child { margin-bottom: 0; }
.dp-ai-msg a { color: inherit; text-decoration: underline; }
.dp-ai-msg hr { border: 0; border-top: 1px solid var(--color-surface-border, #dde5ee); margin: .6rem 0; }
.dp-ai-table { overflow-x: auto; margin: 0 0 .5rem; }
.dp-ai-table table { border-collapse: collapse; font-size: .84rem; min-width: 100%; }
.dp-ai-table th, .dp-ai-table td { border: 1px solid var(--color-surface-border, #dde5ee); padding: .3rem .45rem; text-align: start; vertical-align: top; }
.dp-ai-table th { background: var(--color-bg-subtle, #f5f8fb); }
.dp-ai-bot { align-self: flex-start; background: var(--color-surface, #fff); border: 1px solid var(--color-surface-border, #dde5ee); }
.dp-ai-user { align-self: flex-end; background: var(--color-brand, #0b6bcb); color: #fff; white-space: pre-wrap; }
.dp-ai-typing { opacity: .7; font-style: italic; }
.dp-ai-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.dp-ai-chips[hidden] { display: none; }
.dp-ai-chips button { border: 1px solid var(--color-surface-border, #dde5ee); background: var(--color-surface, #fff); color: var(--color-text, #10202e);
  border-radius: 999px; padding: .4rem .75rem; font: inherit; font-size: .82rem; cursor: pointer; text-align: start; }
.dp-ai-chips button:hover { border-color: var(--color-brand, #0b6bcb); }
.dp-ai-form { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--color-surface-border, #dde5ee); background: var(--color-surface, #fff); }
.dp-ai-form textarea { flex: 1; resize: none; min-height: 44px; max-height: 140px; padding: .6rem .75rem; border-radius: 12px; font: inherit; font-size: .93rem;
  border: 1px solid var(--color-surface-border, #dde5ee); background: var(--color-bg, #fff); color: var(--color-text, #10202e); }
.dp-ai-form button { flex: none; align-self: flex-end; height: 44px; padding: 0 1rem; border: 0; border-radius: 12px; background: var(--color-brand, #0b6bcb);
  color: #fff; font-family: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.dp-ai-form button:disabled { opacity: .55; cursor: wait; }
.dp-ai-attach { flex: none; align-self: flex-end; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-surface-border, #dde5ee); border-radius: 12px; background: var(--color-surface, #fff); color: var(--color-brand, #0b6bcb); cursor: pointer; }
.dp-ai-form .dp-ai-attach { padding: 0; background: var(--color-surface, #fff); color: var(--color-brand, #0b6bcb); }
.dp-ai-attach:focus-visible { outline: 3px solid var(--color-brand-glow, rgba(11, 107, 203, .35)); outline-offset: 2px; }
.dp-ai-preview { position: relative; align-self: flex-start; margin: .5rem .75rem 0; }
.dp-ai-preview[hidden] { display: none; }
.dp-ai-preview img { display: block; max-height: 90px; max-width: 160px; border-radius: 10px; border: 1px solid var(--color-surface-border, #dde5ee); }
.dp-ai-preview button { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: #10202e; color: #fff; cursor: pointer; line-height: 1; }
.dp-ai-thumb { display: block; max-width: 180px; max-height: 140px; border-radius: 8px; margin-bottom: .4rem; }
.dp-ai-note { margin: 0; padding: 0 .9rem .7rem; font-size: .72rem; line-height: 1.4; color: var(--color-text-muted, #5b6b7b); background: var(--color-surface, #fff); }
.dp-ai-teaser { position: fixed; z-index: 1199; top: 84px; right: 16px; width: min(330px, calc(100vw - 32px)); padding: 1rem 1rem .9rem;
  background: var(--color-surface, #fff); color: var(--color-text, #10202e); border: 1px solid var(--color-surface-border, #dde5ee);
  border-left: 4px solid var(--color-brand, #0b6bcb); border-radius: 14px; box-shadow: 0 18px 48px rgba(10, 31, 61, .2);
  font-size: .9rem; line-height: 1.5; animation: dp-ai-in .35s ease-out; }
.dp-ai-teaser[hidden] { display: none; }
.dp-ai-teaser p { margin: 0 1.4rem .75rem 0; }
.dp-ai-teaser-close { position: absolute; top: .35rem; right: .45rem; width: 28px; height: 28px; border: 0; border-radius: 8px;
  background: transparent; color: var(--color-text-muted, #5b6b7b); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.dp-ai-teaser-cta { border: 0; border-radius: 999px; padding: .5rem 1rem; background: var(--color-brand, #0b6bcb); color: #fff;
  font-family: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.dp-ai-teaser button:focus-visible { outline: 3px solid var(--color-brand-glow, rgba(11, 107, 203, .35)); outline-offset: 2px; }
@keyframes dp-ai-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dp-ai-teaser { animation: none; } }
@media (max-width: 640px) { .dp-ai-teaser { top: 70px; right: 8px; width: calc(100vw - 16px); max-width: 360px; } }
[dir="rtl"] .dp-ai-teaser { right: auto; left: 16px; border-left: 1px solid var(--color-surface-border, #dde5ee); border-right: 4px solid var(--color-brand, #0b6bcb); }
[dir="rtl"] .dp-ai-teaser p { margin: 0 0 .75rem 1.4rem; }
[dir="rtl"] .dp-ai-teaser-close { right: auto; left: .45rem; }
@media (max-width: 640px) { .dp-ai { top: 70px; left: 8px; right: 8px; width: auto; height: calc(100vh - 82px); height: calc(100dvh - 82px); } }
@media (min-width: 641px) { [dir="rtl"] .dp-ai { right: auto; left: 16px; } }
[dir="rtl"] .dp-ai-head button { margin-left: 0; margin-right: auto; }
[dir="rtl"] .dp-ai-msg ul { padding-left: 0; padding-right: 1.15rem; }
