/* =============================================================================
   AI Assistant — 2D bot karakteri + chat paneli (Gemini Flash backend)
   Yaprakzade premium çay teması — yeşil yaprak palette
   PREMIUM ANIMATION OVERHAUL: anatomik yürüyüş, blink, breathing, step shadow,
   sequence-based direction flip, spawn overshoot. Halo daire kaldırıldı.
   ============================================================================= */

:root {
  --yz-ai-green: #2d7a3e;
  --yz-ai-green-light: #3fa055;
  --yz-ai-green-dark: #1f5a2c;
  --yz-ai-user: #2563eb;
  --yz-ai-bg: #ffffff;
  --yz-ai-text: #1f2937;
  --yz-ai-muted: #6b7280;
  --yz-ai-border: #e5e7eb;
  --yz-ai-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);

  /* Premium easing tokens — Emil Kowalski'den ilhamla */
  --yz-ai-ease-walk:   cubic-bezier(0.45, 0.05, 0.55, 0.95); /* smooth sine */
  --yz-ai-ease-swing:  cubic-bezier(0.42, 0, 0.58, 1);       /* in-out for limbs */
  --yz-ai-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);    /* overshoot */
  --yz-ai-ease-soft:   cubic-bezier(0.16, 1, 0.3, 1);        /* soft exit */
}

/* ============ FAB — Transparent shell, NO background circle ============ */
.yz-ai-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 72px;
  height: 92px;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  /* Soft drop-shadow under the bot (renksiz, halka değil) */
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.18));
  transition:
    left   3.2s var(--yz-ai-ease-soft),
    right  3.2s var(--yz-ai-ease-soft),
    top    3.2s var(--yz-ai-ease-soft),
    bottom 3.2s var(--yz-ai-ease-soft),
    transform 0.28s var(--yz-ai-ease-spring),
    filter 0.3s ease;
  /* Spawn — yumuşak fade-in (zıplama yok); sadece ilk ziyarette JS .yz-ai-fab--first ekler */
  will-change: transform;
}

/* Hover: yumuşak büyüme + drop-shadow derinleşir (renksiz feedback) */
.yz-ai-fab:hover {
  transform: translateY(-6px) scale(1.08);
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.28));
}
.yz-ai-fab:active {
  transform: translateY(-2px) scale(1.02);
  transition: transform 0.12s ease;
}

/* Bot karakter — wrapper hep canlı (breathing + cup tilt) */
.yz-ai-fab .yz-ai-bot {
  width: 64px;
  height: 88px;
  pointer-events: none;
  overflow: visible;
  transform-origin: 50% 92%;
  animation:
    yzAiBreathe 4s ease-in-out infinite,
    yzAiCupBounce 2.8s ease-in-out infinite;
  will-change: transform;
}

/* Position variants — sağ/sol/orta dolaş */
.yz-ai-fab[data-position="right-bottom"]  { right: 22px; left: auto; bottom: 22px; top: auto; }
.yz-ai-fab[data-position="left-bottom"]   { left: 22px;  right: auto; bottom: 22px; top: auto; }
.yz-ai-fab[data-position="right-middle"]  { right: 22px; left: auto; top: 50%; bottom: auto; }
.yz-ai-fab[data-position="left-middle"]   { left: 22px;  right: auto; top: 50%; bottom: auto; }
.yz-ai-fab[data-position="center-bottom"] { left: 50%;   right: auto; bottom: 22px; top: auto; }

/* ===========================================================================
   YÜRÜYÜŞ — Anatomik 4-fazlı bacak (heel-strike → mid-stance → toe-off → swing)
   Cadence: 0.7s/adım (86 BPM). Sol bacak = referans; sağ bacak 180° faz farkı
   (0.35s gecikme yerine ters keyframe ile — daha temiz senkron).
   =========================================================================== */

/* Walking class — tüm parçalar 0.7s tempoda senkron çalışır */
.yz-ai-fab--walking .yz-ai-bot {
  animation:
    yzAiBobUpDown 0.7s var(--yz-ai-ease-walk) infinite,
    yzAiBodyShift 1.4s var(--yz-ai-ease-walk) infinite,
    yzAiBreathe 4s ease-in-out infinite !important;
}

.yz-ai-fab--walking .yz-ai-leg-left {
  animation: yzAiLegWalkLeft 0.7s var(--yz-ai-ease-swing) infinite !important;
}
.yz-ai-fab--walking .yz-ai-leg-right {
  animation: yzAiLegWalkRight 0.7s var(--yz-ai-ease-swing) infinite !important;
}

/* Crossing pattern: sol kol ↔ sağ bacak aynı fazda (insan yürüyüşü) */
.yz-ai-fab--walking .yz-ai-arm-left {
  animation: yzAiArmSwingRight 0.7s var(--yz-ai-ease-swing) infinite !important;
}
.yz-ai-fab--walking .yz-ai-arm-right {
  animation: yzAiArmSwingLeft 0.7s var(--yz-ai-ease-swing) infinite !important;
}

/* Tea + step shadow walking ile hızlanır */
.yz-ai-fab--walking .yz-ai-tea {
  animation: yzAiTeaSlosh 1.4s ease-in-out infinite !important;
}
.yz-ai-fab--walking .yz-ai-leg-left ellipse,
.yz-ai-fab--walking .yz-ai-leg-right ellipse {
  transform-origin: 50% 100%;
  transform-box: fill-box;
}
.yz-ai-fab--walking .yz-ai-leg-left ellipse {
  animation: yzAiFootSquash 0.7s var(--yz-ai-ease-swing) infinite;
}
.yz-ai-fab--walking .yz-ai-leg-right ellipse {
  animation: yzAiFootSquash 0.7s var(--yz-ai-ease-swing) infinite -0.35s;
}

/* Idle (walking class yokken) — tea ve kollar yavaş salınır */
.yz-ai-bot .yz-ai-tea {
  transform-origin: 50% 100%;
  animation: yzAiTeaSlosh 3.4s ease-in-out infinite;
}
.yz-ai-bot .yz-ai-tea-shine {
  transform-origin: 50% 50%;
  animation: yzAiTeaShine 3.4s ease-in-out infinite;
}
.yz-ai-bot .yz-ai-steam path { transform-origin: 50% 100%; }
.yz-ai-bot .yz-ai-steam-1 { animation: yzAiSteam 2.1s ease-in-out infinite; }
.yz-ai-bot .yz-ai-steam-2 { animation: yzAiSteam 2.4s ease-in-out infinite .35s; }
.yz-ai-bot .yz-ai-steam-3 { animation: yzAiSteam 2.2s ease-in-out infinite .7s; }

/* Bacak ve kol omuz/kalça transform-origin */
.yz-ai-bot .yz-ai-arm-left  { transform-origin: 14px 40px; transform-box: fill-box; animation: yzAiArmIdle 2.8s ease-in-out infinite; }
.yz-ai-bot .yz-ai-arm-right { transform-origin: 50px 40px; transform-box: fill-box; animation: yzAiArmIdle 2.8s ease-in-out infinite reverse; }
.yz-ai-bot .yz-ai-leg-left  { transform-origin: 24px 64px; transform-box: fill-box; }
.yz-ai-bot .yz-ai-leg-right { transform-origin: 40px 64px; transform-box: fill-box; }

/* Gözler — blink için transform-box gerekli */
.yz-ai-bot .yz-ai-bot-eye {
  transform-origin: 50% 50%;
  transform-box: fill-box;
}

/* ===========================================================================
   DIRECTION FLIP — sequence: head turn (100ms) → body lean (200ms) → walk on
   data-direction set ediliyor; yumuşak çoklu-faz transition.
   =========================================================================== */
.yz-ai-fab[data-direction] .yz-ai-bot {
  transition: transform 0.4s var(--yz-ai-ease-spring);
}
.yz-ai-fab[data-direction="right"] .yz-ai-bot { transform: rotate(5deg); }
.yz-ai-fab[data-direction="left"]  .yz-ai-bot { transform: rotate(-5deg); }

/* Head pre-turn — gözler önce çevrilir (subtle scaleX trick) */
.yz-ai-fab[data-direction="right"] .yz-ai-bot-eye,
.yz-ai-fab[data-direction="left"]  .yz-ai-bot-eye {
  transition: transform 0.25s ease;
}
.yz-ai-fab[data-direction="right"] .yz-ai-bot-eye { transform: translateX(0.6px); }
.yz-ai-fab[data-direction="left"]  .yz-ai-bot-eye { transform: translateX(-0.6px); }

/* Buhar yürürken yön ters savrulur (göreceli rüzgar) */
.yz-ai-fab--walking[data-direction="right"] .yz-ai-steam {
  transform: translateX(-2px) skewX(-10deg);
  transition: transform 0.4s var(--yz-ai-ease-soft);
}
.yz-ai-fab--walking[data-direction="left"] .yz-ai-steam {
  transform: translateX(2px) skewX(10deg);
  transition: transform 0.4s var(--yz-ai-ease-soft);
}

/* ===========================================================================
   BLINK — JS toggled `.yz-ai-fab--blink` 150ms (random 3-7s scheduler)
   =========================================================================== */
.yz-ai-fab--blink .yz-ai-bot-eye {
  animation: yzAiBlink 0.15s ease-out;
}

/* ===========================================================================
   HOVER — iki kol greet pozisyonuna kalkar + glow pulse (yumuşak shadow)
   =========================================================================== */
.yz-ai-fab:hover .yz-ai-arm-left  { animation: yzAiArmGreetUpLeft  0.6s var(--yz-ai-ease-spring) forwards !important; }
.yz-ai-fab:hover .yz-ai-arm-right { animation: yzAiArmGreetUpRight 0.6s var(--yz-ai-ease-spring) forwards !important; }

/* Click feedback — kısa scale pulse + soft glow (renksiz) */
.yz-ai-fab--click-pulse {
  animation: yzAiClickPulse 0.4s ease-out !important;
}

/* Periodic attention shake — JS toggled */
.yz-ai-fab--attention .yz-ai-bot {
  animation: yzAiAttention 0.9s var(--yz-ai-ease-spring) 1,
             yzAiBreathe 4s ease-in-out infinite !important;
}

/* Greet — sadece ilk ziyaret + yumuşatılmış bounce */
.yz-ai-fab--greet.yz-ai-fab--first .yz-ai-bot {
  animation: yzAiGreet 1.1s var(--yz-ai-ease-spring) 1,
             yzAiBreathe 4s ease-in-out infinite !important;
}

/* ===========================================================================
   KEYFRAMES — premium overhaul
   =========================================================================== */

/* Spawn — sadece ilk ziyarette (sessionStorage gate); yumuşak fade-up, zıplama yok */
.yz-ai-fab--first { animation: yzAiSpawn 0.45s var(--yz-ai-ease-soft) both; }
@keyframes yzAiSpawn {
  0%   { transform: translateY(12px) scale(0.92); opacity: 0; }
  100% { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* Breathing — subtle scale 1 → 1.02 → 1 */
@keyframes yzAiBreathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.02); }
}

/* Bardak — narin yukarı-aşağı + minik tilt */
@keyframes yzAiCupBounce {
  0%, 100% { transform: translateY(0) rotate(-2deg);    }
  50%      { transform: translateY(-2px) rotate(2deg); }
}

/* Bot bob — 2-pikli (her adımda 1 zirve), gerçek yürüme cadence */
@keyframes yzAiBobUpDown {
  0%   { transform: translateY(0); }
  25%  { transform: translateY(-4px); }   /* sol bacak swing zirvesi */
  50%  { transform: translateY(-1px); }   /* mid-stance (iki ayak yere yakın) */
  75%  { transform: translateY(-4px); }   /* sağ bacak swing zirvesi */
  100% { transform: translateY(0); }
}

/* Body weight shift — adım atılan tarafa hafif kayar (2x bob cadence) */
@keyframes yzAiBodyShift {
  0%   { transform: translateX(-1.5px) rotate(-1.5deg); }
  50%  { transform: translateX(1.5px)  rotate(1.5deg); }
  100% { transform: translateX(-1.5px) rotate(-1.5deg); }
}

/* Sol bacak — 4-aşama gerçek yürüyüş:
   0%  = toe-off (arka pozisyon, push-off)
   25% = swing-up (yukarı kalkar)
   50% = heel-strike (öne uzanır, ayak yukarı)
   75% = mid-stance (yere değer, gövde üstünde)
   100% = toe-off (arkaya geri) */
@keyframes yzAiLegWalkLeft {
  0%   { transform: rotate(22deg)  translateY(0); }
  25%  { transform: rotate(0deg)   translateY(-3px); }
  50%  { transform: rotate(-28deg) translateY(-2px); }
  75%  { transform: rotate(-12deg) translateY(0); }
  100% { transform: rotate(22deg)  translateY(0); }
}
/* Sağ bacak — sol bacaktan 180° faz farklı (zıt taraflı) */
@keyframes yzAiLegWalkRight {
  0%   { transform: rotate(-28deg) translateY(-2px); }
  25%  { transform: rotate(-12deg) translateY(0); }
  50%  { transform: rotate(22deg)  translateY(0); }
  75%  { transform: rotate(0deg)   translateY(-3px); }
  100% { transform: rotate(-28deg) translateY(-2px); }
}

/* Ayak step squash — her basışta micro-bounce (yere değdiğinde) */
@keyframes yzAiFootSquash {
  0%, 70%   { transform: scaleY(1); }
  75%       { transform: scaleY(0.78); }  /* basış anı — ezilir */
  85%       { transform: scaleY(1.08); }  /* recovery — overshoot */
  100%      { transform: scaleY(1); }
}

/* Kol crossing — sol kol sağ bacakla aynı faz (sağ bacak öne ↔ sol kol öne) */
@keyframes yzAiArmSwingRight {
  /* sağ bacakla aynı = bacakRight'ın 0% pozisyonu = öne (negatif açı) */
  0%   { transform: rotate(25deg); }   /* arkada */
  50%  { transform: rotate(-22deg); }  /* öne */
  100% { transform: rotate(25deg); }
}
@keyframes yzAiArmSwingLeft {
  /* sol bacakla aynı = bacakLeft'ın 0% = arkada */
  0%   { transform: rotate(-22deg); }
  50%  { transform: rotate(25deg); }
  100% { transform: rotate(-22deg); }
}

/* Idle arm — bekleme salınımı (walking değilken) */
@keyframes yzAiArmIdle {
  0%, 100% { transform: rotate(-4deg); }
  50%      { transform: rotate(4deg); }
}

/* Greet arms up — hover'da iki kol yukarı kalkar (8° pozitif yukarı) */
@keyframes yzAiArmGreetUpLeft {
  0%   { transform: rotate(-4deg); }
  60%  { transform: rotate(-32deg); }
  100% { transform: rotate(-22deg); }
}
@keyframes yzAiArmGreetUpRight {
  0%   { transform: rotate(4deg); }
  60%  { transform: rotate(32deg); }
  100% { transform: rotate(22deg); }
}

/* Çay sıvısı — yüzeyde dalga salınımı */
@keyframes yzAiTeaSlosh {
  0%, 100% { transform: translateX(-.4px) scaleY(1); }
  25%      { transform: translateX(.6px)  scaleY(.985); }
  50%      { transform: translateX(.4px)  scaleY(1.01); }
  75%      { transform: translateX(-.6px) scaleY(.99); }
}

/* Çay yüzeyi parıltısı */
@keyframes yzAiTeaShine {
  0%, 100% { transform: translateX(0) scaleX(1); opacity: .5; }
  50%      { transform: translateX(8px) scaleX(.85); opacity: .35; }
}

/* Buhar — yukarı kıvrılır + saydamlaşır */
@keyframes yzAiSteam {
  0%   { transform: translateY(2px) scaleY(.55); opacity: 0; }
  20%  { opacity: .8; }
  60%  { transform: translateY(-2px) scaleY(1.05); opacity: .65; }
  100% { transform: translateY(-6px) scaleY(1.25); opacity: 0; }
}

/* Greet bounce — initial spawn ekstra zıplama */
@keyframes yzAiGreet {
  0%   { transform: translateY(0)    scale(1)    rotate(0); }
  30%  { transform: translateY(-10px) scale(1.05) rotate(-3deg); }
  60%  { transform: translateY(-3px)  scale(1.02) rotate(2deg); }
  100% { transform: translateY(0)    scale(1)    rotate(0); }
}

/* Attention — periodic dikkat çekici zıplama */
@keyframes yzAiAttention {
  0%   { transform: translateY(0) rotate(0); }
  18%  { transform: translateY(-16px) rotate(-4deg); }
  38%  { transform: translateY(-2px)  rotate(3deg); }
  58%  { transform: translateY(-10px) rotate(-2deg); }
  80%  { transform: translateY(-2px)  rotate(1deg); }
  100% { transform: translateY(0)     rotate(0); }
}

/* Blink — gözler hızlıca kapanır (150ms) */
@keyframes yzAiBlink {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(0.1); }
}

/* Click pulse — kısa scale + soft shadow */
@keyframes yzAiClickPulse {
  0%   { transform: scale(1); filter: drop-shadow(0 6px 10px rgba(0,0,0,.18)); }
  40%  { transform: scale(1.12); filter: drop-shadow(0 12px 22px rgba(0,0,0,.32)); }
  100% { transform: scale(1); filter: drop-shadow(0 6px 10px rgba(0,0,0,.18)); }
}

/* ============ Tooltip (hover label) ============ */
.yz-ai-fab::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 80px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: #ffffff;
  color: var(--yz-ai-green-dark);
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  box-shadow:
    0 8px 22px rgba(45, 122, 62, 0.28),
    0 0 0 1px rgba(45, 122, 62, 0.12);
  border-left: 3px solid var(--yz-ai-green);
}
.yz-ai-fab:hover::before,
.yz-ai-fab.yz-ai-fab--tip-show::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Notification dot */
.yz-ai-fab .yz-ai-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 12px;
  height: 12px;
  background: #ef4444;
  border: 2px solid #fff;
  border-radius: 50%;
}
.yz-ai-fab.yz-ai-fab--open .yz-ai-dot { display: none; }
.yz-ai-fab.yz-ai-fab--open::before { display: none; }

/* ============ Chat Panel ============ */
.yz-ai-panel {
  position: fixed;
  right: 22px;
  bottom: 100px;
  width: 380px;
  max-width: calc(100vw - 28px);
  height: 540px;
  max-height: calc(100vh - 130px);
  background: var(--yz-ai-bg);
  border-radius: 18px;
  box-shadow: var(--yz-ai-shadow);
  z-index: 9001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s var(--yz-ai-ease-spring), opacity 0.2s;
}

.yz-ai-panel.yz-ai-panel--open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Header */
.yz-ai-head {
  background: linear-gradient(135deg, var(--yz-ai-green), var(--yz-ai-green-dark));
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.yz-ai-head-avatar {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.yz-ai-head-avatar .yz-ai-bot { width: 30px; height: 42px; animation: none; margin-top: 0; }

.yz-ai-head-info { flex: 1; min-width: 0; }
.yz-ai-head-name { font-weight: 600; font-size: 15px; line-height: 1.2; }
.yz-ai-head-status {
  font-size: 12px;
  opacity: 0.92;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}
.yz-ai-head-status::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #10f077;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 240, 119, 0.3);
  animation: yzAiPulse 2s infinite;
}

@keyframes yzAiPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(16, 240, 119, 0.3); }
  50%      { box-shadow: 0 0 0 6px rgba(16, 240, 119, 0); }
}

.yz-ai-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.yz-ai-close:hover { background: rgba(255, 255, 255, 0.28); }

/* Body */
.yz-ai-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  background: #f9fafb;
  scroll-behavior: smooth;
}

.yz-ai-msg {
  display: flex;
  margin-bottom: 10px;
  animation: yzAiMsgIn 0.28s ease;
}
@keyframes yzAiMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.yz-ai-msg--bot { justify-content: flex-start; }
.yz-ai-msg--user { justify-content: flex-end; }

.yz-ai-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.yz-ai-msg--bot .yz-ai-bubble {
  background: #fff;
  color: var(--yz-ai-text);
  border: 1px solid var(--yz-ai-border);
  border-bottom-left-radius: 4px;
}

.yz-ai-msg--user .yz-ai-bubble {
  background: var(--yz-ai-user);
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Inline link */
.yz-ai-inline-link {
  color: #2d7a3e;
  font-weight: 600;
  text-decoration: none;
  padding: 1px 6px;
  margin: 0 1px;
  background: rgba(45, 122, 62, 0.08);
  border-radius: 6px;
  border: 1px solid rgba(45, 122, 62, 0.15);
  transition: background 0.15s, color 0.15s, transform 0.1s;
  display: inline-block;
  white-space: nowrap;
}
.yz-ai-inline-link:hover {
  background: #2d7a3e;
  color: #fff;
  transform: translateY(-1px);
}
.yz-ai-msg--user .yz-ai-inline-link {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Typing indicator */
.yz-ai-typing {
  display: inline-flex;
  gap: 4px;
  padding: 14px 16px;
}
.yz-ai-typing span {
  width: 8px;
  height: 8px;
  background: var(--yz-ai-muted);
  border-radius: 50%;
  animation: yzAiTyping 1.3s ease-in-out infinite;
}
.yz-ai-typing span:nth-child(2) { animation-delay: 0.15s; }
.yz-ai-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes yzAiTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-6px); opacity: 1; }
}

/* Quick replies */
.yz-ai-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px 4px;
  background: #f9fafb;
  border-top: 1px solid var(--yz-ai-border);
}

.yz-ai-chip {
  background: #fff;
  border: 1px solid var(--yz-ai-green-light);
  color: var(--yz-ai-green-dark);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
}
.yz-ai-chip:hover {
  background: var(--yz-ai-green-light);
  color: #fff;
  transform: translateY(-1px);
}

/* Input */
.yz-ai-input-wrap {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  background: #fff;
  border-top: 1px solid var(--yz-ai-border);
}

.yz-ai-input {
  flex: 1;
  border: 1px solid var(--yz-ai-border);
  border-radius: 22px;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}
.yz-ai-input:focus { border-color: var(--yz-ai-green-light); }

.yz-ai-send {
  background: var(--yz-ai-green);
  border: none;
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}
.yz-ai-send:hover { background: var(--yz-ai-green-dark); transform: scale(1.06); }
.yz-ai-send:disabled { background: #9ca3af; cursor: not-allowed; transform: none; }
.yz-ai-send svg { width: 18px; height: 18px; }

/* Reduced motion — TÜM bot animasyonları durur */
@media (prefers-reduced-motion: reduce) {
  .yz-ai-fab,
  .yz-ai-fab .yz-ai-bot,
  .yz-ai-fab .yz-ai-bot *,
  .yz-ai-fab--walking .yz-ai-bot,
  .yz-ai-fab--walking .yz-ai-leg-left,
  .yz-ai-fab--walking .yz-ai-leg-right,
  .yz-ai-fab--walking .yz-ai-arm-left,
  .yz-ai-fab--walking .yz-ai-arm-right,
  .yz-ai-fab--walking .yz-ai-tea,
  .yz-ai-fab--walking .yz-ai-leg-left ellipse,
  .yz-ai-fab--walking .yz-ai-leg-right ellipse,
  .yz-ai-fab--attention .yz-ai-bot,
  .yz-ai-fab--greet .yz-ai-bot,
  .yz-ai-fab--blink .yz-ai-bot-eye,
  .yz-ai-fab--click-pulse {
    animation: none !important;
    transition: none !important;
  }
  .yz-ai-fab:hover { transform: none !important; }
  .yz-ai-fab:hover .yz-ai-arm-left,
  .yz-ai-fab:hover .yz-ai-arm-right { animation: none !important; }
}

/* ============ Greeting tooltip (admin pool) ============ */
.yz-ai-tooltip {
  position: fixed;
  max-width: 280px;
  background: linear-gradient(135deg, #ffffff, #f4f9f1);
  color: #1f3a2a;
  padding: 12px 18px;
  border-radius: 16px;
  border: 1px solid rgba(45, 122, 62, 0.25);
  border-left: 4px solid var(--yz-ai-green);
  box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.22);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  z-index: 8999;
  opacity: 0;
  transform: translateY(20px) scale(0.92);
  transition: opacity 0.35s, transform 0.35s var(--yz-ai-ease-spring),
              left 1.8s var(--yz-ai-ease-soft),
              right 1.8s var(--yz-ai-ease-soft),
              top 1.8s var(--yz-ai-ease-soft),
              bottom 1.8s var(--yz-ai-ease-soft);
  pointer-events: none;
}
.yz-ai-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.yz-ai-tooltip[data-anchor="right-bottom"]  { right: 22px; left: auto; bottom: 100px; top: auto; }
.yz-ai-tooltip[data-anchor="left-bottom"]   { left: 22px;  right: auto; bottom: 100px; top: auto; }
.yz-ai-tooltip[data-anchor="right-middle"]  { right: 100px; left: auto; top: 50%; bottom: auto; transform: translateY(-50%) scale(0.92); }
.yz-ai-tooltip[data-anchor="right-middle"].is-visible { transform: translateY(-50%) scale(1); }
.yz-ai-tooltip[data-anchor="left-middle"]   { left: 100px;  right: auto; top: 50%; bottom: auto; transform: translateY(-50%) scale(0.92); }
.yz-ai-tooltip[data-anchor="left-middle"].is-visible  { transform: translateY(-50%) scale(1); }
.yz-ai-tooltip[data-anchor="center-bottom"] { left: 50%;    right: auto; bottom: 100px; top: auto; transform: translateX(-50%) translateY(20px) scale(0.92); }
.yz-ai-tooltip[data-anchor="center-bottom"].is-visible { transform: translateX(-50%) translateY(0) scale(1); }

@media (prefers-reduced-motion: reduce) {
  .yz-ai-tooltip { transition: opacity 0.2s; }
}

/* ============ Mobile lock — bot sağ alt sabit; walking + blink + breathing aktif ============ */
@media (max-width: 768px) {
  .yz-ai-fab[data-position] {
    right: 16px !important;
    left: auto !important;
    bottom: 16px !important;
    top: auto !important;
  }
  .yz-ai-tooltip { display: none !important; }
}

@media (max-width: 480px) {
  .yz-ai-panel {
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .yz-ai-fab {
    width: 64px;
    height: 84px;
  }
  .yz-ai-fab::before { display: none; }
}

/* =============================================================================
   Search Results & Help Button (Phase 433)
   ============================================================================= */
.yz-ai-help {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 15px; line-height: 1;
  cursor: pointer;
  margin-right: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .18s, transform .18s;
}
.yz-ai-help:hover {
  background: rgba(255,255,255,.28);
  transform: scale(1.08);
}

.yz-ai-search-results {
  display: flex; flex-direction: column;
  gap: 8px;
  max-width: 100%;
  padding: 4px 0;
}

.yz-ai-search-card {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fff, #f8faf6);
  border: 1px solid rgba(45, 122, 62, 0.18);
  border-radius: 12px;
  text-decoration: none;
  color: #1f3a2a;
  transition: transform .15s, box-shadow .2s, border-color .2s;
  align-items: flex-start;
}
.yz-ai-search-card:hover {
  transform: translateY(-2px);
  border-color: #2d7a3e;
  box-shadow: 0 8px 24px -10px rgba(45, 122, 62, 0.35);
}
.yz-ai-search-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
  width: 28px;
  text-align: center;
}
.yz-ai-search-body { flex: 1; min-width: 0; }
.yz-ai-search-body strong {
  display: block;
  font-size: 14px;
  color: #2d7a3e;
  margin-bottom: 4px;
  font-weight: 700;
}
.yz-ai-search-desc {
  font-size: 12.5px;
  color: #555;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.yz-ai-search-price {
  font-size: 13px;
  font-weight: 700;
  color: #c79a3a;
  margin-top: 4px;
}
.yz-ai-search-group {
  font-size: 11px;
  color: #2d7a3e;
  opacity: .75;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
