.ns-reg-modal :where(h1, h2, h3, h4, h5, h6, p, img) {
    margin: 0;
    padding: 0;
}

/* MODAL */
.ns-reg-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(58,63,68, .7);
    width: 100%;
    height: 100%;
    position: fixed;
    opacity: 0;
    pointer-events: none;
    inset: 0;
    z-index: 30;
    padding: calc(var(--ns-header-height, 0) + 48px) 0 48px;
    transition-property: opacity;
    transition-duration: 0.5s;
    transition-timing-function: ease;
    box-sizing: border-box;
}

.ns-reg-modal.ns-reg-modal--opened {
    opacity: 1;
    pointer-events: auto;
}

.ns-reg-modal__inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 20px;
    width: 512px;
    min-height: 320px;
    max-height: calc(100% - 160px);
    background-color: #FFFFFF;
    border-radius: 24px;
    border: 1px solid #EBEDF1;
    color: #1F2023;
    padding: 60px 40px 40px;
    overflow: hidden;
    box-shadow: 0 10px 10px -5px rgba(0,0,0, .04);
    position: relative;
    box-sizing: border-box;
    margin-bottom: var(--ns-modal-offset-bottom, 0);
    box-sizing: border-box;
    overflow: hidden auto;
}

.ns-reg-modal__close {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40' fill='none'%3E%3Cpath stroke='%236A6F75' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m15 25 10-10m-10 0 10 10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 1;
    cursor: pointer;
}

.ns-reg-modal__content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
    height: 100%;
}

/* STEP */
.ns-reg-modal__step {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 32px;
    width: 100%;
    height: 100%;
}

.ns-reg-modal__step:not(.ns-reg-modal__step--active) {
    display: none;
}

.ns-reg-modal__step-head {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 20px;
    width: 100%;
}

.ns-reg-modal__step-head-title {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.37;
}

.ns-reg-modal__step-head-desciption {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: #404040;
}

.ns-reg-modal__step-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 24px;
    width: 100%;
}

/* BUTTON */
.ns-reg-modal__step-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 52px;
    background-color: #FFE7E7;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: #E00E1A;
    transition: .3s ease;
    transition-property: background-color, color;
    outline: none;
    border: none;
}

.ns-reg-modal__step-button--secondary {
    background-color: #F3F4F6;
    color: #1F2023;
}

.ns-reg-modal__step-button:hover {
    background-color: #E00E1A;
    color: #fff;
}

/* ACTION */
.ns-reg-modal__step-button.ns-reg-modal__action-validate {
    background-color: #e00e1a;
    color: #fff;
}

.ns-reg-modal__step-button.ns-reg-modal__action-validate:disabled {
    background-color: #c3c7cb !important;
    color: #fff !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.ns-reg-modal__step-button.ns-reg-modal__action-retry {
    background-color: #f3f4f6;
    color: #5A616C;
    cursor: pointer;
}

.ns-reg-modal__step-button.ns-reg-modal__action-retry:disabled {
    background-color: #f3f4f6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.ns-reg-modal__action-back {
    display: inline;
    color: #E00E1A;
    text-decoration: underline;
    cursor: pointer;
    user-select: none;
}

/* INPUTS */
.ns-reg-modal__input {
    display: block;
    width: 100%;
    height: 64px;
    border-radius: 10px;
    border: 2px solid #ebedf1;
    color: #111827;
    font-family: inherit;
    font-weight: 600;
    font-size: 32px;
    padding: 0 16px;
}

.ns-reg-modal__input::placeholder {
    color: #f3f4f6 !important;
    opacity: 1 !important;
}

.ns-reg-modal__input:focus {
    border-color: #111827;
}

.ns-reg-modal__input--code {
    letter-spacing: -.03em;
    text-align: center;
}

/* CHECKBOX */

.ns-reg-modal__step-checkbox {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.ns-reg-modal__step-checkbox input {
    display: none;
}

.ns-reg-modal__step-checkbox-switch {
    flex-shrink: 0;
    display: block;
    width: 36px;
    height: 20px;
    border-radius: 99px;
    background-color: #c3c7cb;
    position: relative;
    transition: background-color .3s ease;
    cursor: pointer;
}

.ns-reg-modal__step-checkbox-switch::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #fff;
    position: absolute;
    left: 2px;
    top: 2px;
    transition: left .3s ease;
}

.ns-reg-modal__step-checkbox input:checked + .ns-reg-modal__step-checkbox-switch {
    background-color: #e00e1a;
}

.ns-reg-modal__step-checkbox input:checked + .ns-reg-modal__step-checkbox-switch::before {
    left: calc(100% - 16px - 2px);
}

.ns-reg-modal__step-checkbox span {
    font-weight: 500;
    font-size: 14px;
    line-height: 1.43;
}

.ns-reg-modal__step-checkbox a {
    color: #e00e1a;
    text-decoration: underline;
}

/* HR */
.ns-reg-modal__hr {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 100%;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.57;
    user-select: none;
    color: #5A616C;
    text-align: center;
}

.ns-reg-modal__hr::before,
.ns-reg-modal__hr::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background-color: currentColor;
}
    

/* ADAPTIVE */

@media (max-width: 991px) {
    /* MODAL */

    .ns-reg-modal {
        padding: 0;
        align-items: flex-end;
        z-index: 9999;
    }

    .ns-reg-modal__inner {
        width: 100%;
        height: auto;
        max-height: 100%;
        border-radius: 16px 16px 0 0;
        gap: 10px;
        padding: 0;
        transform: translateY(100%);
        transition: transform 0.6s ease;
        overflow: hidden auto;
    }

    .ns-reg-modal--opened .ns-reg-modal__inner {
        transform: translateY(0);
    }

    .ns-reg-modal__content {
        display: block;
        width: 100%;
        overflow: hidden auto;
        padding: 36px 20px 24px;
        box-sizing: border-box;
    }

    .ns-reg-modal__close {
        width: 56px;
        height: 4px;
        background-color: #E0E0E0;
        background-image: none;
        left: 50%;
        top: 6px;
        transform: translateX(-50%);
    }

    .ns-reg-modal__close::before {
        content: "";
        display: block;
        width: 150%;
        height: 40px;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    /* STEP */
    .ns-reg-modal__step {
        gap: 24px;
    }

    .ns-reg-modal__step-head {
        gap: 20px;
    }

    .ns-reg-modal__step-head-title {
        font-size: 24px;
        line-height: 1.17;
    }

    .ns-reg-modal__step-head-desciption {
        font-size: 14px;
        line-height: 1.43;
    }

    .ns-reg-modal__step-col {
        gap: 24px;
    }

    /* BUTTON */

    .ns-reg-modal__step-button {
        height: 48px;
        font-size: 16px;
    }

    /* INPUT */
    .ns-reg-modal__input {
        height: 50px;
        border-radius: 10px;
        font-size: 24px;
    }

    .ns-reg-modal__step-checkbox {
        gap: 12px;
        font-size: 12px;
    }
}