/* Nexa — asistente público de la landing */

.nexa {
  font-family: var(--fm-font);
}

.nexa__fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 400;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.55rem 1rem 0.55rem 0.75rem;
  border: none;
  border-radius: 999px;
  background: var(--fm-gold);
  color: #1a1408;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(201, 169, 98, 0.4);
}

.nexa__fab:focus-visible {
  outline: 3px solid var(--fm-focus);
  outline-offset: 3px;
}

.nexa__fab-avatar {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.nexa__header-avatar {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.nexa__panel {
  position: fixed;
  z-index: 401;
  right: 1rem;
  bottom: 4.5rem;
  width: min(22.5rem, calc(100vw - 2rem));
  max-height: min(70vh, 36rem);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius);
  background: var(--fm-bg-elevated);
  color: var(--fm-text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.nexa__panel[hidden] {
  display: none;
}

.nexa__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--fm-border);
}

.nexa__title {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nexa__subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--fm-text-muted);
}

.nexa__close {
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-sm);
  background: transparent;
  color: inherit;
  font-size: 1.25rem;
  cursor: pointer;
}

.nexa__close:focus-visible {
  outline: 2px solid var(--fm-focus);
  outline-offset: 2px;
}

.nexa__messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: var(--fm-bg-deep);
}

.nexa__msg {
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: var(--fm-radius-sm);
  font-size: 0.9rem;
  line-height: 1.45;
}

.nexa__msg--nexa {
  align-self: flex-start;
  background: var(--fm-bg-soft);
}

.nexa__msg--user {
  align-self: flex-end;
  background: var(--fm-gold-soft);
}

.nexa__msg a {
  color: var(--fm-gold);
}

.nexa__composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  padding: 0.75rem;
  border-top: 1px solid var(--fm-border);
}

.nexa__input {
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-sm);
  background: var(--fm-bg-deep);
  color: var(--fm-text);
  font: inherit;
}

.nexa__input:focus-visible {
  outline: 2px solid var(--fm-focus);
}

.nexa__send {
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: none;
  border-radius: var(--fm-radius-sm);
  background: var(--fm-btn-bg);
  color: var(--fm-btn-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.nexa .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 768px) {
  .nexa__fab {
    right: 1.5rem;
    bottom: 1.5rem;
  }

  .nexa__panel {
    right: 1.5rem;
    bottom: 5rem;
  }
}
