/* UNIPLAZ · reCAPTCHA v3 · статусы форм, honeypot, атрибуция */

:root {
  --rc-orange: #EE703A;
  --rc-orange-deep: #C4501F;
  --rc-amber: #EFCE3A;
  --rc-green: #35B36B;
  --rc-red: #E5484D;
  --rc-blue: #3E86F5;
  --rc-ink: #17181C;
  --rc-ink-2: #22242A;
  --rc-muted: #84868E;
}

/* Скрытый бейдж Google — взамен видима атрибуция в форме (по правилам Google) */
.grecaptcha-badge { visibility: hidden !important; }

/* Ловушка для ботов: в DOM есть, человеку не видна */
.form-hp {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Атрибуция */
.recaptcha-legal {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.45;
  opacity: .5;
  color: currentColor;
}
.recaptcha-legal a {
  color: var(--rc-orange);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.recaptcha-legal a:hover { color: var(--rc-amber); opacity: 1; }

/* Статус отправки */
.form-notice {
  --rc-accent: var(--rc-blue);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--rc-ink-2), var(--rc-ink));
  border: 1px solid rgba(255, 255, 255, .08);
  border-left: 3px solid var(--rc-accent);
  color: #F4F5F7;
  font-size: 13.5px;
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 10px 26px rgba(8, 9, 12, .3);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .22s ease, transform .22s ease;
}
.form-notice.is-in { opacity: 1; transform: none; }
.form-notice[data-state="pending"] { --rc-accent: var(--rc-amber); }
.form-notice[data-state="success"] { --rc-accent: var(--rc-green); }
.form-notice[data-state="error"]   { --rc-accent: var(--rc-red); animation: rc-shake .38s ease; }

.form-notice__icon {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: var(--rc-ink);
  background: var(--rc-accent);
}
.form-notice[data-state="pending"] .form-notice__icon {
  background: transparent;
  border: 2px solid rgba(239, 206, 54, .28);
  border-top-color: var(--rc-amber);
  animation: rc-spin .7s linear infinite;
}
.form-notice[data-state="success"] .form-notice__icon::after { content: "\2713"; }
.form-notice[data-state="error"]   .form-notice__icon::after { content: "!"; }
.form-notice__text { flex: 1 1 auto; }

/* Кнопка в состоянии отправки */
.btn.is-loading,
button[type="submit"].is-loading {
  cursor: progress;
  opacity: .85;
}
.btn-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: rc-spin .7s linear infinite;
}

/* Ошибка согласия */
.form-check-label.err {
  color: var(--rc-red) !important;
  opacity: 1 !important;
  animation: rc-shake .38s ease;
}
.form-check-label.err a { color: var(--rc-red); }

/* Скроллбар модалок в палитре сайта */
.modal-body { scrollbar-width: thin; scrollbar-color: var(--rc-orange) rgba(132, 134, 142, .18); }
.modal-body::-webkit-scrollbar { width: 10px; }
.modal-body::-webkit-scrollbar-track { background: rgba(132, 134, 142, .14); border-radius: 8px; }
.modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--rc-orange), var(--rc-orange-deep));
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.modal-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--rc-amber), var(--rc-orange));
  background-clip: padding-box;
}

@keyframes rc-spin { to { transform: rotate(360deg); } }
@keyframes rc-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  45% { transform: translateX(4px); }
  70% { transform: translateX(-2px); }
}

@media (max-width: 575px) {
  .form-notice { font-size: 12.5px; padding: 10px 12px; }
  .recaptcha-legal { font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .form-notice,
  .form-notice[data-state="error"],
  .form-check-label.err { animation: none !important; transition: none !important; }
  .form-notice { opacity: 1; transform: none; }
  .btn-spinner,
  .form-notice[data-state="pending"] .form-notice__icon { animation-duration: 2.4s; }
}