/* Cloudflare Turnstile widget (visual clone) */
.cf-turnstile,
.cf-turnstile * {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, "Helvetica Neue", Arial, sans-serif !important;
}

.cf-turnstile {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 1rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.cf-turnstile-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 65px;
    height: 65px;
    padding: 0 11px 0 12px;
    background: linear-gradient(180deg, #fefefe 0%, #f8f8f8 48%, #f4f4f4 100%);
    border: 1px solid #d4d4d4;
    border-radius: 3px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.65) inset,
        0 1px 2px rgba(0, 0, 0, 0.04);
    user-select: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cf-turnstile:not(.is-verifying):not(.is-success) .cf-turnstile-body:hover {
    border-color: #bcbcbc;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.65) inset,
        0 1px 3px rgba(0, 0, 0, 0.06);
}

.cf-turnstile.is-success .cf-turnstile-body {
    border-color: #c8c8c8;
}

.cf-turnstile-check-wrap {
    display: flex;
    align-items: center;
    gap: 11px;
    flex: 1;
    min-width: 0;
    margin: 0;
    cursor: pointer;
}

.cf-turnstile-check-wrap.is-disabled {
    cursor: default;
    pointer-events: none;
}

.cf-turnstile-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cf-turnstile-input:focus-visible + .cf-turnstile-box {
    outline: 2px solid #4c8bf5;
    outline-offset: 2px;
}

.cf-turnstile-box {
    position: relative;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 2px solid #b8b8b8;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04) inset;
    transition:
        border-color 0.18s ease,
        background-color 0.22s ease,
        transform 0.12s ease;
}

.cf-turnstile-check-wrap:active:not(.is-disabled) .cf-turnstile-box {
    transform: scale(0.96);
}

.cf-turnstile:not(.is-verifying):not(.is-success) .cf-turnstile-check-wrap:hover .cf-turnstile-box {
    border-color: #8f8f8f;
}

.cf-turnstile-state {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
}

.cf-turnstile-state--idle {
    display: block;
}

.cf-turnstile.is-verifying .cf-turnstile-state--idle,
.cf-turnstile.is-success .cf-turnstile-state--idle {
    display: none;
}

.cf-turnstile.is-verifying .cf-turnstile-box {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.cf-turnstile.is-verifying .cf-turnstile-state--loading {
    display: flex;
}

.cf-turnstile-loader {
    width: 26px;
    height: 26px;
    display: block;
    animation: cfTurnstileSpin 0.85s linear infinite;
}

.cf-turnstile-loader-track {
    stroke: #e5e5e5;
}

.cf-turnstile-loader-arc {
    stroke: #f6821f;
    stroke-dasharray: 22 56;
    stroke-dashoffset: 0;
}

.cf-turnstile.is-success .cf-turnstile-box {
    border-color: #038203;
    background: #038203;
    box-shadow: none;
    animation: cfTurnstilePop 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.cf-turnstile.is-success .cf-turnstile-state--success {
    display: flex;
}

.cf-turnstile-check {
    width: 16px;
    height: 16px;
    color: #fff;
    display: block;
}

.cf-turnstile-label {
    position: relative;
    min-height: 18px;
    font-size: 14px;
    line-height: 1.25;
    color: #1d1d1d;
    letter-spacing: -0.01em;
}

.cf-turnstile-label-idle,
.cf-turnstile-label-busy {
    display: block;
    white-space: nowrap;
}

.cf-turnstile-label-busy {
    display: none;
    color: #4a4a4a;
}

.cf-turnstile.is-verifying .cf-turnstile-label-idle {
    display: none;
}

.cf-turnstile.is-verifying .cf-turnstile-label-busy {
    display: block;
}

.cf-turnstile-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
    gap: 1px;
    padding-top: 1px;
}

.cf-turnstile-logo-link {
    display: block;
    line-height: 0;
    opacity: 0.96;
}

.cf-turnstile-logo {
    display: block;
    width: 86px;
    height: auto;
    pointer-events: none;
}

.cf-turnstile-legal {
    font-size: 8px;
    line-height: 1.15;
    color: #6d6d6d;
    white-space: nowrap;
}

.cf-turnstile-legal a {
    color: #6d6d6d;
    text-decoration: none;
}

.cf-turnstile-legal a:hover {
    text-decoration: underline;
}

.cf-turnstile-legal-dot {
    margin: 0 3px;
    color: #8a8a8a;
}

.cf-post-verify {
    margin-top: 0.5rem;
}

@keyframes cfTurnstileSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes cfTurnstilePop {
    0% {
        transform: scale(0.88);
    }
    55% {
        transform: scale(1.06);
    }
    100% {
        transform: scale(1);
    }
}

/* Legacy class aliases (JS may still reference cf-widget) */
.cf-widget { max-width: 300px; margin: 0 auto 1rem; }
.cf-widget.hidden,
.cf-turnstile.hidden { display: none !important; }
