.demo-modal[hidden] {
    display: none;
}

.demo-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.demo-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
}

.demo-modal__dialog {
    position: relative;
    width: min(640px, calc(100vw - 48px));
    max-height: min(860px, calc(100dvh - 48px));
    overflow: hidden;
    background: #ffffff;
    color: #142341;
    border-radius: 34px;
    box-shadow: 0 22px 70px rgba(20, 35, 65, 0.3);
    outline: none;
}

.demo-modal__content {
    max-height: inherit;
    overflow-y: auto;
    padding: 54px 52px 44px;
    scrollbar-color: rgba(20, 35, 65, 0.4) transparent;
    scrollbar-width: thin;
}

.demo-modal__content::-webkit-scrollbar {
    width: 10px;
}

.demo-modal__content::-webkit-scrollbar-thumb {
    background: rgba(20, 35, 65, 0.4);
    border-radius: 999px;
}

.demo-modal__close {
    position: absolute;
    top: 30px;
    right: 34px;
    z-index: 2;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    color: #68717e;
    font-size: 34px;
    line-height: 1;
    font-weight: 300;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.demo-modal__close:hover,
.demo-modal__close:focus-visible {
    background: rgba(20, 35, 65, 0.08);
    color: #142341;
}

.demo-modal__header {
    padding-right: 42px;
    margin-bottom: 42px;
}

.demo-modal__header h2 {
    margin: 0 0 12px;
    color: #397f9f;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 40px;
    line-height: 1.1;
    font-weight: 400;
    letter-spacing: 0;
}

.demo-modal__header p {
    margin: 0;
    color: #5b4d5a;
    font-size: 18px;
    line-height: 1.55;
}

.demo-modal__form {
    min-height: 260px;
}

.demo-modal__form ._form_8,
.demo-modal__form #_form_8_ {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.demo-modal__form #_form_8_ input[type="text"],
.demo-modal__form #_form_8_ input[type="email"],
.demo-modal__form #_form_8_ textarea,
.demo-modal__form #_form_8_ select {
    min-height: 52px;
    padding: 12px 14px !important;
    border: 1px solid #cfcfcf !important;
    color: #142341 !important;
    font-size: 20px !important;
}

.demo-modal__form #_form_8_ ._form-label,
.demo-modal__form #_form_8_ ._form-checkbox-option-label {
    color: #000000 !important;
    font-size: 18px !important;
}

.demo-modal__form #_form_8_ ._row {
    margin-bottom: 8px;
}

.demo-modal__form #_form_8_ ._row label,
.demo-modal__form #_form_8_ ._row span {
    color: #000000 !important;
    font-size: 18px !important;
}

.demo-modal__form #_form_8_ input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    margin-right: 8px !important;
}

.demo-modal__form #_form_8_ ._submit {
    width: 100%;
    min-height: 52px;
    margin-top: 18px !important;
    background: #397f9f !important;
    border-radius: 999px !important;
    color: #ffffff !important;
    font-size: 17px !important;
    font-weight: 700 !important;
}

.demo-modal__form #_form_8_ ._form-branding {
    display: none !important;
}

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

@media screen and (max-width: 640px) {
    .demo-modal {
        align-items: center;
        padding: 28px 18px;
    }

    .demo-modal__dialog {
        width: min(484px, calc(100vw - 36px));
        max-height: calc(100dvh - 72px);
        border-radius: 32px;
    }

    .demo-modal__content {
        padding: 46px 42px 38px;
    }

    .demo-modal__close {
        top: 24px;
        right: 26px;
        font-size: 32px;
    }

    .demo-modal__header {
        margin-bottom: 58px;
        padding-right: 32px;
    }

    .demo-modal__header h2 {
        font-size: 32px;
    }

    .demo-modal__header p {
        font-size: 18px;
    }
}

@media screen and (max-width: 420px) {
    .demo-modal {
        padding: 18px 16px;
    }

    .demo-modal__dialog {
        width: calc(100vw - 32px);
        max-height: calc(100dvh - 36px);
        border-radius: 30px;
    }

    .demo-modal__content {
        padding: 46px 26px 34px;
    }

    .demo-modal__header {
        margin-bottom: 44px;
    }

    .demo-modal__header h2 {
        font-size: 30px;
    }

    .demo-modal__form #_form_8_ input[type="text"],
    .demo-modal__form #_form_8_ input[type="email"],
    .demo-modal__form #_form_8_ textarea,
    .demo-modal__form #_form_8_ select {
        font-size: 18px !important;
    }
}
