﻿/* —— Verify human (reCAPTCHA-like checkbox) —— */
.hc .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.hc {
    --hc-border: #dadce0;
    --hc-blue: #1a73e8;
    --hc-blue-soft: rgba(26, 115, 232, 0.12);
    --hc-green: #16a34a;
    --hc-text: #202124;
    --hc-muted: #5f6368;
    position: relative;
    max-width: 100%;
    font-family: Figtree, Roboto, ui-sans-serif, system-ui, sans-serif;
    user-select: none;
}
/* Author display rules (grid/flex) must not beat the hidden attribute. */
.hc [hidden] {
    display: none !important;
}

/* ---- Checkbox row ---- */
.hc-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 68px;
    padding: 10px 12px 10px 16px;
    border: 1px solid var(--hc-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 6px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hc-box:hover {
    border-color: #c4c7cc;
}
.hc--open .hc-box {
    border-color: var(--hc-blue);
    box-shadow: 0 0 0 3px var(--hc-blue-soft);
}
.hc--verified .hc-box {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.hc-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    cursor: pointer;
}
.hc-check-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
}
.hc-check-wrap input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    /* Must sit above .hc-fake, otherwise the fake box swallows every click. */
    z-index: 2;
}
.hc-fake {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    box-sizing: border-box;
    border: 2px solid #9aa0a6;
    border-radius: 6px;
    background: #fff;
    color: #fff;
    pointer-events: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.hc-main:hover .hc-fake {
    border-color: var(--hc-blue);
}
.hc-check-wrap input:focus-visible + .hc-fake {
    outline: 3px solid var(--hc-blue-soft);
    outline-offset: 2px;
    border-color: var(--hc-blue);
}
.hc-tick {
    width: 18px;
    height: 18px;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.15s ease, transform 0.2s ease;
}
.hc--verified .hc-fake {
    border-color: var(--hc-green);
    background: var(--hc-green);
}
.hc--verified .hc-tick {
    opacity: 1;
    transform: scale(1);
}
.hc--verified .hc-main {
    cursor: default;
}
.hc-spinner {
    position: absolute;
    inset: 0;
    z-index: 3;
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    border: 3px solid #e8eaed;
    border-top-color: var(--hc-blue);
    border-radius: 50%;
    background: #fff;
    animation: hc-spin 0.7s linear infinite;
}
@keyframes hc-spin {
    to { transform: rotate(360deg); }
}
.hc-label {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--hc-text);
    overflow: hidden;
    text-overflow: ellipsis;
}
.hc--verified .hc-label {
    color: #166534;
}
.hc-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    gap: 1px;
    padding-left: 12px;
    border-left: 1px solid #ececec;
    font-size: 10px;
    line-height: 1.2;
    color: var(--hc-muted);
    text-align: center;
}
.hc-brand strong {
    font-size: 11px;
    font-weight: 700;
    color: var(--hc-text);
}
.hc-shield {
    width: 22px;
    height: 22px;
    margin-bottom: 2px;
    color: var(--hc-blue);
}
.hc--verified .hc-shield {
    color: var(--hc-green);
}

/* ---- Challenge panel ---- */
.hc-panel {
    margin-top: 10px;
    border: 1px solid var(--hc-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}
.hc-panel-head {
    background: var(--hc-blue);
    color: #fff;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}
.hc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
    background: #fff;
}
.hc-tile {
    position: relative;
    padding: 0;
    border: 3px solid transparent;
    border-radius: 6px;
    background: #f1f3f4;
    cursor: pointer;
    aspect-ratio: 1;
    overflow: hidden;
    transition: transform 0.12s ease, border-color 0.12s ease;
}
.hc-tile:hover {
    border-color: #c4c7cc;
}
.hc-tile:focus-visible {
    outline: 3px solid var(--hc-blue-soft);
    outline-offset: 1px;
}
.hc-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
.hc-tile--on,
.hc-tile--on:hover {
    border-color: var(--hc-blue);
    transform: scale(0.94);
}
.hc-tile--on::after {
    content: '✓';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--hc-blue);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}
.hc-accessible {
    padding: 14px 16px;
}
.hc-accessible input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--hc-border);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 15px;
}
.hc-accessible input:focus {
    outline: none;
    border-color: var(--hc-blue);
    box-shadow: 0 0 0 3px var(--hc-blue-soft);
}
.hc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #ececec;
    background: #fafafa;
}
.hc-actions button {
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--hc-blue);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 10px;
}
.hc-actions .hc-alt:hover {
    background: var(--hc-blue-soft);
}
.hc-actions .hc-verify {
    background: var(--hc-blue);
    color: #fff;
    padding: 9px 20px;
}
.hc-actions .hc-verify:hover {
    background: #1765cc;
}
.hc-error {
    margin: 8px 0 0;
    padding: 8px 10px;
    border-radius: 6px;
    background: #fef2f2;
    font-size: 13px;
    color: #b91c1c;
}
.hc--busy .hc-box,
.hc--busy .hc-panel {
    pointer-events: none;
}
.hc--busy .hc-panel {
    opacity: 0.7;
}

@media (max-width: 360px) {
    .hc-brand span { display: none; }
    .hc-label { font-size: 14px; }
}
