.alert {
    padding: 15px;
    border-radius: 4px;
}

.alert.success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.alert.error, .alert.danger {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

.alert.warning {
    background-color: #fcf8e3;
    color: #b2922a;
    border: 1px solid #faebcc;
}

.alert.info, .alert.message {
    background-color: #dee7f2;
    color: #4261a9;
    border: 1px solid #ccdbeb;
}

.flash-popup-container {
    position: fixed;
    top: 30px;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 999999;
    pointer-events: none;
}

.flash-popup {
    min-width: 250px;
    max-width: 90vw;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    animation: fadeIn 0.4s;
    position: relative;
    pointer-events: auto;
}

.flash-popup-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flash-message {
    flex: 1 1 auto;
    word-break: break-word;
    margin-left: 10px;
}

.flash-popup-close {
    align-self: flex-start;      /* Align cross to the top */
    color: #888;
    font-size: 20px;
    cursor: pointer;
    font-weight: bold;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    flex-shrink: 0;
    margin-top: 0;
    margin-right: 4px;
    margin-bottom: 4px;
    transition: color 0.2s, background 0.2s, border 0.2s;
}

.flash-popup-close:hover {
    color: #333;
    background: #f0f0f0;
    border-color: #888;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px);}
    to { opacity: 1; transform: translateY(0);}
}

@media (max-width: 480px) {
    .flash-popup {
        min-width: 180px;
        font-size: 14px;
        padding: 10px;
    }
}
