/* === Floating Action Button (ikonlu) === */
.ba-chat-fab{
  position:fixed; right:20px; bottom:20px; z-index:9999;
  width:56px; height:56px; border-radius:9999px; border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  background:#111827; color:#fff; box-shadow:0 8px 24px rgba(0,0,0,.2)
}
.ba-chat-fab svg{ width:22px; height:22px }

/* === Panel: sabit yükseklik (değişmez) === */
.ba-chat-panel{
  position:fixed; right:20px; bottom:90px; z-index:9999;
  width:440px;
  height:72vh;              /* sabit yükseklik */
  max-height:72vh;          /* garanti */
  display:none; flex-direction:column;
  background:#fff; border-radius:16px; overflow:hidden;
  box-shadow:0 16px 48px rgba(0,0,0,.22)
}

/* === Header === */
.ba-chat-header{
  padding:14px 16px; background:#F3F4F6; color:#101827;
  display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid #E1E7EF;
}
.ba-chat-title{ display:flex; align-items:center; gap:10px }
.ba-chat-avatar{
  flex:0 0 auto; width:32px; height:32px; border-radius:50%;
  background:#111827; display:flex; align-items:center; justify-content:center; color:#fff;
}
.ba-chat-avatar svg{ width:18px; height:18px }
.ba-chat-title h3{
  margin:0; font-size:19px; font-weight:800; color:#101827; letter-spacing:.2px;
}
.ba-chat-close{ background:transparent; border:none; color:#4B5462; font-size:20px; cursor:pointer }

/* === Body: sabit panel içinde esnek, sadece burası scroll olur === */
.ba-chat-body{
  display:flex; flex-direction:column; gap:12px;
  padding:8px 12px 6px 12px;      /* ↑ intro için üst boşluk eklendi */
  background:#F9FAFB;
  overflow-y:auto;                /* içerik burada scroll */
  flex:1 1 auto;                  /* header+footer sabit, body esner */
  min-height:0;                   /* flex taşmasını engeller */
}

/* Intro bubble: mavi ve üstten boşluklu */
.ba-chat-intro{
  background:#E8F0FF; color:#0b3b8f; border:none; border-radius:14px;
  padding:14px 16px; font-size:14px; line-height:1.5;
  margin-top:2px;                 /* tavandan hafif boşluk */
}

/* Quick questions */
.ba-quick{
  display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:6px;
}
.ba-quick button{
  background:#fff; border:1px solid #E5E7EB; border-radius:12px;
  padding:12px 14px; font-size:13px; cursor:pointer; text-align:left; line-height:1.35;
}
.ba-quick button:hover{ border-color:#cfd5df }

/* Messages */
.ba-chat-row{ display:flex; margin:6px 0 }
.ba-chat-row.user{ justify-content:flex-end }
.ba-chat-bubble{
  max-width:78%; padding:12px 14px; border-radius:14px;
  line-height:1.45; font-size:14px; white-space:pre-wrap; word-wrap:break-word;
}
.ba-chat-row.user .ba-chat-bubble{
  background:#111827; color:#fff; border-bottom-right-radius:6px;
}
.ba-chat-row.bot .ba-chat-bubble{
  background:#fff; border-bottom-left-radius:6px;
}

/* HTML içerik balonu: normal akış */
.ba-chat-bubble.html{ white-space:normal }

/* Link stilleri */
.ba-chat-bubble a{ color:#0b3b8f; text-decoration:underline }

/* Typing */
.ba-chat-typing{ font-size:12px; color:#6b7280; margin:2px 0 8px }

/* === Footer / input alanı: sabit yükseklikli panel içinde alt bar === */
.ba-chat-input{
  display:flex; gap:10px; padding:12px; background:#F9FAFB;
  border-top:1px solid #E1E7EF;
  flex-shrink:0;                  /* sabit panelde sıkışmayı engeller */
}
.ba-chat-input .ba-input-wrap{
  flex:1; display:flex; align-items:center; height:46px; padding:0 14px;
  background:#FFFFFF !important; border:1px solid #E5E7EB !important;
  border-radius:14px !important; box-shadow:none !important;
}
.ba-chat-input .ba-input-wrap input{
  width:100%; background:transparent !important; border:none !important;
  outline:0 !important; box-shadow:none !important; color:#374151 !important; font-size:14px !important;
}
.ba-chat-input .ba-input-wrap input::placeholder{ color:#9AA4B2 !important }

/* Gönder butonu */
.ba-chat-input button{
  display:inline-flex; align-items:center; gap:8px; min-width:110px;
  padding:0 16px; border:none; border-radius:14px; background:#111827; color:#fff; cursor:pointer; font-weight:600;
}
.ba-chat-input button svg{ width:18px; height:18px }

/* Error bubble */
.ba-chat-bubble.error{ background:#ffeaea; border:1px solid #ffc7c7; color:#b80000 }

/* === Responsive (mobil): genişlik ve yükseklik ayarı === */
@media (max-width: 520px){
  .ba-chat-panel{
    right:10px; left:10px; bottom:80px; width:auto;
    height:85vh; max-height:85vh;      /* mobilde biraz daha yüksek */
    border-radius:14px;
  }
  .ba-chat-fab{ right:16px; bottom:16px }
}