$snackbar-background-color: $dark !default;

.notices {
    position: fixed;
    display: flex;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2em;
    overflow: hidden;
    z-index: 1000;
    pointer-events: none;
    .toast {
        display: inline-flex;
        animation-duration: $speed-slow;
        margin: 0.5em 0;
        text-align: center;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
        border-radius: 2em;
        padding: 0.75em 1.5em;
        pointer-events: auto;
        opacity: 0.92;
        @each $name, $pair in $colors {
            $color: nth($pair, 1);
            $color-invert: nth($pair, 2);
            &.is-#{$name} {
                color: $color-invert;
                background: $color;
            }
        }
    }
    .snackbar {
        display: inline-flex;
        align-items: center;
        justify-content: space-around;
        animation-duration: $speed-slow;
        margin: 0.5em 0;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
        border-radius: $radius;
        pointer-events: auto;
        background: $snackbar-background-color;
        color: $dark-invert;
        min-height: 3em;
        .text {
            padding: 0.5em 1em;
        }
        .action {
            margin-left: auto;
            padding: 0.5em;
            padding-left: 0;
            .button {
                font-weight: $weight-semibold;
                text-transform: uppercase;
            }
            @each $name, $pair in $colors {
                $color: nth($pair, 1);
                &.is-#{$name} {
                    .button {
                        color: $color;
                    }
                }
            }
        }
        @include mobile {
            width: 100%;
            margin: 0;
            border-radius: 0;
        }
        @include tablet {
            min-width: 350px;
            max-width: 600px;
            overflow: hidden;
        }
    }

    .toast,
    .snackbar {
        // Modifers
        &.is-top {
            align-self: center;
        }
        &.is-top-right {
            align-self: flex-end;
        }
        &.is-bottom {
            align-self: center;
        }
        &.is-bottom-right {
            align-self: flex-end;
        }
        &.is-toast {
            opacity: 0.92;
        }
    }

    // Modifers
    &.is-top {
        flex-direction: column;
    }
    &.is-bottom {
        flex-direction: column-reverse;
    }
    &.has-custom-container {
        position: absolute;
    }

    @include mobile {
        padding: 0;
        position: fixed !important;
    }
}
