/* ============================================================
   PERSONALIZACIÓN RÁPIDA
   Cambia este único valor para cambiar el color de todo el chat.
   ============================================================ */
:root {
  --quini-color: #162E4D;
}

#maria-burbuja {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--quini-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  z-index: 9999;
  overflow: hidden;
}

#maria-burbuja img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

#maria-ventana {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 340px;
  max-width: 90vw;
  height: 460px;
  max-height: 70vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-family: Arial, sans-serif;
}

#maria-ventana.maria-abierta {
  display: flex;
}

#maria-header {
  background: var(--quini-color);
  color: #fff;
  padding: 12px 16px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#maria-cerrar {
  cursor: pointer;
  font-size: 20px;
}

#maria-mensajes {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background: #f7f7f7;
}

.maria-msg {
  max-width: 80%;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.maria-msg-bot {
  background: #fff;
  border: 1px solid #ddd;
  align-self: flex-start;
}

.maria-msg-usuario {
  background: var(--quini-color);
  color: #fff;
  margin-left: auto;
}

.maria-pensando {
  opacity: 0.6;
  font-style: italic;
}

#maria-input-area {
  display: flex;
  border-top: 1px solid #ddd;
  padding: 8px;
}

#maria-input {
  flex: 1;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px;
  font-size: 14px;
}

#maria-enviar {
  background: var(--quini-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  width: 40px;
  margin-left: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#maria-enviar:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ============================================================
   VOZ: micrófono (dictado) y altavoz (lectura en voz alta).
   Ver _compartido/voz-navegador.js. Los botones solo se crean si el
   navegador soporta la función.
   ============================================================ */
#maria-header-acciones {
  display: flex;
  align-items: center;
  gap: 10px;
}

#maria-voz,
#maria-mic {
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#maria-voz {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

#maria-voz:hover {
  background: rgba(255, 255, 255, 0.35);
}

#maria-voz[aria-pressed="true"] {
  background: #fff;
  color: var(--quini-color);
}

#maria-mic {
  width: 40px;
  margin-left: 6px;
  border-radius: 6px;
  background: #eee;
  color: #444;
}

#maria-mic:hover {
  background: #e0e0e0;
}

#maria-mic[aria-pressed="true"] {
  background: #c62828;
  color: #fff;
  animation: maria-pulso-mic 1.2s infinite;
}

#maria-voz:focus-visible,
#maria-mic:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

@keyframes maria-pulso-mic {
  0% { box-shadow: 0 0 0 0 rgba(198, 40, 40, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(198, 40, 40, 0); }
  100% { box-shadow: 0 0 0 0 rgba(198, 40, 40, 0); }
}

@media (prefers-reduced-motion: reduce) {
  #maria-mic[aria-pressed="true"] { animation: none; }
}


/* ===== Marca de la Clínica Dental Antonio Losada (demo3, 28-oct-2026) ===== */
#maria-burbuja { border: 2px solid #DDB837; }
#maria-burbuja img { object-fit: contain; padding: 9px; border-radius: 0; }
#maria-ventana { font-family: Montserrat, Arial, sans-serif; }
#maria-header { border-bottom: 2px solid #DDB837; font-weight: 600; letter-spacing: .02em; }
#maria-enviar { background: #87764D; }
.maria-msg-bot a { color: #87764D; }.maria-msg { overflow-wrap: anywhere; }