/* Math Captcha Styles */
.math-captcha-wrapper {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.math-captcha-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.math-captcha-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.math-captcha-question {
    font-size: 18px;
    font-weight: 700;
    color: #3498db;
    font-family: 'Courier New', monospace;
}

.math-captcha-refresh {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    transition: all 0.3s;
    border-radius: 4px;
}

.math-captcha-refresh:hover {
    background: #e9ecef;
    color: #3498db;
    transform: rotate(90deg);
}

.math-captcha-refresh svg {
    width: 20px;
    height: 20px;
}

.math-captcha-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
}

.math-captcha-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.math-captcha-input.error {
    border-color: #e74c3c;
    background: #fdf2f2;
    animation: shake 0.5s;
}

.math-captcha-input.success {
    border-color: #27ae60;
    background: #f0f9f4;
}

.math-captcha-error {
    color: #e74c3c;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    padding: 8px;
    background: #fdf2f2;
    border-radius: 4px;
    border-left: 3px solid #e74c3c;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* RTL Support */
[dir="rtl"] .math-captcha-label {
    flex-direction: row-reverse;
}

[dir="rtl"] .math-captcha-refresh {
    margin-left: 0;
    margin-right: auto;
}

/* LTR Support (English) */
[dir="ltr"] .math-captcha-label {
    flex-direction: row;
}

[dir="ltr"] .math-captcha-refresh {
    margin-right: 0;
    margin-left: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .math-captcha-question {
        font-size: 16px;
    }
    
    .math-captcha-input {
        font-size: 14px;
        padding: 10px 12px;
    }
}

