/* ============================================================
   Formulario de captura de leads — modal multistep
   Prefijo ml- (modal-lead). Tokens de style.css reutilizados.
   ============================================================ */

:root {
  --ml-wa:        #25D366;
  --ml-wa-hover:  #128C7E;
  --ml-wa-shadow: rgba(37, 211, 102, .35);
  --ml-error:     #D93025;
  --ml-border:    #E2E2E2;
  --ml-selected-bg: rgba(212, 175, 55, .08);
}

/* ── Overlay ─────────────────────────────────────────────── */
.ml-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
}
.ml-overlay[hidden] { display: none; }

/* ── Backdrop ────────────────────────────────────────────── */
.ml-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

/* ── Panel ───────────────────────────────────────────────── */
.ml-panel {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: var(--border-radius-lg);
  width: min(480px, 92vw);
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  animation: ml-entrada .28s cubic-bezier(.22, .61, .36, 1) both;
}

@keyframes ml-entrada {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

@keyframes ml-entrada-mobile {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: none; }
}

/* Mobile: sheet desde abajo */
@media (max-width: 600px) {
  .ml-overlay { align-items: flex-end; }
  .ml-panel {
    width: 100%;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    max-height: 94vh;
    animation: ml-entrada-mobile .28s cubic-bezier(.22, .61, .36, 1) both;
  }
}

/* ── Barra superior ──────────────────────────────────────── */
.ml-barra {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1rem 0;
}

.ml-progreso-pista {
  flex: 1;
  height: 4px;
  background: var(--ml-border);
  border-radius: 99px;
  overflow: hidden;
}

.ml-progreso-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 99px;
  width: 33%;
  transition: width .4s ease;
}

.ml-cerrar {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--secondary-color);
  padding: 4px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}
.ml-cerrar:hover { color: var(--text-color); }

/* ── Formulario y pasos ──────────────────────────────────── */
.ml-form {
  padding: 1.5rem 1.75rem 2rem;
}

.ml-paso {
  animation: ml-paso-in .22s ease both;
}

@keyframes ml-paso-in {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: none; }
}

.ml-label-oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.ml-counter {
  font-size: .72rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: .3rem;
}

.ml-titulo {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 4vw, 1.55rem);
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.25;
  margin-bottom: .4rem;
}

.ml-desc {
  font-size: .88rem;
  color: var(--secondary-color);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

/* ── Input genérico ──────────────────────────────────────── */
.ml-input {
  display: block;
  width: 100%;
  padding: .875rem 1rem;
  font-size: 1rem;
  font-family: var(--font-primary);
  color: var(--text-color);
  border: 1.5px solid var(--ml-border);
  border-radius: var(--border-radius-md);
  background: #FAFAFA;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  margin-bottom: .25rem;
}
.ml-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, .15);
  background: var(--white);
}
.ml-input.ml-input--error {
  border-color: var(--ml-error);
  box-shadow: 0 0 0 3px rgba(217, 48, 37, .1);
}
.ml-textarea {
  resize: vertical;
  min-height: 78px;
}

/* ── Mensaje de error ────────────────────────────────────── */
.ml-error {
  font-size: .8rem;
  color: var(--ml-error);
  min-height: 1.1rem;
  margin-bottom: .4rem;
}

/* ── Tabs de tipo de contacto ────────────────────────────── */
.ml-tabs-contacto {
  display: flex;
  gap: .6rem;
  margin-bottom: 1rem;
}

.ml-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .65rem;
  border: 1.5px solid var(--ml-border);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-size: .9rem;
  font-weight: 500;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  user-select: none;
}
.ml-tab input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.ml-tab:has(input:checked) {
  border-color: var(--primary-color);
  background: var(--ml-selected-bg);
}
.ml-tab:focus-within {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ── Cards de tipo de evento ─────────────────────────────── */
.ml-cards-evento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin-bottom: .75rem;
}

.ml-card-evento {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: .875rem .5rem;
  border: 1.5px solid var(--ml-border);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  text-align: center;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
  user-select: none;
}
.ml-card-evento input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.ml-card-evento:hover {
  border-color: var(--primary-color);
  transform: translateY(-1px);
}
.ml-card-evento:has(input:checked) {
  border-color: var(--primary-color);
  background: var(--ml-selected-bg);
}
.ml-card-evento:focus-within {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
.ml-card-icono { font-size: 1.5rem; line-height: 1; }
.ml-card-texto { font-size: .82rem; font-weight: 500; line-height: 1.3; }

/* ── Botones de navegación ───────────────────────────────── */
.ml-btn-sig {
  width: 100%;
  margin-top: .875rem;
  padding: .875rem;
  font-size: 1rem;
}

.ml-btn-atras {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--secondary-color);
  font-size: .84rem;
  font-family: var(--font-primary);
  margin-top: .625rem;
  padding: .2rem 0;
  transition: color var(--transition-fast);
}
.ml-btn-atras:hover { color: var(--text-color); }

/* ── Paso 4: Confirmación ────────────────────────────────── */
.ml-icono-ok {
  width: 2.75rem;
  height: 2.75rem;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.ml-resumen {
  background: var(--light-bg);
  border-radius: var(--border-radius-md);
  padding: 1rem 1.125rem;
  margin: 1.125rem 0 1.375rem;
}
.ml-resumen-fila {
  display: flex;
  gap: .75rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--ml-border);
  font-size: .88rem;
  line-height: 1.45;
}
.ml-resumen-fila:last-child { border-bottom: none; }
.ml-resumen-fila dt {
  font-weight: 600;
  color: var(--secondary-color);
  width: 5.25rem;
  flex-shrink: 0;
}
.ml-resumen-fila dd { color: var(--text-color); word-break: break-word; }

/* ── Botón WhatsApp ──────────────────────────────────────── */
.ml-btn-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  width: 100%;
  padding: .9375rem;
  background: var(--ml-wa);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius-md);
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.ml-btn-wa:hover {
  background: var(--ml-wa-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--ml-wa-shadow);
}
.ml-btn-wa:active { transform: none; box-shadow: none; }

.ml-trust {
  text-align: center;
  font-size: .77rem;
  color: var(--secondary-color);
  margin-top: .7rem;
}

/* ── Botón flotante de WhatsApp como <button> ────────────── */
button.boton-whatsapp {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
