/* Well Vox AI Chatbot Styles */
:root {
  --wv-primary: #22c55e;
  --wv-primary-dark: #16a34a;
  --wv-primary-light: #dcfce7;
  --wv-text: #111827;
  --wv-text-muted: #6b7280;
  --wv-bg: #ffffff;
  --wv-border: #e5e7eb;
  --wv-bubble-size: 60px;
  --wv-radius: 16px;
  --wv-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 4px 16px rgba(0,0,0,0.08);
}

/* Wrapper */
#wv-chat-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Chat Window ── */
#wv-chat-window {
  position: absolute;
  bottom: calc(var(--wv-bubble-size) + 16px);
  right: 0;
  width: 370px;
  max-height: 580px;
  background: black;
  border-radius: var(--wv-radius);
  box-shadow: var(--wv-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform-origin: bottom right;
}

#wv-chat-window.wv-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* ── Header ── */
#wv-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #1a1a18;
  color: white;
  flex-shrink: 0;
}

.wv-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wv-header-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #1a1a18;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  padding: 4px;
  box-sizing: border-box;
}

.wv-header-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wv-header-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wv-bot-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.wv-status {
  font-size: 11.5px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 5px;
}

.wv-status-dot {
  width: 7px;
  height: 7px;
  background: #a7f3d0;
  border-radius: 50%;
  display: inline-block;
  animation: wv-pulse 2s infinite;
}

@keyframes wv-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.wv-icon-btn {
  background: rgba(255,255,255,0.18);
  border: none;
  color: white;
  width: 48px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.wv-icon-btn svg { width: 16px; height: 16px; }
.wv-icon-btn:hover { background: rgba(255,255,255,0.28); }

/* ── Messages ── */
#wv-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

#wv-chat-messages::-webkit-scrollbar { width: 4px; }
#wv-chat-messages::-webkit-scrollbar-track { background: transparent; }
#wv-chat-messages::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }

.wv-message {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  animation: wv-msg-in 0.2s ease;
}

@keyframes wv-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wv-bot-message { flex-direction: row; }
.wv-user-message { flex-direction: row-reverse; }

.wv-message-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--wv-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-sizing: border-box;
}
.wv-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wv-message-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}

.wv-bot-message .wv-message-bubble {
  background: #434343;
  color: white;
  border-bottom-left-radius: 4px;
}

.wv-user-message .wv-message-bubble {
  background: #5e6f13;
  color: white;
  border-bottom-right-radius: 4px;
}

/* Typing indicator */
.wv-typing-bubble {
  background: #f3f4f6;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  padding: 12px 16px;
  display: flex;
  gap: 5px;
  align-items: center;
}

.wv-typing-dot {
  width: 7px;
  height: 7px;
  background: #9ca3af;
  border-radius: 50%;
  animation: wv-typing 1.2s infinite ease-in-out;
}
.wv-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.wv-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes wv-typing {
  0%, 80%, 100% { transform: scale(1); opacity: 0.5; }
  40% { transform: scale(1.3); opacity: 1; }
}

/* ── Input Area ── */
#wv-chat-input-area {
  padding: 12px 14px 10px;
  border-top: 1px solid var(--wv-border);
  flex-shrink: 0;
  background: #1a1a18;
}

#wv-input-wrapper {
  display: flex;
  align-items: center;
  background: #f9fafb;
  border: 1.5px solid var(--wv-border);
  border-radius: 12px;
  padding: 6px 8px 6px 14px;
  gap: 8px;
  transition: border-color 0.15s;
}

#wv-input-wrapper:focus-within {
  border-color: var(--wv-primary);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.1);
}

#wv-chat-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--wv-text);
  outline: none;
  padding: 4px 0;
  font-family: inherit;
}

#wv-chat-input::placeholder { color: #9ca3af; }

#wv-send-btn {
  width: 48px;
  height: 34px;
  background: black;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}
#wv-send-btn:hover { background: black; }
#wv-send-btn:active { transform: scale(0.95); }
#wv-send-btn svg { width: 15px; height: 15px; color: white; }

#wv-powered-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
  color: #9ca3af;
  margin-top: 7px;
}

/* ── Bubble Button ── */
#wv-chat-bubble {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background:#1a1a18;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 7px 0px rgb(190 230 3);;
  position: relative;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

#wv-chat-bubble:hover {
  box-shadow:0 4px 7px 0px rgb(190 230 3);;
}

.wv-bubble-svg { width: 48px;
    margin-top: 5px;
    height: 60%; }
#wv-bubble-close svg { width: 22px; height: 22px; margin-top: 4px; }

/* Unread badge */
#wv-unread-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  pointer-events: none;
}

/* ── Mobile Full Screen ── */
@media (max-width: 640px) {
  #wv-chat-wrapper {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
  }

  /* Bubble sits fixed bottom-right when chat is CLOSED */
  #wv-chat-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  }

  /* Hide bubble completely when chat window is open */
  #wv-chat-bubble.wv-bubble-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.7);
  }

  #wv-chat-window {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    top: 0;
    width: 100%;
    max-height: 100%;
    border-radius: 0;
    transform: translateY(100%);
    transform-origin: bottom center;
  }

  #wv-chat-window.wv-open {
    transform: translateY(0);
    opacity: 1;
  }

  /* Input area safe from overlap */
  #wv-chat-input-area {
    padding-bottom: 20px;
  }

  #wv-chat-messages {
    padding-bottom: 8px;
  }

  /* Bigger touch targets on mobile */
  #wv-send-btn {
    width: 44px;
    height: 40px;
    border-radius: 11px;
  }

  #wv-chat-input {
    font-size: 16px; /* prevent iOS zoom on focus */
  }
}

/* ── Swipe Down Hint Bar ── */
#wv-swipe-hint {
  display: none;
  justify-content: center;
  padding: 8px 0 4px;
  background: var(--wv-bg);
  flex-shrink: 0;
}

.wv-swipe-bar {
  width: 40px;
  height: 4px;
  background: #d1d5db;
  border-radius: 2px;
}

@media (max-width: 640px) {
  #wv-swipe-hint {
    display: flex;
  }
}
/* ── Add these styles into your existing chat.css ── */

/* Session restored divider */
.wv-session-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 10px 0 6px;
  gap: 8px;
}
.wv-session-divider::before,
.wv-session-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px dashed #e5e7eb;
}
.wv-session-divider span {
  font-size: 10px;
  color: #9ca3af;
  white-space: nowrap;
  padding: 0 4px;
}

/* Clear button hover */
#wv-clear-btn:hover {
  opacity: 1 !important;
  color: #ef4444;
}

.wv-header-right {
    display: flex;
}