/* ═══════════════════════════════════════════
   Asistente de IA — Grupo Mayer
   Widget compartido — usa --agente-accent con
   fallback a azul de marca; InmoMayer puede
   sobreescribirla a terracota.
═══════════════════════════════════════════ */
#mayer-agente-fab {
  position: fixed;
  bottom: 26px;
  left: 26px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--agente-accent, #0048AC);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,72,172,0.35);
  z-index: 300;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
#mayer-agente-fab:hover { transform: scale(1.08); }
#mayer-agente-fab svg { color: white; }
#mayer-agente-fab .agente-dot {
  position: absolute; top: 4px; right: 4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #25D366; border: 2px solid white;
}

#mayer-agente-panel {
  position: fixed;
  bottom: 96px;
  left: 26px;
  width: min(360px, calc(100vw - 40px));
  height: min(520px, calc(100vh - 140px));
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  z-index: 300;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}
#mayer-agente-panel.open { display: flex; }

.agente-header {
  background: var(--agente-accent, #0048AC);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.agente-header img { width: 26px; height: 22px; object-fit: contain; flex-shrink: 0; }
.agente-header-text { flex: 1; }
.agente-header-text .name { font-size: 14px; font-weight: 700; line-height: 1.2; }
.agente-header-text .status { font-size: 11.5px; color: rgba(255,255,255,0.75); display: flex; align-items: center; gap: 5px; }
.agente-header-text .status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #25D366; display: inline-block; }
.agente-close { background: rgba(255,255,255,0.15); border: none; color: #fff; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background 0.2s; }
.agente-close:hover { background: rgba(255,255,255,0.28); }

.agente-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #F7F8FA;
}
.agente-msg { max-width: 84%; font-size: 13.5px; line-height: 1.55; padding: 10px 13px; border-radius: 12px; white-space: pre-wrap; }
.agente-msg.bot { background: #fff; color: #1a1a1a; align-self: flex-start; border: 1px solid #EAEAEE; border-bottom-left-radius: 3px; }
.agente-msg.user { background: var(--agente-accent, #0048AC); color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; }
.agente-msg.typing { display: flex; gap: 4px; align-items: center; padding: 12px 15px; }
.agente-msg.typing span { width: 6px; height: 6px; border-radius: 50%; background: #b7bcc7; animation: agente-blink 1.2s infinite ease-in-out; }
.agente-msg.typing span:nth-child(2) { animation-delay: 0.2s; }
.agente-msg.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes agente-blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.agente-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 16px 12px; background: #F7F8FA; flex-shrink: 0; }
.agente-chip { font-size: 12px; font-weight: 500; color: var(--agente-accent, #0048AC); background: #fff; border: 1px solid #E2E4EA; padding: 7px 13px; border-radius: 100px; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.agente-chip:hover { background: #F0F3F9; border-color: var(--agente-accent, #0048AC); }

.agente-input-row { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #EAEAEE; background: #fff; flex-shrink: 0; }
.agente-input-row input { flex: 1; border: 1px solid #E2E4EA; border-radius: 100px; padding: 10px 16px; font-size: 13.5px; font-family: inherit; outline: none; transition: border-color 0.2s; }
.agente-input-row input:focus { border-color: var(--agente-accent, #0048AC); }
.agente-send { width: 38px; height: 38px; border-radius: 50%; background: var(--agente-accent, #0048AC); border: none; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background 0.2s; }
.agente-send:disabled { opacity: 0.5; cursor: default; }

.agente-footer-note { font-size: 10px; color: #a3a7b3; text-align: center; padding: 6px 12px 10px; background: #fff; flex-shrink: 0; }

@media (max-width: 480px) {
  #mayer-agente-panel { left: 14px; bottom: 88px; }
  #mayer-agente-fab { left: 14px; bottom: 20px; }
}
