.flash-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flash {
    display: flex;
    align-items: center;
    position: relative;
    width: 350px;
    min-height: 80px;
    padding: 15px 45px 15px 70px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border-left: 5px solid #1f8484;
}

.flash_error {
    border-left: 5px solid #dc3545;
}

.flash__icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: #e6f9f0;
    color: #1f8484;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.flash__icon__error {
    background-color: #fdeaea;
    color: #dc3545;
}

.flash__body {
    flex: 1;
    word-break: break-word;
    line-height: 1.4;
}

.flash__close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer !important;
    line-height: 1;
    padding: 5px;
    transition: color 0.2s;
    z-index: 1000;
    pointer-events: auto !important;
}

.flash__close:hover {
    color: #333;
}

.flash__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background-color: #1f8484;
    transform-origin: left;
    animation: flash-progress 5s linear forwards;
}

.flash_error .flash__progress {
    background-color: #dc3545;
}

@keyframes flash-progress {
    0% {
        transform: scaleX(1);
    }

    100% {
        transform: scaleX(0);
    }
}

@keyframes shake-and-slide {
    0% {
        opacity: 0;
        transform: translateX(120%);
    }

    8% {
        opacity: 1;
        transform: translateX(0);
    }

    /* Simple single shake */
    10% {
        transform: translateX(-8px);
    }

    12% {
        transform: translateX(0);
    }

    92% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(40px);
        pointer-events: none;
    }
}

.animate--drop-in-fade-out {
    animation: shake-and-slide 5.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Dark Mode support */
.dark-mode .flash {
    background-color: #1a1a1a;
    color: #eee;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.dark-mode .flash__body {
    color: #eee !important;
}