/* Formulario de inscripción de las landings (mismos campos que inc/footer-v3.php) */
#leadForm .campo { margin-bottom: 18px; }
#leadForm label {
    display: block;
    font-size: .8125rem;
    font-weight: 700;
    color: #242424;
    margin-bottom: 2px;
}
#leadForm input:not(.hp):not([type="radio"]),
#leadForm select {
    width: 100%;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid #000;
    border-radius: 0;
    background-color: transparent;
    margin-bottom: 0;
    font-size: 1rem; /* 16px: evita el zoom automático en iOS */
    color: #242424;
    outline: 0;
}
#leadForm select { cursor: pointer; }
#leadForm input:not(.hp):not([type="radio"]):focus,
#leadForm select:focus {
    border-bottom-color: #0BD561;
    box-shadow: 0 1px 0 0 #0BD561;
}
#leadForm input.is-invalid,
#leadForm select.is-invalid,
#leadForm input.is-invalid:focus,
#leadForm select.is-invalid:focus {
    border-bottom-color: #b42318;
    box-shadow: 0 1px 0 0 #b42318;
}
#leadForm .form-error {
    display: block;
    color: #b42318;
    font-size: .75rem;
    line-height: 1.3;
    margin-top: 4px;
}
#leadForm .form-error:empty { display: none; }
#leadForm .form-resumen {
    color: #b42318;
    font-size: .8125rem;
    line-height: 1.4;
    margin: 4px 0 8px;
}
#leadForm .form-privacidad {
    font-size: .7rem;
    line-height: 1.4;
    color: #6b6b6b;
    text-align: center;
    margin: 14px 0 0;
}
/* Honeypot anti-spam: fuera de pantalla, invisible para personas */
#leadForm .hp {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

/* ---------- Curso: botones de opción (radio) ---------- */
#leadForm fieldset.campo { border: 0; padding: 0; min-width: 0; }
#leadForm legend {
    float: none;
    width: auto;
    display: block;
    padding: 0;
    margin: 0 0 8px;
    font-size: .8125rem;
    font-weight: 700;
    line-height: 1.2;
    color: #242424;
}
/* Pastillas una al lado de la otra; saltan de renglón cuando no entran */
#leadForm .cursos-lista { display: flex; flex-wrap: wrap; gap: 6px; }
/* Pastilla: el <input type="radio"> queda oculto pero accesible (teclado / lector de pantalla) */
#leadForm .opcion-curso {
    position: relative;
    display: flex;
    margin: 0;
    cursor: pointer;
}
#leadForm .opcion-curso input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    pointer-events: none;
}
#leadForm .opcion-curso span {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    background: #fff;
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    color: #242424;
    transition: border-color .15s, background-color .15s, color .15s;
}
#leadForm .opcion-curso:hover span { border-color: #0BD561; }
#leadForm .opcion-curso input:focus-visible + span { outline: 2px solid #242424; outline-offset: 2px; }
#leadForm .opcion-curso input:checked + span {
    background-color: #0BD561;
    border-color: #0BD561;
    color: #0b2b16;
    font-weight: 700;
}
#leadForm fieldset.is-invalid .opcion-curso span { border-color: #b42318; }
#leadForm .cursos-nota {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 12px 0 0;
    padding: 10px 12px;
    background: #fff4e0;
    border: 1px solid #ffc27a;
    border-left: 4px solid #ff8e00;
    border-radius: 8px;
    font-size: .8125rem;
    font-weight: 700;
    line-height: 1.35;
    color: #7a3a00;
}
#leadForm .cursos-nota::before {
    content: "!";
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff8e00;
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
}

/* ---------- Popup más ancho (pisa max-width: 474px de main.css) ---------- */
.popup_inner { max-width: 680px; }

/* ---------- Bloqueo del scroll de la página mientras el popup está abierto ---------- */
html.popup-abierto,
html.popup-abierto body { overflow: hidden; }
.popup { overscroll-behavior: contain; }

/* ---------- Cabecera del popup: logo de WhatsApp + título + botón de cerrar ---------- */
/* Pisa el padding de 80px de main.css (el logo ya no flota por encima de la tarjeta) */
.wrapper_form { padding: 0 0 28px; }
#leadForm { padding: 0 24px; }
.popup_cabecera {
    position: sticky; /* queda fijo arriba al hacer scroll: el botón de cerrar siempre se ve */
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 12px 20px;
    margin-bottom: 16px;
    background: #fff;
    border-bottom: 1px solid #ececec;
    border-radius: 20px 20px 0 0;
}
.popup_cabecera_logo {
    flex: 0 0 auto;
    display: flex;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(90deg, #1EBEA5, #00E676);
    overflow: hidden;
}
.popup_cabecera_logo img { display: block; width: 100%; height: 100%; border-radius: 50%; }
.popup_cabecera_titulo {
    flex: 1 1 auto;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.15;
    color: #242424;
}
.wrapper_form .popupClose {
    position: static;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f1f1;
    color: #242424;
    transition: background-color .15s;
}
.wrapper_form .popupClose:hover,
.wrapper_form .popupClose:focus-visible { background: #e0e0e0; }
.wrapper_form .popupClose svg { display: block; width: 20px; height: 20px; }
