/* Notificações compartilhadas: reutilizam os tokens da apresentação. */
.notifications {
  position: fixed;
  top: calc(var(--header-height, 5.5rem) + 1rem);
  right: max(1rem, env(safe-area-inset-right));
  z-index: 90;
  display: grid;
  gap: var(--space-sm);
  width: min(26rem, calc(100% - 2rem));
  max-height: calc(100dvh - var(--header-height, 5.5rem) - 3rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: none;
}
.notifications:empty { display: none; }
.notification {
  --notification-accent: var(--action);
  position: relative;
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 3px solid var(--notification-accent);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-dropdown);
  pointer-events: auto;
  overflow: hidden;
  animation: notification-appear var(--duration-indicator, 180ms) ease-out;
  font-size: 0.875rem;
  line-height: 1.6;
}
.notification-success { --notification-accent: #167046; }
.notification-error { --notification-accent: #b42332; }
.notification-warning { --notification-accent: #8b5600; }
.notification svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: var(--notification-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.notification p { margin: 0; overflow-wrap: anywhere; }
.notification-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  margin: -0.5rem -0.5rem 0 0;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.5rem;
  cursor: pointer;
}
.notification-close:hover { background: var(--wash); }
.notification-close:focus-visible { outline: 3px solid var(--action); outline-offset: -3px; }
.notification-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--notification-accent);
  transform-origin: left;
}
.notification-announcer {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
@keyframes notification-appear {
  from { opacity: 0; transform: translateY(-0.25rem); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .notification { animation: none; }
}
