/* ==========================================================================
   ASK VENGI — floating assistant widget
   Matches the site's existing charcoal + orange/gold system. Desktop: a
   floating chat window. Mobile: a full-screen drawer.
   ========================================================================== */

.ask-vengi-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.9rem 1.3rem;
  border-radius: var(--radius-full);
  background: var(--gradient-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-glow);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.ask-vengi-fab:hover {
  transform: translateY(-2px);
}

.ask-vengi-fab-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  animation: av-sparkle 2.6s ease-in-out infinite;
}

.ask-vengi-fab-icon svg { width: 100%; height: 100%; }

@keyframes av-sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.15) rotate(8deg); opacity: 0.85; }
}

@media (prefers-reduced-motion: reduce) {
  .ask-vengi-fab-icon { animation: none; }
}

/* ---- Panel ---- */

.ask-vengi-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 200;
  width: min(380px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 140px));
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base);
}

.ask-vengi-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  pointer-events: auto;
}

.ask-vengi-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem 0.9rem;
  background: var(--gradient-navy);
  color: #fff;
  flex-shrink: 0;
}

.ask-vengi-header-info {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.ask-vengi-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.ask-vengi-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
}

.ask-vengi-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0.15rem 0 0;
}

.ask-vengi-status .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ecf6a;
  box-shadow: 0 0 0 2px rgba(62, 207, 106, 0.25);
}

.ask-vengi-close {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.3rem;
  line-height: 1;
  padding: 0.2rem;
  flex-shrink: 0;
  transition: color var(--t-fast);
}

.ask-vengi-close:hover { color: #fff; }

.ask-vengi-subtext {
  padding: 0.75rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--charcoal-500);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.ask-vengi-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* ---- Message bubbles ---- */

.av-msg { display: flex; }
.av-msg-bot { justify-content: flex-start; }
.av-msg-user { justify-content: flex-end; }

.av-bubble {
  max-width: 84%;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.av-msg-bot .av-bubble {
  background: var(--bg-soft);
  color: var(--charcoal-900);
  border-bottom-left-radius: 4px;
}

.av-msg-user .av-bubble {
  background: var(--gradient-accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* ---- Option chips ---- */

.av-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.av-option-btn {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-strong);
  color: var(--navy-900);
  background: var(--bg-white);
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}

.av-option-btn:hover {
  border-color: var(--accent-500);
  color: var(--accent-600);
  background: var(--accent-100);
}

.av-option-btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  border-color: transparent;
}

.av-option-btn-primary:hover {
  color: #fff;
  filter: brightness(1.06);
}

/* ---- Input row + disclaimer ---- */

.ask-vengi-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.ask-vengi-input-row input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  color: var(--charcoal-900);
}

.ask-vengi-input-row input:focus {
  outline: none;
  border-color: var(--accent-500);
  background: var(--bg-white);
}

.ask-vengi-input-row button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  transition: transform var(--t-fast);
}

.ask-vengi-input-row button:hover { transform: scale(1.05); }

.ask-vengi-disclaimer {
  font-size: 0.6875rem;
  color: var(--charcoal-300);
  text-align: center;
  padding: 0 1rem 0.75rem;
  flex-shrink: 0;
}

/* ---- Mobile: full-screen drawer ---- */

@media (max-width: 640px) {
  .ask-vengi-panel {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    transform: translateY(100%);
  }

  .ask-vengi-panel.is-open {
    transform: translateY(0);
  }

  .ask-vengi-fab {
    bottom: 18px;
    right: 18px;
    padding: 0.8rem 1.1rem;
    font-size: 0.85rem;
  }

  body.av-open .ask-vengi-fab {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ask-vengi-panel { transition: opacity 150ms linear; }
  .ask-vengi-fab { transition: none; }
}
