/* Chat José Adonis — flotante EBYZOM */
.ebyzom-agent {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99990;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.ebyzom-agent__launcher {
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.ebyzom-agent__launcher-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ebyzom-agent__launcher.is-open {
  opacity: 0;
  pointer-events: none;
}

.ebyzom-agent__panel {
  width: min(380px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 100px));
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 12px;
}

.ebyzom-agent__panel[hidden] {
  display: none !important;
}

.ebyzom-agent__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #111827;
  border-bottom: 1px solid #1f2937;
}

.ebyzom-agent__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.ebyzom-agent__head strong {
  display: block;
  font-size: 0.95rem;
}

.ebyzom-agent__head span {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
}

.ebyzom-agent__x {
  margin-left: auto;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.ebyzom-agent__messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #0b1220;
}

.ebyzom-agent__msg {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.ebyzom-agent__msg--user {
  align-self: flex-end;
  background: #2563eb;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.ebyzom-agent__msg--agent {
  align-self: flex-start;
  background: #1e293b;
  border-bottom-left-radius: 4px;
}

.ebyzom-agent__msg.is-typing {
  color: #94a3b8;
  font-style: italic;
}

.ebyzom-agent__form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #1f2937;
  background: #111827;
}

.ebyzom-agent__form input {
  flex: 1;
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 9px 14px;
  background: #0b1220;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.ebyzom-agent__form button {
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

/* Evitar solape con el botón WhatsApp (solo desktop) */
@media (min-width: 768px) {
  .ebyzom-agent {
    right: 18px;
    bottom: 96px;
  }
}

@media (max-width: 767px) {
  .ebyzom-agent {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .ebyzom-agent__panel {
    width: calc(100vw - 24px);
    height: min(70vh, 560px);
  }
}
