/* Luvi Asistan — maskot ve sohbet penceresi (luvibot.js). Tüm Luvi ürünlerinde aynı; projeye göre değiştirme.
   Kendi değişkenleri (--lb-*) var, projenin CSS'ine bağımlı değil. Koyu tema: işletim sistemi tercihi,
   <html data-theme="dark"> ya da <html class="dark"> (Tailwind). Açık temaya zorlamak için data-theme="light". */
:root{
  --bot-body:#2F6FE4;--bot-face:#1B2B45;--bot-limb:#1B2B45;--bot-eye:#9ED8FF;--bot-happy:#22A05A;--bot-warn:#DC2626;
  --lb-surface:#FFFFFF;--lb-raised:#F4F6F9;--lb-line:#E4E8EE;--lb-line-2:#D2D9E3;
  --lb-text:#111827;--lb-dim:#4B5563;--lb-muted:#6B7280;
  --lb-accent:#2F6FE4;--lb-accent-soft:rgba(47,111,228,.10);
  --lb-crit:#DC2626;--lb-crit-soft:rgba(220,38,38,.09);--lb-high:#E07A1F;--lb-med:#EAB308;--lb-low:#22A05A;
  --lb-head:#1B2B45;--lb-ease:cubic-bezier(.2,.8,.2,1);
  --lb-font:"Inter","Segoe UI",system-ui,sans-serif;--lb-mono:ui-monospace,"SFMono-Regular",Consolas,monospace;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]):not(.light){
  --bot-limb:#8FA6C8;
  --lb-surface:#141E30;--lb-raised:#1A263B;--lb-line:rgba(150,175,220,.12);--lb-line-2:rgba(150,175,220,.22);
  --lb-text:#EEF2F8;--lb-dim:#A3B0C4;--lb-muted:#7486A0;--lb-accent:#4C82F5;--lb-accent-soft:rgba(76,130,245,.16);
  --lb-crit:#F26B63;--lb-crit-soft:rgba(242,107,99,.14)}}
:root[data-theme="dark"],:root.dark{
  --bot-limb:#8FA6C8;
  --lb-surface:#141E30;--lb-raised:#1A263B;--lb-line:rgba(150,175,220,.12);--lb-line-2:rgba(150,175,220,.22);
  --lb-text:#EEF2F8;--lb-dim:#A3B0C4;--lb-muted:#7486A0;--lb-accent:#4C82F5;--lb-accent-soft:rgba(76,130,245,.16);
  --lb-crit:#F26B63;--lb-crit-soft:rgba(242,107,99,.14)}

/* ---------- robot ---------- */
/* görsel: public/luvibot/*.webp (şeffaf zeminli); uyarıda sağ üstte kırmızı rozet */
.lb{position:relative;display:block;width:48px;height:48px}
.lb img{display:block;width:100%;height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none}
.lb.on-dark img{filter:drop-shadow(0 0 6px rgba(120,190,255,.35))}
.lb.uyari::after{content:"!";position:absolute;top:-2px;right:-2px;display:grid;place-items:center;width:38%;max-width:22px;min-width:12px;aspect-ratio:1;
  border-radius:50%;background:var(--bot-warn);color:#fff;font:700 10px/1 var(--lb-font)}

/* ---------- düğme ve pencere ---------- */
.lb-fab,.lb-panel{box-sizing:border-box;font-family:var(--lb-font);-webkit-font-smoothing:antialiased}
.lb-panel *,.lb-panel *::before,.lb-panel *::after{box-sizing:border-box}
.lb-fab{position:fixed;right:24px;bottom:24px;z-index:9990;display:grid;place-items:center;width:64px;height:64px;padding:0;border:0;border-radius:50%;
  background:var(--lb-surface);cursor:pointer;box-shadow:0 10px 28px rgba(47,111,228,.32),0 0 0 1px var(--lb-line)}
.lb-fab .lb{width:54px;height:54px}
.lb-fab:hover{box-shadow:0 12px 32px rgba(47,111,228,.42),0 0 0 2px var(--lb-accent)}
.lb-fab:focus-visible{outline:3px solid var(--lb-accent);outline-offset:3px}
.lb-fab.on{box-shadow:0 0 0 2px var(--lb-accent)}

.lb-panel{position:fixed;right:24px;bottom:100px;z-index:9990;display:flex;flex-direction:column;width:400px;height:min(600px,calc(100vh - 130px));
  overflow:hidden;border-radius:24px;background:var(--lb-surface);color:var(--lb-text);font-size:14px;line-height:1.5;text-align:left;
  box-shadow:0 24px 60px rgba(17,24,39,.22),0 0 0 1px var(--lb-line)}
.lb-panel[hidden]{display:none}
.lb-panel button{font:inherit}
.lb-head{display:flex;align-items:center;gap:12px;margin:0;padding:14px 14px 14px 18px;background:var(--lb-head);color:#fff}
.lb-head .lb{width:42px;height:42px;flex:none}
.lb-head div{flex:1;min-width:0} .lb-head b{display:block;font-weight:600;font-size:15px}
.lb-head small{display:flex;align-items:center;gap:6px;color:rgba(255,255,255,.72);font-size:12px}
.lb-state{width:7px;height:7px;border-radius:50%;background:var(--lb-med)}
.lb-state.on{background:var(--lb-low)} .lb-state.off{background:var(--lb-crit)}
.lb-x{display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.1);color:#fff;cursor:pointer}
.lb-x:hover{background:rgba(255,255,255,.2)}
.lb-new{margin-right:-4px}
.lb-body{flex:1;overflow:auto;padding:22px 20px}
.lb-hello{display:flex;flex-direction:column;align-items:center;text-align:center;gap:14px}
.lb-hello .lb{width:112px;height:112px}
.lb-hello p{margin:0;color:var(--lb-dim);line-height:1.55} .lb-hello p b{display:block;margin-bottom:6px;color:var(--lb-text);font-size:16px}
.lb-sugs{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.lb-sug{padding:7px 12px;border:0;border-radius:999px;background:var(--lb-accent-soft);color:var(--lb-accent);font:500 12.5px/1.2 var(--lb-font);cursor:pointer}
.lb-sug:hover{background:var(--lb-accent);color:#fff}
.lb-msgs{display:flex;flex-direction:column;gap:12px;margin:0;padding:0;list-style:none}
.lb-me{align-self:flex-end;max-width:85%;padding:10px 14px;border-radius:18px 18px 6px 18px;background:var(--lb-accent);color:#fff;font-size:14px;line-height:1.45;white-space:pre-line;overflow-wrap:anywhere}
.lb-bot{display:flex;align-items:flex-end;gap:8px;max-width:94%}
.lb-bot>.lb{flex:none;width:32px;height:32px;margin-bottom:2px}
.lb-bub{min-width:0;padding:10px 14px;border-radius:18px 18px 18px 6px;background:var(--lb-raised);font-size:14px;line-height:1.55}
.lb-bub.err{background:var(--lb-crit-soft);color:var(--lb-crit)}
.lb-txt{white-space:pre-line;overflow-wrap:anywhere}
.lb-code{font:500 12.5px var(--lb-mono);color:var(--lb-accent);text-decoration:none} .lb-code:hover{text-decoration:underline}
.lb-srcs{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.lb-src{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:999px;background:var(--lb-surface);box-shadow:0 0 0 1px var(--lb-line);color:var(--lb-accent);font:600 11.5px var(--lb-font);text-decoration:none}
a.lb-src:hover{box-shadow:0 0 0 1px var(--lb-accent)}
.lb-src i{width:6px;height:6px;border-radius:50%;background:var(--lb-muted)}
.lb-src i.crit{background:var(--lb-crit)} .lb-src i.high{background:var(--lb-high)} .lb-src i.med{background:var(--lb-med)} .lb-src i.low{background:var(--lb-low)}
/* genel yanıt: sistem verisine dayanmaz, etiketli; web kaynakları ve Google arama önerisi */
.lb-tag{display:inline-block;margin-bottom:6px;padding:2px 9px;border-radius:999px;background:var(--lb-accent-soft);color:var(--lb-accent);font:600 11px/1.6 var(--lb-font)}
.lb-web{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
.lb-web::before{content:"↗";font-size:10px}
.lb-gs{display:block;width:100%;height:58px;margin-top:8px;border:0;border-radius:12px;background:transparent}
.lb-dots{display:flex;gap:4px;padding:13px 14px} .lb-dots i{width:6px;height:6px;border-radius:50%;background:var(--lb-muted)}
.lb-compose{display:flex;gap:8px;margin:0;padding:12px 14px;border-top:1px solid var(--lb-line)}
.lb-compose input{flex:1;min-width:0;padding:11px 16px;border:1px solid var(--lb-line-2);border-radius:999px;background:var(--lb-raised);color:var(--lb-text);font:inherit;outline:none}
.lb-compose input:focus{border-color:var(--lb-accent)}
.lb-compose button{display:grid;place-items:center;width:42px;height:42px;padding:0;border:0;border-radius:50%;background:var(--lb-accent);color:#fff;cursor:pointer}
.lb-compose :disabled{opacity:.55;cursor:not-allowed}
/* sesli soru düğmesi (tarayıcı destekliyorsa); dinlerken kırmızı */
.lb-compose .lb-mic{background:var(--lb-raised);color:var(--lb-text);box-shadow:inset 0 0 0 1px var(--lb-line-2)}
.lb-compose .lb-mic:hover:not(:disabled){color:var(--lb-accent);box-shadow:inset 0 0 0 1px var(--lb-accent)}
.lb-compose .lb-mic.on{background:var(--lb-crit);color:#fff;box-shadow:none}
.lb-compose input.err::placeholder{color:var(--lb-crit);opacity:1}
.lb-note{display:block;padding:0 14px 10px;color:var(--lb-muted);font-size:11px;text-align:center}
@media (max-width:520px){
  .lb-fab{right:16px;bottom:16px;width:56px;height:56px} .lb-fab .lb{width:48px;height:48px}
  .lb-panel{left:10px;right:10px;top:10px;bottom:84px;width:auto;height:auto}
}

/* ---------- hareket: düşünürken hafif süzülme ---------- */
@keyframes lb-float{50%{transform:translateY(-3px)}}
.lb.dusunuyor img{animation:lb-float 1.4s ease-in-out infinite}
@keyframes lb-pop{from{opacity:0;transform:translateY(12px) scale(.97)}}
.lb-panel{animation:lb-pop .28s var(--lb-ease) both;transform-origin:bottom right}
.lb-fab{transition:transform .2s var(--lb-ease),box-shadow .2s} .lb-fab:hover{transform:translateY(-2px)}
@keyframes lb-dot{0%,80%,100%{opacity:.25}40%{opacity:1}}
.lb-dots i{animation:lb-dot 1.2s infinite} .lb-dots i:nth-child(2){animation-delay:.2s} .lb-dots i:nth-child(3){animation-delay:.4s}
@keyframes lb-rec{0%{box-shadow:0 0 0 0 rgba(220,38,38,.45)}100%{box-shadow:0 0 0 10px rgba(220,38,38,0)}}
.lb-compose .lb-mic.on{animation:lb-rec 1.2s ease-out infinite}
@media (prefers-reduced-motion:reduce){
  .lb.dusunuyor img,.lb-panel,.lb-dots i,.lb-compose .lb-mic.on{animation:none}
  .lb-fab,.lb-fab:hover{transition:none;transform:none}
}
