.flash-toast-container {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}

.flash-toast {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #111827;
  color: #f9fafb;
  font-size: 0.875rem;
  line-height: 1.45;
  box-shadow:
    0 10px 25px rgba(15, 23, 42, 0.18),
    0 2px 8px rgba(15, 23, 42, 0.12);
  pointer-events: auto;
  animation: flash-toast-in 0.24s ease-out;
}

.flash-toast--success {
  background: #065f46;
}

.flash-toast--error {
  background: #991b1b;
}

.flash-toast--info {
  background: #1e40af;
}

.flash-toast__icon {
  flex: 0 0 auto;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.1rem;
}

.flash-toast__text {
  flex: 1 1 auto;
  min-width: 0;
}

.flash-toast--copyable {
  cursor: pointer;
  text-align: left;
}

.flash-toast--copyable:hover {
  filter: brightness(1.05);
}

.flash-toast--copyable.flash-toast--copied {
  filter: brightness(1.08);
}

.flash-toast__headline {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.flash-toast__copy-text {
  display: block;
  word-break: break-all;
  font-size: 0.8125rem;
  opacity: 0.95;
}

.flash-toast__hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  opacity: 0.8;
}

.flash-toast__close {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  margin: -0.125rem -0.25rem 0 0.25rem;
  border: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
}

.flash-toast__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.flash-toast--linkable:hover {
  filter: brightness(1.05);
}

.flash-toast.is-leaving {
  animation: flash-toast-out 0.2s ease-in forwards;
}

@keyframes flash-toast-in {
  from {
    opacity: 0;
    transform: translateY(0.75rem) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes flash-toast-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(0.5rem) scale(0.98);
  }
}

@media (min-width: 768px) {
  .flash-toast-container {
    left: auto;
    right: 1.5rem;
    bottom: auto;
    top: 1.25rem;
    transform: none;
    align-items: flex-end;
    width: min(24rem, calc(100vw - 3rem));
  }

  @keyframes flash-toast-in {
    from {
      opacity: 0;
      transform: translateY(-0.75rem) scale(0.98);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes flash-toast-out {
    from {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
    to {
      opacity: 0;
      transform: translateY(-0.5rem) scale(0.98);
    }
  }
}
