.modal {
    display: none;
    overflow: auto;
    overflow-y: scroll;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    -webkit-overflow-scrolling: touch;
    outline: 0;

    @at-root #{&}__header {
        display: flex;
        padding: 10px;
        border-bottom: 1px solid #a0a0a0;
        background-color: #d8d8d8;

        @at-root #{&}-title {
            flex: 1 1 auto;

            h2 {
                font-size: 1.3rem;
                margin: 0;
            }
        }

        @at-root #{&}-close {
            flex: 0 1 32px;
            padding: 0;
            cursor: pointer;
            font-size: 1.3rem;
            background: #0000;
            border: 0;
            -webkit-appearance: none;
        }
    }

    @at-root #{&}__body {
        padding: 10px;
    }

    @at-root #{&}__footer {
        display: flex;
        justify-content: flex-end;
        padding: 10px;
        border-top: 1px solid #e5e5e5;

        @at-root #{&}-controls {
            display: flex;
            flex: 0 1 auto;

            .btn {
                margin-left: 5px;
            }
        }
    }
}

.modal-content {
    position: relative;
    background-color: #fff;
    border: 1px solid #999;
    border: 1px solid #0003;
    border-radius: 4px;
    -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
    background-clip: padding-box;
    outline: none;
}

// Modal widths at the bootstrap breakpoint widths
$modal-width-sm: 600px;
$modal-width-md: 800px;
$modal-width-lg: 960px;

.modal-dialog {
    width: 95%;
    margin: 30px auto;

    @media screen and (min-width: $screen-sm-min) {
        width: $modal-width-sm;
    }

    @media screen and (min-width: $screen-md-min) {
        width: $modal-width-md;
    }

    @media screen and (min-width: $screen-lg-min) {
        width: $modal-width-lg;
    }

    &.modal-dialog--sm {
        @media screen and (min-width: $screen-md-min) {
            width: $modal-width-sm;
        }

        @media screen and (min-width: $screen-lg-min) {
            width: $modal-width-sm;
        }
    }

    &.modal-dialog--md {
        @media screen and (min-width: $screen-lg-min) {
            width: $modal-width-md;
        }
    }
}

.modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    background-color: #000;

    &.in {
        opacity: 0.3;
    }
}

.modal-batch-download {
    @at-root #{&}__footer-note {
        align-self: center;
    }
}
