/* ═══════════════════════════════════════════════════════════════════
   Ask La Valette — premium concierge panel
   Reuses the existing La Valette Boutique design tokens.
   No new colours. No new type sizes. No new spacing values.
   ═══════════════════════════════════════════════════════════════════ */

/* ─── FLOATING ENTRY CARD ────────────────────────────────────────── */
.ask-fab {
  position: fixed;
  right: max(env(safe-area-inset-right), 20px);
  bottom: max(env(safe-area-inset-bottom), 20px);
  z-index: 890; /* just below drawer + drawer-backdrop */
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--white, #fff);
  border: 1px solid var(--border-lt, rgba(20,22,20,0.08));
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(20,22,20,0.10), 0 2px 6px rgba(20,22,20,0.04);
  cursor: pointer;
  font-family: var(--font, 'Manrope', sans-serif);
  color: var(--ink, #14161C);
  text-align: left;
  /* Hidden state before scroll/timer reveal */
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 320ms ease;
  max-width: calc(100vw - 40px);
}
.ask-fab.ready {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.ask-fab:hover {
  box-shadow: 0 12px 40px rgba(20,22,20,0.14), 0 3px 8px rgba(20,22,20,0.06);
}
.ask-fab:focus-visible {
  outline: 2px solid var(--sage, #8B8E70);
  outline-offset: 3px;
}
.ask-fab-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sage-05, rgba(139, 142, 112, 0.06));
  border-radius: 50%;
  color: var(--sage-dk, #6b6e56);
}
.ask-fab-icon svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.ask-fab-body { display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.ask-fab-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink, #14161C);
}
.ask-fab-sub {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink-55, rgba(20,22,20,0.55));
}
@media (max-width: 599px) {
  .ask-fab { padding: 12px 14px; }
  .ask-fab-sub { display: none; } /* compact mobile version */
  .ask-fab-icon { width: 32px; height: 32px; }
  .ask-fab-icon svg { width: 16px; height: 16px; }
}

/* ─── BACKDROP + PANEL (identical model to mobile navigation drawer) ─ */
.ask-backdrop {
  position: fixed;
  inset: 0;
  z-index: 899;
  background: rgba(20, 22, 20, 0);
  pointer-events: none;
  transition: background 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.ask-backdrop.open {
  background: rgba(20, 22, 20, 0.42);
  pointer-events: auto;
}

.ask-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  z-index: 900;
  background: var(--bg, #F2EBE0);
  transform: translateX(100%);
  transition: transform 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px rgba(0,0,0,0.12);
  overflow: hidden;
}
.ask-panel.open { transform: translateX(0); }
body.ask-locked {
  position: fixed;
  left: 0; right: 0;
  overflow: hidden;
}

/* ─── PANEL HEADER ────────────────────────────────────────────────── */
.ask-header {
  flex-shrink: 0;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border-lt, rgba(20,22,20,0.08));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.ask-title-group { display: flex; flex-direction: column; gap: 6px; }
.ask-kicker {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sage, #8B8E70);
  line-height: 1;
}
.ask-title {
  font-family: var(--font, 'Manrope', sans-serif);
  font-size: 20px;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--ink, #14161C);
  line-height: 1.15;
  margin: 0;
}
.ask-subtitle {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-55, rgba(20,22,20,0.55));
  line-height: 1.5;
  margin: 4px 0 0;
  max-width: 300px;
}
.ask-close {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ink, #14161C);
  border-radius: 8px;
  transition: background 200ms ease;
}
.ask-close:hover { background: rgba(20,22,20,0.05); }
.ask-close:focus-visible { outline: 2px solid var(--sage, #8B8E70); outline-offset: 2px; }
.ask-close svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.6; fill: none; }

/* ─── SCROLLABLE BODY ─────────────────────────────────────────────── */
.ask-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 12px;
  -webkit-overflow-scrolling: touch;
}

/* ─── SUGGESTED QUESTIONS (welcome state) ─────────────────────────── */
.ask-suggest-intro {
  font-size: 13px;
  color: var(--ink-70, rgba(20,22,20,0.7));
  margin: 0 0 16px;
  line-height: 1.5;
}
.ask-suggestions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
@media (max-width: 380px) { .ask-suggestions { grid-template-columns: 1fr; } }
.ask-suggest {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--border-lt, rgba(20,22,20,0.08));
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink, #14161C);
  text-align: left;
  line-height: 1.3;
  transition: background 220ms ease, border-color 220ms ease, transform 220ms ease;
}
.ask-suggest:hover {
  background: rgba(255,255,255,0.9);
  border-color: rgba(139, 142, 112, 0.35);
}
.ask-suggest:focus-visible { outline: 2px solid var(--sage, #8B8E70); outline-offset: 2px; }
.ask-suggest-emoji { flex-shrink: 0; font-size: 14px; }

/* ─── CONVERSATION MESSAGES ───────────────────────────────────────── */
.ask-messages { display: flex; flex-direction: column; gap: 14px; }
.ask-msg { max-width: 92%; }
.ask-msg-user {
  align-self: flex-end;
  background: var(--sage, #8B8E70);
  color: var(--white, #fff);
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.01em;
}
.ask-msg-bot {
  align-self: flex-start;
  color: var(--ink, #14161C);
  padding: 2px 0 8px;
  font-size: 13px;
  line-height: 1.6;
}
.ask-msg-bot p { margin: 0 0 8px; }
.ask-msg-bot p:last-child { margin-bottom: 0; }
.ask-msg-bot strong { font-weight: 600; color: var(--ink, #14161C); }
.ask-msg-bot ul, .ask-msg-bot ol {
  margin: 6px 0 8px;
  padding-left: 20px;
}
.ask-msg-bot li { margin: 2px 0; }
.ask-msg-bot em { font-style: italic; color: var(--ink-70, rgba(20,22,20,0.7)); }
.ask-msg-bot a {
  color: var(--sage-dk, #6b6e56);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.ask-msg-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-dk, #6b6e56);
  background: rgba(139, 142, 112, 0.08);
  border-radius: 12px;
}

/* Typing indicator */
.ask-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 2px;
}
.ask-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sage, #8B8E70);
  opacity: 0.5;
  animation: askTyping 1.2s infinite ease-in-out;
}
.ask-typing span:nth-child(2) { animation-delay: 0.15s; }
.ask-typing span:nth-child(3) { animation-delay: 0.30s; }
@keyframes askTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .ask-typing span { animation: none; opacity: 0.7; }
  .ask-fab, .ask-backdrop, .ask-panel, .ask-suggest { transition: none !important; }
}

/* ─── INPUT ROW ───────────────────────────────────────────────────── */
.ask-input-row {
  flex-shrink: 0;
  padding: 14px 20px 12px;
  border-top: 1px solid var(--border-lt, rgba(20,22,20,0.08));
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: var(--bg, #F2EBE0);
}
.ask-input {
  flex: 1;
  min-height: 42px;
  max-height: 120px;
  padding: 10px 14px;
  background: var(--white, #fff);
  border: 1px solid var(--border-lt, rgba(20,22,20,0.08));
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink, #14161C);
  resize: none;
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.ask-input::placeholder { color: var(--ink-55, rgba(20,22,20,0.55)); font-style: italic; }
.ask-input:focus {
  border-color: var(--sage, #8B8E70);
  box-shadow: 0 0 0 3px rgba(139, 142, 112, 0.12);
}
.ask-send {
  flex-shrink: 0;
  width: 42px; height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sage, #8B8E70);
  color: var(--white, #fff);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 200ms ease, transform 100ms ease;
}
.ask-send:hover { background: var(--sage-dk, #6b6e56); }
.ask-send:active { transform: scale(0.95); }
.ask-send:disabled { opacity: 0.35; cursor: not-allowed; }
.ask-send:focus-visible { outline: 2px solid var(--sage-dk, #6b6e56); outline-offset: 2px; }
.ask-send svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; }

/* ─── WHATSAPP FOOTER ─────────────────────────────────────────────── */
.ask-whatsapp {
  flex-shrink: 0;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--border-lt, rgba(20,22,20,0.08));
  background: rgba(139, 142, 112, 0.04);
  text-align: center;
}
.ask-wa-intro {
  font-size: 12px;
  color: var(--ink-70, rgba(20,22,20,0.7));
  line-height: 1.5;
  margin: 0 0 10px;
}
.ask-wa-intro strong {
  display: block;
  font-weight: 600;
  color: var(--ink, #14161C);
  margin-bottom: 2px;
}
.ask-wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 220ms ease, transform 100ms ease;
}
.ask-wa-btn:hover { background: #1EBE57; }
.ask-wa-btn:active { transform: scale(0.98); }
.ask-wa-btn:focus-visible { outline: 2px solid var(--sage, #8B8E70); outline-offset: 3px; }
.ask-wa-btn svg { width: 14px; height: 14px; fill: currentColor; }

/* ─── Hide the FAB while a drawer or panel is open (avoid stacking) ─ */
body.drawer-locked .ask-fab,
body.ask-locked .ask-fab { opacity: 0; pointer-events: none; }
