﻿/* Alert container */
.floating-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

/* Alert box */
.alert {
    min-width: 250px;
    max-width: 90vw;
    padding: 15px 20px;
    border-radius: 8px;
    color: #fff;
    font-family: sans-serif;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateX(100%);
    animation: slide-in 0.5s forwards;
    position: relative;
}

    /* Different types */
    .alert.success {
        background-color: #28a745;
    }

    .alert.error {
        background-color: #dc3545;
    }

    .alert.info {
        background-color: #007bff;
    }

/* Slide-in animation */
@keyframes slide-in {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide-out (used before removing) */
@keyframes slide-out {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Close (X) */
.alert .close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    font-weight: bold;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 600px) {
    .alert {
        min-width: auto;
        width: 90%;
        right: 5%;
    }
}
