/* ---------------------------------------------------------------------
   Toasts — top-right transient notifications.
   Used to render server-side Flask flash messages on any page.
   --------------------------------------------------------------------- */

.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none; /* let clicks pass through gaps; toasts re-enable */
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #2563eb;
    border-radius: 0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    font: 500 0.92rem/1.35 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
    animation: toast-in 180ms ease-out both;
}

.toast.toast-out {
    animation: toast-out 180ms ease-in both;
}

.toast-success { border-left-color: #059669; }
.toast-error   { border-left-color: #dc2626; }
.toast-info    { border-left-color: #2563eb; }

.toast-icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}
.toast-success .toast-icon { color: #059669; }
.toast-error   .toast-icon { color: #dc2626; }
.toast-info    .toast-icon { color: #2563eb; }

.toast-body {
    flex: 1 1 auto;
    min-width: 0;
    word-wrap: break-word;
}

.toast-close {
    flex: 0 0 auto;
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 2px 4px;
    margin: -2px -4px -2px 0;
    color: #6b7280;
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
}
.toast-close:hover { color: #111827; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-6px); }
}
