/*
 * Flash messages. Notices appear as a floating toast that fades out, as in
 * Campfire's flash.css. Alerts stay inline so errors aren't missed.
 */
.flash {
  border-radius: var(--radius);
  border: 1px solid transparent;
  margin-block-end: var(--block-space);
  padding: 0.6rem 0.9rem;
}

.flash-notice {
  animation: appear-then-fade 3s 300ms both;
  background-color: var(--color-ok-bg);
  box-shadow: var(--shadow-layered);
  color: var(--color-ok-text);
  inset-block-start: var(--block-space);
  inset-inline-start: 50%;
  margin: 0;
  pointer-events: none;
  position: fixed;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 6;
}

.flash-alert {
  background-color: var(--color-err-bg);
  color: var(--color-err-text);
}

.errors {
  background-color: var(--color-err-bg);
  border-radius: var(--radius);
  color: var(--color-err-text);
  padding: 0.6rem 0.9rem;

  ul {
    margin: 0;
    padding-inline-start: 1.1rem;
  }
}

@keyframes appear-then-fade {
  0%,
  100% {
    opacity: 0;
  }

  10%,
  80% {
    opacity: 1;
  }
}
