/* ============================================================
 *  Captcha — سوال ریاضی
 * ============================================================ */

.js-cp-captcha {
    margin-bottom: 16px;
}

.js-cp-captcha__row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 8px;
}

.js-cp-captcha__question {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fef9e7 0%, #fdf5e3 100%);
    border: 1.5px solid #fde68a;
    border-radius: 10px;
    font-family: 'Inter', 'Vazirmatn', monospace;
    font-size: 15px;
    font-weight: 800;
    color: #b8912f;
    white-space: nowrap;
}

.js-cp-captcha__question-text {
    font-family: 'Inter', monospace;
    direction: ltr;
    letter-spacing: 1px;
    font-size: 16px;
}

.js-cp-captcha__input {
    flex: 1;
    min-width: 80px;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    direction: ltr;
    background: #fff;
    color: #1a2332;
    transition: all .25s;
    -moz-appearance: textfield;
    -webkit-appearance: none;
    appearance: none;
}

.js-cp-captcha__input::-webkit-outer-spin-button,
.js-cp-captcha__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.js-cp-captcha__input:focus {
    outline: none;
    border-color: #E6A83A;
    box-shadow: 0 0 0 4px rgba(230, 168, 58, .12);
    background: #fffdf7;
}

.js-cp-captcha__refresh {
    flex: 0 0 auto;
    width: 48px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .25s;
    padding: 0;
}

.js-cp-captcha__refresh:hover {
    background: #fef9e7;
    border-color: #E6A83A;
    color: #b8912f;
    transform: rotate(90deg);
}

.js-cp-captcha__refresh:active {
    transform: rotate(180deg) scale(0.9);
}

.js-cp-captcha__hint {
    font-size: 11.5px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.6;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ─── خطا ─── */
.js-cp-captcha.has-error .js-cp-captcha__input {
    border-color: #ef4444;
    background: #fef2f2;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .1);
}

.js-cp-captcha.has-error .js-cp-captcha__hint {
    color: #b91c1c;
    font-weight: 600;
}

/* ─── ریسپانسیو ─── */
@media (max-width: 480px) {
    .js-cp-captcha__row {
        flex-wrap: wrap;
    }
    .js-cp-captcha__question {
        flex: 1 1 100%;
        justify-content: center;
        font-size: 14px;
    }
    .js-cp-captcha__input {
        flex: 1;
    }
    .js-cp-captcha__refresh {
        width: 44px;
    }
}