/* ───────── Alerts / flash messages ───────── */

.flash-container {
    padding-top: calc(var(--header-h) + 16px);
    padding-bottom: 0;
    position: relative;
    z-index: 2;
}

.alert {
    padding: 14px 18px;
    border-radius: var(--r);
    margin-bottom: var(--space-lg);
    font-size: 14.5px;
    line-height: 1.5;
    border: 1px solid transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.alert-info {
    background: rgba(180, 124, 253, 0.08);
    color: #d3c2f5;
    border-color: rgba(180, 124, 253, 0.3);
}

.alert-success {
    background: rgba(16, 185, 129, 0.10);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.32);
}

.alert-warning {
    background: rgba(255, 176, 123, 0.10);
    color: #ffd0a8;
    border-color: rgba(255, 176, 123, 0.32);
}

.alert-error {
    background: rgba(239, 68, 68, 0.10);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.32);
}

/* Toast for failed HTMX requests (see showRequestError in main.js). Fixed
   so it is seen wherever the user is scrolled. */
.request-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 90;
    width: min(560px, calc(100% - 32px));
    margin: 0;
    background: rgba(40, 8, 20, 0.94);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 12px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.request-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
    .request-toast {
        transition: none;
    }
}
