.sfc-captcha-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    direction: rtl;
}

.sfc-captcha-container img {
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: opacity 0.3s;
}

.sfc-captcha-container img:hover {
    opacity: 0.8;
}

#sfc_captcha {
    height: 62px;
}

.comment-form-captcha,
p:has(#sfc_captcha_login),
p:has(#sfc_captcha_register) {
    margin-bottom: 15px;
}

.comment-form-captcha label,
p:has(#sfc_captcha_login) label,
p:has(#sfc_captcha_register) label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    direction: rtl;
}

.comment-form-captcha input[type="text"],
#sfc_captcha_login,
#sfc_captcha_register {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    direction: rtl;
    text-align: center;
    font-family: 'Tahoma', 'Arial', sans-serif;
    transition: border-color 0.3s;
}

.comment-form-captcha input[type="text"]:focus,
#sfc_captcha_login:focus,
#sfc_captcha_register:focus {
    outline: none;
    border-color: #0073aa;
}

.comment-form-captcha input[type="text"].error,
#sfc_captcha_login.error,
#sfc_captcha_register.error {
    border-color: #ef5350;
}

.sfc-holder-captcha {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.sfc-captcha-placeholder {
    width: 200px;
    height: 60px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sfc-captcha-placeholder::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid #ddd;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.sfc-captcha-placeholder.hidden {
    display: none;
}

.sfc-refresh-link {
    font-family: inherit;
    display: inline-block;
    margin-top: 8px;
    color: #0073aa;
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.3s;
    direction: rtl;
}

.sfc-refresh-link:hover {
    color: #005a87;
    text-decoration: underline;
}

.sfc-refresh-link:active {
    color: #004a6f;
}

/* استایل خطای کامنت */
.sfc-comment-error {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ef5350;
    border-radius: 4px;
    direction: rtl;
    font-size: 14px;
    line-height: 1.5;
}

/* استایل برای صفحه ورود */
.login form p:has(#sfc_captcha_login) {
    margin-bottom: 15px;
}

.login form p:has(#sfc_captcha_login) label {
    display: block;
    margin-bottom: 5px;
}

.login .sfc-captcha-container {
    direction: ltr;
}

/* استایل برای صفحه ثبت نام */
.register form p:has(#sfc_captcha_register) {
    margin-bottom: 15px;
}

.register form p:has(#sfc_captcha_register) label {
    display: block;
    margin-bottom: 5px;
}

.register .sfc-captcha-container {
    direction: ltr;
}
