@import "app/styles/variables";

bl-toast {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 250px;
    cursor: pointer;
    font-size: 13px;
    margin: 10px 0 0;
    padding: 10px;
    transition: 0.3s ease-in-out;
    color: rgba(250, 251, 255, 0.95);

    animation-name: animScale;
    animation-duration: 0.25s;
    box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.3);
    pointer-events: all;

    > .separator {
        flex: 1;
    }

    &.success {
        color: $success-contrast-color;
        background-color: $success-color;
    }

    &.error {
        color: $danger-contrast-color;
        background-color: $danger-color;
    }

    &.info {
        color: $primary-contrast-color;
        background-color: $primary-color;
    }

    &.warn {
        color: $warn-contrast-color;
        background-color: $warn-color;
    }

    &.success > .focus-outline.focus-visible {
        outline-color: $success-contrast-color;
    }

    &.error > .focus-outline.focus-visible {
        outline-color: $danger-contrast-color;
    }

    &.info > .focus-outline.focus-visible {
        outline-color: $primary-contrast-color;
    }

    &.warn > .focus-outline.focus-visible {
        outline-color: $warn-contrast-color;
    }

    &.notification-hidden {
        opacity: 0;
    }

    > .notification-title {
        font-size: 14px;
        margin-right: 10px;
        padding: 0;
        font-weight: bold;
    }

    > .notification-message {
        margin: 0 5px;
    }

    > .dismiss-btn {
        cursor: pointer;
        padding: 2px;
        .fa-times {
            color: $primary-contrast-color;
        }
        &:hover {
            .fa-times {
                color: $hover-bg-color;
            }
        }
    }

    > .actions {
        margin-left: 10px;
        margin-right: 7px;

        > .action {
            padding: 5px;
            background: rgba(0, 0, 0, 0.2);
            margin-right: 3px;
            white-space: nowrap;
            &:hover {
                background: rgba(0, 0, 0, 0.3);
            }
        }
    }
}

@media (forced-colors: active) {
    bl-toast {
        &.success, &.info, &.warn, &.error {
            border: 1px solid Highlight;
        }
    }
}
