/* =========================================================
   CALLBACK MODAL
========================================================= */

.callback-modal {
    position: fixed;
    z-index: 9999;

    inset: 0;

    display: flex;

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

    padding: 20px;

    visibility: hidden;
    opacity: 0;

    pointer-events: none;

    transition:
        opacity 180ms ease,
        visibility 180ms ease;
}


/* =========================================================
   OPEN
========================================================= */

.callback-modal.is-open {
    visibility: visible;
    opacity: 1;

    pointer-events: auto;
}


/* =========================================================
   BACKDROP
========================================================= */

.callback-modal__backdrop {
    position: absolute;

    inset: 0;

    background:
        rgba(0, 0, 0, 0.68);
}


/* =========================================================
   DIALOG
========================================================= */

.callback-modal__dialog {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 390px;

    padding:
        34px
        30px
        30px;

    background:
        #ffffff;

    border-top:
        4px solid
        var(--service-primary);

    border-radius:
        6px;

    box-shadow:
        0 20px 60px
        rgba(0, 0, 0, 0.28);

    transform:
        translateY(12px);

    transition:
        transform 180ms ease;
}


.callback-modal.is-open
.callback-modal__dialog {
    transform:
        translateY(0);
}


/* =========================================================
   CLOSE
========================================================= */

.callback-modal__close {
    position: absolute;

    top: 13px;
    right: 13px;

    width: 32px;
    height: 32px;

    padding: 0;

    background: transparent;

    border: 0;

    cursor: pointer;
}


.callback-modal__close span {
    position: absolute;

    top: 50%;
    left: 50%;

    display: block;

    width: 18px;
    height: 2px;

    background:
        #555555;
}


.callback-modal__close span:first-child {
    transform:
        translate(-50%, -50%)
        rotate(45deg);
}


.callback-modal__close span:last-child {
    transform:
        translate(-50%, -50%)
        rotate(-45deg);
}


/* =========================================================
   TITLE
========================================================= */

.callback-modal__title {
    margin:
        0
        38px
        8px
        0;

    color:
        var(--color-text);

    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
}


/* =========================================================
   DESCRIPTION
========================================================= */

.callback-modal__description {
    margin:
        0
        0
        22px;

    color:
        var(--color-text-secondary);

    font-size: 14px;
    line-height: 1.5;
}


/* =========================================================
   CF7
========================================================= */

.callback-modal__form
.wpcf7-form {
    display: grid;

    gap: 14px;
}


.callback-modal__form
.wpcf7-form p {
    margin: 0;
}


.callback-modal__form
.wpcf7-form-control-wrap {
    display: block;
}


/* =========================================================
   INPUTS
========================================================= */

.callback-modal__form
input[type='text'],
.callback-modal__form
input[type='tel'] {
    display: block;

    width: 100%;
    height: 48px;

    padding:
        0
        14px;

    color:
        #333333;

    background:
        #ffffff;

    border:
        1px solid
        #d5d5d5;

    border-radius:
        3px;

    outline: 0;

    font: inherit;

    transition:
        border-color
        var(--transition-fast),
        box-shadow
        var(--transition-fast);
}


.callback-modal__form
input:focus {
    border-color:
        var(--service-primary);

    box-shadow:
        0 0 0 3px
        var(--service-primary-soft);
}


/* =========================================================
   SUBMIT
========================================================= */

.callback-modal__form
input[type='submit'] {
    width: 100%;
    min-height: 46px;

    margin-top: 2px;

    padding:
        0
        18px;

    color:
        var(--service-primary-text);

    background:
        var(--service-primary);

    border: 0;
    border-radius: 3px;

    font: inherit;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color
        var(--transition-fast);
}


.callback-modal__form
input[type='submit']:hover {
    background:
        var(--service-primary-hover);
}


/* =========================================================
   CF7 ERRORS
========================================================= */

.callback-modal__form
.wpcf7-not-valid-tip {
    margin-top: 5px;

    color:
        #c73535;

    font-size: 12px;
    line-height: 1.35;
}


.callback-modal__form
.wpcf7-response-output {
    margin:
        4px
        0
        0 !important;

    padding:
        10px
        12px !important;

    font-size: 12px;
    line-height: 1.4;
}


/* =========================================================
   LOCK BODY
========================================================= */

body.callback-modal-open {
    overflow: hidden;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .callback-modal {
        padding: 14px;
    }


    .callback-modal__dialog {
        max-width: 360px;

        padding:
            30px
            20px
            22px;
    }


    .callback-modal__title {
        font-size: 21px;
    }

}