/* Floating Alert Styles */
.alert-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease-out;
    margin-bottom: 10px;
}

/* Animation for alert entrance */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animation for alert exit */
.alert-floating.fade-out {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Stack multiple alerts */
.alert-floating:nth-child(n+2) {
    top: calc(20px + (80px * var(--alert-index, 0)));
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .alert-floating {
        left: 20px;
        right: 20px;
        min-width: auto;
        max-width: none;
    }
}