/* =========================================================
   AniLog — анти-бот: honeypot и PoW-капча
   ========================================================= */

/* ---------- Анти-бот: honeypot и PoW-капча ---------- */

/* Ловушка для ботов: скрыта, но видима для автозаполнителей
   (никакого display:none — иначе часть ботов поле пропустит). */
.honeypot {
  position: absolute;
  opacity: 0;
  z-index: -1;
  width: 1px;
  height: 1px;
  border: 0;
  padding: 0;
}

.captcha {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 16px 10px 12px;
  margin: 4px 0 2px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  user-select: none;
}

.captcha:focus-visible {
  border-color: rgba(var(--accent-rgb, 139, 92, 246), 0.55);
  outline: none;
}

.captcha__box {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.captcha:hover .captcha__box,
.captcha:focus-visible .captcha__box {
  border-color: rgba(255, 255, 255, 0.6);
}

/* Загрузка: спиннер на месте квадрата */
.captcha.is-loading {
  cursor: wait;
  pointer-events: none;
}

.captcha.is-loading .captcha__box {
  border-color: rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent, #8b5cf6);
  border-radius: 50%;
  animation: captcha-spin 0.8s linear infinite;
}

@keyframes captcha-spin {
  to { transform: rotate(360deg); }
}

/* Пройдено: зелёная галочка */
.captcha.is-done {
  cursor: default;
  border-color: rgba(52, 211, 153, 0.4);
}

.captcha.is-done .captcha__box {
  border-color: #34d399;
  background: #34d399;
}

.captcha.is-done .captcha__box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #0b1a12;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.captcha__label {
  color: var(--muted, rgba(255, 255, 255, 0.65));
  font-size: 12px;
}

.captcha.is-done .captcha__label {
  color: var(--text, rgba(255, 255, 255, 0.9));
}
