/* =========================================================
   Fan3D — Botón flotante + Modal de captura de leads
   ========================================================= */

/* --- Botón flotante --- */
.fab-lead {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #8b5cf6;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 20px rgba(139,92,246,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.fab-lead:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(139,92,246,0.55);
}
.fab-lead svg { width: 28px; height: 28px; fill: currentColor; }

/* --- Overlay --- */
.lead-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  padding: 1rem;
}
.lead-overlay.active { display: flex; }

/* --- Modal --- */
.lead-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: leadSlideUp 0.3s ease;
}
@keyframes leadSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lead-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 0;
}
.lead-modal__header h3 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: #1a1a2e;
  margin: 0;
}
.lead-modal__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f5f5f7;
  color: #1a1a2e;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.lead-modal__close:hover { background: #eaeaef; }

.lead-modal__sub {
  padding: 0.25rem 1.5rem 0;
  font-size: 0.85rem;
  color: rgba(26,26,46,0.55);
}

.lead-modal__body {
  padding: 1.25rem 1.5rem 1.5rem;
}

/* --- Formulario --- */
.lead-form .fg {
  margin-bottom: 1rem;
}
.lead-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(26,26,46,0.55);
  margin-bottom: 0.35rem;
  font-family: 'Nunito', sans-serif;
}
.lead-form input,
.lead-form textarea,
.lead-form select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: #f5f5f7;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  color: #1a1a2e;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.15s;
}
.lead-form input:focus,
.lead-form textarea:focus,
.lead-form select:focus {
  outline: none;
  border-color: rgba(139,92,246,0.5);
}
.lead-form textarea {
  min-height: 80px;
  resize: vertical;
}
.lead-form .fg-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* --- Botón submit --- */
.lead-form .btn-submit {
  width: 100%;
  padding: 0.75rem;
  background: #8b5cf6;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 0.25rem;
}
.lead-form .btn-submit:hover { background: #7c3aed; }
.lead-form .btn-submit:active { transform: scale(0.98); }
.lead-form .btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- Mensajes --- */
.lead-msg {
  display: none;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  font-family: 'Nunito', sans-serif;
}
.lead-msg--ok {
  display: block;
  background: rgba(74,222,128,0.12);
  border: 1px solid rgba(74,222,128,0.3);
  color: #16a34a;
}
.lead-msg--err {
  display: block;
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.3);
  color: #dc2626;
}

/* --- Responsive --- */
@media (max-width: 500px) {
  .lead-modal { border-radius: 12px; }
  .lead-form .fg-row { grid-template-columns: 1fr; }
}
