/**
 * Popup de cotización del blog (ver inc/lead-popup.php).
 * Escritorio: modal de dos columnas. Móvil: hoja inferior.
 * Identidad "Petróleo + Latón" con los tokens de style.css.
 */

.sh-lpop {
    --lpop-radius: 6px;
    width: min(860px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: var(--lpop-radius);
    background: var(--cal, #F3F2EF);
    color: var(--grafito, #1C2422);
    box-shadow: 0 24px 64px rgba(8, 32, 31, 0.35);
    font-family: var(--font-sans, 'Inter', sans-serif);
    overflow: auto;
    overscroll-behavior: contain;
}

.sh-lpop[open] {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
}

.sh-lpop::backdrop {
    background: rgba(8, 32, 31, 0.6);
    backdrop-filter: blur(3px);
    overflow: hidden;
    overscroll-behavior: contain;
}

.sh-lpop [hidden] { display: none !important; }

/* Entrada suave */
@media (prefers-reduced-motion: no-preference) {
    .sh-lpop[open] {
        animation: sh-lpop-in 0.32s cubic-bezier(0.25, 0.1, 0.25, 1);
    }
    .sh-lpop[open]::backdrop {
        animation: sh-lpop-fade 0.32s ease;
    }
}
@keyframes sh-lpop-in {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}
@keyframes sh-lpop-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* --- Columna de marca ------------------------------------------------- */
.sh-lpop__aside {
    position: relative;
    padding: 44px 36px;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(210, 155, 61, 0.16), transparent 60%),
        var(--petroleo-900, #08201F);
    color: var(--petroleo-100, #DCE6E3);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sh-lpop__eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--laton, #D29B3D);
}

.sh-lpop__title {
    margin: 0 0 24px;
    font-family: var(--font-heading, 'Fraunces', Georgia, serif);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.01em;
    color: var(--cal, #F3F2EF);
    text-wrap: balance;
}

.sh-lpop__benefits {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.sh-lpop__benefits li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    line-height: 1.45;
}

.sh-lpop__benefits svg {
    flex: none;
    margin-top: 1px;
    color: var(--laton, #D29B3D);
}

/* --- Columna del formulario ------------------------------------------ */
.sh-lpop__main {
    padding: 40px 36px 32px;
}

.sh-lpop__text {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--salvia, #5A6B68);
}

.sh-lpop__label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--grafito, #1C2422);
}

.sh-lpop__input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1.5px solid var(--lino, #DEDCD6);
    border-radius: 3px;
    background: #fff;
    color: var(--grafito, #1C2422);
    font: inherit;
    font-size: 16px; /* evita el zoom automático de iOS */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sh-lpop__input:focus-visible {
    outline: none;
    border-color: var(--petroleo-700, #0F3B3A);
    box-shadow: 0 0 0 3px rgba(15, 59, 58, 0.15);
}

.sh-lpop__textarea {
    min-height: 92px;
    resize: vertical;
}

.sh-lpop__submit,
.sh-lpop__continue {
    width: 100%;
    padding: 15px 18px;
    border: 1.5px solid var(--petroleo-700, #0F3B3A);
    border-radius: 3px;
    background: var(--laton, #D29B3D);
    color: var(--petroleo-700, #0F3B3A);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.sh-lpop__submit:hover,
.sh-lpop__continue:hover {
    background: var(--laton-oscuro, #B8842C);
}

.sh-lpop__submit:focus-visible,
.sh-lpop__continue:focus-visible,
.sh-lpop__close:focus-visible {
    outline: 2px solid var(--laton, #D29B3D);
    outline-offset: 2px;
}

.sh-lpop__submit[disabled] {
    opacity: 0.7;
    cursor: progress;
}

.sh-lpop__note {
    margin: 12px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    text-align: center;
    color: var(--salvia, #5A6B68);
}

.sh-lpop__note a { color: var(--petroleo-700, #0F3B3A); }

.sh-lpop__msg {
    display: none;
    margin: 0 0 16px;
    padding: 11px 14px;
    border-radius: 3px;
    background: var(--rojo-fondo, #FBEAE8);
    color: var(--rojo-texto, #8E1D18);
    font-size: 14px;
}

.sh-lpop__msg.is-visible { display: block; }

.sh-lpop__trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- Confirmación ----------------------------------------------------- */
.sh-lpop__success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.sh-lpop__success svg { color: var(--verde-aval, #1D6F4A); margin-bottom: 14px; }

.sh-lpop__success-title {
    margin: 0 0 10px;
    font-family: var(--font-heading, 'Fraunces', Georgia, serif);
    font-size: 24px;
    font-weight: 600;
    color: var(--petroleo-700, #0F3B3A);
}

.sh-lpop__success-text {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--salvia, #5A6B68);
}

/* --- Cerrar ----------------------------------------------------------- */
.sh-lpop__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--salvia, #5A6B68);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.sh-lpop__close:hover { background: var(--muted, #E4E1DB); color: var(--grafito, #1C2422); }

/* --- Móvil: hoja inferior --------------------------------------------- */
@media (max-width: 680px) {
    .sh-lpop {
        width: 100%;
        max-height: 88dvh;
        margin: auto 0 0;
        border-radius: 14px 14px 0 0;
    }

    .sh-lpop[open] {
        display: block;
    }

    @media (prefers-reduced-motion: no-preference) {
        .sh-lpop[open] { animation-name: sh-lpop-up; }
    }

    .sh-lpop__aside {
        padding: 26px 56px 18px 20px;
    }

    .sh-lpop__eyebrow { margin-bottom: 8px; font-size: 11px; }

    .sh-lpop__title {
        margin-bottom: 12px;
        font-size: 23px;
    }

    .sh-lpop__benefits {
        display: flex;
        flex-wrap: wrap;
        gap: 6px 14px;
    }

    .sh-lpop__benefits li { font-size: 13px; gap: 6px; }
    .sh-lpop__benefits li:first-child { display: none; }

    .sh-lpop__main { padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); }
    .sh-lpop__text { margin-bottom: 16px; font-size: 14px; }
    .sh-lpop__input { margin-bottom: 12px; }
    .sh-lpop__textarea { min-height: 76px; }

    .sh-lpop__close { color: var(--petroleo-100, #DCE6E3); }
    .sh-lpop__close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
}

@keyframes sh-lpop-up {
    from { transform: translateY(100%); }
    to   { transform: none; }
}
