/* ── Dashboard toast notifications ──────────────────────────────────
 * Shared dashboard primitive — see docs/RESERVATION_LIST_AJAX_AND_SORTING_PLAN.md
 *
 * Stack of up to 3 toasts, top-right corner, auto-dismiss after 4s.
 * Types: success / error / info. Slides in from the right.
 *
 * Container is in templates/dashboard/base.html with aria-live="polite"
 * so screen readers announce messages without stealing focus.
 */

.dash-toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none; /* let clicks pass through gaps; toasts re-enable */
    max-width: 400px;
    width: calc(100% - 32px);
}

.dash-toast {
    pointer-events: auto;
    background: #1f2937;
    color: #ffffff;
    padding: 12px 36px 12px 16px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    position: relative;
    animation: dashToastIn 200ms cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;
}

.dash-toast--success {
    background: #166534;
}

.dash-toast--error {
    background: #991b1b;
}

.dash-toast--info {
    background: #1e40af;
}

.dash-toast__icon {
    flex: 0 0 18px;
    line-height: 1;
    margin-top: 1px;
}

.dash-toast__message {
    flex: 1;
    word-wrap: break-word;
}

.dash-toast__close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 4px;
}

.dash-toast__close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.dash-toast--exiting {
    animation: dashToastOut 180ms cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes dashToastIn {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes dashToastOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(20px) scale(0.96);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dash-toast,
    .dash-toast--exiting {
        animation: none;
    }
}

@media (max-width: 480px) {
    .dash-toast-container {
        top: 8px;
        right: 8px;
        left: 8px;
        max-width: none;
        width: auto;
    }
}
