/* ════════════════════════════════════════════════════
   BOTÓN FLOTANTE DE AYUDA + MODAL — help-modal.css
   Lo usan precios, presupuesto, materiales, registro y el editor.
   Solo variables del tema actual (definidas para claro y oscuro en
   css/electroprecios_teal.css y en el editor): sin colores fijos, para
   que el modal siga al tema elegido.
   ════════════════════════════════════════════════════ */

/* ── BOTÓN FLOTANTE DE AYUDA ── */
.help-fab {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.1rem;
  background: var(--brand, #1D9E75);
  color: #0a1628;                      /* ~5,6:1 sobre el verde de marca */
  border: none;
  border-radius: 50px;
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(29,158,117,0.35), 0 2px 8px rgba(0,0,0,0.25);
  transition: transform 0.18s, box-shadow 0.18s, background 0.15s;
  white-space: nowrap;
}
.help-fab:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 28px rgba(29,158,117,0.5), 0 3px 10px rgba(0,0,0,0.3);
}
.help-fab:active { transform: scale(0.97); }
.help-fab svg { flex-shrink: 0; }
@media (max-width: 480px) {
  .help-fab { bottom: 1.25rem; right: 1.25rem; padding: 0.6rem 0.9rem; }
  .help-fab-label { display: none; }
}

/* ── MODAL DE AYUDA ── */
.help-modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  padding: 1.25rem;
}
.help-modal-overlay.open { display: flex; }

.help-modal {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--volt-border);
  border-radius: 16px;
  width: 100%; max-width: 640px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  animation: modalIn 0.25s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes modalIn {
  from { opacity:0; transform: scale(0.92) translateY(16px); }
  to   { opacity:1; transform: scale(1)    translateY(0);    }
}
@media (prefers-reduced-motion: reduce) { .help-modal { animation: none; } }

.help-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--bg-card);
  z-index: 1;
}
.help-modal-title {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono, monospace); font-size: 1rem; font-weight: 700;
  color: var(--brand);
}
.help-modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); padding: 0.25rem;
  border-radius: 6px; transition: color 0.15s, background 0.15s;
  display: flex; align-items: center;
}
.help-modal-close:hover { color: var(--text-primary); background: var(--bg-input); }

.help-modal-body { padding: 1.25rem 1.5rem 1.5rem; }

.help-section { margin-bottom: 1.5rem; }
.help-section:last-child { margin-bottom: 0; }

.help-section-title {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono, monospace); font-size: 0.72rem; font-weight: 700;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.help-section-title svg { color: var(--brand); }

.help-step {
  display: flex; gap: 0.85rem; align-items: flex-start;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
  transition: border-color 0.15s;
}
.help-step:hover { border-color: var(--volt-border); }
.help-step-num {
  flex-shrink: 0; width: 24px; height: 24px;
  background: var(--volt-dim); border: 1px solid var(--volt-border);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono, monospace); font-size: 0.68rem; font-weight: 700;
  color: var(--brand); margin-top: 0.05rem;
}
.help-step-text { font-size: 0.875rem; line-height: 1.55; color: var(--text-primary); }
.help-step-text strong { color: var(--brand); font-weight: 600; }
.help-step-text em { color: var(--text-secondary); font-style: normal; font-size: 0.8rem; }

.help-tip {
  display: flex; gap: 0.6rem; align-items: flex-start;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  background: var(--volt-dim);
  border: 1px dashed var(--volt-border);
  margin-bottom: 0.45rem;
  font-size: 0.82rem; line-height: 1.5; color: var(--text-primary);
}
.help-tip strong { color: var(--text-primary); }
.help-tip svg { flex-shrink: 0; color: var(--brand); margin-top: 0.05rem; }

/* Enlaces dentro del modal: color de marca (el azul por defecto no se lee en el tema oscuro) */
.help-modal a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.help-modal a:hover { color: var(--text-primary); }
