/* Self-hosted captcha widget and its anti-spam trap (#338).
   Kept out of style.css because that file is generated from scss/style.scss. */

.np-captcha {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid #d3d9e3;
    border-radius: 4px;
    background: #f9fafc;
    font-size: 14px;
    color: #4a5568;
}

.np-captcha::before {
    content: "";
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border-radius: 50%;
    border: 2px solid #c3cbd8;
}

.np-captcha[data-state="working"]::before {
    border-top-color: #2f80ed;
    animation: np-captcha-spin 0.8s linear infinite;
}

.np-captcha[data-state="done"]::before {
    border-color: #27ae60;
    background: #27ae60;
}

.np-captcha[data-state="failed"] {
    border-color: #e2b4b4;
    background: #fdf6f6;
    color: #b03a3a;
    cursor: pointer;
}

.np-captcha[data-state="failed"]::before {
    border-color: #b03a3a;
}

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

@media (prefers-reduced-motion: reduce) {
    .np-captcha[data-state="working"]::before { animation: none; }
}

/* Hidden from people but not from bots: display:none would let some crawlers
   skip it, so move it out of view instead. */
.np-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
