/* ==========================================================================
   LUXURY — sohbet asistanı: maskot "Pırıl" (asistan_bot.php) + widget kabuğu (§21.2)
   Çekirdek widget func/musterihizmetleri.php'de (satır içi <style>); burada yalnız boyut, konum ve görünüm ezilir.
   FAB: 56 daire --lx-ink (hover altın), maskot 40 px; sağ alt right 30 / bottom 86 (yukarı-çıkın 16 üstü) — ≤991 10 / 66.
   Panel: 380 × min(600, 100vh-140), 1px çizgi, r12, gölge drop; başlık 64 px mürekkep zemin; ≤767 tam ekran.
   Mobil off-canvas, sepet çekmecesi, tam ekran menü ya da pencere açıkken FAB gizlenir (html.lx-katman-acik / ex-kilit).
   ========================================================================== */

html body .bpa-wrap.ln-asistan { --bpa: var(--lx-ink); --bpa-d: var(--lx-ink); right: 30px; z-index: 1101; gap: 12px; font-family: var(--lx-font); }
html body .bpa-wrap.ln-asistan.bpa-sol { right: auto; left: 30px; }
html body .bpa-wrap.ln-asistan:not([style*="bottom"]) { bottom: 86px !important; }
html body .bpa-wrap.ln-asistan:has(.bpa-panel.open) { z-index: 2150; }
html.lx-katman-acik body .bpa-wrap.ln-asistan, html:is(.ex-modal-acik, .ln-cark-acik) body .bpa-wrap.ln-asistan:not(:has(.bpa-panel.open)),
html body:has(.bp-cark-ov.open, .bp-ukm-bg.acik) .bpa-wrap.ln-asistan:not(:has(.bpa-panel.open)) { visibility: hidden; opacity: 0; pointer-events: none; }
@media (max-width: 991.98px) {
  html body .bpa-wrap.ln-asistan { right: 10px; }
  html body .bpa-wrap.ln-asistan.bpa-sol { left: 10px; }
  html body .bpa-wrap.ln-asistan:not([style*="bottom"]) { bottom: calc(66px + env(safe-area-inset-bottom)) !important; }
}

/* ---------------- yüzen düğme (56 daire, mürekkep zemin, maskot 40) ---------------- */
html body .ln-asistan .bpa-fab { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%;
  background: var(--lx-ink); box-shadow: var(--lx-shadow-backtop); overflow: visible; transition: background-color .3s; }
html body .ln-asistan .bpa-fab:hover { background: var(--lx-gold); }
html body .ln-asistan .bpa-fab .bpa-bot { display: block; width: 40px; height: auto; margin-top: -4px; overflow: visible; filter: none; transition: transform .2s ease; }
html body .ln-asistan .bpa-fab:hover .bpa-bot .bpa-body { transform: none; }
html body .ln-asistan .bpa-fab:focus-visible { outline: 2px solid var(--lx-focus); outline-offset: 3px; }
html body .ln-asistan .bpa-golge { display: none; }
html body .ln-asistan .bpa-dot { top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--lx-gold); box-shadow: 0 0 0 2px var(--lx-bg); font: 600 11px/16px var(--lx-font); }

/* ---------------- maskot: dönme noktaları ve kırpma ---------------- */
body .bpa-bot.lx-piril .bpa-eyes { fill: inherit; stroke: none; stroke-width: 0; animation: lxPirilGoz 8s ease-in-out infinite; }
body .bpa-bot.lx-piril .bpa-mouth { fill: none; }
body .bpa-bot.lx-piril .bpa-arm { transform-box: view-box; transform-origin: 97px 60px; }
body .bpa-bot.lx-piril .bpa-spout { transform-box: view-box; transform-origin: 60px 14.5px; animation: lxPirilti 3.2s ease-in-out infinite; }
body .bpa-bot.lx-piril.emo-excited .bpa-spout { animation: lxPiriltiDon 1.1s ease-in-out; }
@keyframes lxPirilGoz { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes lxPirilti { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.82); } }
@keyframes lxPiriltiDon { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.25); } 100% { transform: rotate(360deg) scale(1); } }

/* ---------------- karşılama balonu (FAB'ın solunda; 6 sn sonra solar) ---------------- */
html body.lx-govde .ln-asistan .bpa-bubble { max-width: 264px; padding: 12px 40px 12px 16px; border: 1px solid var(--lx-line); border-radius: 12px 12px 4px 12px; background: var(--lx-surface);
  color: var(--lx-ink); font-size: 14px; font-weight: 500; line-height: 20px; box-shadow: none; transition: opacity .6s; }
html body.lx-govde .ln-asistan .bpa-bubble.lx-solar { opacity: 0; pointer-events: none; }
html body.lx-govde .ln-asistan.bpa-sol .bpa-bubble { border-radius: 12px 12px 12px 4px; }
html body.lx-govde .ln-asistan .bpa-bubble .x { position: absolute; top: 8px; right: 8px; display: inline-flex !important; align-items: center; justify-content: center; width: 24px !important; height: 24px !important;
  padding: 0 !important; border: 0 !important; background: none !important; color: var(--lx-ink) !important; font-size: 0 !important; opacity: .6; cursor: pointer; }
html body.lx-govde .ln-asistan .bpa-bubble .x::before { content: ""; display: block; width: 12px; height: 12px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat; }
html body.lx-govde .ln-asistan .bpa-bubble .x::after { content: ""; position: absolute; inset: -8px; }
html body.lx-govde .ln-asistan .bpa-bubble .x:hover { opacity: 1; color: var(--lx-gold) !important; }
html body.lx-govde:not(.lx-anasayfa) .bpa-bubble { display: none !important; }

/* ---------------- sohbet paneli ---------------- */
html body .ln-asistan .bpa-panel { width: min(380px, calc(100vw - 32px)); height: min(600px, calc(100vh - 140px)); overflow: hidden; border: 1px solid var(--lx-line); border-radius: 12px;
  background: var(--lx-surface); box-shadow: var(--lx-shadow-drop); font-family: var(--lx-font); }
html body .ln-asistan .bpa-panel.open { display: flex; animation: lxAsistanAc .25s ease both; }
@keyframes lxAsistanAc { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
html body .ln-asistan .bpa-head { flex: none; gap: 12px; min-height: 64px; padding: 0 16px; border-bottom: 0; background: #22201D; color: #FFFFFF; }
html body .ln-asistan .bpa-head .bpa-mini { flex: none; width: 36px; height: 36px; padding: 3px; overflow: visible; border-radius: 50%; background: var(--lx-gold); }
html body .ln-asistan .bpa-head .t b { overflow: hidden; color: #FFFFFF; font-size: 15px; font-weight: 600; line-height: 20px; white-space: nowrap; text-overflow: ellipsis; }
html body .ln-asistan .bpa-head .t span { gap: 6px; margin-top: 1px; overflow: hidden; color: #A1A1A0; font-size: 12px; line-height: 16px; white-space: nowrap; opacity: 1; }
html body .ln-asistan .bpa-head .t span i { flex: none; width: 6px; height: 6px; background: #4CBB6C; box-shadow: none; }
html body .ln-asistan .bpa-hbtn { width: 32px !important; height: 32px !important; border-radius: 0 !important; background: none !important; color: #FFFFFF !important; }
html body .ln-asistan .bpa-hbtn:hover { color: var(--lx-gold) !important; }
html body .ln-asistan .bpa-hbtn svg { width: 20px; height: 20px; fill: currentColor; }
html body .ln-asistan .bpa-hbtn svg.lna-ik { fill: none; }
html body .ln-asistan .bpa-hbtn:focus-visible { outline-color: var(--lx-gold) !important; }

html body .ln-asistan .bpa-msgs { flex: 1 1 auto; height: auto; min-height: 0; gap: 12px; padding: 16px; background: var(--lx-surface); overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--lx-line) transparent; }
html body .ln-asistan .bpa-m { max-width: 85%; padding: 10px 14px; border: 0; border-radius: 4px 12px 12px 12px; background: var(--lx-soft); color: var(--lx-ink); font-size: 14px; line-height: 21px; }
html body .ln-asistan .bpa-m.me { border-radius: 12px 4px 12px 12px; background: var(--lx-btn-bg); color: var(--lx-btn-ink); }
html body .ln-asistan .bpa-m .who { margin-bottom: 2px; color: var(--lx-muted); font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; }
html body .ln-asistan .bpa-m a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
html body .ln-asistan .bpa-typing { padding: 12px 14px; border: 0; border-radius: 4px 12px 12px 12px; background: var(--lx-soft); }
html body .ln-asistan .bpa-typing i { width: 6px; height: 6px; background: var(--lx-muted); }

html body .ln-asistan .bpa-form { flex: none; gap: 8px; padding: 12px; border-top: 1px solid var(--lx-line); background: var(--lx-surface); }
html body .ln-asistan .bpa-form input { height: 44px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; background: var(--lx-soft); color: var(--lx-ink); font: 400 16px/20px var(--lx-font); transition: border-color .3s, background-color .3s; }
html body .ln-asistan .bpa-form input::placeholder { color: var(--lx-muted); opacity: 1; }
html body .ln-asistan .bpa-form input:focus { border-color: var(--lx-gold); background: var(--lx-surface); }
html body .ln-asistan .bpa-form button { flex: none; width: 44px; height: 44px; border-radius: 9px; background: var(--lx-gold); color: #FFFFFF; transition: background-color .3s; }
html body .ln-asistan .bpa-form button:hover { background: #22201D; transform: none; }
html body .ln-asistan .bpa-form button svg { width: 20px; height: 20px; margin: 0; fill: currentColor; }
html body .ln-asistan .bpa-form button svg.lna-ik { fill: none; }
html body .ln-asistan .bpa-alt { flex: none; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 16px 12px; background: var(--lx-surface); color: var(--lx-muted); font-size: 11px; line-height: 16px; }
html body .ln-asistan .bpa-alt svg { flex: none; width: 12px; height: 12px; }
html body .ln-asistan .bpa-noti { border-color: var(--lx-line); background: var(--lx-surface); }

/* sürüklerken arkadaki bağlantı/görsel yerel sürüklemeyi başlatmasın */
html body:has(.bpa-wrap.bpa-dragging) { -webkit-user-select: none; user-select: none; }
html body:has(.bpa-wrap.bpa-dragging) :is(a, img) { -webkit-user-drag: none; }
html body .ln-asistan .bpa-drag-bubble { padding: 8px 12px; border: 1px solid var(--lx-line); border-radius: 12px 12px 4px 12px; background: var(--lx-surface); color: var(--lx-ink);
  font-family: var(--lx-font); font-size: 13px; font-weight: 600; box-shadow: none; }
html body .ln-asistan.bpa-sol .bpa-drag-bubble { border-radius: 12px 12px 12px 4px; }

@media (max-width: 767.98px) {
  html body .ln-asistan .bpa-panel.open { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; border: 0; border-radius: 0; padding-top: env(safe-area-inset-top); translate: none !important; }
  html body.lx-govde .ln-asistan .bpa-bubble { max-width: min(264px, calc(100vw - 32px)); }
  /* form, ödeme ve hesap sayfalarında robot alt düğmeleri örtmesin */
  html body.ex-sessiz .ln-asistan .bpa-fab, html body.ex-sessiz .ln-asistan .bpa-bubble, html body.ex-sessiz .ln-asistan .bpa-drag-bubble { display: none; }
}
:root[data-tema="kontrast"] html body .ln-asistan .bpa-panel, :root[data-tema="kontrast"] .ln-asistan .bpa-panel { border: 2px solid #000000; }
@media (forced-colors: active) {
  html body .ln-asistan .bpa-panel, html body.lx-govde .ln-asistan .bpa-bubble, html body .ln-asistan .bpa-fab { border: 1px solid CanvasText; }
}
@media (prefers-reduced-motion: reduce) {
  html body .ln-asistan *, html body .ln-asistan *::before, html body .ln-asistan *::after { animation: none !important; transition: none !important; }
}
