/* AI Smart CAPTCHA - Frontend Styles */

.aisc-captcha-container {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    position: relative;
    z-index: 10;
}

.aisc-math-captcha {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.aisc-captcha-wrapper {
    max-width: 500px;
}

.aisc-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.aisc-math-problem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    position: relative;
}

.aisc-question {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    display: block;
}

.aisc-numeric {
    font-size: 14px;
    color: #7f8c8d;
    font-family: monospace;
    display: block;
    margin-top: 5px;
}

.aisc-refresh-captcha {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s;
    font-weight: 600;
}

.aisc-refresh-captcha:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.aisc-refresh-captcha:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.aisc-input {
    width: 100%;
    max-width: 300px;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #3498db;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s;
    background: #fff !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 100 !important;
}

.aisc-input:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.aisc-error-message {
    margin-top: 10px;
    padding: 10px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c33;
    font-size: 14px;
}

/* AI Challenge Styles */
.aisc-ai-challenge-wrapper {
    display: none;
    padding: 20px;
    background: #fff;
    border: 2px solid #3498db;
    border-radius: 8px;
}

.aisc-ai-challenge {
    display: block;
}

.aisc-ai-challenge-content {
    padding: 0;
}

.aisc-challenge-question {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.aisc-challenge-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.aisc-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.aisc-option:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.aisc-option input[type="radio"] {
    margin: 0;
}

.aisc-option span {
    flex: 1;
    font-size: 15px;
    color: #333;
}

/* Responsive */
@media (max-width: 600px) {
    .aisc-captcha-container {
        padding: 15px;
    }
    
    .aisc-math-problem {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-right: 50px;
    }
    
    .aisc-question {
        font-size: 14px;
    }
    
    .aisc-numeric {
        font-size: 12px;
    }
}

/* Loading state */
.aisc-captcha-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.aisc-captcha-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #3498db;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

/* Success state */
.aisc-captcha-container.success .aisc-math-problem {
    border-color: #27ae60;
    background: #edfff3;
}

/* Error state */
.aisc-captcha-container.error .aisc-math-problem {
    border-color: #e74c3c;
    background: #fef5f5;
}
