/* VedicHymns Chatbot Widget + Page styles
   Used by: chatbot-widget.js (bubble + drawer) and chatbot.html (full page)
*/

/* ── Floating bubble ─────────────────────────────────────────────── */
#vh-chat-bubble {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 500;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0D6B63, #12A99D);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(13,107,99,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  outline: none;
}
#vh-chat-bubble:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 28px rgba(13,107,99,0.6);
}
#vh-chat-bubble svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}
#vh-chat-bubble .vh-bubble-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFD54F;
  border: 2px solid #060E0D;
  animation: vhPulse 2.5s ease-out infinite;
}
@keyframes vhPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,213,79,0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(255,213,79,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,213,79,0); }
}

/* Tooltip on hover */
#vh-chat-bubble::after {
  content: 'Ask VedicHymns';
  position: absolute;
  right: 68px;
  top: 50%;
  transform: translateY(-50%);
  background: #0D1A18;
  border: 1px solid rgba(18,169,157,0.25);
  color: #D8F0EC;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
#vh-chat-bubble:hover::after {
  opacity: 1;
}

/* ── Drawer ───────────────────────────────────────────────────────── */
#vh-chat-drawer {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: min(400px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 120px));
  background: #0D1A18;
  border: 1px solid rgba(18,169,157,0.2);
  border-radius: 20px;
  z-index: 499;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  transform: scale(0.92) translateY(16px);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1),
              opacity 0.25s cubic-bezier(0.4,0,0.2,1);
}
#vh-chat-drawer.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Drawer header */
.vh-drawer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(18,169,157,0.12);
  flex-shrink: 0;
}
.vh-drawer-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg,#0D6B63,#12A99D);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.vh-drawer-avatar svg { width:18px; height:18px; fill:#fff; }
.vh-drawer-title {
  flex: 1;
  min-width: 0;
}
.vh-drawer-title-name {
  font-family: 'Inter',sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #D8F0EC;
  line-height: 1.2;
}
.vh-drawer-title-sub {
  font-size: 0.68rem;
  color: rgba(18,169,157,0.7);
  display: flex;
  align-items: center;
  gap: 4px;
}
.vh-drawer-title-sub::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #12A99D;
}
.vh-drawer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.vh-drawer-action-btn {
  background: none;
  border: none;
  color: rgba(216,240,236,0.4);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 0.8rem;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
}
.vh-drawer-action-btn:hover {
  color: #D8F0EC;
  background: rgba(18,169,157,0.1);
}

/* Tab bar */
.vh-tab-bar {
  display: flex;
  border-bottom: 1px solid rgba(18,169,157,0.1);
  flex-shrink: 0;
  padding: 0 12px;
  gap: 4px;
}
.vh-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(216,240,236,0.4);
  font-family: 'Inter',sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 8px 10px 6px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.vh-tab.active {
  color: #12A99D;
  border-bottom-color: #12A99D;
}
.vh-tab:hover:not(.active) {
  color: rgba(216,240,236,0.7);
}

/* Tab panels */
.vh-tab-panel {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.vh-tab-panel.active {
  display: flex;
}

/* Messages area */
.vh-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.vh-messages::-webkit-scrollbar { width: 3px; }
.vh-messages::-webkit-scrollbar-track { background: transparent; }
.vh-messages::-webkit-scrollbar-thumb {
  background: rgba(18,169,157,0.25);
  border-radius: 2px;
}

/* Message bubbles */
.vh-msg {
  max-width: 88%;
  line-height: 1.55;
  font-family: 'Inter',sans-serif;
  font-size: 0.82rem;
}
.vh-msg-user {
  align-self: flex-end;
  background: #0D6B63;
  color: #D8F0EC;
  border-radius: 14px 14px 4px 14px;
  padding: 9px 13px;
}
.vh-msg-bot {
  align-self: flex-start;
  background: #142420;
  color: #D8F0EC;
  border-radius: 14px 14px 14px 4px;
  padding: 9px 13px;
  border: 1px solid rgba(18,169,157,0.12);
}
.vh-msg-bot a {
  color: #12A99D;
  text-decoration: underline;
}
.vh-typing {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: #142420;
  border-radius: 14px 14px 14px 4px;
  border: 1px solid rgba(18,169,157,0.12);
}
.vh-typing-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #12A99D;
  opacity: 0.4;
  animation: vhTyping 1.2s infinite;
}
.vh-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.vh-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes vhTyping {
  0%,80%,100% { opacity:0.4; transform:scale(1); }
  40%         { opacity:1;   transform:scale(1.3); }
}

/* Input area */
.vh-input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(18,169,157,0.1);
  flex-shrink: 0;
}
.vh-input {
  flex: 1;
  background: #0A1512;
  border: 1px solid rgba(18,169,157,0.2);
  border-radius: 12px;
  padding: 9px 12px;
  font-family: 'Inter',sans-serif;
  font-size: 0.82rem;
  color: #D8F0EC;
  outline: none;
  resize: none;
  min-height: 38px;
  max-height: 100px;
  line-height: 1.45;
  transition: border-color 0.15s;
}
.vh-input::placeholder { color: rgba(216,240,236,0.3); }
.vh-input:focus { border-color: rgba(18,169,157,0.45); }
.vh-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #0D6B63;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}
.vh-send-btn:hover { background: #12A99D; }
.vh-send-btn:active { transform: scale(0.95); }
.vh-send-btn svg { width:16px; height:16px; fill:#fff; }
.vh-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* WA panel */
.vh-wa-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  gap: 16px;
  text-align: center;
}
.vh-wa-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg,#003A1F,#25D366);
  display: flex;
  align-items: center;
  justify-content: center;
}
.vh-wa-icon svg { width:36px; height:36px; fill:#fff; }
.vh-wa-title {
  font-family: 'Cormorant Garamond',serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #D8F0EC;
  line-height: 1.3;
}
.vh-wa-desc {
  font-family: 'Inter',sans-serif;
  font-size: 0.78rem;
  color: rgba(216,240,236,0.5);
  line-height: 1.6;
  max-width: 280px;
}
.vh-wa-specs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0;
}
.vh-wa-spec {
  background: rgba(18,169,157,0.1);
  border: 1px solid rgba(18,169,157,0.2);
  border-radius: 20px;
  padding: 3px 10px;
  font-family: 'Inter',sans-serif;
  font-size: 0.68rem;
  color: rgba(18,169,157,0.8);
  white-space: nowrap;
}
.vh-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  border-radius: 10px;
  padding: 12px 24px;
  font-family: 'Inter',sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s;
}
.vh-wa-btn:hover { background: #1DA855; }
.vh-wa-btn svg { width:18px; height:18px; fill:#fff; }
.vh-wa-number {
  font-family: 'Inter',sans-serif;
  font-size: 0.7rem;
  color: rgba(216,240,236,0.3);
}

/* Suggestions */
.vh-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px 2px;
  flex-shrink: 0;
}
.vh-suggestion {
  background: rgba(13,107,99,0.15);
  border: 1px solid rgba(18,169,157,0.2);
  border-radius: 20px;
  padding: 4px 12px;
  font-family: 'Inter',sans-serif;
  font-size: 0.7rem;
  color: rgba(18,169,157,0.85);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.vh-suggestion:hover {
  background: rgba(13,107,99,0.3);
  border-color: rgba(18,169,157,0.4);
  color: #12A99D;
}

/* Full-page link */
.vh-open-full {
  display: block;
  text-align: center;
  font-family: 'Inter',sans-serif;
  font-size: 0.68rem;
  color: rgba(216,240,236,0.3);
  padding: 6px;
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.15s;
}
.vh-open-full:hover { color: rgba(216,240,236,0.6); }

/* Mobile adjustments */
@media (max-width: 480px) {
  #vh-chat-drawer {
    bottom: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
  }
  #vh-chat-bubble {
    bottom: 20px;
    right: 16px;
  }
  #vh-chat-bubble::after { display: none; }
}
