/* EUROSPACE CALLBACK V1 */

.es-callback-open {
    cursor: pointer;
}

.es-callback-lock {
    overflow: hidden;
}

.es-callback-modal[hidden] {
    display: none !important;
}

.es-callback-modal {
    position: fixed;
    inset: 0;
    z-index: 2147481900;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
    padding: 18px;

    background:
        rgba(45, 34, 29, .48);

    opacity: 0;
    pointer-events: none;

    transition:
        opacity .18s ease;
}

.es-callback-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.es-callback-card {
    position: relative;

    width:
        min(
            440px,
            100%
        );

    box-sizing: border-box;

    padding:
        25px;

    border:
        1px solid
        #d8c9c0;

    border-radius:
        16px;

    background:
        #fff;

    box-shadow:
        0 24px 70px
        rgba(65, 42, 32, .25);
}

.es-callback-card__kicker {
    display: block;
    margin-bottom: 5px;
    color: #9c8376;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.es-callback-card h3 {
    margin: 0 46px 7px 0;
    color: #5d382b;
    font-size: 24px;
    line-height: 1.2;
}

.es-callback-card__lead {
    margin: 0 0 18px;
    color: #766a64;
    font-size: 14px;
    line-height: 1.45;
}

.es-callback-close {
    position: absolute;
    top: 12px;
    right: 12px;

    width: 40px;
    height: 40px;

    border: 0;
    border-radius: 9px;

    background: #f2ece8;
    color: #6e4333;

    cursor: pointer;
    font-size: 26px;
}

.es-callback-field {
    display: block;
    margin-bottom: 12px;
}

.es-callback-field span {
    display: block;
    margin-bottom: 5px;
    color: #594b44;
    font-size: 13px;
    font-weight: 700;
}

.es-callback-field input {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #c9b5aa;
    border-radius: 9px;
    outline: 0;
    background: #fffdfc;
    color: #332923;
    font-size: 16px;
}

.es-callback-field input:focus {
    border-color: #6e4333;
    box-shadow:
        0 0 0 3px
        rgba(110, 67, 51, .08);
}

.es-callback-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 15px 0 13px;
    color: #665951;
    font-size: 12px;
    line-height: 1.4;
}

.es-callback-consent input {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin-top: 0;
}

.es-callback-consent a {
    color: #6e4333;
    font-weight: 700;
}

.es-callback-submit {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 9px;
    background: #6e4333;
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
}

.es-callback-submit:hover {
    background: #573427;
}

.es-callback-submit:disabled {
    opacity: .6;
    cursor: wait;
}

.es-callback-error {
    min-height: 18px;
    margin-top: 9px;
    color: #a4362d;
    font-size: 12px;
}

.es-callback-success {
    position: fixed;
    z-index: 2147482100;
    left: 50%;
    top: 50%;

    width:
        min(
            440px,
            calc(100vw - 32px)
        );

    box-sizing: border-box;
    transform: translate(-50%, -50%);
    padding: 23px;

    border: 1px solid #d8c9c0;
    border-radius: 16px;

    background: #fff;
    color: #332923;

    box-shadow:
        0 24px 70px
        rgba(65,42,32,.25);

    opacity: 0;
    pointer-events: none;

    transition:
        opacity .18s ease;
}

.es-callback-success.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.es-callback-success__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;
    margin-bottom: 13px;

    border-radius: 50%;
    background: #6e4333;
    color: #fff;

    font-size: 23px;
    font-weight: 700;
}

.es-callback-success strong {
    display: block;
    padding-right: 38px;
    color: #5d382b;
    font-size: 19px;
    line-height: 1.25;
}

.es-callback-success p {
    margin: 8px 0 0;
    color: #655a55;
    font-size: 14px;
    line-height: 1.5;
}

.es-callback-success__close {
    position: absolute;
    top: 10px;
    right: 10px;

    width: 40px;
    height: 40px;

    border: 0;
    border-radius: 9px;

    background: #f2ece8;
    color: #6e4333;

    cursor: pointer;
    font-size: 24px;
}

.es-callback-success__timer {
    position: absolute;
    left: 0;
    bottom: 0;

    width: 100%;
    height: 4px;

    overflow: hidden;

    border-radius:
        0
        0
        16px
        16px;

    background: #eee5e0;
}

.es-callback-success__timer::after {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: #6e4333;
    transform-origin: left center;
}

.es-callback-success.is-visible
.es-callback-success__timer::after {
    animation:
        es-callback-timer
        5s
        linear
        forwards;
}

@keyframes es-callback-timer {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

@media (max-width: 600px) {
    .es-callback-modal {
        align-items: flex-end;
        padding:
            8px
            8px
            calc(
                8px
                + env(
                    safe-area-inset-bottom
                )
            );
    }

    .es-callback-card {
        width: 100%;
        max-height:
            calc(
                100dvh
                - 16px
            );

        overflow-y: auto;

        padding:
            20px
            15px
            calc(
                16px
                + env(
                    safe-area-inset-bottom
                )
            );

        border-radius:
            15px
            15px
            10px
            10px;
    }

    .es-callback-card h3 {
        font-size: 20px;
    }

    .es-callback-close {
        width: 44px;
        height: 44px;
    }

    .es-callback-field input {
        min-height: 48px;
        font-size: 16px;
    }

    .es-callback-submit {
        min-height: 48px;
    }

    .es-callback-success {
        top: auto;
        left:
            max(
                10px,
                env(
                    safe-area-inset-left
                )
            );
        right:
            max(
                10px,
                env(
                    safe-area-inset-right
                )
            );
        bottom:
            calc(
                14px
                + env(
                    safe-area-inset-bottom
                )
            );

        width: auto;
        transform: translateY(12px);

        padding:
            19px
            17px
            18px;

        border-radius: 14px;
    }

    .es-callback-success.is-visible {
        transform: translateY(0);
    }

    .es-callback-success strong {
        font-size: 17px;
    }

    .es-callback-success__close {
        width: 44px;
        height: 44px;
    }
}
