/* Basic alert styles */
.alert {
    position: fixed;
    right: 20px;
    padding: 15px 20px;
    margin-bottom: 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 16px;
    z-index: 1000;
    min-width: 250px;
    max-width: 350px;
    box-shadow: 0 4px 8px var(--shadow-color);
    transform: translateX(100%) scale(0.1); /* Off-screen to the right */
    opacity: 0; /* Start with opacity 0 for fade-in effect */
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.9s ease, scale 0.1s ease;
}


/* Final position when fully visible */
.alert.show {
    opacity: 1;
    transform: translateX(0) scale(1); /* Moves the alert to its final position */
}

/* Alert types */

.alert-info {
    background-color: var(--secondary-color);
    border-color: var(--border-color);
    color: var(--primary-color);
}

.alert-success {
    background-color: #dff0d8;
    border-color: #d6e9c6;
    color: #3c763d;
    box-shadow: 0 4px 8px #3c763d;
}

.alert-warning {
    background-color: #fcf8e3;
    border-color: #faebcc;
    color: #8a6d3b;
    box-shadow: 0 4px 8px #8a6d3b;
}

.alert-error {
    background-color: #f2dede;
    border-color: #ebccd1;
    color: #a94442;
    box-shadow: 0 4px 8px #a94442;;
}

/* Close button styles */

.alert .close {
    margin-left: 15px;
    color: inherit;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.6;
    line-height: 1;
    float: right;
}

.alert .close:hover {
    opacity: 1;
}

/* Transition effect for disappearing alerts */

.alert.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease, top 0.5s ease;
}

/* Container for stacking alerts */

.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}