/* Base flash box (your existing rules) */
#flash-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 30px;
    background: #4caf50;
    color: white;
    font-size: 1.2rem;
    border-radius: 10px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s ease;
}
#flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: all; /* blocks clicks */
}

#flash-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Visibility behaviour */
#flash-box.visible {
    opacity: 1;
}

#flash-box.fade-out {
    opacity: 0;
}

/* Size classes */
.flash.small {
    width: 250px;
    height: auto;
    font-size: 1rem;
}

.flash.medium {
    width: 350px;
    height: auto;
    font-size: 1.1rem;
}

.flash.large {
    width: 500px;
    max-width: 90vw;   /* never wider than the viewport */
    height: auto;
    font-size: 1.3rem;
}

#flash-box, .flash.large {
    box-sizing: border-box;
}


