/* ════════════════════════════════════════════════════════════
   ASISTENTE IA · "Aura" — chat luxury que responde dudas de clientas
   Recomienda secciones, técnicas, el Diagnóstico IA y responde FAQs.
   Desktop + Mobile. Paleta vino/dorado.
   ════════════════════════════════════════════════════════════ */

/* Launcher flotante */
.aura-fab {
  position: fixed; right: 22px; bottom: 92px; z-index: 9990;
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 1.1rem 0.7rem 0.8rem; border: none; cursor: pointer;
  background: var(--grad-wine, linear-gradient(135deg,#8E0A14,#861F18 55%,#4E0610));
  color: var(--cream, #FCFBF9); border-radius: 999px;
  box-shadow: 0 14px 40px rgba(92,7,16,0.4), inset 0 1px 0 rgba(255,255,255,0.12);
  font-family: 'Manrope', sans-serif; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.04em; transition: transform 0.3s cubic-bezier(0.34,1.56,0.36,1), box-shadow 0.3s;
}
.aura-fab:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 20px 50px rgba(92,7,16,0.5); }
.aura-fab-orb {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, #ECD7A4, #C9A24E 55%, #9A7B36);
  display: grid; place-items: center; color: var(--cherry, #7A0712);
  box-shadow: 0 0 0 3px rgba(197,163,90,0.25); position: relative;
}
.aura-fab-orb::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1.5px solid rgba(197,163,90,0.5); animation: auraPulse 2.4s ease-out infinite;
}
@keyframes auraPulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.5); opacity: 0; } }
.aura-fab-label { white-space: nowrap; }
.aura-fab-label small { display: block; font-weight: 400; font-size: 0.62rem; opacity: 0.7; letter-spacing: 0.1em; text-transform: uppercase; }
@media (max-width: 600px) {
  .aura-fab { right: 14px; bottom: 86px; padding: 0.6rem; }
  .aura-fab-label { display: none; }
}

/* Panel */
.aura-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 9991;
  width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100vh - 110px));
  display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, #FCFBF9, #F7F2EF);
  border: 1px solid rgba(197,163,90,0.4); border-radius: 26px;
  box-shadow: 0 40px 100px rgba(74,10,10,0.4), inset 0 1px 0 rgba(255,255,255,0.6);
  transform: translateY(24px) scale(0.96); opacity: 0; pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.34,1.4,0.36,1), opacity 0.35s ease;
  font-family: 'Manrope', sans-serif;
}
.aura-panel.open { transform: none; opacity: 1; pointer-events: auto; }
@media (max-width: 600px) {
  .aura-panel { right: 8px; left: 8px; bottom: 8px; width: auto; height: min(78vh, 620px); }
}

/* Header del panel */
.aura-head {
  position: relative; padding: 1.1rem 1.25rem; display: flex; align-items: center; gap: 0.8rem;
  background: var(--grad-wine, linear-gradient(135deg,#8E0A14,#861F18 55%,#4E0610));
  color: var(--cream, #FCFBF9);
}
.aura-head-orb {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, #ECD7A4, #C9A24E 55%, #9A7B36);
  display: grid; place-items: center; color: var(--cherry, #7A0712); font-size: 1.1rem;
  box-shadow: 0 0 0 3px rgba(197,163,90,0.25);
}
.aura-head-meta { flex: 1; min-width: 0; }
.aura-head-name { font-family: 'Italiana', serif; font-size: 1.25rem; line-height: 1; letter-spacing: 0.02em; }
.aura-head-status { font-size: 0.66rem; letter-spacing: 0.08em; opacity: 0.8; display: flex; align-items: center; gap: 0.4em; margin-top: 3px; }
.aura-head-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.aura-close {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08); color: var(--cream, #FCFBF9); cursor: pointer;
  font-size: 1.2rem; display: grid; place-items: center; transition: background 0.25s, transform 0.2s;
}
.aura-close:hover { background: rgba(255,255,255,0.18); transform: rotate(90deg); }

/* Cuerpo / mensajes */
.aura-body { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: 0.85rem; scroll-behavior: smooth; }
.aura-body::-webkit-scrollbar { width: 6px; }
.aura-body::-webkit-scrollbar-thumb { background: rgba(134,31,24,0.25); border-radius: 3px; }
.aura-msg { max-width: 85%; padding: 0.7rem 0.95rem; border-radius: 16px; font-size: 0.88rem; line-height: 1.5; animation: auraIn 0.4s cubic-bezier(0.22,1,0.36,1); }
@keyframes auraIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.aura-msg--bot { align-self: flex-start; background: #fff; color: var(--ink, #45070C); border: 1px solid rgba(92,7,16,0.08); border-bottom-left-radius: 5px; box-shadow: 0 4px 14px rgba(92,7,16,0.05); }
.aura-msg--user { align-self: flex-end; background: var(--wine, #861F18); color: var(--cream, #FCFBF9); border-bottom-right-radius: 5px; }
.aura-msg a { color: var(--wine, #861F18); font-weight: 600; text-decoration: underline; }
.aura-msg--user a { color: var(--gold-light, #ECD7A4); }
.aura-msg strong { font-weight: 700; }

/* Chips de sugerencias rápidas */
.aura-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 1.1rem 0.5rem; }
.aura-chip {
  font-size: 0.72rem; padding: 0.5em 0.9em; border-radius: 999px; cursor: pointer;
  background: rgba(197,163,90,0.12); border: 1px solid rgba(197,163,90,0.35); color: var(--cherry, #7A0712);
  transition: background 0.25s, transform 0.2s; white-space: nowrap;
}
.aura-chip:hover { background: rgba(197,163,90,0.25); transform: translateY(-1px); }

/* Typing indicator */
.aura-typing { align-self: flex-start; display: flex; gap: 4px; padding: 0.8rem 1rem; background: #fff; border-radius: 16px; border-bottom-left-radius: 5px; border: 1px solid rgba(92,7,16,0.08); }
.aura-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-dark, #9A7B36); animation: auraDot 1.2s infinite; }
.aura-typing span:nth-child(2) { animation-delay: 0.2s; }
.aura-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes auraDot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-5px); opacity: 1; } }

/* Input */
.aura-foot { padding: 0.85rem 1rem 1rem; border-top: 1px solid rgba(92,7,16,0.08); background: rgba(255,255,255,0.5); }
.aura-input-wrap { display: flex; align-items: flex-end; gap: 0.6rem; background: #fff; border: 1px solid rgba(92,7,16,0.14); border-radius: 18px; padding: 0.5rem 0.5rem 0.5rem 0.9rem; transition: border-color 0.25s, box-shadow 0.25s; }
.aura-input-wrap:focus-within { border-color: var(--gold, #C9A24E); box-shadow: 0 0 0 3px rgba(197,163,90,0.15); }
.aura-input { flex: 1; border: none; outline: none; resize: none; font-family: inherit; font-size: 0.88rem; line-height: 1.4; max-height: 90px; background: transparent; color: var(--ink, #45070C); }
.aura-send {
  width: 38px; height: 38px; border-radius: 50%; border: none; flex-shrink: 0; cursor: pointer;
  background: var(--wine, #861F18); color: var(--cream, #FCFBF9); display: grid; place-items: center;
  transition: transform 0.2s, background 0.25s;
}
.aura-send:hover { background: var(--wine-deep, #4E0610); transform: scale(1.06); }
.aura-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.aura-foot-note { text-align: center; font-size: 0.62rem; color: var(--ink, #45070C); opacity: 0.5; margin-top: 0.55rem; }

@media (prefers-reduced-motion: reduce) {
  .aura-fab-orb::after { animation: none; }
  .aura-msg, .aura-panel { animation: none; transition: opacity 0.2s; }
}
