/* FAB único: menú desplegable Asistente / Escríbenos */
.fab-menu-wrap {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
}
.fab-menu-wrap .fab-menu-btn {
  position: static;
}
.fab-menu-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #0b0906;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.fab-menu-btn:hover {
  filter: brightness(1.08);
}
.fab-menu-btn svg {
  width: 1.2rem;
  height: 1.2rem;
}
.fab-menu-dropdown {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 0.5rem;
  min-width: 10rem;
  background: var(--bg-elevated, #1e1e2e);
  border: 1px solid var(--border, #333);
  border-radius: var(--radius, 8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  padding: 0.25rem 0;
  z-index: 902;
}
.fab-menu-dropdown[hidden] {
  display: none;
}
.fab-menu-item {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  color: var(--text, #e2e8f0);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}
.fab-menu-item:hover {
  background: var(--accent-dim, rgba(99, 102, 241, 0.15));
}

/* Panel del asistente (global) */
.assistant-wrap {
  position: relative;
}
.assistant-panel {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  z-index: 901;
  width: 360px;
  max-width: calc(100vw - 2.5rem);
  max-height: 70vh;
  background: var(--bg-elevated, #1e1e2e);
  border: 1px solid var(--border, #333);
  border-radius: var(--radius, 12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.assistant-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border, #333);
  flex-shrink: 0;
}
.assistant-panel-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text, #e2e8f0);
}
.assistant-panel-close {
  background: none;
  border: none;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.1rem;
  line-height: 1;
}
.assistant-panel-close:hover {
  color: var(--text, #e2e8f0);
}

.assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 120px;
}

.assistant-msg {
  max-width: 90%;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  word-break: break-word;
}
.assistant-msg-user {
  align-self: flex-end;
  background: var(--accent-dim, rgba(99, 102, 241, 0.2));
  color: var(--text, #e2e8f0);
  border-bottom-right-radius: 4px;
}
.assistant-msg-bot {
  align-self: flex-start;
  background: var(--bg, #252536);
  color: var(--text, #e2e8f0);
  border: 1px solid var(--border, #333);
  border-bottom-left-radius: 4px;
}
.assistant-msg-bot p {
  margin: 0 0 0.5em 0;
  line-height: 1.5;
}
.assistant-msg-bot p:last-child {
  margin-bottom: 0;
}
.assistant-msg-bot ul,
.assistant-msg-bot ol {
  margin: 0.35em 0 0.5em 0;
  padding-left: 1.25em;
}
.assistant-msg-bot ul { list-style-type: disc; }
.assistant-msg-bot ol { list-style-type: decimal; }
.assistant-msg-bot li {
  margin-bottom: 0.2em;
  line-height: 1.45;
}
.assistant-msg-bot strong {
  font-weight: 600;
}
.assistant-msg-bot em {
  font-style: italic;
}
.assistant-msg-loading {
  color: var(--text-muted, #94a3b8);
}

.assistant-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border, #333);
  flex-shrink: 0;
}
.assistant-input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border, #333);
  border-radius: var(--radius-sm, 8px);
  background: var(--bg, #252536);
  color: var(--text, #e2e8f0);
  font-size: 0.9rem;
}
.assistant-input::placeholder {
  color: var(--text-muted, #94a3b8);
}
.assistant-input:focus {
  outline: none;
  border-color: var(--accent, #6366f1);
}

@media (max-width: 768px) {
  .assistant-panel {
    right: 1rem;
    bottom: 4.5rem;
  }
}
