/* Unified Form Validator - CAPTCHA Styles */

/* Overlay */
.ufv-captcha-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.ufv-captcha-overlay.show {
    display: flex !important;
}

/* Modal */
.ufv-captcha-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    animation: ufv-captcha-slide-up 0.3s ease-out;
    overflow: hidden;
}

@keyframes ufv-captcha-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.ufv-captcha-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    text-align: center;
}

.ufv-captcha-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.ufv-captcha-header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* Body */
.ufv-captcha-body {
    padding: 40px 30px;
}

/* Checkbox Container */
.ufv-captcha-checkbox-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.ufv-captcha-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.ufv-captcha-checkbox:hover {
    border-color: #667eea;
    background: #f5f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.ufv-captcha-checkbox input[type="checkbox"] {
    display: none;
}

.ufv-captcha-checkmark {
    width: 28px;
    height: 28px;
    border: 2px solid #ddd;
    border-radius: 6px;
    margin-left: 12px;
    position: relative;
    transition: all 0.3s ease;
    background: white;
}

.ufv-captcha-checkbox input[type="checkbox"]:checked + .ufv-captcha-checkmark {
    background: #667eea;
    border-color: #667eea;
}

.ufv-captcha-checkbox input[type="checkbox"]:checked + .ufv-captcha-checkmark::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 9px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ufv-captcha-label {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* Status Messages */
.ufv-captcha-status {
    min-height: 30px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.ufv-captcha-status.loading {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #90caf9;
}

.ufv-captcha-status.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #81c784;
}

.ufv-captcha-status.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

.ufv-captcha-status.warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffb74d;
}

.ufv-captcha-status-icon {
    display: inline-block;
    margin-left: 5px;
    font-size: 18px;
}

.ufv-captcha-status.loading .ufv-captcha-status-icon {
    animation: ufv-captcha-spin 1s linear infinite;
}

@keyframes ufv-captcha-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Footer */
.ufv-captcha-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.ufv-captcha-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ufv-captcha-cancel {
    background: #e0e0e0;
    color: #666;
}

.ufv-captcha-cancel:hover {
    background: #d0d0d0;
}

.ufv-captcha-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ufv-captcha-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ufv-captcha-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Branding */
.ufv-captcha-branding {
    padding: 15px;
    text-align: center;
    font-size: 12px;
    color: #999;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.ufv-captcha-icon {
    display: inline-block;
    margin-left: 5px;
    font-size: 14px;
}

/* RTL Support */
[dir="rtl"] .ufv-captcha-checkmark {
    margin-left: 0;
    margin-right: 12px;
}

[dir="rtl"] .ufv-captcha-checkbox input[type="checkbox"]:checked + .ufv-captcha-checkmark::after {
    left: auto;
    right: 9px;
}

/* Responsive */
@media (max-width: 500px) {
    .ufv-captcha-modal {
        width: 95%;
        max-width: none;
    }
    
    .ufv-captcha-header {
        padding: 20px;
    }
    
    .ufv-captcha-header h3 {
        font-size: 20px;
    }
    
    .ufv-captcha-body {
        padding: 30px 20px;
    }
    
    .ufv-captcha-footer {
        padding: 15px 20px;
        flex-direction: column;
    }
    
    .ufv-captcha-btn {
        width: 100%;
    }
}

/* Animation for failed attempts */
@keyframes ufv-captcha-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.ufv-captcha-checkbox.shake {
    animation: ufv-captcha-shake 0.5s;
}

