﻿/* Add this to your site.css or a custom toast-styles.css file */
.material-symbols-outlined {
    font-size: 24px;
    vertical-align: middle;
    margin-right: 4px;
    margin-left: 4px;
}

.toast-body {
    display: flex;
    align-items: center;
    padding-bottom: 1rem; /* Extra space for progress bar */
}

.toast {
    min-width: 300px;
    max-width: 400px; /* Added max-width for better responsive design */
    position: relative;
    backdrop-filter: blur(10px); /* Modern glass effect */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); /* Enhanced shadow */
    animation: slideInRight 0.3s ease-out; /* Smooth entrance animation */
}

.toast-container {
    z-index: 1080 !important; /* Increased to appear above app bar */
    position: fixed !important;
    top: 50px !important; /* Moved down 50px to avoid app bar */
    right: 0 !important;
    padding: 1rem !important;
}

/* Enhanced progress bar structure */
.toast-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px; /* Slightly thicker for better visibility */
    background-color: rgba(255, 255, 255, 0.2); /* Semi-transparent background */
    overflow: hidden;
    border-bottom-left-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.toast-progress-bar {
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white */
    width: 100%;
    transition: width linear; /* Smooth linear animation */
    border-bottom-left-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Toast type specific progress bar colors */
.toast.bg-success .toast-progress-bar {
    background-color: #c7c7c7!important;
}

.toast.bg-danger .toast-progress-bar {
    background-color: rgba(255, 255, 255, 0.9);
}

.toast.bg-info .toast-progress-bar {
    background-color: rgba(255, 255, 255, 0.9);
}

.toast.bg-warning .toast-progress-bar {
    background-color: rgba(0, 0, 0, 0.6); /* Darker for warning (yellow background) */
}

/* Entrance animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}
/* Larger icons */
.toast .material-symbols-outlined {
    font-size: 28px; /* Increased from 24px */
    vertical-align: middle;
    margin-right: 8px;
}

/* Muted grey header/body separator */
.toast .toast-header {
    border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.075));
}

/* Use Bootstrap's subtle color variants */
.toast.bg-success {
    background-color: #d1e7dd !important; /* body background */
}

.toast.bg-success .toast-header {
        background-color: #bcdacb !important; /* header background */
        color: #0f5132; /* optional: text color */
        font-weight: bold;
}
.toast.bg-success .toast-body .material-symbols-outlined {
        color: #6c757d; 
}

/* Success */
.toast.bg-success {
    background-color: #d1e7dd!important;
}

    .toast.bg-success .toast-header {
        background-color: #bcdacb!important;
        color: #0f5132;
        font-weight: bold;
    }

    .toast.bg-success .toast-body .material-symbols-outlined {
        color: #6c757d;
    }

/* Info */
.toast.bg-info {
    background-color: #cff4fc!important;
}

    .toast.bg-info .toast-header {
        background-color: #b6effb!important;
        color: #055160;
        font-weight: bold;
    }

    .toast.bg-info .toast-body .material-symbols-outlined {
        color: #6c757d;
    }

/* Warning */
.toast.bg-warning {
    background-color: #fff3cd!important;
}

    .toast.bg-warning .toast-header {
        background-color: #ffe69c !important;
        color: #664d03;
        font-weight: bold;
    }

    .toast.bg-warning .toast-body .material-symbols-outlined {
        color: #6c757d;
    }

/* Error (custom, assuming danger) */
.toast.bg-error,
.toast.bg-danger {
    background-color: #f8d7da !important;
}

    .toast.bg-error .toast-header,
    .toast.bg-danger .toast-header {
        background-color: #f1aeb5 !important;
        color: #842029;
        font-weight: bold;
    }

    .toast.bg-error .toast-body .material-symbols-outlined,
    .toast.bg-danger .toast-body .material-symbols-outlined {
        color: #6c757d;
    }

 

/* Progress bar colors for subtle variants */
/*.toast.bg-success .toast-progress-bar {
    background-color: var(--bs-success);
}

.toast.bg-danger .toast-progress-bar {
    background-color: var(--bs-danger);
}

.toast.bg-info .toast-progress-bar {
    background-color: var(--bs-info);
}

.toast.bg-warning .toast-progress-bar {
    background-color: var(--bs-warning);
}*/

/* Ensure progress bar container works with subtle colors */
.toast-progress-container {
    background-color: #6c757d;
 
}

/* Override the close button for better visibility on subtle backgrounds */
.toast .btn-close {
    filter: none;
    opacity: 0.6;
}

    .toast .btn-close:hover {
        opacity: 1;
    }
/* Custom toast background colors */
/*::deep .e-toast-container .e-toast.e-toast-success {
    background-color: #4caf50;
    border-color: #43a047;
}

::deep .e-toast-container .e-toast.e-toast-danger {
    background-color: #f44336;
    border-color: #e53935;
}

::deep .e-toast-container .e-toast.e-toast-info {
    background-color: #2196f3;
    border-color: #1e88e5;
}

::deep .e-toast-container .e-toast.e-toast-warning {
    background-color: #ff9800;
    border-color: #fb8c00;
}*/

/* Custom toast styling */
/*::deep .e-toast-container .e-toast {
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

    ::deep .e-toast-container .e-toast .e-toast-message {
        color: white;
    }

    ::deep .e-toast-container .e-toast .e-toast-title {
        color: white;
        font-weight: 600;
    }*/

    /* Toast icons adjustments */
    /*::deep .e-toast-container .e-toast .toast-icons {
        margin-right: 12px;
    }*/
