/* HumanCheck widget styling. Self-contained; no framework dependency. */
.humancheck {
    display: inline-flex;
    min-width: 240px;
    max-width: 100%;
}

.humancheck .hc-box {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem .5rem;
    padding: .55rem .75rem;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: .5rem;
    background: rgba(0, 0, 0, .02);
    font-size: .875rem;
    line-height: 1.25;
    color: inherit;
    width: 100%;
}

.humancheck .hc-retry {
    border: 0;
    background: transparent;
    color: #0d6efd;
    font-size: .8125rem;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    flex: 0 0 auto;
}

.humancheck .hc-retry:hover { color: #0a58ca; }

[data-bs-theme="dark"] .humancheck .hc-box,
.humancheck[data-theme="dark"] .hc-box {
    border-color: rgba(255, 255, 255, .15);
    background: rgba(255, 255, 255, .04);
}

.humancheck .hc-spinner {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    opacity: .55;
    animation: hc-spin .7s linear infinite;
    flex: 0 0 auto;
}

.humancheck .hc-label { flex: 1 1 auto; }

.humancheck .hc-brand {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    opacity: .5;
    flex: 0 0 auto;
}

.humancheck[data-state="verified"] .hc-spinner {
    animation: none;
    border: 0;
    width: 1rem;
    height: 1rem;
    position: relative;
    opacity: 1;
}

.humancheck[data-state="verified"] .hc-spinner::after {
    content: "";
    position: absolute;
    left: .28rem;
    top: .02rem;
    width: .3rem;
    height: .6rem;
    border: solid #1a7f37;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.humancheck[data-state="verified"] .hc-box { border-color: rgba(26, 127, 55, .5); }
.humancheck[data-state="error"] .hc-box {
    border-color: rgba(200, 35, 51, .55);
    background: rgba(200, 35, 51, .05);
}
.humancheck[data-state="error"] .hc-label { color: #b02a37; }
.humancheck[data-state="error"] .hc-spinner {
    animation: none;
    border: 0;
    position: relative;
}
.humancheck[data-state="error"] .hc-spinner::after {
    content: "!";
    position: absolute;
    inset: 0;
    text-align: center;
    font-weight: 700;
    color: #b02a37;
    line-height: 1rem;
}

/* Honeypot — visually removed, kept reachable for bots, hidden from humans + a11y. */
.humancheck .hc-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

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