/* modal */
.modal {
    position: fixed;
    z-index: 2;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 1;
    transition: opacity 0.2s ease, display 0.2s allow-discrete;
    overscroll-behavior: contain;
}

html.modal-open,
body.modal-open {
    overflow: hidden;
}

.modal.hidden {
    opacity: 0;
}

@starting-style {
    .modal:not(.hidden) {
        opacity: 0;
    }
}

.modal-content {
    box-sizing: border-box;
    background-color: white;
    color: black;
    border-radius: 15px;
    border: 1px solid #EBEBEB;
    padding: 18px;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    width: min(400px, calc(100vw - 32px)) !important;
    height: min-content;
    white-space: normal;
}

.modal-content-large {
    box-sizing: border-box;
    width: min(640px, calc(100vw - 32px)) !important;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 24px 4px 24px;
}

@media (max-width: 640px) {
    .modal-content-large {
        padding: 18px 18px 0px 18px;
    }
}