/* Слайдер-капча (ask.php, question.php) */

.slider-captcha {
    display: block;
    width: 200px;
    max-width: 100%;
    margin: 8px 0 16px;
}

.slider-captcha-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.slider-captcha-track {
    position: relative;
    display: block;
    width: 100%;
    height: 36px;
    border: 1px solid var(--border-input, #d1d5db);
    border-radius: 8px;
    background: var(--bg-empty, #f8fafc);
    overflow: hidden;
    user-select: none;
    touch-action: none;
}

.slider-captcha-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--focus-ring, rgba(26, 95, 138, 0.12));
    border-radius: 7px 0 0 7px;
    pointer-events: none;
}

.slider-captcha.is-verified .slider-captcha-fill {
    background: var(--vote-up-bg, #dcfce7);
}

.slider-captcha-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-muted, #6b7280);
    pointer-events: none;
    padding: 0 8px 0 40px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slider-captcha.is-verified .slider-captcha-hint {
    color: var(--vote-up-text, #166534);
    font-weight: 600;
    padding: 0 8px;
}

.slider-captcha-handle {
    position: absolute;
    left: 0;
    top: 2px;
    width: 36px;
    height: calc(100% - 4px);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: 1px solid var(--border-input, #d1d5db);
    border-radius: 6px;
    background: var(--bg-card, #fff);
    color: var(--text-heading, #1a1a1a);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1;
    cursor: grab;
    z-index: 2;
    -webkit-appearance: none;
    appearance: none;
}

.slider-captcha-handle:focus {
    outline: none;
    border-color: var(--border-focus, #1a5f8a);
    box-shadow: 0 0 0 2px var(--focus-ring, rgba(26, 95, 138, 0.12));
}

.slider-captcha.is-dragging .slider-captcha-handle {
    cursor: grabbing;
    border-color: var(--border-focus, #1a5f8a);
    background: var(--bg-vote-hover, #f1f5f9);
}

.slider-captcha.is-verified .slider-captcha-handle {
    cursor: default;
    border-color: var(--vote-up-border, #86efac);
    background: var(--vote-up-bg, #dcfce7);
    color: var(--vote-up-text, #166534);
}

.form-block .btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-block .btn:disabled:hover {
    background: var(--bg-btn, #1f2933);
    transform: none;
    box-shadow: none;
}

@media (max-width: 640px) {
    .slider-captcha {
        width: 100%;
    }

    .slider-captcha-track {
        height: 42px;
    }

    .slider-captcha-handle {
        width: 48px;
    }

    .slider-captcha-hint {
        font-size: 0.9rem;
        padding-left: 52px;
    }
}
