/* ------------------------------------------------------------------
   WBL CHAT – Modern Chat Arayüzü Stilleri (Sabit Yükseklikli)
------------------------------------------------------------------ */

/* 1. Genel Konteynerler */
#wbl-chat-box {
  display: none;
  flex-direction: column;
  width: 300px;
  height: 400px;           /* <-- Sabit yükseklik */
  background: var(--wbl-bg-color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
  font-family: sans-serif;
  position: fixed;
}

#wbl-chat-box.open {
  display: flex !important;
}

/* 2. Header / Branding */
#wbl-chat-header {
  flex: 0 0 auto;         /* sabit */
  background: var(--wbl-btn-bg);
  color: #fff;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Header’ın iç elemanları… */
.wbl-header-left      { display: flex; align-items: center; }
.wbl-header-avatar    { width:32px; height:32px; border-radius:50%; object-fit:cover; margin-right:8px; }
.wbl-header-titles    { display:flex; flex-direction:column; }
.wbl-header-title     { font-size:14px; font-weight:bold; line-height:1; }
.wbl-header-subtitle  { font-size:11px; opacity:0.8; line-height:1; }
.wbl-header-brand     { font-size:10px; opacity:0.7; font-style:italic; }
#wbl-chat-close,
.wbl-header-close     { cursor:pointer; font-size:18px; line-height:1; padding:0 4px; }

/* 3. Quick Questions */
#wbl-chat-quick-questions {
  flex: 0 0 auto;        /* sabit */
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 8px;
}
.wbl-quick-btn {
  background: var(--wbl-btn-bg);
  color: var(--wbl-btn-text);
  border: none;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: opacity .2s;
}
.wbl-quick-btn:hover { opacity:.8; }

/* 4. Body / Mesaj Listesi */
#wbl-chat-body {
  flex: 1 1 auto;        /* kalan yüksekliği kapla */
  padding: 12px;
  background: #f9f9f9;
  overflow-y: auto;       /* içerdeki mesajları scroll’la */
}

/* 5. Mesaj Baloncukları */
.wbl-user,
.wbl-bot {
  max-width: 80%;
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 16px;
  line-height: 1.4;
  word-wrap: break-word;
}
.wbl-user {
  background: #dcf8c6;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.wbl-bot {
  background: #fff;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
/* link’leri vurgula */
.wbl-bot a {
  color: var(--wbl-btn-bg);
  text-decoration: underline;
}

/* 6. Yazıyor Göstergesi */
#wbl-chat-typing {
  flex: 0 0 auto;        /* sabit */
  padding: 0 12px 8px;
  font-size: 12px;
  color: #888;
  font-style: italic;
}

/* 7. Input & Gönder Butonu */
/* wrapper yoksa direkt flex konteyner içinde absolute hizalama */
#wbl-chat-box {
  position: relative;     /* input/send absolute için */
}

#wbl-chat-input {
  position: absolute;
  bottom: 0;
  left: 0;
  box-sizing: border-box;
  width: calc(100% - 60px); /* buton genişliği kadar boşluk bırak */
  margin: 0;
  padding: 8px 12px;
  background: var(--wbl-input-bg);
  color: var(--wbl-text-color);
  border-top: 1px solid #eee;
  border-bottom-left-radius: 8px;
  outline: none;
}

#wbl-chat-send {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;             /* input ile orantılı */
  height: 40px;            /* satır yüksekliği + padding */
  background: var(--wbl-btn-bg);
  color: #fff;             /* ok ikonu beyaz */
  border-top: 1px solid #eee;
  border-left: 1px solid #eee;
  border-bottom-right-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .2s;
}
#wbl-chat-send:hover { opacity:.9; }

/* ok ikonu font veya svg ise beyaz kalması için */
#wbl-chat-send svg,
#wbl-chat-send::before {
  color: #fff !important;
}

/* Body scroll ile overlap etmesin diye alt padding */
#wbl-chat-body {
  padding-bottom: 56px;   /* input(40px) + küçük boşluk */
}

/* 8. Launcher Buton */
#wbl-chat-launcher { cursor: pointer; }
.wbl-launcher-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* 9. Scrollbar (isteğe bağlı) */
#wbl-chat-body::-webkit-scrollbar       { width:6px; }
#wbl-chat-body::-webkit-scrollbar-thumb { background:rgba(0,0,0,0.1); border-radius:3px; }

/* 10. Responsive Küçültme */
@media (max-width:400px) {
  #wbl-chat-box {
    width:90%;
    left:5% !important;
  }
}
/* ─────────────────────────────────────────────────────────────────────────────
   11. Quick Questions: üstte boşluk + alt alta
──────────────────────────────────────────────────────────────────────────── */
#wbl-chat-quick-questions {
  margin-top: 12px;          /* üstten boşluk */
  flex-direction: column;    /* alt alta */
  gap: 6px 0;                /* düşey gap, yatay sıfır */
}
#wbl-chat-quick-questions .wbl-quick-btn {
  display: block;
}

/* ─────────────────────────────────────────────────────────────────────────────
   12. Header: alt başlığı gizle, markalama düzeni
──────────────────────────────────────────────────────────────────────────── */
/* AI Destekli Asistan metnini tamamen gizle */
.wbl-header-subtitle { display: none !important; }

/* Başlık satırı ortalanmış */
.wbl-header-title {
  text-align: center;
  width: 100%;
}

/* "Powered by Weblicas" biraz aşağıda kalsın */
.wbl-header-brand {
  display: block;
  text-align: center;
  margin-top: 2px;
}

/* Eğer "Powered by Weblicas" classesızsa (header-brand yoksa),
   header içinde italik küçük yazıyı hedefleyin: */
#wbl-chat-header em {
  display: block;
  text-align: center;
  font-style: italic;
  opacity: .7;
  margin-top: 2px;
}
/* ────────────────────────────────────────────────────────────────────
   0-bis. Launcher Etiketi (Bize yazabilirsiniz…)
──────────────────────────────────────────────────────────────────── */
#wbl-chat-label{
  background: var(--wbl-primary,#28a745);
  color: var(--wbl-secondary,#ffffff);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: var(--wbl-font-size);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  user-select:none;
}
.wbl-typing-dots {
  display: inline-block;
  font-size: 20px;
  font-weight: bold;
  color: var(--wbl-text-color, #000);
}

.wbl-typing-dots span {
  animation: blink 1.4s infinite both;
}

.wbl-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.wbl-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}
.wbl-typing-dots span:nth-child(1) {
  animation-delay: 0s;
}
.wbl-typing-dots span {
  opacity: 0; /* başlangıçta görünmesin */
  animation: blink 1.4s infinite both;
}
