/* „Ich bin kein Roboter – Spamschutz ohne Google“ – Farben über CSS-Variablen im Projekt anpassbar */
.imhof-captcha {
  --ic-bg: #ece8de;
  --ic-line: #b9b4a8;
  --ic-ink: #1f1f1c;
  --ic-muted: #5f5d57;
  --ic-ok: #2e7d32;
  --ic-bad: #c62828;
  --ic-box: #fff;
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  max-width: 460px; margin: .25rem 0 1rem; padding: 14px 16px;
  border: 1px solid var(--ic-line); border-radius: 12px; background: var(--ic-bg); color: var(--ic-ink);
  font-size: 1rem; line-height: 1.3;
}
.imhof-captcha__box { display: flex; align-items: center; gap: 14px; flex: 1 1 auto; min-height: 40px; margin: 0; cursor: pointer; font-weight: 700; }
.imhof-captcha__box input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.imhof-captcha__mark { position: relative; flex: none; width: 30px; height: 30px; border: 2px solid var(--ic-ink); border-radius: 8px; background: var(--ic-box); transition: border-color .2s, background-color .2s; }
.imhof-captcha__box input:focus-visible + .imhof-captcha__mark { outline: 3px solid var(--ic-muted); outline-offset: 2px; }
.imhof-captcha[data-state=busy] .imhof-captcha__mark { border-color: var(--ic-muted); border-right-color: transparent; border-radius: 50%; animation: imhof-captcha-spin .8s linear infinite; }
.imhof-captcha[data-state=ok] .imhof-captcha__mark { border-color: var(--ic-ok); background: var(--ic-ok); }
.imhof-captcha[data-state=ok] .imhof-captcha__mark::after { content: ""; position: absolute; left: 8px; top: 3px; width: 8px; height: 15px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.imhof-captcha[data-state=ok] .imhof-captcha__box { cursor: default; }
.imhof-captcha__side { display: flex; align-items: center; gap: 6px; color: var(--ic-muted); }
.imhof-captcha__side small { font-size: 11px; line-height: 1.2; }
.imhof-captcha[data-state=ok] .imhof-captcha__side { color: var(--ic-ok); }
.imhof-captcha__status { flex-basis: 100%; font-size: 13px; color: var(--ic-muted); }
.imhof-captcha__status:empty { display: none; }
.imhof-captcha[data-invalid] { border-color: var(--ic-bad); }
.imhof-captcha[data-invalid] .imhof-captcha__status { color: var(--ic-bad); }
.imhof-captcha__hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* Joomla schreibt „Captcha“ als Feldbeschriftung davor – das Kästchen erklärt sich selbst */
.control-group:has(.imhof-captcha) > .control-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@keyframes imhof-captcha-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .imhof-captcha[data-state=busy] .imhof-captcha__mark { animation-duration: 2.4s; } }
