/* Proteção anti-spam dos formulários */

.rn-captcha { margin: 4px 0 0; }
.rn-captcha-erro:empty { display: none; }
.rn-captcha-erro { display: block; margin-top: 6px; }

/* Google reCAPTCHA */
.rn-captcha-slot { min-height: 78px; }
.rn-captcha-aviso { margin: 0; color: var(--muted, #5f6368); font-size: 12px; line-height: 1.5; }
.rn-captcha-aviso a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.grecaptcha-badge { visibility: hidden !important; }

/* TelecomSIP Human Verification, baseline v1: um único DOM, tokens claro e escuro. */
.rn-captcha-telecomsip {
  --captcha-bg: #fbfbfc;
  --captcha-border: #e0e3e7;
  --captcha-border-hover: #c8cdd2;
  --captcha-shadow: 0 1px 2px rgba(60, 64, 67, .08);
  --captcha-text: #202124;
  --captcha-muted: #6c7177;
  --captcha-brand: #61676e;
  --checkbox-bg: #ffffff;
  --checkbox-border: #5f6368;
  --captcha-accent: #1a73e8;
  --captcha-success: #188038;
  --captcha-danger: #d93025;
  --captcha-focus: #1a73e8;
  font-family: Inter, Roboto, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.secoes-escuro .section .rn-captcha-telecomsip,
.tv-form .rn-captcha-telecomsip,
.rn-captcha-telecomsip.is-dark {
  --captcha-bg: #202428;
  --captcha-border: #484f56;
  --captcha-border-hover: #60676f;
  --captcha-shadow: 0 1px 2px rgba(0, 0, 0, .18);
  --captcha-text: #f1f3f4;
  --captcha-muted: #aeb4ba;
  --captcha-brand: #a9afb5;
  --checkbox-bg: #1b1f23;
  --checkbox-border: #b7bcc1;
  --captcha-accent: #8ab4f8;
  --captcha-success: #81c995;
  --captcha-danger: #f28b82;
  --captcha-focus: #8ab4f8;
}

.rn-captcha .human-check {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 390px;
  max-width: 100%;
  min-height: 84px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 14px 15px;
  border: 1px solid var(--captcha-border);
  border-radius: 6px;
  background: var(--captcha-bg);
  color: var(--captcha-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--captcha-shadow);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.rn-captcha .human-check:hover:not(:disabled) { border-color: var(--captcha-border-hover); box-shadow: 0 1px 3px rgba(60, 64, 67, .12); }
.rn-captcha .human-check:focus-visible { outline: 2px solid var(--captcha-focus); outline-offset: 2px; }
.rn-captcha .human-check:disabled { cursor: wait; opacity: 1; }
.rn-captcha .human-check[data-state="success"]:disabled { cursor: default; }

.rn-captcha .human-check__indicator { position: relative; width: 30px; height: 30px; display: grid; place-items: center; }
.rn-captcha .human-check__checkbox {
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid var(--checkbox-border);
  border-radius: 2px;
  background: var(--checkbox-bg);
  transition: border-color .15s ease, background-color .15s ease;
}
.rn-captcha .human-check__check {
  width: 21px;
  height: 21px;
  opacity: 0;
  fill: none;
  stroke: var(--captcha-success);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 28;
  stroke-dashoffset: 28;
}
.rn-captcha .human-check__spinner {
  box-sizing: border-box;
  position: absolute;
  width: 28px;
  height: 28px;
  display: none;
  border: 3px solid color-mix(in srgb, var(--captcha-accent) 23%, transparent);
  border-top-color: var(--captcha-accent);
  border-radius: 50%;
}
.rn-captcha .human-check__content { min-width: 0; display: grid; gap: 3px; }
.rn-captcha .human-check__title { color: var(--captcha-text); font-size: 14px; line-height: 1.25; font-weight: 560; white-space: nowrap; }
.rn-captcha .human-check__subtitle { color: var(--captcha-muted); font-size: 12px; line-height: 1.25; font-weight: 400; white-space: nowrap; }
.rn-captcha .human-check__brand {
  min-width: 88px;
  position: relative;
  top: -1px;
  margin-left: 2px;
  display: grid;
  justify-items: end;
  align-content: center;
  color: var(--captcha-brand);
  line-height: 1.08;
  user-select: none;
}
.rn-captcha .human-check__brand span { font-size: 8px; font-weight: 450; letter-spacing: .015em; opacity: .78; }
.rn-captcha .human-check__brand strong { margin-top: 2px; font-size: 11.5px; font-weight: 650; letter-spacing: -.015em; }
.rn-captcha .captcha-feedback { min-height: 0; margin: 6px 2px 0; color: var(--captcha-muted); font-size: 11px; line-height: 1.35; }
.rn-captcha .captcha-feedback:empty { display: none; }

.rn-captcha .human-check[data-state="verifying"] .human-check__checkbox { visibility: hidden; }
.rn-captcha .human-check[data-state="verifying"] .human-check__spinner { display: block; animation: human-check-spin .8s linear infinite; }
.rn-captcha .human-check[data-state="success"] .human-check__checkbox { border-color: var(--captcha-success); }
.rn-captcha .human-check[data-state="success"] .human-check__check { opacity: 1; animation: human-check-draw .28s ease forwards; }
.rn-captcha .human-check[data-state="error"] .human-check__checkbox { border-color: var(--captcha-danger); }

@keyframes human-check-spin { to { transform: rotate(360deg); } }
@keyframes human-check-draw { to { stroke-dashoffset: 0; } }

@media (max-width: 420px) {
  .rn-captcha .human-check { width: 100%; min-height: 82px; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; padding: 13px 14px; }
  .rn-captcha .human-check__title { white-space: normal; }
  .rn-captcha .human-check__brand { min-width: 72px; }
  .rn-captcha .human-check__brand strong { font-size: 10px; }
}
@media (max-width: 340px) {
  .rn-captcha .human-check { grid-template-columns: 30px minmax(0, 1fr); }
  .rn-captcha .human-check__brand { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rn-captcha .human-check, .rn-captcha .human-check * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
