/* Custom CAPTCHA Styles */
.captcha-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#captcha-image {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: border-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#captcha-image:hover {
    border-color: #c0c0c0;
}

.refresh-captcha-btn {
    transition: all 0.3s ease;
    font-weight: 500;
}

.refresh-captcha-btn:hover {
    color: #0056b3 !important;
    text-decoration: underline !important;
}

.refresh-captcha-btn i {
    transition: transform 0.3s ease;
}

.refresh-captcha-btn:hover i {
    transform: rotate(180deg);
}

/* Form Messages Styling */
.form-messages {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    margin-top: 15px;
}

.form-messages.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-messages.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Button Spinner - Using Bootstrap spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Make sure the submit button maintains its width when spinner shows */
.th-btn {
    min-width: 160px;
    transition: all 0.3s ease;
}

.th-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* CAPTCHA Input Field Enhancement */
input[name="captcha"] {
    font-family: monospace;
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    #captcha-image {
        max-width: 100% !important;
    }
    
    .captcha-wrapper {
        margin-bottom: 15px;
    }
}
