.modal {
    /* Underlay covers entire screen. */
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;

    /* Flexbox centers the .modal-content vertically and horizontally */
    display: flex;
    flex-direction: column;
    align-items: center;

    /* Animate when opening */
    animation-name: fadeIn;
    animation-duration: 150ms;
    animation-timing-function: ease;
}

.modal > .modal-underlay {
    /* underlay takes up the entire viewport. This is only
    required if you want to click to dismiss the popup */
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

.modal > .modal-content {
    /* Position visible dialog near the top of the window */
    margin-top: auto;
    margin-bottom: auto;

    /* Sizing for visible dialog */
    width: 572px;

    max-height: 90vh;
    overflow-y: auto;

    /* Display properties for visible dialog*/
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 25px;
    position: relative;
    background-color: var(--neutralswhite);
    border-radius: 16px;
    box-shadow: var(--shadow);

    /* Animate when opening */
    animation-name: zoomIn;
    animation-duration: 150ms;
    animation-timing-function: ease;
}

.modal > .modal-full {
    width: auto;
    height: 100%;
    max-width: 95vw;
    max-height: 95vh;
    aspect-ratio: 1;
    margin: auto;
    align-items: stretch;
    justify-content: center;
    padding: 16px;
}

.modal.closing {
    /* Animate when closing */
    animation-name: fadeOut;
    animation-duration: 150ms;
    animation-timing-function: ease;
}

.modal.closing > .modal-content {
    /* Animate when closing */
    animation-name: zoomOut;
    animation-duration: 150ms;
    animation-timing-function: ease;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes zoomIn {
    0% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes zoomOut {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(0.9);
    }
}

.modal-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-text {
    min-height: 78px;
}

.modal-controls {
    align-self: end;
    display: flex;
    justify-content: end;
    gap: 22px;
}

.modal-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    position: relative;
    border-radius: 12px;
    cursor: pointer;
}

.left-modal-control {
    border-color: var(--dark-cyan);
    border-width: 1px;
    border-style: solid;
}
.left-modal-control:hover {
    border-color: var(--neutralsdark-gray);
    background-color: var(--neutralsdark-gray);
}

.right-modal-control {
    background-color: var(--limeapple-green);
}
.right-modal-control:hover {
    background-color: var(--greenfresh-mint);
}
.right-modal-control.disabled {
    opacity: 50%;
    background-color: var(--neutralsdark-gray);
    cursor: unset;
}