/* ═══════════════════════════════════════════════
   FREECOLORS — CHATBOT.CSS
   Estilos específicos de la página del asistente.
   Requiere: global.css
═══════════════════════════════════════════════ */

body { min-height: 100vh; display: flex; flex-direction: column; }

.wrapper { flex: 1; display: flex; flex-direction: column; padding-top: 60px; }

/* ── SECCIÓN CHAT ─────────────────────────────── */
.chat-section {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(155deg, #07091d 0%, #0c0535 45%, #130050 65%, #07091d 100%);
  position: relative; overflow: hidden; padding-bottom: 2rem;
}

/* Los blobs del chatbot son un poco más grandes */
.blob-1 { width: 400px; height: 400px; top: -100px; right: -150px; opacity: 0.2; }
.blob-2 { width: 300px; height: 300px; bottom: 10%; left: -100px; opacity: 0.2; }

/* ── APP CHAT ─────────────────────────────────── */
.app-chat {
  width: 92%; max-width: 600px; height: calc(100vh - 120px);
  background: rgba(13, 26, 82, 0.4); backdrop-filter: blur(20px);
  border: 1px solid rgba(77, 163, 255, 0.15); border-radius: 24px;
  margin: 1.5rem auto; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5); z-index: 10;
}

.chat-header {
  padding: 1.2rem 1.5rem; background: rgba(7, 9, 29, 0.5);
  border-bottom: 1px solid rgba(77, 163, 255, 0.1);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.bot-info   { display: flex; align-items: center; gap: 12px; }
.bot-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--degradado); display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 1.1rem;
}
.bot-status      { display: flex; flex-direction: column; }
.bot-name        { color: white; font-weight: 600; font-size: 0.95rem; }
.status-online   { color: var(--verde-wa); font-size: 0.75rem; display: flex; align-items: center; gap: 4px; }
.status-online::before { content: ''; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }

.btn-inicio-header {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(77,163,255,0.2);
  border-radius: 10px; padding: 6px 14px; color: var(--gris); font-size: 0.8rem;
  cursor: pointer; font-family: inherit; transition: all 0.2s; display: none;
}
.btn-inicio-header:hover   { background: rgba(77,163,255,0.15); color: white; }
.btn-inicio-header.visible { display: block; }

/* ── MENSAJES ─────────────────────────────────── */
.messages {
  flex: 1; overflow-y: auto; padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
  scrollbar-width: thin; scrollbar-color: var(--azul-claro) transparent;
}
.messages::-webkit-scrollbar       { width: 5px; }
.messages::-webkit-scrollbar-thumb { background: var(--azul-claro); border-radius: 10px; }

.welcome    { text-align: center; color: var(--blanco); padding: 1.5rem 0.5rem; animation: fadeUp 0.5s ease; }
.welcome h2 { font-family: 'Bebas Neue', sans-serif; font-size: 2.2rem; margin-bottom: 0.5rem; letter-spacing: 1px; }
.welcome p  { color: var(--gris); font-size: 0.9rem; margin-bottom: 1.5rem; }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(77,163,255,0.25);
  border-radius: 16px; padding: 1.1rem 0.8rem; color: white; text-align: left; cursor: pointer;
  transition: all 0.18s; font-family: inherit; min-height: 72px;
  display: flex; flex-direction: column; gap: 4px;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.quick-btn:active  { transform: scale(0.96); background: rgba(77,163,255,0.2); border-color: var(--azul-claro); }
.quick-btn strong  { display: block; font-size: 0.9rem; color: var(--azul-claro); }
.quick-btn span    { font-size: 0.75rem; color: var(--gris); }

.msg       { display: flex; max-width: 92%; animation: fadeUp 0.3s ease; }
.msg-bot   { align-self: flex-start; }
.msg-user  { align-self: flex-end; }

.bubble { padding: 0.85rem 1.1rem; border-radius: 18px; font-size: 0.92rem; line-height: 1.55; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.bubble-bot  { background: rgba(13,26,82,0.85); color: var(--blanco); border: 1px solid rgba(77,163,255,0.2); border-bottom-left-radius: 4px; }
.bubble-user { background: var(--degradado); color: white; border-bottom-right-radius: 4px; font-size: 0.88rem; }
.bubble-bot b { color: var(--amarillo); }

/* ── MARCAS ───────────────────────────────────── */
.marcas-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.marca-pill {
  background: rgba(77,163,255,0.12); border: 1px solid rgba(77,163,255,0.3);
  border-radius: 20px; padding: 6px 14px; font-size: 0.82rem; color: var(--blanco);
  white-space: nowrap; cursor: pointer; transition: all 0.18s;
  user-select: none; -webkit-tap-highlight-color: transparent;
  text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
}
.marca-pill:active { background: rgba(77,163,255,0.3); transform: scale(0.96); }
.marca-pill.propia { background: rgba(255,205,60,0.15); border-color: var(--amarillo); color: var(--amarillo); }
.marca-pill .mp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--azul-claro); flex-shrink: 0; }
.marca-pill.propia .mp-dot { background: var(--amarillo); }
.marcas-ver-catalogo { margin-top: 10px; display: block; color: var(--amarillo); font-size: 0.82rem; text-decoration: none; }

/* ── LOOP MENU ────────────────────────────────── */
.loop-menu-wrap { animation: fadeUp 0.35s ease; }
.loop-sep { text-align: center; color: var(--gris); font-size: 0.78rem; margin: 4px 0 10px; position: relative; }
.loop-sep::before, .loop-sep::after { content: ''; position: absolute; top: 50%; width: 28%; height: 1px; background: rgba(77,163,255,0.2); }
.loop-sep::before { left: 0; }
.loop-sep::after  { right: 0; }

/* ── TYPING INDICATOR ─────────────────────────── */
.typing-indicator { display: flex; gap: 4px; padding: 0.8rem 1.1rem; }
.typing-indicator span { width: 8px; height: 8px; border-radius: 50%; background: var(--gris); animation: typingBounce 1.4s infinite ease-in-out; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ── DESKTOP (≥ 768px) ────────────────────────── */
@media (min-width: 768px) {
  .app-chat { height: 750px; margin: 3rem auto; }
}
