/* ==========================================
   Noble Shine — запрос расчёта
   ========================================== */

html.ns-modal-open,
html.ns-modal-open body {
    overflow: hidden;
}

.ns-request-modal[hidden] {
    display: none !important;
}

.ns-request-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;

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

    padding: 24px;
}

.ns-request-modal__backdrop {
    position: absolute;
    inset: 0;

    background: rgba(5, 26, 42, .78);
    backdrop-filter: blur(5px);
}

.ns-request-modal__dialog {
    position: relative;
    z-index: 1;

    width: min(100%, 760px);
    max-height: calc(100vh - 48px);

    overflow: hidden;

    background: #ffffff;
    color: #17232d;

    box-shadow:
        0 24px 80px rgba(0, 0, 0, .24);
}

.ns-request-modal__scroll {
    max-height: calc(100vh - 48px);
    overflow-y: auto;

    padding: 44px 54px 0;
}


/* Уголки в стиле сайта */

.ns-request-modal__dialog::before,
.ns-request-modal__dialog::after {
    content: "";

    position: absolute;
    z-index: 3;

    width: 48px;
    height: 48px;

    pointer-events: none;
}

.ns-request-modal__dialog::before {
    top: 20px;
    left: 20px;

    border-top: 2px solid #1682cf;
    border-left: 2px solid #1682cf;
}

.ns-request-modal__dialog::after {
    right: 20px;
    bottom: 20px;

    border-right: 2px solid #1682cf;
    border-bottom: 2px solid #1682cf;
}


/* ==========================================
   Header
   ========================================== */

.ns-request-modal__close {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 5;

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

    width: 44px;
    height: 44px;

    padding: 0;
    border: 0;

    background: transparent;
    color: #17232d;

    cursor: pointer;

    font-family: Arial, sans-serif;
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
}

.ns-request-modal__close:hover {
    opacity: .65;
}

.ns-request-modal__eyebrow {
    margin: 8px 0 14px;

    color: #1264a3;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.ns-request-modal__title {
    margin: 0;

    color: #17232d;

    font-size: clamp(38px, 5vw, 62px);
    font-weight: 400;
    line-height: 1.02;
}

.ns-request-modal__lead {
    max-width: 620px;
    margin: 18px 0 0;

    color: #68747d;

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

.ns-request-modal__item {
    margin: 26px 0 28px;
    padding: 16px 18px;

    border-left: 3px solid #1682cf;

    background: #f4f6f8;
    color: #17232d;

    font-size: 17px;
    font-weight: 500;
    line-height: 1.35;
}


/* ==========================================
   Form
   ========================================== */

.ns-request-form {
    display: grid;
    gap: 20px;
}

.ns-request-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.ns-request-form__field {
    position: relative;

    display: grid;
    gap: 7px;
}

.ns-request-form__field label {
    color: #586874;

    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

.ns-request-form__field label > span[aria-hidden="true"] {
    color: #ff7a2f;
}

.ns-request-form__optional {
    margin-left: 5px;

    color: #98a3ab;

    font-size: 12px;
    font-weight: 400;
}

.ns-request-form__field input,
.ns-request-form__field textarea {
    display: block;

    width: 100%;
    box-sizing: border-box;

    border: 0;
    border-bottom: 1px solid #b6c0c8;
    border-radius: 0;

    background: transparent;
    color: #17232d;

    font: inherit;
    font-size: 16px;

    outline: none;

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

.ns-request-form__field input {
    min-height: 48px;
    padding: 8px 2px 10px;
}

.ns-request-form__field textarea {
    min-height: 94px;
    padding: 9px 2px 22px;

    resize: vertical;
}

.ns-request-form__field input::placeholder,
.ns-request-form__field textarea::placeholder {
    color: #9ca6ad;
    opacity: 1;
}

.ns-request-form__field input:focus,
.ns-request-form__field textarea:focus {
    border-bottom-color: #1682cf;
}

.ns-request-form__field input:disabled,
.ns-request-form__field textarea:disabled {
    opacity: .55;
}

.ns-request-form__counter {
    position: absolute;
    right: 0;
    bottom: 5px;

    color: #a1abb2;

    font-size: 11px;
    line-height: 1;
}


/* ==========================================
   Consent
   ========================================== */

.ns-request-form__consent {
    display: flex;
    align-items: flex-start;

    gap: 11px;

    color: #68747d;

    cursor: pointer;

    font-size: 13px;
    line-height: 1.45;
}

.ns-request-form__consent input {
    flex: 0 0 auto;

    width: 18px;
    height: 18px;

    margin: 1px 0 0;

    accent-color: #1682cf;
}


/* ==========================================
   Messages
   ========================================== */

.ns-request-form__message {
    min-height: 0;

    padding: 0;

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

.ns-request-form__message:empty {
    display: none;
}

.ns-request-form__message.is-success,
.ns-request-form__message.is-error {
    display: block;

    padding: 13px 15px;
}

.ns-request-form__message.is-success {
    border-left: 3px solid #2d8659;

    background: #edf7f1;
    color: #246b48;
}

.ns-request-form__message.is-error {
    border-left: 3px solid #b74242;

    background: #fff1f1;
    color: #9f3030;
}


/* ==========================================
   Sticky submit area
   Кнопка всегда видна внизу окна
   ========================================== */

.ns-request-form__footer {
    position: sticky;
    bottom: 0;
    z-index: 4;

    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    align-items: center;

    gap: 18px;

    margin: 2px -54px 0;
    padding: 20px 54px 24px;

    border-top: 1px solid #e4e8eb;

    background:
        linear-gradient(
            to bottom,
            rgba(255,255,255,.96),
            #ffffff 30%
        );
}

.ns-request-form__submit {
    position: relative;

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

    min-height: 54px;
    padding: 14px 26px;

    border: 1px solid #1682cf;
    border-radius: 0;

    background: #1682cf;
    color: #ffffff;

    cursor: pointer;

    font: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;

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

.ns-request-form__submit:hover:not(:disabled) {
    background: #126fae;
}

.ns-request-form__submit:active:not(:disabled) {
    transform: translateY(1px);
}

.ns-request-form__submit:disabled {
    opacity: .7;
    cursor: default;
}

.ns-request-form__hint {
    max-width: 360px;

    color: #8a969e;

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


/* ==========================================
   Honeypot
   ========================================== */

.ns-request-form__honeypot {
    position: absolute !important;
    left: -10000px !important;

    width: 1px !important;
    height: 1px !important;

    overflow: hidden !important;
}


/* ==========================================
   Mobile
   ========================================== */

@media (max-width: 767px) {

    .ns-request-modal {
        align-items: flex-end;

        padding: 0;
    }

    .ns-request-modal__dialog {
        width: 100%;
        max-height: 94vh;
    }

    .ns-request-modal__scroll {
        max-height: 94vh;

        padding:
            34px
            20px
            0;
    }

    .ns-request-modal__dialog::before {
        top: 14px;
        left: 14px;

        width: 30px;
        height: 30px;
    }

    .ns-request-modal__dialog::after {
        right: 14px;
        bottom: 14px;

        width: 30px;
        height: 30px;
    }

    .ns-request-modal__close {
        top: 8px;
        right: 10px;
    }

    .ns-request-modal__eyebrow {
        margin-top: 6px;
    }

    .ns-request-modal__title {
        padding-right: 36px;

        font-size: 34px;
    }

    .ns-request-modal__lead {
        margin-top: 13px;

        font-size: 15px;
    }

    .ns-request-modal__item {
        margin: 20px 0 22px;
        padding: 13px 14px;

        font-size: 15px;
    }

    .ns-request-form {
        gap: 17px;
    }

    .ns-request-form__grid {
        grid-template-columns: 1fr;

        gap: 17px;
    }

    .ns-request-form__footer {
        grid-template-columns: 1fr;

        gap: 9px;

        margin:
            2px
            -20px
            0;

        padding:
            16px
            20px
            20px;
    }

    .ns-request-form__submit {
        width: 100%;
    }

    .ns-request-form__hint {
        text-align: center;
    }
}