/* =========================================================
   MAMABODY — ONE CLICK ORDER POPUP
   =========================================================
   
   ВАЖНО:
   Magnific Popup самостоятельно управляет:
   .mfp-wrap
   .mfp-container
   .mfp-content
   
   Поэтому здесь мы НЕ переопределяем их позиционирование,
   размеры, height, overflow и т.д.

   Popup является обычным inline-контентом Magnific Popup.
   ========================================================= */


/* =========================================================
   1. BASE / BOX SIZING
   ========================================================= */

#order-form,
#order-form *,
#order-form *::before,
#order-form *::after {

    box-sizing: border-box;

}


/*
 * Magnific Popup использует .mfp-hide
 * для скрытого inline-контента.
 *
 * Не трогаем механизм Magnific Popup.
 */

.mfp-hide {

    display: none !important;

}

.mfp-wrap {
    position: fixed;
    z-index: 1043;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.mfp-container {
    position: fixed;
/*    top: 0;*/
    left: 0;
    width: 100%;
/*    height: 100%;*/

    top: 70px;
    height: calc(100vh - 70px);

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

    padding: 20px 16px;

    box-sizing: border-box;

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mfp-content {
    position: relative;
    display: block;

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

    margin: auto;

    box-sizing: border-box;
}


/* =========================================================
   2. POPUP CARD
   ========================================================= */

#order-form.white-popup {

    position: relative;

    width: calc(100vw - 32px);

    max-width: 520px;

    /*
     * ВАЖНО:
     * нет height;
     * нет max-height;
     * нет overflow-y.
     *
     * Высота определяется содержимым.
     */

    margin: 20px auto;

    padding: 0;

    background: #ffffff;

    border: 1px solid #eee7e9;

    border-radius: 24px;

    box-shadow:
        0 24px 70px rgba(48, 35, 41, .16);

    color: #292629;

}


/* =========================================================
   3. CLOSE BUTTON
   ========================================================= */

#order-form .mb-order-close {

    position: absolute !important;

    top: 16px !important;

    right: 16px !important;

    z-index: 20;

    display: flex !important;

    align-items: center !important;

    justify-content: center !important;

    width: 38px !important;

    height: 38px !important;

    margin: 0 !important;

    padding: 0 !important;

    border: 1px solid #eee7e9 !important;

    border-radius: 50% !important;

    background: rgba(255, 255, 255, .96) !important;

    color: #777075 !important;

    font-family: Arial, sans-serif !important;

    font-size: 25px !important;

    font-weight: 300 !important;

    line-height: 38px !important;

    text-align: center !important;

    opacity: 1 !important;

    cursor: pointer;

    transition:
        color .2s ease,
        border-color .2s ease,
        background .2s ease,
        transform .2s ease;

}


#order-form .mb-order-close:hover {

    color: #b96f8d !important;

    border-color: #e4c7d1 !important;

    background: #ffffff !important;

    transform: rotate(5deg);

}


/* =========================================================
   4. CONTENT
   ========================================================= */

#order-form #contacts {

    width: 100%;

    margin: 0;

    padding: 38px 40px 34px;

/*    background: #ffffff;*/

    color: #292629;

    text-align: left;

}


/* =========================================================
   5. HEADER
   ========================================================= */

#order-form .mb-order-header {

    padding-right: 42px;

    margin-bottom: 23px;

}


#order-form .mb-order-kicker {

    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 12px;

    color: #b96f8d;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: .11em;

    line-height: 1.2;

    text-transform: uppercase;

}


#order-form .mb-order-kicker span {

    display: block;

    width: 6px;

    height: 6px;

    flex: 0 0 6px;

    border-radius: 50%;

    background: #d98ca8;

}


#order-form .mb-order-header h3 {

    margin: 0 0 10px;

    color: #292629;

    font-size: 29px;

    font-weight: 700;

    line-height: 1.18;

    letter-spacing: -.025em;

}


#order-form .mb-order-header p {

    max-width: 410px;

    margin: 0;

    color: #777177;

    font-size: 14px;

    font-weight: 400;

    line-height: 1.65;

}


/* =========================================================
   6. TRUST STRIP
   ========================================================= */

#order-form .mb-order-trust {

    display: flex;

    align-items: stretch;

    width: 100%;

    margin: 0 0 25px;

    padding: 12px 13px;

    border: 1px solid #f0e7ea;

    border-radius: 13px;

    background: #fff9fc;

}


#order-form .mb-order-trust-item {

    display: flex;

    align-items: center;

    min-width: 0;

    flex: 1;

    color: #696268;

    font-size: 10.5px;

    font-weight: 600;

    line-height: 1.35;

}


#order-form .mb-order-trust-item + .mb-order-trust-item {

    margin-left: 12px;

    padding-left: 12px;

    border-left: 1px solid #eadfe3;

}


#order-form .mb-order-trust-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 18px;

    height: 18px;

    min-width: 18px;

    margin-right: 6px;

    border-radius: 50%;

    background: #fbeaf1;

    color: #b96f8d;

    font-size: 10px;

    font-weight: 800;

}


/* =========================================================
   7. FORM
   ========================================================= */

#order-form #contactform {

    width: 100%;

    margin: 0;

}


#order-form #contactform fieldset {

    width: 100%;

    margin: 0;

    padding: 0;

    border: 0;

}


/* =========================================================
   8. FORM FIELDS
   ========================================================= */

#order-form .mb-order-field {

    width: 100%;

    margin: 0 0 16px;

}


#order-form .mb-order-field label {

    display: flex;

    align-items: baseline;

    justify-content: space-between;

    gap: 10px;

    width: 100%;

    margin: 0 0 7px;

    color: #3b363a;

    font-size: 12px;

    font-weight: 650;

    line-height: 1.3;

}


#order-form .mb-order-field label span {

    color: #aaa2a7;

    font-size: 10px;

    font-weight: 400;

}


/* =========================================================
   9. INPUTS
   ========================================================= */

#order-form #contactform input[type="text"],
#order-form #contactform input[type="email"],
#order-form #contactform input[type="tel"] {

    display: block;

    width: 100%;

    height: 52px;

    margin: 0;

    padding: 0 16px;

    border: 1px solid #eee8eb;

    border-radius: 11px;

    outline: none;

    background: #faf8f9;

    color: #292629;

    box-shadow: none;

    font-family: inherit;

    /*
     * 16px специально.
     *
     * На iPhone Safari input меньше 16px может
     * вызывать автоматический zoom при фокусе.
     */

    font-size: 16px;

    font-weight: 450;

    line-height: 52px;

    -webkit-appearance: none;

    appearance: none;

    transition:
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease;

}


#order-form #contactform input::placeholder {

    color: #aaa3a8;

    opacity: 1;

}


#order-form #contactform input:hover {

    border-color: #e3d6db;

    background: #ffffff;

}


#order-form #contactform input:focus {

    border-color: #d8a1b5;

    background: #ffffff;

    box-shadow:
        0 0 0 4px rgba(217, 140, 168, .11);

}


/* =========================================================
   10. AGREEMENT
   ========================================================= */

#order-form .mb-order-agreement {

    margin-top: 1px;

}


#order-form .mb-order-agreement > label {

    display: flex;

    align-items: flex-start;

    gap: 10px;

    margin: 0;

    color: #81787e;

    font-size: 11px;

    font-weight: 400;

    line-height: 1.5;

    cursor: pointer;

}


#order-form .mb-order-agreement input[type="checkbox"] {

    position: absolute;

    width: 1px;

    height: 1px;

    margin: -1px;

    padding: 0;

    opacity: 0;

    pointer-events: none;

}


#order-form .mb-order-checkbox {

    position: relative;

    display: block;

    width: 18px;

    height: 18px;

    min-width: 18px;

    margin-top: 1px;

    border: 1px solid #d9d1d5;

    border-radius: 5px;

    background: #ffffff;

    transition:
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;

}


#order-form .mb-order-checkbox::after {

    content: "";

    position: absolute;

    left: 4px;

    top: 1px;

    width: 6px;

    height: 10px;

    border-right: 2px solid #ffffff;

    border-bottom: 2px solid #ffffff;

    transform: rotate(45deg) scale(0);

    transition: transform .15s ease;

}


#order-form .mb-order-agreement input[type="checkbox"]:checked
+ .mb-order-checkbox {

    border-color: #d98ca8;

    background: #d98ca8;

}


#order-form .mb-order-agreement input[type="checkbox"]:checked
+ .mb-order-checkbox::after {

    transform: rotate(45deg) scale(1);

}


#order-form .mb-order-agreement input[type="checkbox"]:focus-visible
+ .mb-order-checkbox {

    box-shadow:
        0 0 0 4px rgba(217, 140, 168, .13);

}


#order-form .mb-order-agreement-text a {

    color: #b96f8d !important;

    text-decoration: underline !important;

    text-decoration-thickness: 1px;

    text-underline-offset: 2px;

}


/* =========================================================
   11. SUBMIT BUTTON
   ========================================================= */

#order-form .mb-order-submit {

    position: relative;

    display: flex;

    align-items: center;

    justify-content: center;

    width: 100%;

    min-height: 53px;

    margin: 22px 0 0;

    padding: 0 50px 0 24px;

    border: 0 !important;

    border-radius: 11px !important;

    outline: none;

    background: #D98FA8 !important;

    color: #ffffff !important;

    box-shadow: none !important;

    font-family: inherit;

    font-size: 14px;

    font-weight: 700;

    line-height: 1;

    text-align: center;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease,
        box-shadow .2s ease;

}


#order-form .mb-order-submit:hover {

    background: #C97D98 !important;

    transform: translateY(-1px);

    box-shadow:
        0 9px 24px rgba(41, 38, 41, .13) !important;

}


#order-form .mb-order-submit:active {

    transform: translateY(0);

    box-shadow: none !important;

}


#order-form .mb-order-submit:disabled {

    cursor: wait;

    opacity: .75;

    transform: none;

}


#order-form .mb-order-submit b {

    position: absolute;

    right: 20px;

    font-size: 20px;

    font-weight: 300;

    line-height: 1;

}


/* =========================================================
   12. LOADER
   ========================================================= */

#order-form .mb-order-loader {

    position: absolute;

    right: 20px;

    width: 17px;

    height: 17px;

    border: 2px solid rgba(255, 255, 255, .3);

    border-top-color: #ffffff;

    border-radius: 50%;

    animation: mb-order-spin .7s linear infinite;

}


#order-form .mb-order-submit.is-loading b {

    display: none;

}


@keyframes mb-order-spin {

    to {

        transform: rotate(360deg);

    }

}


/* =========================================================
   13. NOTE
   ========================================================= */

#order-form .mb-order-note {

    max-width: 410px;

    margin: 10px auto 0;

    color: #a29a9f;

    font-size: 10px;

    line-height: 1.55;

    text-align: center;

}


/* =========================================================
   14. ERROR MESSAGE
   ========================================================= */

#order-form #message:empty {

    display: none;

}


#order-form #message {

    width: 100%;

    margin: 0 0 18px;

    padding: 11px 13px;

    border: 1px solid #ecd3db;

    border-radius: 10px;

    background: #fff8fa;

    color: #9a536b;

    font-size: 12px;

    line-height: 1.5;

    text-align: left;

}


#order-form .error_message {

    margin: 0 0 18px;

    padding: 11px 13px;

    border: 1px solid #ecd3db;

    border-radius: 10px;

    background: #fff8fa;

    color: #9a536b;

    font-size: 12px;

    line-height: 1.5;

}


/* =========================================================
   15. SUCCESS
   ========================================================= */

#order-form #success_page {

    width: 100%;

    padding: 3px 0 2px;

    text-align: center;

}


#order-form .mb-success-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 68px;

    height: 68px;

    margin: 0 auto 19px;

    border: 1px solid #f0dce4;

    border-radius: 50%;

    background: #fbeaf1;

}


#order-form .mb-success-icon svg {

    width: 30px;

    height: 30px;

    fill: none;

    stroke: #b96f8d;

    stroke-width: 1.9;

    stroke-linecap: round;

    stroke-linejoin: round;

}


#order-form .mb-success-kicker {

    margin-bottom: 9px;

    color: #b96f8d;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: .1em;

    text-transform: uppercase;

}


#order-form #success_page h1 {

    margin: 0 0 9px;

    color: #292629;

    font-size: 28px;

    font-weight: 700;

    line-height: 1.2;

    letter-spacing: -.025em;

}


#order-form .mb-success-name {

    margin: 0 0 8px;

    color: #4d464b;

    font-size: 15px;

    line-height: 1.55;

}


#order-form .mb-success-lead {

    max-width: 400px;

    margin: 0 auto 22px;

    color: #777177;

    font-size: 13px;

    line-height: 1.65;

}


/* =========================================================
   16. SUCCESS DETAILS
   ========================================================= */

#order-form .mb-success-details {

    max-width: 390px;

    margin: 0 auto 20px;

    padding: 15px 17px;

    border: 1px solid #eee8eb;

    border-radius: 13px;

    background: #ffffff;

    text-align: left;

}


#order-form .mb-success-details-title {

    margin-bottom: 11px;

    color: #8d858a;

    font-size: 10px;

    font-weight: 750;

    letter-spacing: .07em;

    line-height: 1.2;

    text-transform: uppercase;

}


#order-form .mb-success-detail {

    display: flex;

    align-items: baseline;

    justify-content: space-between;

    gap: 15px;

    color: #4b4549;

    font-size: 12px;

    line-height: 1.5;

}


#order-form .mb-success-detail + .mb-success-detail {

    margin-top: 8px;

    padding-top: 8px;

    border-top: 1px solid #f1edef;

}


#order-form .mb-success-detail-label {

    flex: 0 0 auto;

    color: #958d92;

}


#order-form .mb-success-detail-value {

    min-width: 0;

    overflow: hidden;

    color: #3b3539;

    font-weight: 600;

    text-align: right;

    text-overflow: ellipsis;

    white-space: nowrap;

}


/* =========================================================
   17. SUCCESS NEXT STEPS
   ========================================================= */

#order-form .mb-success-next {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 8px;

    max-width: 390px;

    margin: 0 auto 21px;

}


#order-form .mb-success-next-item {

    min-height: 66px;

    padding: 11px 8px;

    border-radius: 11px;

    background: #fff9fc;

    color: #716970;

    font-size: 10px;

    line-height: 1.45;

    text-align: center;

}


#order-form .mb-success-next-item strong {

    display: block;

    margin-bottom: 4px;

    color: #4b4449;

    font-size: 10.5px;

    font-weight: 700;

}


/* =========================================================
   18. SUCCESS BOTTOM
   ========================================================= */

#order-form .mb-success-bottom {

    margin: 0;

    padding-top: 17px;

    border-top: 1px solid #eee8eb;

    color: #8c8389;

    font-size: 11px;

    line-height: 1.55;

    text-align: center;

}


#order-form .mb-success-bottom strong {

    color: #554e53;

    font-weight: 650;

}


/* =========================================================
   19. MOBILE
   ========================================================= */

@media (max-width: 575px) {


    /*
     * Popup остаётся обычным inline-контентом.
     *
     * НЕТ:
     * height
     * max-height
     * overflow-y
     *
     * Magnific Popup сам управляет viewport.
     */

    #order-form.white-popup {

        width: calc(100vw - 24px);

        max-width: calc(100vw - 24px);

        margin: 12px auto;

        border-radius: 20px;

    }


    #order-form #contacts {

        padding: 31px 22px 25px;

    }


    #order-form .mb-order-header {

        padding-right: 34px;

        margin-bottom: 20px;

    }


    #order-form .mb-order-header h3 {

        font-size: 25px;

    }


    #order-form .mb-order-header p {

        font-size: 13px;

        line-height: 1.6;

    }


    /* -----------------------------------------------------
       TRUST
       ----------------------------------------------------- */

    #order-form .mb-order-trust {

        flex-direction: column;

        gap: 8px;

        margin-bottom: 22px;

        padding: 11px 12px;

    }


    #order-form .mb-order-trust-item {

        flex: none;

        width: 100%;

        font-size: 10.5px;

    }


    #order-form .mb-order-trust-item + .mb-order-trust-item {

        margin-left: 0;

        padding-left: 0;

        border-left: 0;

    }


    /* -----------------------------------------------------
       FIELDS
       ----------------------------------------------------- */

    #order-form .mb-order-field {

        margin-bottom: 15px;

    }


    #order-form #contactform input[type="text"],
    #order-form #contactform input[type="email"],
    #order-form #contactform input[type="tel"] {

        height: 50px;

        /*
         * Ключевой момент для iPhone:
         * 16px предотвращает автоматический zoom
         * при фокусе на input.
         */

        font-size: 16px;

        line-height: 50px;

    }


    /* -----------------------------------------------------
       SUBMIT
       ----------------------------------------------------- */

    #order-form .mb-order-submit {

        min-height: 52px;

        margin-top: 21px;

    }


    /* -----------------------------------------------------
       SUCCESS
       ----------------------------------------------------- */

    #order-form #success_page h1 {

        font-size: 25px;

    }


    #order-form .mb-success-lead {

        font-size: 12.5px;

    }


    #order-form .mb-success-next {

        gap: 6px;

    }


    #order-form .mb-success-next-item {

        padding: 10px 5px;

        font-size: 9.5px;

    }


    #order-form .mb-success-next-item strong {

        font-size: 10px;

    }

}


/* =========================================================
   20. VERY SMALL PHONES
   ========================================================= */

@media (max-width: 360px) {


    #order-form #contacts {

        padding-right: 18px;

        padding-left: 18px;

    }


    #order-form .mb-order-header h3 {

        font-size: 23px;

    }


    #order-form .mb-order-trust-item {

        font-size: 10px;

    }


    #order-form .mb-success-next-item {

        font-size: 9px;

    }

}


/* =========================================================
   21. LANDSCAPE / VERY SHORT SCREENS
   =========================================================

   НИКАКОГО собственного scroll здесь нет.

   Если форма выше viewport, штатный Magnific Popup
   сам предоставляет возможность прокрутить страницу
   до содержимого.

   Это принципиально лучше, чем превращать саму карточку
   в отдельный scroll-контейнер.
   ========================================================= */


/* =========================================================
   22. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    #order-form *,
    #order-form *::before,
    #order-form *::after {

        transition: none !important;

        animation: none !important;

    }

}

