.flash-toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10050;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 8px;
  max-width: min(480px, calc(100vw - 32px));
  pointer-events: none;
}

.flash-toast {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0;
  padding: 14px 18px;
  font-size: 1.5rem;
  line-height: 1.4;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.flash-toast.flash-toast--hiding {
  opacity: 0;
  transform: translateY(8px);
}

.flash-toast.flash-toast--copied {
  animation: flash-toast-copy-pulse 0.55s ease;
}

.flash-toast__progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background-color: currentColor;
  opacity: 0.35;
  transform-origin: left center;
  animation-name: flash-toast-progress;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.flash-toast__body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.flash-toast__copy {
  flex: 0 0 auto;
  margin: 0;
  padding: 2px;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.65;
  cursor: pointer;
  line-height: 0;
}

.flash-toast__copy-icon {
  display: block;
  width: 22px;
  height: 22px;
}

.flash-toast__copy:hover,
.flash-toast__copy:focus {
  opacity: 0.95;
  outline: none;
}

.flash-toast__message {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
  font-size: 1.5rem;
  line-height: 1.4;
}

.flash-toast__close {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin: 0;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.55;
  font-size: 2.25rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
}

.flash-toast__close:hover,
.flash-toast__close:focus {
  opacity: 0.9;
  outline: none;
}

.flash-toast.flash-toast--paused .flash-toast__progress {
  animation-play-state: paused;
}

@keyframes flash-toast-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

@keyframes flash-toast-copy-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
  40% {
    transform: scale(1.025);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12), 0 4px 14px rgba(0, 0, 0, 0.2);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
}
