/* CAPTCHA Styling */
.captcha-question {
    min-width: 100px;
    user-select: none;
}

.refresh-captcha {
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.refresh-captcha:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.refresh-captcha:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.refresh-captcha i {
    font-size: 14px;
    color: #6c757d;
}

.captcha-error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Error styling for CAPTCHA input */
#captchaAnswer.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Hide default validation styling on CAPTCHA field */
#captchaAnswer:invalid {
    border-color: #dee2e6;
    box-shadow: none;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .captcha-question {
        min-width: 80px;
        font-size: 0.9rem;
    }
    
    #captchaAnswer {
        width: 90px !important;
    }
}