#bkb-chatbot-root {
  --primary: #6366f1;
  --secondary: #06b6d4;
  --grad: linear-gradient(135deg, #6366f1, #06b6d4);
  --glass-bg: rgba(14, 14, 20, 0.72);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-blur: 40px;
  --text-primary: #ffffff;
  --text-muted: #888899;
}
#bkb-chatbot-root * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }

@keyframes bkb-pulse {
  0%   { transform: scale(1);    opacity: .6; }
  70%  { transform: scale(1.38); opacity: 0;  }
  100% { transform: scale(1.38); opacity: 0;  }
}
@keyframes bkb-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}
@keyframes bkb-bounce {
  0%,80%,100% { transform: translateY(0);    opacity:.35; }
  40%         { transform: translateY(-5px); opacity:1;  }
}

#bkb-chatbot-toggle {
  position: fixed; bottom: 28px; right: 28px;
  width: 64px; height: 64px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 99998;
  background: var(--grad);
  box-shadow: 0 8px 32px rgba(99,102,241,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: box-shadow .3s, transform .25s;
}
#bkb-chatbot-toggle::before {
  content:''; position:absolute; inset:-7px; border-radius:50%;
  border:1px solid rgba(99,102,241,0.4);
  animation: bkb-pulse 2.6s ease-out infinite;
}
#bkb-chatbot-toggle:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 40px rgba(99,102,241,0.55), inset 0 1px 0 rgba(255,255,255,0.3);
}
#bkb-chatbot-toggle svg { width:30px; height:30px; fill:#fff; stroke:none; }
#bkb-chatbot-toggle .bkb-close { display:none; stroke:#fff; stroke-width: 2.2; fill:none; width: 26px; height: 26px; }
#bkb-chatbot-toggle.open .bkb-icon { display:none; }
#bkb-chatbot-toggle.open .bkb-close { display:block; }
#bkb-chatbot-toggle.open::before { display:none; }

#bkb-chatbot-window {
  position: fixed; bottom: 106px; right: 28px; width: 380px;
  height: 580px; display: flex; flex-direction: column;
  z-index: 99997; border-radius: 24px; overflow: hidden;
  pointer-events: none; opacity: 0;
  transform: translateY(20px) scale(.96);
  transition: all 0.45s cubic-bezier(0.16,1,0.3,1);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(200%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(200%);
  border: 1px solid var(--glass-border); border-top-color: rgba(255,255,255,0.24);
  box-shadow: 0 32px 64px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,0.12);
}
#bkb-chatbot-window.open { opacity:1; pointer-events:all; transform:translateY(0) scale(1); }

#bkb-chatbot-header {
  padding: 16px 20px 12px; display:flex; flex-direction: column; align-items:center;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 15, 0.4); flex-shrink:0; position: relative;
  z-index: 10;
}
.bkb-logo-wrap {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; box-shadow: 0 4px 10px rgba(99,102,241,0.4);
  margin-bottom: 6px; position: relative; color: white; font-weight: 800; font-family: 'Outfit', sans-serif; letter-spacing: -1px;
}
.bkb-dot {
  width:10px; height:10px; background:#10b981; border-radius:50%;
  position: absolute; bottom: 0; right: -2px;
  border: 2px solid #0e0e14;
  box-shadow: 0 0 8px rgba(16,185,129,0.6);
}
.bkb-brand {
  font-weight: 600; font-size: 13px; color: #ffffff;
  letter-spacing: -0.01em; display: flex; align-items: center; gap: 4px;
}
.bkb-brand::after {
  content: '›'; font-size: 14px; color: rgba(255,255,255,0.3);
  font-weight: 300; transform: rotate(90deg) translateX(-1px); display: inline-block;
}
.bkb-status {
  font-size: 10px; color: var(--text-muted); font-weight: 400; margin-top: 2px;
}
#bkb-chatbot-close {
  position: absolute; top: 18px; right: 20px;
  background: none; border: none; color: #06b6d4;
  font-size: 14px; font-weight: 500; cursor: pointer;
  font-family: inherit; transition: opacity 0.2s;
}
#bkb-chatbot-close:hover { opacity: 0.75; }

#bkb-chatbot-disclaimer {
  padding:7px 16px;
  background:rgba(255,255,255,0.03); border-bottom:1px solid rgba(255,255,255,0.06);
  font-size:10px; font-weight:300;
  letter-spacing:.05em; color:var(--text-muted); text-align:center;
}
#bkb-chatbot-disclaimer strong { color:rgba(255,255,255,0.5); font-weight:400; }

#bkb-chatbot-messages {
  flex:1; overflow-y:auto; padding: 16px 16px 8px;
  display:flex; flex-direction:column;
  scroll-behavior:smooth; min-height:0;
  scrollbar-width: none;
}
#bkb-chatbot-messages::-webkit-scrollbar { display: none; }
#bkb-chatbot-messages::before { content:''; flex:1; }

.bkb-msg {
  max-width: 75%; padding: 10px 16px; font-size: 14.5px; line-height: 1.45;
  margin-bottom: 2px; word-wrap: break-word; overflow-wrap: break-word;
  white-space: pre-wrap; transition: all 0.2s;
  animation: bkb-fadein .28s ease;
}
.bkb-msg.bot {
  background: #1c1c24; color: #ffffff;
  align-self: flex-start;
  border-radius: 18px;
  border: 0.5px solid rgba(255,255,255,0.05);
}
.bkb-msg.bot b, .bkb-msg.bot strong { color: #06b6d4; font-weight: 600; }
.bkb-msg.bot a { color: #6366f1; text-decoration: none; border-bottom: 0.5px solid rgba(99,102,241,0.3); }

.bkb-msg.user {
  background: var(--primary); color: #ffffff;
  align-self: flex-end;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.bkb-time-separator {
  align-self: center; font-size: 10px; color: var(--text-muted); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em; margin: 18px 0 6px;
}

.bkb-typing-container {
  align-self: flex-start; margin-left: 0;
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 18px; max-width: 80%;
  border-radius: 18px 18px 18px 4px;
  background: #1c1c24;
  border: 0.5px solid rgba(255,255,255,0.05);
  animation: bkb-fadein 0.25s forwards;
}
.bkb-typing-dots { display: flex; gap: 3.5px; align-items: center; }
.bkb-typing-dots span {
  width: 5px; height: 5px; background: var(--text-muted); border-radius: 50%;
  animation: bkb-bounce 1.2s ease-in-out infinite;
}
.bkb-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.bkb-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

#bkb-chatbot-qr { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 16px 10px; align-self: flex-start; max-width: 95%; }
.bkb-qr-btn {
  padding: 7px 14px; border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 12px; font-weight: 500; color: #06b6d4;
  cursor: pointer; transition: all 0.2s;
  line-height: 1.3; font-family: inherit;
}
.bkb-qr-btn:hover {
  background: rgba(6,182,212,0.12);
  border-color: rgba(6,182,212,0.3);
  transform: translateY(-1px);
}
.bkb-qr-btn:active { transform: scale(0.97); }

/* ── ACTION SHEET ────────────────────────────────────────────────── */
#bkb-actions-sheet {
  position: absolute; bottom: 82px; left: 16px; right: 16px;
  background: rgba(20, 20, 25, 0.95);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px; padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  z-index: 1000;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
#bkb-actions-sheet.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.bkb-action-item {
  padding: 11px 16px; border-radius: 10px;
  color: #06b6d4; font-size: 13.5px; font-weight: 500;
  background: transparent; border: none; cursor: pointer;
  text-align: left; display: flex; align-items: center; gap: 10px;
  transition: background 0.2s; font-family: inherit;
}
.bkb-action-item:hover { background: rgba(255,255,255,0.06); }
.bkb-action-item span { font-size: 16px; }

/* ── INPUT AREA ───────────────────────────────────────────────── */
#bkb-input-row {
  padding: 10px 14px 14px; display:flex; align-items:center; gap:8px;
  background: rgba(14, 14, 20, 0.88);
  border-top: 0.5px solid rgba(255,255,255,0.08);
  flex-shrink:0; position: relative;
  z-index: 10;
}
#bkb-plus {
  background: rgba(255,255,255,0.08); border: none; color: var(--text-muted);
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 300; transition: all 0.2s; flex-shrink:0;
}
#bkb-plus:hover { background: rgba(255,255,255,0.15); color: #ffffff; }
#bkb-plus.active { transform: rotate(45deg); color: #ef4444; }

#bkb-input-capsule {
  flex: 1; display: flex; align-items: center;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px; background: rgba(0,0,0,0.3);
  padding: 2px 4px 2px 12px; transition: border-color 0.2s;
}
#bkb-input-capsule:focus-within { border-color: var(--primary); }
#bkb-input {
  flex:1; border: none; outline:none; background: transparent;
  color: #ffffff; padding: 6px 0; font-size: 14px;
  font-family: inherit; min-height: 20px; max-height: 72px;
  resize: none; line-height: 1.35;
}
#bkb-input::placeholder { color: rgba(255,255,255,0.3); }

#bkb-send {
  background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.4); 
  border: none; border-radius: 50%; width: 28px; height: 28px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s; flex-shrink:0; margin-left: 6px;
}
#bkb-send.active { background: var(--primary); color: #ffffff; }
#bkb-send svg { width: 14px; height: 14px; transform: rotate(-90deg); fill: currentColor; }

#bkb-chatbot-footer {
  padding: 10px 20px; text-align:center;
  font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  background: rgba(5,5,8,0.4); border-top: 0.5px solid rgba(255,255,255,0.06);
  font-weight: 700; flex-shrink:0;
}

@media (max-width:480px) {
  #bkb-chatbot-window { width:calc(100vw - 20px); right:10px; bottom:88px; height:75svh; border-radius:20px; }
  #bkb-chatbot-toggle { right:18px; bottom:18px; width:58px; height:58px; }
}
