/* Surprise Ville Voice & Text AI Chatbot Stylesheet - Luxury V2 */

/* Floating Launcher Button - Positioned neatly above WhatsApp FAB */
#svVoiceBotLauncher {
  position: fixed;
  bottom: 92px;
  right: 20px;
  z-index: 99990;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.25s ease;
}

#svVoiceBotLauncher:hover {
  transform: scale(1.05);
}

.sv-bot-fab {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff3c78 0%, #d81b60 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 8px 25px rgba(255, 60, 120, 0.45);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.sv-bot-fab:hover {
  box-shadow: 0 12px 30px rgba(255, 60, 120, 0.6);
}

.sv-bot-fab-pulse {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50%;
  border: 2px solid #ff3c78;
  animation: svFabPulse 2s infinite;
  pointer-events: none;
}

@keyframes svFabPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.sv-bot-fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #10b981;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.sv-bot-tooltip {
  background: #ffffff;
  color: #1f2937;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  border: 1px solid #fee2e2;
  white-space: nowrap;
  animation: fadeInRight 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Chatbot Main Window */
#svChatbotWindow {
  display: none;
  position: fixed;
  bottom: 95px;
  right: 25px;
  width: 395px;
  height: 590px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 16px 50px rgba(0,0,0,0.2);
  z-index: 99991;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  animation: svBotSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes svBotSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Chat Window Header */
.sv-chat-header {
  background: linear-gradient(135deg, #ff3c78 0%, #d81b60 100%);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 2px 10px rgba(216, 27, 96, 0.15);
}

.sv-chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sv-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  color: #ff3c78;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.sv-chat-title {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.sv-chat-sub {
  font-size: 0.72rem;
  opacity: 0.92;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.sv-chat-sub-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
}

.sv-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sv-hdr-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.2s ease;
}

.sv-hdr-btn:hover {
  background: rgba(255,255,255,0.35);
  transform: scale(1.05);
}

/* Hands-free active state */
#svHandsFreeBtn.active {
  background: #ff3c78;
  box-shadow: 0 0 10px rgba(255, 60, 120, 0.7);
  animation: svHFPulse 1.4s ease-in-out infinite;
}
@keyframes svHFPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(255, 60, 120, 0.6); }
  50%       { box-shadow: 0 0 14px rgba(255, 60, 120, 1); }
}

.sv-lang-pill {
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(255,255,255,0.25);
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.6px;
}

/* Chat Messages Body */
.sv-chat-body {
  flex: 1;
  padding: 14px 14px 10px;
  overflow-y: auto;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.sv-chat-body::-webkit-scrollbar {
  width: 5px;
}
.sv-chat-body::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 4px;
}

/* Message Wrappers (Handles both .sv-chat-bubble-wrap and .sv-msg) */
.sv-chat-bubble-wrap,
.sv-msg {
  display: flex;
  flex-direction: column;
  max-width: 90%;
  animation: svFadeInUp 0.2s ease-out;
}

@keyframes svFadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.sv-chat-bubble-wrap.user,
.sv-msg.sv-msg-user {
  align-self: flex-end;
}

.sv-chat-bubble-wrap.bot,
.sv-msg.sv-msg-bot {
  align-self: flex-start;
  width: 100%;
}

/* Chat Bubbles (Handles both .sv-chat-bubble and .sv-msg-content) */
.sv-chat-bubble,
.sv-msg-content {
  padding: 11px 15px;
  font-size: 0.88rem;
  line-height: 1.5;
  border-radius: 16px;
  position: relative;
  word-break: break-word;
}

.sv-chat-bubble.user,
.sv-msg-user-content {
  background: linear-gradient(135deg, #ff3c78 0%, #e11d48 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 3px 10px rgba(255, 60, 120, 0.25);
  font-weight: 500;
}

.sv-chat-bubble.bot,
.sv-msg-bot-content {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}

.sv-chat-bubble.bot strong,
.sv-msg-bot-content strong {
  font-weight: 700 !important;
  color: #0f172a !important;
}

.sv-chat-bubble.bot em,
.sv-msg-bot-content em {
  font-style: italic !important;
  color: #334155 !important;
}

.sv-meta-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  margin-top: 4px !important;
  padding: 0 2px !important;
}

.sv-chat-time,
.sv-msg-time {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 3px;
  align-self: flex-start;
  font-weight: 500;
}

.sv-chat-bubble-wrap.user .sv-chat-time,
.sv-msg-user .sv-msg-time {
  align-self: flex-end;
}

/* Speaking Wave Animation */
.sv-speaking-wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
  vertical-align: middle;
}

.sv-wave-bar {
  width: 3px;
  height: 12px;
  background: #ff3c78;
  border-radius: 2px;
  animation: svWaveAnim 1s ease-in-out infinite alternate;
}
.sv-wave-bar:nth-child(2) { animation-delay: 0.2s; height: 16px; }
.sv-wave-bar:nth-child(3) { animation-delay: 0.4s; height: 10px; }

@keyframes svWaveAnim {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1); }
}

/* Quick Action Chips Container (Handles both .sv-chips-container and .sv-chips) */
.sv-chips-container,
.sv-chips {
  display: flex !important;
  gap: 8px !important;
  overflow-x: auto !important;
  padding: 6px 2px 4px !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
}

.sv-chips-container::-webkit-scrollbar,
.sv-chips::-webkit-scrollbar {
  display: none !important;
}

.sv-chip-btn,
.sv-chip {
  background: #ffffff !important;
  border: 1.5px solid #fed7d7 !important;
  color: #e11d48 !important;
  padding: 6px 14px !important;
  border-radius: 20px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03) !important;
  outline: none !important;
}

.sv-chip-btn:hover,
.sv-chip:hover {
  background: #ff3c78 !important;
  color: #ffffff !important;
  border-color: #ff3c78 !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 4px 12px rgba(255, 60, 120, 0.3) !important;
}

/* Product Cards Carousel (Handles both .sv-cards-row and .sv-cards-grid) */
.sv-cards-row,
.sv-cards-grid {
  display: flex !important;
  gap: 12px !important;
  overflow-x: auto !important;
  padding: 8px 3px 12px !important;
  margin: 6px 0 2px !important;
  scroll-snap-type: x mandatory !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  scrollbar-color: #fbcfe8 transparent !important;
}

.sv-cards-row::-webkit-scrollbar,
.sv-cards-grid::-webkit-scrollbar {
  height: 5px !important;
}
.sv-cards-row::-webkit-scrollbar-thumb,
.sv-cards-grid::-webkit-scrollbar-thumb {
  background: #fbcfe8 !important;
  border-radius: 4px !important;
}

.sv-product-card,
.sv-card {
  min-width: 175px !important;
  max-width: 185px !important;
  width: 180px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  scroll-snap-align: start !important;
  text-decoration: none !important;
  color: inherit !important;
  cursor: pointer !important;
}

.sv-product-card:hover,
.sv-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 22px rgba(255, 60, 120, 0.18) !important;
  border-color: #ff3c78 !important;
}

.sv-card-img {
  width: 100% !important;
  height: 110px !important;
  object-fit: cover !important;
  display: block !important;
  background: #fdf2f4 !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.sv-card-body,
.sv-card-info {
  padding: 10px 11px !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

.sv-card-title {
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  line-height: 1.3 !important;
  margin-bottom: 6px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  min-height: 2.2em !important;
}

.sv-card-pricing,
div.sv-card-price {
  display: flex !important;
  align-items: baseline !important;
  gap: 6px !important;
  margin-bottom: 8px !important;
}

span.sv-card-price,
span.sv-price-current {
  font-size: 0.96rem !important;
  font-weight: 800 !important;
  color: #ff3c78 !important;
  display: inline !important;
}

.sv-card-was,
.sv-price-strike {
  font-size: 0.74rem !important;
  color: #94a3b8 !important;
  text-decoration: line-through !important;
  font-weight: 500 !important;
}

.sv-card-book-btn {
  background: linear-gradient(135deg, #ff3c78 0%, #e11d48 100%) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  padding: 7px 10px !important;
  border-radius: 8px !important;
  text-align: center !important;
  transition: all 0.2s ease !important;
  display: block !important;
  box-shadow: 0 2px 6px rgba(255, 60, 120, 0.25) !important;
}

.sv-card-book-btn:hover {
  background: #d81b60 !important;
  transform: scale(1.02) !important;
  box-shadow: 0 4px 10px rgba(255, 60, 120, 0.4) !important;
}

/* Feedback Buttons */
.sv-feedback-wrap,
.sv-msg-feedback {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 4px !important;
}

.sv-fb-btn,
.sv-msg-feedback button {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 3px 9px !important;
  font-size: 0.76rem !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03) !important;
  outline: none !important;
}

.sv-fb-btn:hover,
.sv-msg-feedback button:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  transform: scale(1.1) !important;
}

/* Listening Voice Banner */
.sv-listening-banner {
  display: none;
  background: #fdf2f8;
  color: #be185d;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #fce7f3;
  animation: svFadeInUp 0.2s ease;
}

.sv-mic-pulse-dot {
  width: 10px;
  height: 10px;
  background: #ff3c78;
  border-radius: 50%;
  animation: svMicPulse 1s infinite;
}

@keyframes svMicPulse {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
  100% { transform: scale(0.9); opacity: 1; }
}

/* Chat Input Bar */
.sv-chat-footer {
  padding: 11px 14px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.02);
}

.sv-chat-input {
  flex: 1;
  padding: 11px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 24px;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
  background: #f8fafc;
  color: #1e293b;
}

.sv-chat-input:focus {
  background: #ffffff;
  border-color: #ff3c78;
  box-shadow: 0 0 0 3px rgba(255, 60, 120, 0.12);
}

/* Mic Push-to-Talk Button */
.sv-mic-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sv-mic-btn:hover {
  background: #fee2e2;
  color: #e11d48;
  transform: scale(1.05);
}

.sv-mic-btn.active {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
  animation: svMicActivePulse 1.2s infinite;
}

@keyframes svMicActivePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.sv-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff3c78 0%, #e11d48 100%);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255, 60, 120, 0.3);
}

.sv-send-btn:hover {
  background: #d81b60;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 60, 120, 0.45);
}

/* Responsive Mobile Window */
@media (max-width: 768px) {
  #svVoiceBotLauncher {
    bottom: 165px;
    right: 18px;
  }
  .sv-bot-fab {
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
  }
  .sv-bot-tooltip {
    display: none;
  }
  #svChatbotWindow {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 84vh;
    border-radius: 22px 22px 0 0;
    border: none;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.25);
  }
}
