/* Enhanced Xbox-style notification system CSS with smooth animations */

#toast {
    visibility: hidden;
    max-width: 50px;
    height: 50px;
    margin: auto;
    background-color: #111;
    color: #fff;
    text-align: center;
    border-radius: 30px;
    position: fixed;
    z-index: 10000;
    right: 30px;
    bottom: 30px;
    font-size: 14px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 1px solid #4A0000; /* Always red outline */
    transform: translateX(100%) scale(0.8);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#toast #img {
    width: 50px;
    height: 50px;
    float: left;
    box-sizing: border-box;   
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

#toast #desc {
    color: #fff; 
    position: relative;
    opacity: 0;
    transition: opacity 0.3s ease 0.2s;
}

#toast #desc p {
    position: absolute;
    width: 80%;
    height: 50px;
    align-items: center;
    display: flex;
    padding-right: 10px; 
    text-align: left;
    left: 60px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* Show animation states */
#toast.show {
    visibility: visible;
    transform: translateX(0) scale(1);
    opacity: 1;
    min-width: 350px;
    border: 1px solid #4A0000; /* Always red outline */
}

#toast.show #desc {
    opacity: 1;
}

/* Smooth entrance animation */
#toast.entering {
    visibility: visible;
    animation: smoothEnter 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    border: 1px solid #4A0000; /* Always red outline */
}

/* Smooth exit animation */
#toast.exiting {
    animation: smoothExit 0.4s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
    border: 1px solid #4A0000; /* Always red outline */
}

/* Keyframe animations */
@keyframes smoothEnter {
    0% {
        transform: translateX(100%) scale(0.8);
        opacity: 0;
        min-width: 50px;
        border: 1px solid #4A0000; /* Always red outline */
    }
    50% {
        transform: translateX(-10px) scale(1.05);
        opacity: 0.8;
        min-width: 200px;
        border: 1px solid #4A0000; /* Always red outline */
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
        min-width: 350px;
        border: 1px solid #4A0000; /* Always red outline */
    }
}

@keyframes smoothExit {
    0% {
        transform: translateX(0) scale(1);
        opacity: 1;
        min-width: 350px;
        border: 1px solid #4A0000; /* Always red outline */
    }
    50% {
        transform: translateX(20px) scale(0.95);
        opacity: 0.6;
        min-width: 200px;
        border: 1px solid #4A0000; /* Always red outline */
    }
    100% {
        transform: translateX(100%) scale(0.8);
        opacity: 0;
        min-width: 50px;
        border: 1px solid #4A0000; /* Always red outline */
    }
}

/* Text fade animations */
@keyframes textFadeIn {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes textFadeOut {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-20px);
    }
}

/* Enhanced hover effects */
#toast:hover {
    transform: translateX(-5px) scale(1.02);
    box-shadow: 0 6px 20px rgba(74, 0, 0, 0.4); /* Darker red shadow */
    border: 1px solid #4A0000; /* Always red outline */
    transition: all 0.2s ease;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #toast {
        right: 15px;
        bottom: 15px;
        max-width: 45px;
        height: 45px;
        border: 1px solid #4A0000; /* Always red outline */
    }
    
    #toast #img {
        width: 45px;
        height: 45px;
    }
    
    #toast #desc p {
        height: 45px;
        left: 55px;
        font-size: 13px;
    }
    
    #toast.show {
        min-width: 300px;
        border: 1px solid #4A0000; /* Always red outline */
    }
    
    @keyframes smoothEnter {
        0% {
            transform: translateX(100%) scale(0.8);
            opacity: 0;
            min-width: 45px;
            border: 1px solid #4A0000; /* Always red outline */
        }
        50% {
            transform: translateX(-8px) scale(1.05);
            opacity: 0.8;
            min-width: 180px;
            border: 1px solid #4A0000; /* Always red outline */
        }
        100% {
            transform: translateX(0) scale(1);
            opacity: 1;
            min-width: 300px;
            border: 1px solid #4A0000; /* Always red outline */
        }
    }
    
    @keyframes smoothExit {
        0% {
            transform: translateX(0) scale(1);
            opacity: 1;
            min-width: 300px;
            border: 1px solid #4A0000; /* Always red outline */
        }
        50% {
            transform: translateX(15px) scale(0.95);
            opacity: 0.6;
            min-width: 180px;
            border: 1px solid #4A0000; /* Always red outline */
        }
        100% {
            transform: translateX(100%) scale(0.8);
            opacity: 0;
            min-width: 45px;
            border: 1px solid #4A0000; /* Always red outline */
        }
    }
}

/* Pulse effect for important notifications */
#toast.pulse {
    animation: pulse 0.6s ease-in-out;
    border: 1px solid #4A0000; /* Always red outline */
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(74, 0, 0, 0.3);
        border: 1px solid #4A0000; /* Always red outline */
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(74, 0, 0, 0.5);
        border: 1px solid #4A0000; /* Always red outline */
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(74, 0, 0, 0.3);
        border: 1px solid #4A0000; /* Always red outline */
    }
}

/* All notification types maintain red outline but different shadows */
#toast.success {
    border: 1px solid #4A0000; /* Always red outline */
    box-shadow: 0 4px 12px rgba(34, 139, 34, 0.3);
}

#toast.error {
    border: 1px solid #4A0000; /* Always red outline */
    box-shadow: 0 4px 12px rgba(74, 0, 0, 0.3);
}

#toast.warning {
    border: 1px solid #4A0000; /* Always red outline */
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

#toast.info {
    border: 1px solid #4A0000; /* Always red outline */
    box-shadow: 0 4px 12px rgba(65, 105, 225, 0.3);
}