/* MODAL CSS */
.modal {
    display: none; /* Hidden by default */
    visibility: visible;
    position: fixed; /* Stay in place */
    z-index: 9999; /* Sit on top */
    left: 0;
    top: 0;
    width: 100vw; /* Full width */
    height: 100vh; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0, 0, 0); /* Fallback color */
    background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

/* Modal Content/Box */
.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80vw;
    max-height: 80vh;
    overflow: hidden auto;
    padding: 1em;
    border: 1px solid #888;
    background-color: #fefefe;
}

/* The Close Button */
.modal-content > .close {
    position: absolute;
    top: 0.25em;
    right: 0.25em;
    color: #aaa;
    font-size: 2em;
    font-weight: bold;
    line-height: 0.5em;
    z-index: 1;
}

.modal-content > .close:hover,
.modal-content > .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-content .modal-confirm-buttons {
    width: 100%;
    margin-top: 1em;
    display: flex;
    justify-content: end;
    gap: 1em;
}

body.admin-bar.has-modal {
    height: calc(100vh - var(--wd-admin-bar-h, 32px));
    overflow-y: hidden;
    max-height: calc(100vh - var(--wd-admin-bar-h, 32px));
}

body.has-modal {
    height: calc(100vh);
    overflow-y: hidden;
    max-height: calc(100vh);
}