.flash-alert {
    position: fixed;
    top: 20px;
    right: 2px;
    max-width: 400px;
    width: 100%;
    z-index: 999999;
    border-radius: 6px;
    padding: 12px 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    animation: fadeOut 0.5s ease-in-out forwards;
    animation-delay: 5s;
    transition: all 0.3s ease;
}

/* Responsive center for small screens */
@media (max-width: 576px) {
    .flash-alert {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 90%;
        max-width: 90%;
    }
}

/* Backgrounds and text colors */
.flash-alert.success {
    background-color: #d1e7dd;
    color: #0d4b2e;
    border: 1px solid #badbcc;
}

.flash-alert.warning {
    background-color: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
}

.flash-alert.error {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

/* Progress bar */
.flash-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    animation: shrinkProgress 5s linear forwards;
}

.flash-progress.success {
    background-color: #197047;
}
.flash-progress.warning {
    background-color: #f5bc12;
}
.flash-progress.error {
    background-color: #dc3545;
}

@keyframes shrinkProgress {
    from { width: 100%; }
    to { width: 0%; }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
    }
}
