/* Floating copies preserve the original inline message and its Blazor actions. */
.app-notifications {
    position: fixed; top: max(18px, env(safe-area-inset-top)); right: max(18px, env(safe-area-inset-right));
    width: min(480px, calc(100vw - 36px)); max-height: calc(100dvh - 36px);
    z-index: 10050; display: grid; gap: 12px; overflow-y: auto;
    overscroll-behavior: contain; pointer-events: none; padding: 4px;
}
.app-toast {
    --toast-accent: #2563a6; --toast-tint: #eaf3ff;
    display: grid; grid-template-columns: 38px minmax(0, 1fr) 36px; gap: 12px;
    background: #fff; color: #172d4b; border: 1px solid #cbd5e1;
    border-left: 5px solid var(--toast-accent); border-radius: 16px; padding: 16px;
    box-shadow: 0 12px 36px #14284d26, 0 2px 5px #14284d14; pointer-events: auto;
    animation: toast-arrive .18s ease-out; font-size: 14px; line-height: 1.5;
}
.app-toast[data-kind="error"] { --toast-accent: #b42342; --toast-tint: #fff0f3; }
.app-toast[data-kind="warning"] { --toast-accent: #925500; --toast-tint: #fff4df; }
.app-toast[data-kind="success"] { --toast-accent: #087c58; --toast-tint: #e8f8f0; }
.app-toast-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--toast-tint); color: var(--toast-accent); }
.app-toast-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app-toast-title { display: block; font-size: 15px; color: var(--toast-accent); margin: 0 0 4px; }
.app-toast-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; max-height: 30dvh; overflow-y: auto; }
.app-toast button { font: inherit; cursor: pointer; box-shadow: none; min-height: 36px; }
.app-toast-close { border: 0; background: transparent; color: #50617a; border-radius: 8px; width: 36px; padding: 0; font-size: 25px !important; align-self: start; }
.app-toast-close:hover { background: #edf1f7; }
.app-toast-details { background: transparent; border: 0; padding: 4px 0; color: #364f94; text-decoration: underline; font-weight: 700 !important; margin-top: 6px; }
.app-toast button:focus-visible { outline: 3px solid #7761e8; outline-offset: 2px; }
@keyframes toast-arrive { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
    .app-notifications { top: max(10px, env(safe-area-inset-top)); right: 10px; width: calc(100vw - 20px); max-height: 55dvh; }
    .app-toast { padding: 12px; gap: 8px; grid-template-columns: 32px minmax(0, 1fr) 36px; }
    .app-toast-icon { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) { .app-toast { animation: none; } }
@media print { .app-notifications { display: none !important; } }
