.modal:has(.new-modal__form, iframe) {
    position: fixed;
    inset: 0;
    z-index: var(--z-index-modal);
    display: flex;
    justify-content: center;
    padding-top: 4rem;
    background-color: color-mix(in oklab, var(--clr-gray-950), transparent 50%);
    backdrop-filter: blur(0.25rem);
    opacity: 0;
    transition: opacity var(--transition-duration) linear;

    &.modal--visible {
        opacity: 1;
        z-index: var(--z-index-modal--visible);
    }

    .modal__container {
        min-width: 600px;
        height: 100%;
        max-height: 800px;
        background: var(--clr-gray-0);
        margin: 0;
        max-width: none;
    }

    .new-modal__form {
        width: 100%;
        height: 100%;
        background-color: transparent;
        display: flex;
        flex-direction: column;
    }

    .new-modal__header {
        padding: 2rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .new-modal__header__title {
        font-size: var(--fs-xl);
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 0.625rem;

        button {
            display: grid;
            place-items: center;
        }
    }

    .new-modal__header__button--close {
        border: none;
        background-color: transparent;
        cursor: pointer;
        display: grid;
        place-items: center;
        transition: opacity var(--transition-duration) ease-in-out;

        &:hover {
            opacity: 0.75;
        }
    }

    .new-modal__body {
        flex: 1;
        position: relative;
        margin: 0;
    }

    .new-modal__body__scrollable-area {
        position: absolute;
        inset: 0;
        padding: 0.5rem 2rem;
        overflow-y: auto;
    }

    .new-modal__body__scrollable-area .form-group {
        margin-bottom: 1.75rem;
    }

    .new-modal__footer {
        padding: 1rem 2rem 2rem;
        text-align: center;
    }

    .new-modal__footer__buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        justify-content: center;
        align-items: center;
    }

    .new-modal__footer__submit-button {
        --padding-horizontal: 3rem;

        padding-left: var(--padding-horizontal);
        padding-right: var(--padding-horizontal);
    }

    .new-modal__input-nip {
        display: flex;
        gap: 0.5rem;
    }

    .new-modal__input-nip .form-group {
        flex: 1;
    }

    .new-modal__form .new-modal__input-nip .new-modal__gus-button {
        height: 51px;
    }

    .new-modal__vies-information {
        display: block;
        color: var(--clr-gray-400);
        font-size: var(--fs-xs);
        margin-bottom: 1rem;
        text-align: center;
    }
}

@media screen and (max-width: 600px) {
    .modal:has(.new-modal__form, iframe) {
        padding: 0;
    }

    .modal:has(.new-modal__form, iframe) .modal__container {
        width: 100%;
        height: 100%;
        min-width: 0;
        max-height: none;
    }
}

@media screen and (min-width: 600px) and (max-height: 900px) {
    .modal:has(.new-modal__form) {
        display: grid;
        place-items: center;
        padding: 0;
    }
}
