/* Flash banner shared by the public and app layouts. Surface-neutral on
   purpose: loaded alongside color.css on both surfaces, so it must not
   depend on the Tailwind bundle. */

.flash-banner {
  position: fixed;
  left: 50%;
  bottom: 3rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(calc(100vw - 2rem), 32rem);
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  font-weight: 600;
  text-align: center;
  transform: translateX(-50%);
  gap: 0.75rem;
}

.flash-banner__message {
  min-width: 0;
}

.flash-banner__dismiss {
  display: none;
  flex-shrink: 0;
  padding: 0.35rem 0.75rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.flash-banner--alert {
  background-color: #f1d2d2;
  color: var(--color-carbon-error, #8a3f3f);
}

.flash-banner--notice {
  background-color: #dbe9e3;
  color: var(--color-forest-success, #3e836e);
}

@media (prefers-reduced-motion: no-preference) {
  .hide-after-delay {
    animation: hide-after-delay 1s forwards;
    animation-iteration-count: 1;
    animation-delay: 3s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hide-after-delay {
    animation: none;
  }

  .flash-banner {
    justify-content: space-between;
    text-align: left;
  }

  .flash-banner__dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@keyframes hide-after-delay {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}
