/* .flash {
  align-items: center;
  animation: appear-then-fade 4s 300ms both;
  backdrop-filter: var(--blur-sm) var(--contrast-75);
  background-color: var(
    --flash-background,
    rgb(from var(--color-text) r g b / 0.65)
  );
  border-radius: var(--rounded-full);
  color: var(--flash-color, var(--color-text-reversed));
  column-gap: var(--size-2);
  display: flex;
  font-size: var(--text-fluid-base);
  justify-content: center;
  line-height: var(--leading-none);
  margin-block-start: var(--flash-position, var(--size-4));
  margin-inline: auto;
  min-block-size: var(--size-11);
  padding: var(--size-1) var(--size-4);
  text-align: center;

  [data-turbo-preview] & {
    display: none;
  }
} */

.flash--positive {
  --flash-background: var(--color-positive);
  --flash-color: var(--color-text-reversed);
}

.flash--negative {
  --flash-background: var(--color-negative);
  --flash-color: white;
}

.flash--warning {
  --flash-background: var(--color-warning, orange);
  --flash-color: white;
}

.flash--info {
  --flash-background: var(--color-info, blue);
  --flash-color: white;
}

.flash--extended {
  animation-name: appear-then-fade-extended;
  animation-duration: 12s;
}

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

@keyframes appear-then-fade-extended {
  0%,
  100% {
    opacity: 0;
  }
  2%,
  90% {
    opacity: 1;
  }
}

.flash {
  view-transition-name: disabled;
  z-index: 99;
  position: fixed;
  text-align: center;

  background-color: var(--flash-background, var(--color-text-subtle));
  color: var(--flash-color, white);
  box-shadow: 0 3px 22px -3px rgba(0, 0, 0, 0.4);
  max-inline-size: calc(100vw - var(--gutter) * 2);

  border-radius: var(--rounded-lg);
  padding-inline: var(--space-g-half);
  padding-block: var(--space-g-quarter);
  top: calc(var(--space-g) + var(--height-title-bar));
  /* right: var(--gutter); */
  right: var(--size-4);
  left: unset;
  bottom: unset;
  transition-timing-function: var(--ease-out-back);
  &:focus {
    outline: none;
  }
}

.flash-debut--before-enter {
  opacity: 0;
  transform: translateX(50%);
}

.flash-debut--enter {
  transition-duration: 600ms;
  opacity: 1;
  transform: translateX(0);
}

.flash-debut--before-exit {
  opacity: 1;
  transform: translateX(0);
}

.flash-debut--exit {
  transition-duration: 600ms;
  opacity: 0;
  transform: translateX(0) scale(0);
}
