/* کپچای سراسری رادیوتون */

.rt-captcha {
    display: block;
    margin: 14px 0;
    text-align: right;
}

.rt-captcha__label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
}

.rt-captcha__required {
    color: #ef4444;
    margin-inline-start: 3px;
}

.rt-captcha__row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rt-captcha__question {
    flex: 1 1 auto;
    min-width: 130px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-primary, #1e293b);
    font-size: 1.25em;
    font-weight: 700;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
    user-select: all;
    transition: opacity 0.15s ease;
}

.rt-captcha__question.is-refreshing {
    opacity: 0.45;
}

.rt-captcha__refresh {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-secondary, #475569);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.rt-captcha__refresh:hover:not(:disabled) {
    background: var(--bg-tertiary, #e2e8f0);
    color: var(--text-primary, #1e293b);
}

.rt-captcha__refresh:disabled {
    cursor: progress;
    opacity: 0.6;
}

.rt-captcha__refresh.is-spinning svg {
    animation: rt-captcha-spin 0.9s linear infinite;
}

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

.rt-captcha__input {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 11px 14px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #1e293b);
    font-size: 1em;
    text-align: center;
    letter-spacing: 3px;
    font-variant-numeric: tabular-nums;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rt-captcha__input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.rt-captcha__hint {
    display: block;
    margin-top: 6px;
    font-size: 0.78em;
    color: var(--text-secondary, #64748b);
}

.rt-captcha__error {
    display: block;
    margin-top: 6px;
    font-size: 0.78em;
    font-weight: 600;
    color: #ef4444;
}

.rt-captcha.has-error .rt-captcha__input {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.rt-captcha--google {
    text-align: center;
}

.rt-captcha--google .rt-captcha__label {
    text-align: right;
}

/* جایگاه کپچا در فرم نظرات: فاصله‌اش با بقیهٔ فیلدهای همان فرم یکی بماند. */
.rt-comment-captcha-slot {
    margin-bottom: 15px;
}

.rt-comment-captcha-slot .rt-captcha {
    margin-bottom: 0;
}

@media (max-width: 480px) {
    .rt-captcha__question {
        font-size: 1.1em;
        padding: 9px 11px;
    }
}
