.modal-open {
    overflow: hidden;
}

.modal {
    position: fixed;
    display: grid;
    place-items: center;
    z-index: 9999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.75);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-btn {
    cursor: pointer;
}

.modal[data-open="false"] {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal[data-open="true"] {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.modal-content {
    position: relative;
    border-radius: 10px;
    max-width: 800px;
    width: 95%;
    height: 95%;
    background-color: #fefefe;
    margin: auto;
    padding: 32px 24px;
    overflow: auto
}

.modal[data-open="true"] .modal-content {
    -webkit-animation: slideIn 0.3s cubic-bezier(0, 0, 0.2, 1);
    animation: slideIn 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.modal[data-open="false"] .modal-content {
    -webkit-animation: slideOut 0.3s cubic-bezier(0, 0, 0.2, 1);
    animation: slideOut 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 28px;
    position: absolute;
    top: 0;
    right: 0;
    padding: 10px;
    aspect-ratio: 1;
    line-height: 0;
}

.modal-close:hover,
.modal-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-header {
    margin-bottom: 10px;
}

@keyframes slideIn {
    from {
        transform: translateY(2rem);
        opacity: 0.01;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(2rem);
        opacity: 0.01;
    }
}