/* toast.css */
:root {
    /* Glassmorphism Backgrounds: Lower opacity for more transparency */
    --toast-success-bg: rgba(40, 167, 69, 0.7);
    --toast-error-bg: rgba(220, 53, 69, 0.7);
    --toast-info-bg: rgba(13, 110, 253, 0.7);
    --toast-text-color: #ffffff;
    /* A more diffused shadow for a softer, "sexier" feel */
    --toast-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

[data-theme="dark"],
[data-theme="dm"] {
    --toast-success-bg: rgba(45, 189, 87, 0.7);
    --toast-error-bg: rgba(230, 65, 80, 0.7);
    --toast-info-bg: rgba(40, 130, 255, 0.7);
    --toast-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

#toast-container {
    position: fixed;
    /* CHANGE: Positioned higher off the bottom */
    bottom: 80px; 
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    /* CHANGE: New toasts appear at the bottom and push old ones up */
    flex-direction: column-reverse; 
    align-items: center;
    gap: 12px;
}

.toast {
    
     box-sizing: border-box;
    padding: 12px 20px;
    border-radius: 5px;
    color: var(--toast-text-color);
    font-size: 1em;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-shadow: var(--toast-shadow);
    opacity: 0;
    /* CHANGE: Animate in from the BOTTOM with a subtle scale for a "pop up" effect */
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Max width for mobile and desktop */
    width: max-content;
    max-width: min(90vw, 450px);
    
    text-align: left;

    /* "SEXIER" GLASS EFFECT */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);

    /* Flex properties to align the new icon and text */
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    opacity: 1;
    /* Final state for the entrance animation */
    transform: translateY(0) scale(1);
}

/* Icon styling */
.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast.success {
    background-color: var(--toast-success-bg);
}

.toast.error {
    background-color: var(--toast-error-bg);
}

.toast.info {
    background-color: var(--toast-info-bg);
}

.toast.warning {
    background-color: rgba(255, 152, 0, 0.7);
}

[data-theme="dark"] .toast.warning,
[data-theme="dm"] .toast.warning {
    background-color: rgba(255, 167, 38, 0.7);
}

