/* EPPS Captcha Styles - Enhanced Security and UX */

.captcha-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.captcha-container:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.captcha-image-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#captcha-image, #captcha-image-th {
    transition: all 0.3s ease;
    max-width: 120px;
    height: auto;
}

#captcha-image:hover, #captcha-image-th:hover {
    transform: scale(1.05);
}

button[onclick="getCaptCha()"] {
    transition: all 0.2s ease;
    border-radius: 4px;
}

button[onclick="getCaptCha()"]:hover {
    background-color: #f8f9fa !important;
    transform: scale(1.1);
}

.captcha-refresh-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.captcha-refresh-btn:hover {
    background-color: rgba(0,0,0,0.1);
}

#captcha_verify, #captcha_verify_th {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 2px;
    text-align: center;
    background-color: #fff;
    border: 2px solid #ced4da;
    transition: border-color 0.3s ease;
}

#captcha_verify:focus, #captcha_verify_th:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.has-success #captcha_verify,
.has-success #captcha_verify_th {
    border-color: #28a745;
    background-color: #f8fff9;
}

.has-error #captcha_verify,
.has-error #captcha_verify_th {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.help-block {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

/* Submit button styles */
#submitFormEn, #submitFormTh {
    transition: all 0.3s ease;
    position: relative;
}

#submitFormEn:disabled, #submitFormTh:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#submitFormEn.btn-success, #submitFormTh.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

#submitFormEn.btn-success:hover, #submitFormTh.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
}

/* Loading animation for captcha refresh */
.captcha-loading {
    opacity: 0.5;
    pointer-events: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.captcha-loading img {
    animation: spin 1s linear infinite;
}

/* Responsive design */
@media (max-width: 768px) {
    .captcha-container {
        max-width: 100% !important;
        margin: 0 15px 15px 15px;
    }
    
    .captcha-image-section {
        flex-direction: column;
        gap: 15px;
    }
}