/* Restora toasts — glass notifications that morph out of / back into the top corner */
.rt-stack {
    position: fixed;
    top: max(14px, env(safe-area-inset-top, 0px));
    right: 16px;
    left: auto;
    z-index: 100050;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}
.rt-stack.rt-stack--rtl { right: auto; left: 16px; align-items: flex-end; }
.rt-toast {
    --rt-c: #0a84ff;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 10px 14px 10px 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(30px) saturate(190%);
    backdrop-filter: blur(30px) saturate(190%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 18px 40px -16px rgba(0, 0, 0, 0.35);
    color: #1d1d1f;
    font: 600 0.88rem/1.35 var(--rf-font, -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', sans-serif);
    cursor: pointer;
    /* closed: a small blurred pill tucked into the corner */
    opacity: 0;
    filter: blur(6px);
    transform: translateY(-14px) scale(0.55, 0.4);
    transform-origin: top right;
    transition:
        transform 0.55s cubic-bezier(0.34, 1.35, 0.5, 1),
        opacity 0.3s ease,
        filter 0.35s ease,
        border-radius 0.45s ease;
}
.rt-stack--rtl .rt-toast { transform-origin: top left; padding: 10px 10px 10px 14px; }
.rt-toast.rt-in { opacity: 1; filter: none; transform: none; }
.rt-toast.rt-out {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(-14px) scale(0.55, 0.4);
    border-radius: 999px;
    transition: transform 0.4s cubic-bezier(0.5, 0, 0.75, 0), opacity 0.35s ease, filter 0.35s ease, border-radius 0.3s ease;
}
.rt-ico {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--rt-c);
    color: #fff;
}
.rt-ico svg { width: 16px; height: 16px; }
.rt-text { min-width: 0; overflow-wrap: anywhere; }
.rt-success { --rt-c: #34c759; }
.rt-error { --rt-c: #ff3b30; }
.rt-warning { --rt-c: #ff9500; }
.rt-info { --rt-c: #0a84ff; }
body.dark-mode .rt-toast { background: rgba(44, 44, 46, 0.82); border-color: rgba(255, 255, 255, 0.1); color: #f5f5f7; }
@media (max-width: 576px) {
    .rt-stack, .rt-stack.rt-stack--rtl { left: 12px; right: 12px; width: auto; align-items: stretch; }
    .rt-toast { transform-origin: top center !important; }
}
@media (prefers-reduced-motion: reduce) {
    .rt-toast, .rt-toast.rt-out { transform: none !important; filter: none !important; transition: opacity 0.2s ease; }
}
/* hide the old bootstrap flash bars if any page still renders them */
.restora-flash { display: none !important; }
