/**
 * Wompea · Popup unificado de asesoría.
 * Se carga globalmente porque el popup está disponible en todo el sitio.
 */

.wompea-popup-asesoria {
    --wompea-popup-navy: #00314f;
    --wompea-popup-navy-deep: #022a45;
    --wompea-popup-coral: #ff3f5c;
    --wompea-popup-orange: #ff6848;
    --wompea-popup-teal: #278ca4;
    --wompea-popup-green: #25d366;
    --wompea-popup-text: #123b55;
    --wompea-popup-muted: #5b7588;
    --wompea-popup-line: #d9e5eb;
    --wompea-popup-soft: #f5f9fb;
    position: relative;
    display: grid !important;
    grid-template-columns: minmax(235px, 0.72fr) minmax(0, 1.45fr);
    width: min(820px, calc(100vw - 32px));
    max-width: 820px;
    overflow: hidden;
    border: 1px solid rgba(0, 49, 79, 0.1);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 42, 69, 0.24);
}

.wompea-popup-asesoria::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    z-index: 4;
    height: 5px;
    background: linear-gradient(
        90deg,
        var(--wompea-popup-orange) 0 18%,
        var(--wompea-popup-teal) 18% 36%,
        var(--wompea-popup-green) 36% 54%,
        var(--wompea-popup-coral) 54% 100%
    );
}

.wompea-popup-asesoria__identity,
.wompea-popup-asesoria__content {
    --width: 100%;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    flex-basis: auto !important;
}

.wompea-popup-asesoria__identity {
    position: relative;
    overflow: hidden;
    min-height: 470px;
    padding: 34px 26px 0 !important;
    color: #fff;
    background:
        radial-gradient(circle at 92% 20%, rgba(39, 140, 164, 0.34), transparent 38%),
        linear-gradient(145deg, var(--wompea-popup-navy-deep), var(--wompea-popup-navy));
}

.wompea-popup-asesoria__identity::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: 42px;
    width: 190px;
    height: 190px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.wompea-popup-asesoria__brand {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 434px;
    flex-direction: column;
}

.wompea-popup-asesoria__human {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    margin: 0 0 15px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.wompea-popup-asesoria__human > span {
    width: 9px;
    height: 9px;
    border: 2px solid rgba(255, 255, 255, 0.78);
    border-radius: 50%;
    background: var(--wompea-popup-green);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.wompea-popup-asesoria__brand h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(25px, 2.5vw, 32px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.wompea-popup-asesoria__brand > p:not(.wompea-popup-asesoria__secure) {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.5;
}

.wompea-popup-asesoria__mascot {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 1;
    align-items: flex-end;
    justify-content: center;
    min-height: 210px;
    margin: 4px -18px 0;
}

.wompea-popup-asesoria__mascot::before {
    content: "";
    position: absolute;
    right: 50%;
    bottom: 8px;
    width: 185px;
    height: 185px;
    transform: translateX(50%);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.wompea-popup-asesoria__mascot img {
    position: relative;
    z-index: 1;
    display: block;
    width: 220px;
    max-width: 100%;
    height: 220px;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 14px 22px rgba(0, 10, 25, 0.28));
}

.wompea-popup-asesoria__secure {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -10px -26px 0 !important;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(0, 20, 36, 0.34);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
}

.wompea-popup-asesoria__secure span {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--wompea-popup-green);
    font-size: 12px;
}

.wompea-popup-asesoria__content {
    padding: 36px 34px 26px !important;
    background:
        radial-gradient(circle at 100% 0, rgba(255, 63, 92, 0.06), transparent 34%),
        #fff;
}

.wompea-popup-asesoria__intro {
    position: relative;
    padding-right: 126px;
}

.wompea-popup-asesoria__eyebrow {
    margin: 0 0 8px;
    color: var(--wompea-popup-coral);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.wompea-popup-asesoria__intro h2 {
    margin: 0;
    color: var(--wompea-popup-navy);
    font-size: clamp(25px, 3vw, 35px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.wompea-popup-asesoria__description {
    margin: 10px 0 18px;
    color: var(--wompea-popup-muted);
    font-size: 14px;
    line-height: 1.5;
}

.wompea-popup-asesoria__price {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    width: 112px;
    min-height: 58px;
    flex-direction: column;
    justify-content: center;
    padding: 9px 10px;
    border: 1px solid rgba(255, 63, 92, 0.16);
    border-radius: 14px;
    background: #fff2f5;
    text-align: center;
}

.wompea-popup-asesoria__price[hidden] {
    display: none !important;
}

.wompea-popup-asesoria__price span {
    color: var(--wompea-popup-muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1;
}

.wompea-popup-asesoria__price strong {
    margin-top: 3px;
    color: var(--wompea-popup-coral);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.1;
}

.wompea-popup-form {
    width: 100%;
}

.wompea-popup-form .elementor-form {
    row-gap: 0;
}

.wompea-popup-form .elementor-field-group {
    margin-bottom: 9px !important;
}

.wompea-popup-form .elementor-field-label {
    margin: 0 0 5px;
    color: var(--wompea-popup-text);
    font-size: 12px;
    font-weight: 700;
}

.wompea-popup-form input.elementor-field,
.wompea-popup-form select.elementor-field,
.wompea-popup-form textarea.elementor-field {
    min-height: 47px;
    padding: 10px 14px !important;
    border: 1px solid var(--wompea-popup-line) !important;
    border-radius: 13px !important;
    color: var(--wompea-popup-text) !important;
    background-color: var(--wompea-popup-soft) !important;
    box-shadow: none !important;
    font-size: 14px !important;
    line-height: 1.25;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.wompea-popup-form input.elementor-field::placeholder,
.wompea-popup-form textarea.elementor-field::placeholder {
    color: #7890a1;
    opacity: 1;
}

.wompea-popup-form input.elementor-field:focus,
.wompea-popup-form select.elementor-field:focus,
.wompea-popup-form textarea.elementor-field:focus {
    border-color: var(--wompea-popup-teal) !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 3px rgba(39, 140, 164, 0.12) !important;
    outline: none;
}

.wompea-popup-form .elementor-field-type-select select {
    cursor: pointer;
}

.wompea-popup-form .elementor-select-wrapper {
    width: 100%;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.wompea-popup-form .elementor-select-wrapper::before {
    right: 16px;
    color: var(--wompea-popup-teal);
}

/* reCAPTCHA v3 es invisible. Conservamos el nodo para Elementor, sin espacio visual. */
.wompea-popup-form .elementor-field-type-recaptcha_v3 {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

.wompea-popup-form .elementor-field-type-recaptcha_v3 .elementor-field {
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.wompea-popup-form .elementor-button {
    width: 100%;
    min-height: 49px;
    border: 0;
    border-radius: 14px !important;
    color: #fff !important;
    background: linear-gradient(100deg, var(--wompea-popup-coral), var(--wompea-popup-orange)) !important;
    box-shadow: 0 10px 22px rgba(255, 63, 92, 0.22);
    font-size: 15px !important;
    font-weight: 800 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wompea-popup-form .elementor-button:hover,
.wompea-popup-form .elementor-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 13px 26px rgba(255, 63, 92, 0.3);
}

.wompea-popup-form .elementor-message {
    margin: 8px 0 0;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.4;
}

.wompea-popup-form .elementor-message-success {
    color: #126536;
    background: #eaf9f0;
}

.wompea-popup-form .elementor-message-danger {
    color: #a12539;
    background: #fff0f3;
}

.wompea-popup-asesoria__privacy {
    margin: 4px 0 0;
    color: #8294a3;
    font-size: 10px;
    line-height: 1.4;
    text-align: center;
}

.wompea-popup-asesoria__privacy a {
    color: var(--wompea-popup-teal);
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 767px) {
    .wompea-popup-asesoria {
        display: block !important;
        width: min(390px, calc(100vw - 20px));
        max-height: calc(100dvh - 24px);
        overflow-x: hidden;
        overflow-y: auto;
        border-radius: 20px;
    }

    .wompea-popup-asesoria__identity {
        min-height: 155px;
        padding: 24px 150px 18px 20px !important;
    }

    .wompea-popup-asesoria__brand {
        min-height: 113px;
    }

    .wompea-popup-asesoria__brand h2 {
        margin-bottom: 7px;
        font-size: 24px;
    }

    .wompea-popup-asesoria__brand > p:not(.wompea-popup-asesoria__secure) {
        font-size: 12px;
        line-height: 1.35;
    }

    .wompea-popup-asesoria__mascot {
        position: absolute;
        right: -17px;
        bottom: -35px;
        width: 178px;
        min-height: 0;
        margin: 0;
    }

    .wompea-popup-asesoria__mascot::before {
        width: 145px;
        height: 145px;
    }

    .wompea-popup-asesoria__mascot img {
        width: 178px;
        height: 178px;
    }

    .wompea-popup-asesoria__secure {
        display: none;
    }

    .wompea-popup-asesoria__content {
        padding: 22px 20px 18px !important;
    }

    .wompea-popup-asesoria__intro {
        padding-right: 0;
    }

    .wompea-popup-asesoria__intro h2 {
        padding-right: 0;
        font-size: 27px;
    }

    .wompea-popup-asesoria__description {
        margin: 8px 0 12px;
        font-size: 13px;
    }

    .wompea-popup-asesoria__price {
        position: static;
        display: inline-flex;
        width: auto;
        min-height: 0;
        flex-direction: row;
        align-items: baseline;
        gap: 5px;
        margin: 0 0 12px;
        padding: 6px 10px;
    }

    .wompea-popup-asesoria__price strong {
        font-size: 14px;
    }

    .wompea-popup-form .elementor-field-group {
        width: 100% !important;
        margin-bottom: 8px !important;
    }

    .wompea-popup-form input.elementor-field,
    .wompea-popup-form select.elementor-field {
        min-height: 44px;
    }

    .wompea-popup-form .elementor-button {
        min-height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wompea-popup-form .elementor-field,
    .wompea-popup-form .elementor-button {
        transition: none;
    }
}
/* Corrección definitiva del popup en móviles */
@media (max-width: 767px) {

    #elementor-popup-modal-3643 .dialog-widget-content,
    #elementor-popup-modal-3643 .dialog-message,
    #elementor-popup-modal-3643 .elementor-location-popup,
    #elementor-popup-modal-3643 .wompea-popup-asesoria {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    .wompea-popup-asesoria__identity {
        position: relative !important;
    }

    .wompea-popup-asesoria__brand,
    .wompea-popup-asesoria__identity > .elementor-widget-html,
    .wompea-popup-asesoria__identity > .elementor-widget-html > .elementor-widget-container {
        position: static !important;
    }

    .wompea-popup-asesoria__mascot {
        position: absolute !important;
        right: 8px !important;
        bottom: -24px !important;
        width: 160px !important;
        min-height: 0 !important;
        margin: 0 !important;
    }

    .wompea-popup-asesoria__mascot img {
        width: 160px !important;
        height: 160px !important;
    }
}
