/**
 * Centered success prompt after form submission.
 */

.if-form-toast {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.if-form-toast.if-form-toast--open {
  pointer-events: auto;
  opacity: 1;
}

.if-form-toast__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.45);
  backdrop-filter: blur(2px);
}

.if-form-toast__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  padding: 2rem 1.75rem 1.75rem;
  border-radius: 1rem;
  border: 1px solid #e4e4e7;
  background: #fff;
  box-shadow:
    0 24px 48px -12px rgb(0 0 0 / 0.28),
    0 0 0 1px rgb(255 255 255 / 0.04);
  text-align: center;
  transform: translate3d(0, 12px, 0) scale(0.98);
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0;
}

.if-form-toast.if-form-toast--open .if-form-toast__panel {
  transform: none;
  opacity: 1;
}

.if-form-toast__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.25rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #d9e021 0%, #facc15 100%);
  color: #111;
  box-shadow: 0 8px 20px -6px rgb(217 224 33 / 0.55);
}

.if-form-toast__icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.if-form-toast__title {
  margin: 0 0 0.75rem;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.35;
  color: #111;
}

.if-form-toast__message {
  margin: 0 auto 1.5rem;
  max-width: 22rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: #52525b;
}

.if-form-toast__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8.5rem;
  height: 2.75rem;
  padding: 0 1.75rem;
  border: none;
  border-radius: 9999px;
  background: #d9e021;
  color: #111;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.if-form-toast__action:hover {
  background: #c9d01e;
  transform: translateY(-1px);
}

.if-form-toast__action:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .if-form-toast,
  .if-form-toast__panel {
    transition: none;
    transform: none;
  }
}
