/* ==========================================
   VOWS & VELVET DIGITAL CONCIERGE CHATBOT v2
   ========================================== */

/* ─── FLOATING BUTTON ───────────────────────────────────────── */
.vv-chatbot-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #a07820);
  color: #0a0d10;
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(.175,.885,.32,1.275), box-shadow 0.3s;
}
.vv-chatbot-trigger:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.45);
}
.vv-chatbot-trigger.active {
  background: linear-gradient(135deg, #2d3748, #1a202c);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.vv-chatbot-trigger svg {
  width: 26px;
  height: 26px;
  stroke: #0a0d10;
  transition: transform 0.3s;
}
.vv-chatbot-trigger.active svg {
  stroke: #d4af37;
  transform: rotate(90deg) scale(1.1);
}

/* Badge notif */
.vv-chatbot-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #e53e3e;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0a0d10;
  animation: pulse-badge 1.8s infinite;
}
@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,62,62,0.6); }
  50% { box-shadow: 0 0 0 6px rgba(229,62,62,0); }
}

/* ─── CHAT BOX ───────────────────────────────────────────────── */
.vv-chat-container {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 360px;
  max-height: 540px;
  background: #12161e;
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  z-index: 9998;
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(.175,.885,.32,1.275);
}
.vv-chat-container.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Mobile */
@media (max-width: 480px) {
  .vv-chat-container {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 84px;
    max-height: 70vh;
  }
  .vv-chatbot-trigger {
    right: 16px;
    bottom: 16px;
  }
}

/* ─── HEADER ─────────────────────────────────────────────────── */
.vv-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, #1a1f2e, #0f1318);
  border-bottom: 1px solid rgba(212,175,55,0.15);
  flex-shrink: 0;
}
.asst-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.asst-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #a07820);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0d10;
  flex-shrink: 0;
}
.asst-title h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f0e8d0;
  margin: 0;
  line-height: 1.2;
}
.asst-title p {
  font-size: 0.68rem;
  color: #4ade80;
  margin: 0;
  line-height: 1;
}
.asst-close {
  background: rgba(255,255,255,0.06);
  border: none;
  color: rgba(255,255,255,0.5);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.asst-close:hover {
  background: rgba(229,62,62,0.15);
  color: #feb2b2;
}

/* ─── CHAT LOG ────────────────────────────────────────────────── */
.vv-chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(212,175,55,0.2) transparent;
}
.vv-chat-log::-webkit-scrollbar { width: 4px; }
.vv-chat-log::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.25); border-radius: 4px; }

/* ─── BUBBLES ─────────────────────────────────────────────────── */
.vv-chat-bubble {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 0.83rem;
  line-height: 1.55;
  word-wrap: break-word;
  animation: bubbleIn 0.25s ease;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.vv-chat-bubble.assistant {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.07);
  color: #e8e0d0;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.vv-chat-bubble.user {
  background: linear-gradient(135deg, #d4af37, #a07820);
  color: #0a0d10;
  font-weight: 600;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

/* Typing indicator */
.vv-typing-bubble {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
}
.vv-typing-bubble span {
  width: 7px;
  height: 7px;
  background: rgba(212,175,55,0.7);
  border-radius: 50%;
  animation: typing-dot 1.2s infinite;
}
.vv-typing-bubble span:nth-child(2) { animation-delay: 0.2s; }
.vv-typing-bubble span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ─── QUICK OPTIONS ───────────────────────────────────────────── */
.vv-chat-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: stretch;
  animation: bubbleIn 0.3s ease;
}
.vv-option-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(212,175,55,0.07);
  border: 1px solid rgba(212,175,55,0.2);
  color: #e8d9a8;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  width: 100%;
}
.vv-option-btn:hover {
  background: rgba(212,175,55,0.15);
  border-color: rgba(212,175,55,0.4);
  transform: translateX(2px);
}
.vv-option-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.6;
}

/* ─── INPUT PANEL ─────────────────────────────────────────────── */
.vv-chat-input-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.2);
  flex-shrink: 0;
}
#vv-chat-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #f0e8d0;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
#vv-chat-input::placeholder { color: rgba(255,255,255,0.3); }
#vv-chat-input:focus { border-color: rgba(212,175,55,0.4); }

.btn-send {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #d4af37, #a07820);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-send:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(212,175,55,0.35);
}
.btn-send svg {
  width: 16px;
  height: 16px;
  stroke: #0a0d10;
}
