/* ======================================================================
   Antiquaria Chat — Estilo visual
   Ruta: /media/antiqua/antiquaria-embed.css
   Compatible con antiquaria-embed.js v5
   ====================================================================== */

/* --- Botón flotante --- */
#antiquaria-chat-button {
  background: linear-gradient(145deg, #222, #000);
  color: #f5d89c;              /* Dorado Antiquaria */
  font-family: 'Georgia', serif;
  font-size: 22px;
  font-weight: bold;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  border: 2px solid #f5d89c;
  transition: all 0.25s ease;
}

#antiquaria-chat-button:hover {
  background: #f5d89c;
  color: #000;
  transform: scale(1.05);
}

/* --- Panel principal --- */
#antiquaria-chat-panel {
  backdrop-filter: blur(8px);
  border: 1px solid #ddd;
  overflow: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#antiquaria-chat-panel[data-open="false"] {
  opacity: 0;
  transform: translateY(20px);
}

/* --- Cabecera --- */
#antiquaria-chat-panel > div:first-child {
  background: linear-gradient(90deg, #111, #2b2b2b);
  border-bottom: 1px solid #444;
  font-family: 'Georgia', serif;
  letter-spacing: 0.5px;
}

#antiquaria-chat-panel div[aria-label="Cerrar chat"] {
  font-size: 18px;
  transition: transform 0.2s ease;
}

#antiquaria-chat-panel div[aria-label="Cerrar chat"]:hover {
  transform: scale(1.2);
}

/* --- Zona de mensajes --- */
#antiquaria-chat-messages {
  background: #f8f8f7;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  color: #222;
}

.aq-msg.aq-user .aq-body {
  background: #f0f5fa;
  border-color: #ccd6e0;
}

.aq-msg.aq-assistant .aq-body {
  background: #fff;
  border-color: #e6e6e6;
}

/* --- Burbujas --- */
.aq-msg .aq-body {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.aq-msg.aq-assistant .aq-body::before {
  content: "";
  display: block;
  height: 4px;
  width: 40px;
  background: #f5d89c;
  margin-bottom: 6px;
  border-radius: 2px;
}

/* --- Scrollbar (estética dorada) --- */
#antiquaria-chat-messages::-webkit-scrollbar {
  width: 8px;
}
#antiquaria-chat-messages::-webkit-scrollbar-thumb {
  background: #d8c48e;
  border-radius: 4px;
}
#antiquaria-chat-messages::-webkit-scrollbar-thumb:hover {
  background: #f5d89c;
}

/* --- Input y botón de enviar --- */
#antiquaria-chat-input {
  font-family: 'Open Sans', sans-serif;
  border: 1px solid #ccc;
  border-radius: 10px;
  transition: border-color 0.2s ease;
}

#antiquaria-chat-input:focus {
  border-color: #f5d89c;
  box-shadow: 0 0 0 2px rgba(245, 216, 156, 0.3);
}

#antiquaria-chat-send {
  background: #111;
  color: #f5d89c;
  border: 1px solid #f5d89c;
  font-family: 'Georgia', serif;
  transition: all 0.25s ease;
}

#antiquaria-chat-send:hover {
  background: #f5d89c;
  color: #000;
}

/* --- Spinner --- */
#antiquaria-chat-spinner {
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.2; }
  50% { opacity: 1; }
  100% { opacity: 0.2; }
}

/* --- Ajustes móviles --- */
@media (max-width: 500px) {
  #antiquaria-chat-panel {
    width: 92vw !important;
    right: 4vw !important;
    bottom: 100px !important;
    height: 75vh !important;
  }
}

/* Layout base sin inline */
.aq-btn {
  position: fixed; right: 20px; bottom: 20px; z-index: 2147483647;
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; line-height: 1; font-weight: 700; font-size: 22px;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
  background: #111; color: #fff;
}

.aq-panel {
  position: fixed; right: 20px; bottom: 88px; width: 360px; max-width: 90vw;
  height: 520px; max-height: 70vh; background: #fff; border-radius: 16px;
  box-shadow: 0 16px 28px rgba(0,0,0,.25); display: none; flex-direction: column;
  overflow: hidden; z-index: 2147483647;
}

.aq-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: #111; color: #fff;
}

.aq-title { font-weight: 600; }
.aq-header-right { display: flex; gap: 10px; align-items: center; }
.aq-spinner { display: none; opacity: 0.8; }
.aq-close { border: 0; background: transparent; font-size: 18px; color: #fff; cursor: pointer; }

.aq-messages { flex: 1; padding: 12px; overflow-y: auto; background: #f7f7f8; }

.aq-form {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px; border-top: 1px solid #eee;
}
.aq-input {
  resize: none; font-family: inherit; font-size: 14px; line-height: 1.4;
  padding: 10px 12px; border-radius: 10px; border: 1px solid #ddd; outline: none; max-height: 200px;
}
.aq-send { border: 0; border-radius: 10px; padding: 0 14px; font-weight: 600; cursor: pointer; background: #111; color: #fff; }

/* Tus estilos “Antiquaria” pueden machacar estos (sin !important ya funcionará) */

