////
/// @group Component:Modal
/// @author Mustard-UI@v1, Michael Becker
////

///
.modal-mask {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: $modal-z;
    background-color: $modal-mask-color;
}

///
.modal {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    top: 50%;
    left: 50%;
    max-height: $modal-max-height;
    transform: translate(-50%, -50%);
    background: $modal-bg-color;
    border-radius: $modal-border-radius;
    overflow: hidden;

    @if $modal-shadow {
        box-shadow: elevation(3);
    }

    &.fullscreen {
        inset: 0;
        justify-content: flex-start;
        position: absolute;
        transform: none;
        max-height: 100%;
    }
}

///
.modal-head {
    padding: $modal-head-padding;

    .modal-title {
        font-size: 2em;
    }
}

///
.modal-body {
    flex: 1;
    padding: $modal-body-padding;
    overflow: auto;
}

///
.modal-footer {
    padding: $modal-footer-padding;
}
