
/* ══════════════════════════════════════════════════
   SŨPHIE CHATBOT — Supen Spa Widget Styles
   Scoped with !important to override main site CSS
   ══════════════════════════════════════════════════ */

/* DESIGN TOKENS */
:root {
  --brand-dark-royal:     #160514;
  --brand-midnight:       #2A0A1F;
  --brand-royal-purple:   #3D0D2B;
  --brand-deep-indigo:    #5C1040;
  --brand-maroon:         #8B0035;
  --brand-magenta:        #C2185B;
  --brand-gold:           #FFD700;
  --brand-gold-light:     #FFDF40;
  --brand-lavender:       #D4A0C0;
  --brand-text-body:      #E8C8D8;
  --brand-text-light:     #B88FA0;
  --brand-shadow-lg:      0 24px 60px rgba(0,0,0,0.70);
  --brand-glow-gold:      0 0 20px rgba(255,215,0,0.45), 0 0 40px rgba(255,215,0,0.20);
  --brand-glow-magenta:   0 0 20px rgba(194,24,91,0.50);
  --bot-font-heading:     'Outfit', sans-serif;
  --bot-font-body:        'Poppins', sans-serif;
  --bot-radius-lg:        24px;
  --bot-radius-md:        16px;
  --bot-radius-sm:        12px;
}

/* RESET — Override main site's global user-select:none and pointer-events:none inside chatbot */
#chatbot-container,
#chatbot-container *,
#chatbot-container *::before,
#chatbot-container *::after {
  box-sizing: border-box !important;
  font-family: var(--bot-font-body) !important;
  -webkit-user-select: auto !important;
  -moz-user-select: auto !important;
  user-select: auto !important;
  -webkit-user-drag: auto !important;
  pointer-events: auto !important;
}
#chatbot-container img {
  pointer-events: auto !important;
  -webkit-user-drag: none !important;
}

/* ── TRIGGER BUTTON (bottom-right) ── */
#bot-trigger {
  position: fixed !important;
  bottom: 25px !important;
  right: 25px !important;
  left: auto !important;
  background: var(--brand-gold) !important;
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  border: none !important;
  border-radius: 50px !important;
  padding: 14px 24px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  box-shadow: var(--brand-shadow-lg), var(--brand-glow-gold) !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  z-index: 10000 !important;
  font-family: var(--bot-font-heading) !important;
  text-decoration: none !important;
  opacity: 1 !important;
  transform: none !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  margin: 0 !important;
}
#bot-trigger:hover {
  transform: scale(1.05) translateY(-3px) !important;
  background: var(--brand-gold-light) !important;
}
#bot-trigger svg {
  width: 24px !important;
  height: 24px !important;
  flex-shrink: 0 !important;
}
.trigger-dot {
  width: 10px !important;
  height: 10px !important;
  background-color: #22c55e !important;
  border-radius: 50% !important;
  animation: botPulse 2s infinite !important;
  flex-shrink: 0 !important;
}
@keyframes botPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ── CHAT WINDOW (bottom-right) ── */
#bot-window {
  position: fixed !important;
  bottom: 25px !important;
  right: 25px !important;
  left: auto !important;
  width: 380px !important;
  height: 600px !important;
  max-width: calc(100vw - 40px) !important;
  max-height: calc(100vh - 40px) !important;
  background: rgba(42, 10, 31, 0.92) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(139,0,53,0.45) !important;
  border-radius: var(--bot-radius-lg) !important;
  box-shadow: var(--brand-shadow-lg) !important;
  display: none;
  flex-direction: column !important;
  z-index: 10001 !important;
  overflow: hidden !important;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}
#bot-window.bot-window-open {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

/* ── HEADER ── */
.bot-header {
  padding: 16px 20px !important;
  background: linear-gradient(135deg, rgba(22,5,20,0.97) 0%, rgba(42,10,31,0.96) 50%, rgba(61,13,43,0.97) 100%) !important;
  border-bottom: 1px solid rgba(139,0,53,0.45) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin: 0 !important;
  min-height: 0 !important;
}
.bot-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}
.bot-avatar-ring {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  border-radius: 50% !important;
  padding: 2px !important;
  background: linear-gradient(135deg, var(--brand-gold), var(--brand-magenta)) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.bot-avatar {
  border-radius: 50% !important;
  overflow: hidden !important;
  background: var(--brand-dark-royal) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.bot-avatar.lg { width: 40px !important; height: 40px !important; }
.bot-avatar.sm { width: 32px !important; height: 32px !important; flex-shrink: 0 !important; margin-top: 5px !important; }
.bot-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 50% !important;
}
.bot-avatar-letter {
  color: var(--brand-gold) !important;
  -webkit-text-fill-color: var(--brand-gold) !important;
  font-family: var(--bot-font-heading) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}
.bot-info {
  display: flex !important;
  flex-direction: column !important;
}
h2.bot-name,
.bot-name {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-family: var(--bot-font-heading) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
  line-height: 1.3 !important;
}
.bot-status {
  color: var(--brand-text-light) !important;
  -webkit-text-fill-color: var(--brand-text-light) !important;
  font-size: 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}
.status-dot {
  width: 6px !important;
  height: 6px !important;
  background-color: #22c55e !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
}
.bot-close {
  background: transparent !important;
  border: none !important;
  color: var(--brand-text-light) !important;
  cursor: pointer !important;
  padding: 5px !important;
  transition: color 0.2s !important;
}
.bot-close:hover {
  color: #fff !important;
}

/* ── MESSAGES AREA ── */
#bot-messages,
.bot-messages {
  flex: 1 !important;
  padding: 20px !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  background: transparent !important;
  min-height: 0 !important;
}
.bot-messages::-webkit-scrollbar { width: 6px !important; }
.bot-messages::-webkit-scrollbar-track { background: transparent !important; }
.bot-messages::-webkit-scrollbar-thumb {
  background: rgba(139,0,53,0.5) !important;
  border-radius: 10px !important;
}

.msg-wrap {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  animation: botFadeUp 0.3s ease forwards !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: none !important;
}
@keyframes botFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg-user {
  flex-direction: row-reverse !important;
}
.msg-bubble {
  max-width: 80% !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
.bot-bubble {
  background: rgba(61,13,43,0.8) !important;
  border: 1px solid rgba(139,0,53,0.3) !important;
  border-radius: 0 var(--bot-radius-md) var(--bot-radius-md) var(--bot-radius-md) !important;
  color: var(--brand-text-body) !important;
  -webkit-text-fill-color: var(--brand-text-body) !important;
}
.user-bubble {
  background: linear-gradient(135deg, var(--brand-maroon) 0%, var(--brand-magenta) 100%) !important;
  border-radius: var(--bot-radius-md) 0 var(--bot-radius-md) var(--bot-radius-md) !important;
  box-shadow: var(--brand-glow-magenta) !important;
  border: none !important;
}

/* ── QUICK REPLY CHIPS ── */
#bot-chips,
.bot-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: 10px !important;
  margin-left: 42px !important;
  padding: 0 !important;
}
.bot-chip {
  background: transparent !important;
  border: 1px solid var(--brand-gold) !important;
  color: var(--brand-gold) !important;
  -webkit-text-fill-color: var(--brand-gold) !important;
  padding: 6px 12px !important;
  border-radius: 50px !important;
  font-size: 12px !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  font-family: var(--bot-font-body) !important;
}
.bot-chip:hover {
  background: var(--brand-gold) !important;
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  box-shadow: var(--brand-glow-gold) !important;
}

/* ── TYPING INDICATOR ── */
.typing-bubble {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 16px !important;
}
.typing-dot {
  width: 6px !important;
  height: 6px !important;
  background: var(--brand-lavender) !important;
  border-radius: 50% !important;
  animation: botTypingBounce 1.4s infinite ease-in-out both !important;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s !important; }
.typing-dot:nth-child(2) { animation-delay: -0.16s !important; }
@keyframes botTypingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* ── INPUT AREA ── */
.bot-input-area {
  padding: 15px 20px !important;
  background: rgba(22,5,20,0.97) !important;
  border-top: 1px solid rgba(139,0,53,0.45) !important;
  margin: 0 !important;
  min-height: 0 !important;
}
.input-wrapper {
  display: flex !important;
  align-items: flex-end !important;
  gap: 10px !important;
  background: rgba(61,13,43,0.6) !important;
  border: 1px solid rgba(139,0,53,0.6) !important;
  border-radius: var(--bot-radius-md) !important;
  padding: 8px 12px !important;
  transition: border-color 0.2s !important;
}
.input-wrapper:focus-within {
  border-color: var(--brand-gold) !important;
}
#bot-input {
  flex: 1 !important;
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 14px !important;
  min-height: 24px !important;
  max-height: 110px !important;
  resize: none !important;
  font-family: var(--bot-font-body) !important;
  padding: 2px 0 !important;
  outline: none !important;
  width: auto !important;
}
#bot-input::placeholder {
  color: var(--brand-text-light) !important;
  -webkit-text-fill-color: var(--brand-text-light) !important;
}
#bot-trigger-btn {
  background: transparent !important;
  border: none !important;
  color: var(--brand-gold) !important;
  cursor: pointer !important;
  padding: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s !important;
  width: auto !important;
  height: auto !important;
}
#bot-trigger-btn:hover {
  transform: scale(1.1) !important;
}

/* ── FOOTER ── */
.bot-footer {
  text-align: center !important;
  padding: 8px !important;
  font-size: 11px !important;
  color: rgba(255,255,255,0.4) !important;
  -webkit-text-fill-color: rgba(255,255,255,0.4) !important;
  background: rgba(22,5,20,0.97) !important;
  margin: 0 !important;
  min-height: 0 !important;
  border: none !important;
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  #bot-window {
    width: calc(100vw - 30px) !important;
    right: 15px !important;
    left: auto !important;
    bottom: 80px !important;
  }
  #bot-trigger {
    right: 15px !important;
    left: auto !important;
    bottom: 20px !important;
  }
}


