.flash-message-shell {
  box-sizing: border-box;
  left: 50%;
  max-width: calc(100vw - 1rem);
  padding-inline: 0.5rem;
  pointer-events: none;
  position: fixed;
  top: 1rem;
  transform: translateX(-50%);
  width: max-content;
  z-index: 9999;
}

.flash-message-card {
  box-sizing: border-box;
  display: inline-flex;
  max-width: min(48rem, calc(100vw - 2rem));
  width: max-content;
}

.flash-message-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.flash-message-close {
  align-items: center;
  border-radius: 9999px;
  display: inline-flex;
  flex-shrink: 0;
  height: 1.5rem;
  justify-content: center;
  margin-right: -0.25rem;
  margin-top: 0.125rem;
  opacity: 0.72;
  transition: background-color 150ms ease, opacity 150ms ease;
  width: 1.5rem;
}

.flash-message-close:hover,
.flash-message-close:focus-visible {
  background-color: color-mix(in oklab, currentColor 12%, transparent);
  opacity: 1;
  outline: none;
}

.flash-message-close:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in oklab, currentColor 35%, transparent);
}

@media (max-width: 640px) {
  .flash-message-shell,
  .flash-message-card {
    max-width: calc(100vw - 1rem);
  }
}
