/* Toast Notification System - Replacing Modal Alert */
#layout-alert-root {
    position: fixed;
    top: 80px;
    /* Below header */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    /* Allow clicking through container */
}

/* Base Toast Style */
#layout-alert-root .toast-notification {
    pointer-events: auto;
    /* Re-enable clicks on toast */
    min-width: 300px;
    max-width: 90vw;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    animation: toastSlideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
    transform: translateY(-20px);
    overflow: hidden;
    position: relative;
}

/* Toast Variants */
#layout-alert-root .toast-notification.toast-success {
    border-left: 4px solid #00c853;
    /* Green */
    background: linear-gradient(90deg, rgba(0, 200, 83, 0.1), rgba(10, 10, 10, 0.95));
}

#layout-alert-root .toast-notification.toast-danger,
#layout-alert-root .toast-notification.toast-error {
    border-left: 4px solid #ff1744;
    /* Red */
    background: linear-gradient(90deg, rgba(255, 23, 68, 0.1), rgba(10, 10, 10, 0.95));
}

#layout-alert-root .toast-notification.toast-info,
#layout-alert-root .toast-notification.toast-warning {
    border-left: 4px solid #2979ff;
    /* Blue */
    background: linear-gradient(90deg, rgba(41, 121, 255, 0.1), rgba(10, 10, 10, 0.95));
}

/* Message Text */
#layout-alert-root .toast-message {
    font-size: 14px;
    font-weight: 500;
    margin-right: 15px;
    line-height: 1.4;
}

/* Close Icon (Optional, user said auto vanish, but good UX to have X) */
#layout-alert-root .toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

#layout-alert-root .toast-close:hover {
    color: #fff;
}

/* Progress Bar (Visual Timer) */
#layout-alert-root .toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    width: 100%;
    transform-origin: left;
    animation: progressLinear 3s linear forwards;
}

#layout-alert-root .toast-notification.toast-success .toast-progress {
    background: #00c853;
}

#layout-alert-root .toast-notification.toast-danger .toast-progress {
    background: #ff1744;
}

#layout-alert-root .toast-notification.toast-info .toast-progress {
    background: #2979ff;
}

/* Animations */
@keyframes toastSlideDown {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
}

@keyframes progressLinear {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    #layout-alert-root {
        width: 100%;
        padding: 0 15px;
        top: 70px;
    }

    #layout-alert-root .toast-notification {
        min-width: 200px;
        max-width: 85vw;
        width: fit-content;
        padding: 10px 18px;
        border-radius: 12px;
    }

    #layout-alert-root .toast-message {
        font-size: 13px;
        margin-right: 10px;
    }

    #layout-alert-root .toast-close {
        font-size: 16px;
    }
}