.turnstile-field {
  width: 100%;
  min-width: 0;
  margin: 2px 0 5px;
  padding: 10px;
  background: rgba(124, 58, 237, 0.05);
  border: 1px solid rgba(89, 62, 121, 0.14);
  border-radius: 14px;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.turnstile-field[hidden] {
  display: none !important;
}

.turnstile-widget {
  width: 100%;
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.turnstile-widget:empty::before {
  content: "";
  width: min(100%, 300px);
  height: 58px;
  background:
    linear-gradient(
      100deg,
      rgba(124, 58, 237, 0.05) 20%,
      rgba(236, 72, 153, 0.11) 42%,
      rgba(124, 58, 237, 0.05) 65%
    );
  background-size: 240% 100%;
  border-radius: 9px;
  animation: turnstile-loading 1.4s ease-in-out infinite;
}

.turnstile-widget iframe {
  max-width: 100%;
}

.turnstile-message {
  display: block;
  min-height: 15px;
  margin-top: 5px;
  color: #756a82;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.turnstile-message.success {
  color: #11805b;
}

.turnstile-message.error {
  color: #c52d58;
}

.turnstile-field.is-verified {
  background: rgba(20, 184, 166, 0.07);
  border-color: rgba(20, 184, 166, 0.26);
}

.turnstile-field:is(.is-error, .needs-attention) {
  background: rgba(236, 72, 153, 0.07);
  border-color: rgba(236, 72, 153, 0.34);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.08);
}

html[data-theme="dark"] .turnstile-field {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .turnstile-message {
  color: rgba(247, 243, 255, 0.65);
}

html[data-theme="dark"] .turnstile-message.success {
  color: #6ee7b7;
}

html[data-theme="dark"] .turnstile-message.error {
  color: #fda4af;
}

@keyframes turnstile-loading {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .turnstile-widget:empty::before {
    animation: none;
  }
}
