/* Toasts and reminder notifications. The host is re-parented into the top modal when one is open. */
.toasts {
  position: fixed; right: 16px; bottom: 16px; z-index: 100; width: min(400px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast { pointer-events: auto; animation: toast-in 0.18s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.toast--info, .toast--success, .toast--error {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: var(--r-m);
  background: var(--toast-bg); color: var(--toast-ink); box-shadow: var(--shadow-sm); font-size: 14px;
}
.toast-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast--error .toast-icon { color: light-dark(#FF8F86, #B3261E); }
.toast--success .toast-icon { color: light-dark(#6FE0D3, #0E6E69); }
.toast--info .toast-icon { color: var(--sun); }
.toast--info .toast-icon, .toast--success .toast-icon, .toast--error .toast-icon { display: grid; }
.toast--info .btn, .toast--success .btn, .toast--error .btn,
.toast--info .icon-btn, .toast--success .icon-btn, .toast--error .icon-btn { color: inherit; border-color: color-mix(in oklab, currentColor 35%, transparent); background: transparent; }
.toast--info .icon-btn, .toast--success .icon-btn, .toast--error .icon-btn { border-color: transparent; }
.toast--info .btn:hover, .toast--success .btn:hover, .toast--error .btn:hover,
.toast--info .icon-btn:hover, .toast--success .icon-btn:hover, .toast--error .icon-btn:hover { background: color-mix(in oklab, currentColor 14%, transparent) !important; }

/* Reminder notification: persistent, with actions. */
.toast--reminder {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; padding: 12px 8px 12px 14px;
  background: var(--surface); color: var(--ink); border-radius: var(--r-m); border: 1px solid var(--line); border-left: 4px solid var(--sun);
  box-shadow: var(--shadow-lg);
}
.toast--reminder .toast-icon { color: var(--ink); background: var(--sun); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.toast-title { font-weight: 700; overflow-wrap: anywhere; }
.toast-sub { font-size: 13px; color: var(--muted); }
.toast-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

@media (max-width: 720px) {
  .toasts { left: 12px; right: 12px; width: auto; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); }
}
dialog .toasts { bottom: 16px; }
@media (max-width: 720px) { dialog .toasts { bottom: 12px; } }
