/* Notificações: um único componente para todas as telas.
 * Markup: templates/_notices.html (mensagens flash) e notify() em static/js/app-events.js (mensagens do JS).
 * Fixo no canto superior direito (em telemóveis ocupa a largura toda). Não depende do JS do Bootstrap.
 */
.notice-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1080;
  display: grid;
  gap: 8px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.notice {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border: 1px solid;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.4;
  animation: notice-in 0.18s ease-out;
}
.notice-icon { flex: none; margin-top: 1px; font-size: 18px; }
.notice-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notice-close {
  flex: none;
  margin: -2px -4px 0 0;
  padding: 2px 4px;
  border: 0;
  background: none;
  color: inherit;
  opacity: 0.6;
  line-height: 1;
  cursor: pointer;
}
.notice-close:hover,
.notice-close:focus-visible { opacity: 1; }

.notice-info  { background: #f0f9ff; border-color: #bae6fd; color: #075985; }
.notice-ok    { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.notice-warn  { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.notice-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

@media (max-width: 575.98px) {
  .notice-stack { left: 16px; right: 16px; width: auto; }
}
@keyframes notice-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .notice { animation: none; }
}
