/* ==========================================================================
   UMANARAYANI AYURVEDA — AI CONSULTANT & HUMAN WHATSAPP SANCTUARY
   Features:
   1. Google Gemini AI Vaidya (Live Chat & Dosha Diagnosis)
   2. Ayurvedic Herbal Care Team on WhatsApp (+91 8641033514)
   3. Product-Page AI Assistant & Floating Quick Consult
   ========================================================================== */

/* Section Outer Styling */
.section-ai-sanctuary {
  padding: 80px 0;
  background: linear-gradient(180deg, #F0F6F1 0%, #FFFFFF 50%, #F5F9F6 100%);
  position: relative;
  overflow: hidden;
}

.section-ai-sanctuary::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(82, 183, 136, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.section-ai-sanctuary::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(197, 160, 89, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Split Consultation Grid */
.ai-consult-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 32px;
  align-items: stretch;
  margin-top: 36px;
}

@media (max-width: 992px) {
  .ai-consult-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Base Consultation Card */
.consult-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg, 20px);
  border: 1px solid rgba(45, 106, 79, 0.15);
  box-shadow: 0 14px 40px -6px rgba(27, 67, 50, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.consult-card:hover {
  box-shadow: 0 20px 48px -8px rgba(27, 67, 50, 0.12);
}

/* Card Header */
.consult-card-header {
  padding: 24px 28px;
  border-bottom: 1px solid rgba(45, 106, 79, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.consult-card-header.ai-header {
  background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 100%);
  color: #FFFFFF;
}

.consult-card-header.human-header {
  background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
  color: #FFFFFF;
}

.header-brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.consult-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FFFFFF;
  padding: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  object-fit: cover;
  flex-shrink: 0;
}

.consult-title-wrap h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin: 0 0 2px 0;
  color: #FFFFFF;
  letter-spacing: 0.3px;
}

.consult-subtitle {
  font-size: 0.82rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Powered by Gemini Badge */
.gemini-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #FFE5A3;
  border: 1px solid rgba(255, 255, 255, 0.25);
  white-space: nowrap;
}

/* Online status pill */
.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 211, 102, 0.2);
  color: #FFFFFF;
  border: 1px solid rgba(37, 211, 102, 0.5);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #25D366;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(37, 211, 102, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* AI Mode Tabs */
.ai-mode-tabs {
  display: flex;
  background: #EAF3EC;
  padding: 6px;
  gap: 6px;
  border-bottom: 1px solid rgba(45, 106, 79, 0.1);
}

.ai-tab-btn {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ai-tab-btn.active {
  background: #FFFFFF;
  color: var(--green-primary);
  box-shadow: 0 4px 12px rgba(27, 67, 50, 0.08);
}

.ai-tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.5);
  color: var(--green-forest);
}

/* Chat Messages Container */
.ai-chat-body {
  flex: 1;
  min-height: 380px;
  max-height: 480px;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #FAFCFA;
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
.ai-chat-body::-webkit-scrollbar {
  width: 6px;
}
.ai-chat-body::-webkit-scrollbar-track {
  background: #F0F6F1;
}
.ai-chat-body::-webkit-scrollbar-thumb {
  background: rgba(45, 106, 79, 0.25);
  border-radius: 3px;
}

/* Chat Bubble Base */
.chat-msg {
  display: flex;
  gap: 12px;
  max-width: 90%;
  animation: fadeInMsg 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.chat-msg.bot {
  align-self: flex-start;
}

.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #E8F5E9;
  border: 1px solid rgba(45, 106, 79, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.msg-content {
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.chat-msg.bot .msg-content {
  background: #FFFFFF;
  color: var(--text-main);
  border: 1px solid rgba(45, 106, 79, 0.12);
  border-top-left-radius: 4px;
  box-shadow: 0 4px 14px rgba(27, 67, 50, 0.04);
}

.chat-msg.user .msg-content {
  background: linear-gradient(135deg, var(--green-forest) 0%, var(--green-primary) 100%);
  color: #FFFFFF;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(27, 67, 50, 0.15);
}

/* Markdown styling inside bot message */
.chat-msg.bot .msg-content h1,
.chat-msg.bot .msg-content h2,
.chat-msg.bot .msg-content h3,
.chat-msg.bot .msg-content h4 {
  font-family: 'Playfair Display', serif;
  color: var(--green-primary);
  margin: 12px 0 6px 0;
  font-size: 1.05rem;
}

.chat-msg.bot .msg-content h1:first-child,
.chat-msg.bot .msg-content h2:first-child,
.chat-msg.bot .msg-content h3:first-child {
  margin-top: 0;
}

.chat-msg.bot .msg-content p {
  margin: 0 0 8px 0;
}

.chat-msg.bot .msg-content p:last-child {
  margin-bottom: 0;
}

.chat-msg.bot .msg-content ul,
.chat-msg.bot .msg-content ol {
  margin: 6px 0 10px 0;
  padding-left: 20px;
}

.chat-msg.bot .msg-content li {
  margin-bottom: 4px;
}

.chat-msg.bot .msg-content strong {
  color: var(--green-deep);
  font-weight: 700;
}

/* Suggested Products embedded inside AI response */
.suggested-products-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(45, 106, 79, 0.2);
}

.suggested-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--gold-deep);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.suggested-items-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggested-product-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #F0F7F2;
  border: 1px solid rgba(45, 106, 79, 0.2);
  border-radius: 20px;
  padding: 4px 12px 4px 6px;
  text-decoration: none;
  color: var(--green-primary);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.suggested-product-pill:hover {
  background: #E0EFE5;
  border-color: var(--green-mint);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(45, 106, 79, 0.15);
}

.suggested-product-pill img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

/* WhatsApp fallback link inside AI answer */
.ai-answer-whatsapp-escalate {
  margin-top: 12px;
  padding: 10px 14px;
  background: #E8F5E9;
  border-radius: 12px;
  border: 1px solid rgba(37, 211, 102, 0.4);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ai-answer-whatsapp-escalate a {
  background: #25D366;
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 0.78rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease;
}

.ai-answer-whatsapp-escalate a:hover {
  background: #1EBE5D;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 18px;
  background: #FFFFFF;
  border-radius: 18px;
  border: 1px solid rgba(45, 106, 79, 0.12);
  width: fit-content;
}

.typing-dot {
  width: 7px;
  height: 7px;
  background: var(--green-mint);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Real-time Streaming Cursor & Pulse */
.ai-stream-cursor {
  display: inline-block;
  width: 3px;
  height: 1.05em;
  background-color: var(--green-primary, #2D6A4F);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: aiCursorBlink 0.75s infinite ease-in-out;
  border-radius: 1px;
}

@keyframes aiCursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.msg-text-stream {
  display: inline;
}

/* Quick Prompt Chips */
.quick-chips-wrapper {
  padding: 12px 24px;
  background: #F4F9F5;
  border-top: 1px solid rgba(45, 106, 79, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-quick-chip {
  background: #FFFFFF;
  border: 1px solid rgba(45, 106, 79, 0.18);
  border-radius: 16px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ai-quick-chip:hover {
  background: var(--green-primary);
  color: #FFFFFF;
  border-color: var(--green-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(27, 67, 50, 0.15);
}

/* Chat Input Bar */
.ai-chat-input-bar {
  padding: 16px 24px;
  background: #FFFFFF;
  border-top: 1px solid rgba(45, 106, 79, 0.12);
  display: flex;
  gap: 12px;
  align-items: center;
}

.ai-input-field {
  flex: 1;
  padding: 12px 18px;
  border: 1.5px solid rgba(45, 106, 79, 0.2);
  border-radius: 24px;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  background: #FDFEFE;
}

.ai-input-field:focus {
  border-color: var(--green-forest);
  box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.2);
}

.ai-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-forest) 0%, var(--green-primary) 100%);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.ai-send-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(27, 67, 50, 0.25);
}

.ai-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ==================== DOSHA QUIZ VIEW ==================== */
.dosha-quiz-container {
  display: none;
  padding: 24px;
  overflow-y: auto;
  max-height: 520px;
  flex-direction: column;
  gap: 20px;
}

.dosha-quiz-container.active {
  display: flex;
}

.dosha-step-card {
  background: #FAFCFA;
  border: 1px solid rgba(45, 106, 79, 0.14);
  border-radius: 14px;
  padding: 18px 20px;
}

.dosha-step-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--green-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dosha-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.dosha-radio-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 10px;
  background: #FFFFFF;
  border: 1.5px solid rgba(45, 106, 79, 0.16);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.dosha-radio-label:hover {
  border-color: var(--green-mint);
  background: #F3F9F5;
}

.dosha-radio-label input {
  display: none;
}

.dosha-radio-label.selected {
  border-color: var(--green-primary);
  background: #EAF4EE;
  color: var(--green-primary);
  box-shadow: 0 4px 10px rgba(27, 67, 50, 0.12);
}

.dosha-radio-icon {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.btn-diagnose-dosha {
  background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold-primary) 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(197, 160, 89, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-diagnose-dosha:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(197, 160, 89, 0.4);
}

.dosha-result-box {
  background: #FFFFFF;
  border: 2px solid var(--gold-primary);
  border-radius: 14px;
  padding: 20px;
  margin-top: 14px;
  display: none;
  animation: fadeInMsg 0.4s ease;
}

.dosha-result-box.active {
  display: block;
}

/* ==================== RIGHT COLUMN: HUMAN SPECIALIST ON WHATSAPP ==================== */
.human-specialist-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: #FFFFFF;
  flex: 1;
}

/* Herbal Care Team Profile Banner */
.herbal-team-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #F0FAF4;
  border: 1px solid rgba(37, 211, 102, 0.3);
  border-radius: 14px;
}

.team-img-wrap {
  position: relative;
  flex-shrink: 0;
}

.team-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #25D366;
}

.team-status-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background: #25D366;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
}

.team-info h4 {
  margin: 0 0 2px 0;
  font-size: 1.05rem;
  color: var(--green-primary);
  font-family: 'Playfair Display', serif;
}

.team-credentials {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 4px 0;
}

.team-availability {
  font-size: 0.76rem;
  font-weight: 700;
  color: #128C7E;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Phone Number Callout Box */
.helpline-callout {
  background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
  color: #FFFFFF;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(18, 140, 126, 0.25);
  position: relative;
  overflow: hidden;
}

.helpline-callout::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.helpline-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  margin-bottom: 6px;
}

.helpline-number {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: block;
  color: #FFFFFF;
  text-decoration: none;
  font-family: 'Cinzel', serif;
}

.helpline-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-helpline-action {
  padding: 9px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-helpline-action.wa {
  background: #25D366;
  color: #FFFFFF;
}

.btn-helpline-action.wa:hover {
  background: #1EBE5D;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-helpline-action.call {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-helpline-action.call:hover {
  background: #FFFFFF;
  color: #075E54;
  transform: translateY(-2px);
}

/* Why Talk to Human Specialist */
.human-benefits-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.human-benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #F9FCF9;
  border: 1px solid rgba(45, 106, 79, 0.08);
}

.benefit-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #E8F5E9;
  color: var(--green-forest);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.benefit-text h5 {
  margin: 0 0 2px 0;
  font-size: 0.88rem;
  color: var(--green-primary);
  font-weight: 700;
}

.benefit-text p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Direct One-Click WhatsApp Inquiries */
.direct-wa-inquiries {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.direct-wa-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #F3FBF5;
  border: 1px solid rgba(37, 211, 102, 0.35);
  border-radius: 10px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.direct-wa-btn:hover {
  background: #E5F7EB;
  border-color: #25D366;
  transform: translateX(4px);
  color: #075E54;
}

.direct-wa-btn i {
  color: #25D366;
  font-size: 0.95rem;
}

/* ==================== PRODUCT PAGE SPECIFIC AI TAB ==================== */
.product-ai-consultant-card {
  background: #FAFCFA;
  border: 1.5px solid rgba(45, 106, 79, 0.18);
  border-radius: 16px;
  padding: 24px;
  margin-top: 24px;
}

.product-ai-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(45, 106, 79, 0.12);
}

.product-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--green-primary);
  font-size: 0.95rem;
}

.product-ai-chat-stream {
  max-height: 300px;
  overflow-y: auto;
  padding: 16px;
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid rgba(45, 106, 79, 0.12);
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Floating AI Button & Dialog (Bottom Right Toggle) */
.ai-floating-assistant-btn {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1B4332 0%, #40916C 100%);
  color: #FFFFFF;
  border: 2px solid #E5C98B;
  box-shadow: 0 8px 24px rgba(27, 67, 50, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-floating-assistant-btn:hover {
  transform: scale(1.1) rotate(6deg);
  box-shadow: 0 12px 30px rgba(27, 67, 50, 0.45);
}

.ai-floating-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #FFA41C;
  color: #000;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  border: 1.5px solid #FFFFFF;
  text-transform: uppercase;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .section-ai-sanctuary {
    padding: 50px 0;
  }
  .consult-card-header {
    padding: 18px 20px;
  }
  .ai-chat-body {
    padding: 16px;
    min-height: 320px;
    max-height: 400px;
  }
  .ai-chat-input-bar {
    padding: 12px 16px;
  }
  .human-specialist-body {
    padding: 20px;
  }
  .helpline-number {
    font-size: 1.35rem;
  }
  .ai-floating-assistant-btn {
    bottom: 84px;
    right: 16px;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
}

/* ==================== FLOATING AI CHAT DRAWER / MODAL ==================== */
.ai-floating-modal {
  position: fixed;
  bottom: 104px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 130px);
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(27, 67, 50, 0.28), 0 0 0 1px rgba(45, 106, 79, 0.15);
  overflow: hidden;
  z-index: 1002;
  display: none;
  flex-direction: column;
  animation: slideUpModal 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-floating-modal.active {
  display: flex;
}

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

.ai-floating-header {
  background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 100%);
  color: #FFFFFF;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.ai-floating-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-floating-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #E5C98B;
  background: #FFFFFF;
  flex-shrink: 0;
}

.ai-floating-brand h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  margin: 0;
  color: #FFFFFF;
}

.ai-floating-status {
  font-size: 0.72rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ai-floating-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-header-wa-pill {
  background: #25D366;
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s;
}

.ai-header-wa-pill:hover {
  background: #1EBE5D;
}

.ai-floating-close-btn {
  color: #FFFFFF;
  font-size: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  opacity: 0.85;
  transition: opacity 0.2s, transform 0.2s;
  padding: 4px;
}

.ai-floating-close-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}

.ai-floating-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #FAFCFA;
  scroll-behavior: smooth;
}

.ai-floating-chips {
  padding: 8px 14px;
  background: #F4F8F5;
  border-top: 1px solid rgba(45, 106, 79, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-mini-chip {
  background: #FFFFFF;
  border: 1px solid rgba(45, 106, 79, 0.2);
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ai-mini-chip:hover {
  background: var(--green-primary);
  color: #FFFFFF;
  border-color: var(--green-primary);
  transform: translateY(-1px);
}

.ai-floating-support-bar {
  padding: 8px 14px;
  background: #E8F5E9;
  border-top: 1px solid rgba(37, 211, 102, 0.3);
  font-size: 0.74rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-floating-support-bar a {
  color: #075E54;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-floating-support-bar a:hover {
  text-decoration: underline;
}

.ai-floating-footer {
  padding: 12px 14px;
  background: #FFFFFF;
  border-top: 1px solid rgba(45, 106, 79, 0.12);
  display: flex;
  gap: 8px;
  align-items: center;
}

.ai-floating-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid rgba(45, 106, 79, 0.2);
  border-radius: 20px;
  font-size: 0.86rem;
  font-family: inherit;
  outline: none;
  background: #FDFEFE;
}

.ai-floating-input:focus {
  border-color: var(--green-forest);
  box-shadow: 0 0 0 2px rgba(82, 183, 136, 0.25);
}

.ai-floating-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-forest) 0%, var(--green-primary) 100%);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.ai-floating-send-btn:hover {
  transform: scale(1.08);
}
