/* ============================================
   ALTCHA Proof-of-Work Captcha (virgo-karma)
   The widget renders in light DOM, so these rules
   override its bundled defaults directly. The
   --altcha-* custom properties cascade INTO the
   widget from our theme tokens, and the type ramp
   is shrunk to match the template scale.
   ============================================ */

/* Wrapper box — caps width against the login/register form. */
.captcha-altcha-widget {
    max-width: 100%;
}

/* Bind the widget's custom properties to template tokens.
   Declared on both the wrapper and the widget root so the
   values reach the widget regardless of where it anchors. */
.altcha,
.captcha-altcha-widget {
    --altcha-color-base: var(--card-bg);
    --altcha-color-text: var(--text-color);
    --altcha-color-border: var(--border-color);
    --altcha-color-border-focus: var(--primary-color);
    --altcha-color-error-text: var(--danger);
    --altcha-color-footer-bg: transparent;
    --altcha-border-width: 2px;
    --altcha-border-radius: var(--radius-md);
    --altcha-max-width: 320px;
}

/* Type ramp — shrink the widget's inherited / fixed sizes
   to the template scale so the captcha reads at the same
   cadence as surrounding form text. */
.altcha-main {
    font-size: var(--fs-label);
    padding: 0.55rem var(--radius-sm);
}

.altcha-error {
    font-size: var(--fs-meta);
}

.altcha-footer {
    font-size: var(--fs-2xs, 0.7rem);
}

/* Spinner inherits currentColor; theme it to the brand teal. */
.altcha-spinner {
    color: var(--primary-color);
}

/* Dark theme: the bound tokens already flip via template.css
   under [data-bs-theme="dark"], so no explicit override block
   is required here. */
