/* Auto-dismissing toast popups instead of inline flash messages - see
   static/scripts/flash.js for the dismiss behavior. */
ul.flashes {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 0;
    /* min() keeps the 320px cap on wider screens, but shrinks to fit
       (with matching clearance) on a ~320px-wide phone. */
    max-width: min(320px, calc(100vw - 40px));
}

ul.flashes li {
    background-color: #333;
    color: #fff;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    opacity: 1;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

ul.flashes li.flash-hide {
    opacity: 0;
    transform: translateX(20px);
}
