/**
 * Copyright (c) 2021 Peyton Gasink
 * Distributed under MIT License.
 
 * This file contains all the styling for the toasts. It may cause
 * conflicting styles if simultaneously using Bootstrap toasts not generated by
 * Bootstrap Toaster, which is not recommended.
 */

.status-icon {
    font-size: 1.1rem;
}

.toast {
    /* Ported back from Bootstrap 5's toast styling */
    width: 350px;
}

#toastContainer {
    /*
        Variables dedicated to light and dark theme colors. The light theme ones are only used
        for JavaScript overrides, and are duplicates of Bootstrap's settings.
    */
    --header-color-light: #6c757d;
    --text-color-light: #212529;
    --header-bg-color-light: rgba(255,255,255,.85);
    --body-bg-color-light: rgba(255,255,255,.85);
    --header-color-dark: #f8f9fa;
    --text-color-dark: #f8f9fa;
    --header-bg-color-dark: rgba(30,40,45,.85);
    --body-bg-color-dark: rgba(30,40,45,.85);
    --header-color-success: #EEEEEE;
    --text-color-success: #444444;
    --header-bg-color-success: rgba(106,168,79, 0.74);
    --body-bg-color-success: rgba(75,159,39, 0.12);
    --header-color-danger: #EEEEEE;
    --text-color-danger: #444444;
    --header-bg-color-danger: rgba(102,0,0, 0.74);
    --body-bg-color-danger: rgba(230,132,132, 0.12);
    --header-color-warning: #5B5B5B;
    --text-color-warning: #444444;
    --header-bg-color-warning: rgba(241,194,50, 0.74);
    --body-bg-color-warning: rgba(255,242,204, 0.12);
    --header-color-info: #5B5B5B;
    --text-color-info: #444444;
    --header-bg-color-info: rgba(11,83,148, 0.74);
    --body-bg-color-info: rgba(207,226,243, 0.12);
    max-height: 100vh;
    overflow-y: scroll;
    /* Hide scrollbar in Firefox */
    scrollbar-width: none;
    /* Render in front of Bootstrap toasts */
    z-index: 1060;
}

    /* Hide scrollbar in all webkit-based browsers. */
    #toastContainer::-webkit-scrollbar {
        display: none;
    }

    #toastContainer .toast {
        margin: 0.8rem;
    }

/* Force toast container to top center on mobile. */
@media only screen and (max-width: 576px) {
    #toastContainer {
        width: 100%;
        top: 0 !important;
        bottom: auto !important;
        left: 0 !important;
        transform: none !important;
    }

        #toastContainer .toast {
            margin: 0.8rem auto;
        }
}

@media (prefers-color-scheme: dark) {
    .toast, .toast-header, .toast-header .close {
        color: var(--text-color-dark);
    }

    .toast {
        background-color: var(--body-bg-color-dark);
    }

    .toast-header {
        background-color: var(--header-bg-color-dark);
    }
}

@media (prefers-color-scheme: success) {
    .toast, .toast-header, .toast-header .close {
        color: var(--text-color-success);
    }

    .toast {
        background-color: var(--body-bg-color-success);
    }

    .toast-header {
        background-color: var(--header-bg-color-success);
    }
}
/*Styles for types of messages */
.SUCCESS {
}

/* Styles borrowed from Bootstrap 5 for backport */
.top-0 {
    top: 0 !important;
}

.top-50 {
    top: 50% !important;
}

.bottom-0 {
    bottom: 0 !important;
}

.left-0 {
    left: 0 !important;
}

.left-50 {
    left: 50% !important;
}

.right-0 {
    right: 0 !important;
}

.translate-middle {
    transform: translate(-50%, -50%) !important;
}

.translate-middle-x {
    transform: translateX(-50%) !important;
}

.translate-middle-y {
    transform: translateY(-50%) !important;
}
