/* ═══ KeeBot v3 — Unified Chat Widget Styles ═══ */
/* Floating dock, banner, chat panel, contact modal, countdown */

.kb-dock {
  position:fixed; bottom:16px; right:16px; z-index:995;
  display:flex; flex-direction:column; align-items:flex-end; gap:10px;
  max-width:calc(100vw - 32px);
  transition:all 0.35s cubic-bezier(0.16,1,0.3,1);
  font-family:'Outfit',-apple-system,sans-serif;
}
.kb-dock * { box-sizing:border-box; }

/* ── Banner ───────────────────────────────────── */
.kb-banner {
  display:flex; align-items:center; gap:12px; padding:12px 18px;
  background:rgba(22,22,28,0.94); backdrop-filter:blur(24px);
  border:1px solid rgba(255,255,255,0.12); border-radius:20px;
  box-shadow:0 8px 32px rgba(0,0,0,0.3),0 0 0 1px rgba(159,68,211,0.15);
  transition:all 0.6s cubic-bezier(0.16,1,0.3,1);
  opacity:0; transform:translateY(20px); pointer-events:none;
}
.kb-banner.visible { opacity:1; transform:translateY(0); pointer-events:auto; }
.kb-banner.hidden { opacity:0; transform:translateY(20px); pointer-events:none; margin-bottom:-60px; }

.kb-banner-text {
  font-size:14px; font-weight:500; color:#e8e8f0; letter-spacing:-0.01em;
  white-space:nowrap;
}
.kb-banner-btn {
  background:linear-gradient(135deg,#9F44D3,#FF2442); color:#fff; border:none;
  padding:9px 20px; border-radius:999px; font-size:13px; font-weight:600;
  cursor:pointer; white-space:nowrap; transition:all 0.2s;
  position:relative; overflow:hidden;
}
.kb-banner-btn::after {
  content:''; position:absolute; top:-50%; left:-50%; width:200%; height:200%;
  background:linear-gradient(45deg,transparent 40%,rgba(255,255,255,0.15) 50%,transparent 60%);
  animation:kbShimmer 2.5s ease-in-out infinite;
}
@keyframes kbShimmer { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }
.kb-banner-btn:hover { transform:translateY(-1px); box-shadow:0 6px 24px rgba(159,68,211,0.5); }

.kb-banner-close {
  background:rgba(255,255,255,0.06); border:none; color:#888;
  width:26px; height:26px; border-radius:50%; cursor:pointer;
  font-size:15px; display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}

@media(max-width:600px) {
  .kb-banner { flex-wrap:wrap; justify-content:center; gap:8px; }
  .kb-banner-text { font-size:12px; text-align:center; }
  .kb-dock { bottom:12px; right:8px; }
}

/* ── Trigger button ───────────────────────────── */
.kb-trigger {
  position:relative; display:flex; align-items:center; gap:10px;
  padding:11px 20px; background:linear-gradient(135deg,#9F44D3,#FF2442);
  border:none; border-radius:999px; cursor:pointer;
  box-shadow:0 4px 24px rgba(159,68,211,0.4);
  transition:all 0.3s cubic-bezier(0.16,1,0.3,1);
}
.kb-trigger:hover { transform:scale(1.03); box-shadow:0 6px 30px rgba(159,68,211,0.55); }
.kb-trigger.active {
  background:rgba(22,22,28,0.94); box-shadow:0 4px 20px rgba(0,0,0,0.3);
  border:1px solid rgba(255,255,255,0.12);
}

.kb-trigger-glow {
  position:absolute; inset:-4px; border-radius:999px;
  background:linear-gradient(135deg,rgba(159,68,211,0.35),rgba(255,36,66,0.25));
  filter:blur(12px); z-index:-1; opacity:0.6;
  animation:kbGlowPulse 2.5s ease-in-out infinite;
}
@keyframes kbGlowPulse { 0%,100%{opacity:0.4;transform:scale(1)} 50%{opacity:0.8;transform:scale(1.06)} }

.kb-trigger-icon { font-size:18px; position:relative; z-index:1; }
.kb-trigger-label { font-size:13px; font-weight:600; color:#fff; position:relative; z-index:1; }
.kb-trigger.active .kb-trigger-label { color:#e8e8f0; }

/* Temp countdown */
.kb-countdown {
  font-size:11px; font-weight:700; color:#FFD54F; position:relative; z-index:1;
  background:rgba(0,0,0,0.3); padding:2px 8px; border-radius:8px;
  margin-left:4px; animation:kbPulse 1.5s ease-in-out infinite;
}
@keyframes kbPulse { 0%,100%{opacity:1} 50%{opacity:0.6} }
.kb-trigger.kb-temp { border:2px solid #FFD54F; }

/* ── Chat panel ────────────────────────────────── */
.kb-panel {
  width:380px; max-width:calc(100vw - 32px); height:520px;
  max-height:calc(100vh - 200px); background:#0d0d10;
  border:1px solid rgba(255,255,255,0.12); border-radius:24px;
  overflow:hidden; display:flex; flex-direction:column;
  box-shadow:0 24px 64px rgba(0,0,0,0.6),0 0 0 1px rgba(159,68,211,0.15);
  animation:kbPanelSlide 0.35s cubic-bezier(0.16,1,0.3,1);
  margin-top:10px;
}
@keyframes kbPanelSlide {
  from{opacity:0;transform:translateY(16px) scale(0.95)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@media(max-width:600px) {
  .kb-panel { width:calc(100vw - 16px); height:460px; max-height:calc(100vh - 220px); }
}

.kb-panel-header {
  background:linear-gradient(180deg,#1a1a20,#14141a); padding:16px 18px;
  display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid rgba(255,255,255,0.06);
}
.kb-panel-brand { display:flex; align-items:center; gap:12px; }
.kb-panel-avatar {
  width:38px; height:38px; border-radius:12px;
  background:linear-gradient(135deg,rgba(159,68,211,0.2),rgba(255,36,66,0.15));
  display:flex; align-items:center; justify-content:center; font-size:20px;
}
.kb-panel-brand strong { font-size:14px; color:#e8e8f0; display:block; }
.kb-panel-brand span { font-size:11px; color:#888; }
.kb-panel-close {
  background:rgba(255,255,255,0.05); border:none; color:#888;
  width:30px; height:30px; border-radius:50%; cursor:pointer;
  font-size:16px; display:flex; align-items:center; justify-content:center;
}
.kb-panel-close:hover { background:rgba(159,68,211,0.2); color:#b77ae0; }

/* Messages */
.kb-messages {
  flex:1; overflow-y:auto; padding:16px; display:flex;
  flex-direction:column; gap:12px; background:#0a0a0f;
}
.kb-msg { display:flex; gap:8px; align-items:flex-start; }
.kb-msg-user { flex-direction:row-reverse; }
.kb-msg-avatar {
  width:28px; height:28px; border-radius:8px; display:flex;
  align-items:center; justify-content:center; font-size:14px; flex-shrink:0;
  background:linear-gradient(135deg,rgba(159,68,211,0.15),rgba(255,36,66,0.1));
}
.kb-msg-content {
  max-width:80%; padding:10px 14px; border-radius:14px;
  font-size:13px; line-height:1.55;
}
.kb-msg-bot .kb-msg-content {
  background:#1a1a20; color:#e8e8f0; border:1px solid rgba(255,255,255,0.06);
}
.kb-msg-user .kb-msg-content {
  background:linear-gradient(135deg,#9F44D3,#FF2442); color:#fff;
}
.kb-typing .kb-msg-content { background:#1a1a20; color:#888; }

/* Input */
.kb-input-wrap {
  display:flex; gap:8px; padding:14px 16px;
  border-top:1px solid rgba(255,255,255,0.06); background:#0d0d10;
}
.kb-input {
  flex:1; background:#1a1a20; border:1px solid rgba(255,255,255,0.08);
  border-radius:14px; padding:11px 16px; font-size:13px;
  color:#e8e8f0; outline:none; font-family:inherit;
}
.kb-input:focus { border-color:rgba(159,68,211,0.5); box-shadow:0 0 0 3px rgba(159,68,211,0.08); }
.kb-input::placeholder { color:#555; }
.kb-send {
  background:linear-gradient(135deg,#9F44D3,#FF2442); border:none; color:#fff;
  width:40px; height:40px; border-radius:14px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.kb-send:hover { transform:scale(1.06); box-shadow:0 4px 16px rgba(159,68,211,0.4); }

/* ── Contact Modal ─────────────────────────────── */
.kb-contact-overlay {
  position:fixed; inset:0; z-index:1000;
  background:rgba(0,0,0,0.55); backdrop-filter:blur(6px);
  display:none; align-items:center; justify-content:center;
}
.kb-contact-overlay.open { display:flex; animation:kbFadeIn 0.2s ease; }
@keyframes kbFadeIn { from{opacity:0} to{opacity:1} }

.kb-contact-modal {
  background:#fff; border:2px solid #e0e0e0; border-radius:24px;
  padding:32px; max-width:400px; width:calc(100vw - 40px); position:relative;
  animation:kbModalSlide 0.3s cubic-bezier(0.16,1,0.3,1);
  box-shadow:0 24px 64px rgba(0,0,0,0.15);
}
@keyframes kbModalSlide { from{opacity:0;transform:translateY(20px) scale(0.95)} to{opacity:1;transform:translateY(0) scale(1)} }
.kb-contact-modal h3 { font-size:22px; font-weight:700; margin-bottom:6px; letter-spacing:-0.02em; color:#212121; }
.kb-contact-sub { font-size:13px; color:#757575; margin-bottom:24px; }
.kb-contact-close {
  position:absolute; top:14px; right:18px; background:#f5f5f5; border:none; color:#757575;
  width:32px; height:32px; border-radius:50%; cursor:pointer; font-size:18px;
  display:flex; align-items:center; justify-content:center; transition:all 0.15s;
}
.kb-contact-close:hover { background:#f3e8ff; color:#9F44D3; }
.kb-contact-options { display:flex; flex-direction:column; gap:12px; }
.kb-contact-card {
  display:flex; align-items:center; gap:14px; padding:16px; border-radius:16px;
  text-decoration:none; cursor:pointer; transition:all 0.2s;
}
.kb-contact-card:hover { transform:translateY(-2px); }
.kb-contact-wa { background:#e8f5e9; border:1px solid #a5d6a7; }
.kb-contact-wa:hover { box-shadow:0 4px 16px rgba(37,211,102,0.15); }
.kb-contact-wx { background:#e8f5e9; border:1px solid #a5d6a7; }
.kb-contact-wx:hover { box-shadow:0 4px 16px rgba(7,193,96,0.15); }
.kb-contact-icon { font-size:28px; }
.kb-contact-card div { flex:1; display:flex; flex-direction:column; gap:2px; }
.kb-contact-card strong { font-size:15px; color:#212121; }
.kb-contact-card span:not(.kb-contact-copy) { font-size:12px; color:#757575; }
.kb-contact-copy {
  background:#f5f5f5; padding:6px 12px; border-radius:8px;
  font-size:11px; font-weight:600; color:#757575; cursor:pointer; transition:all 0.15s;
}
.kb-contact-copy:hover { background:#e0e0e0; color:#424242; }
.kb-contact-copy.copied { background:rgba(37,211,102,0.15); color:#2e7d32; }
.kb-contact-footer { font-size:12px; color:#9e9e9e; text-align:center; margin-top:20px; }

/* Reset old KeeBot styles that might conflict */
#kee-bot { all:unset; }
#kee-bot .kb-fab, #kee-bot .kb-panel, #kee-bot .kb-header,
#kee-bot .kb-messages, #kee-bot .kb-input-wrap, #kee-bot .kb-bug-modal,
#kee-bot .kb-toast { display:none !important; }
.kb-cursor { animation: kbBlink 1s step-end infinite; color: #b77ae0; font-weight: 700; }
@keyframes kbBlink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
