/**
 * ID Verification Plugin Styles
 * Version: 2.5.0 - Added Camera Capture Support
 */

/* Base Form Styles */
.idv-form {
    max-width: 500px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.idv-form h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 24px;
}

.idv-form-group {
    margin-bottom: 20px;
}

.idv-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
}

.idv-form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.idv-form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.idv-form-file {
    width: 100%;
    padding: 12px;
    border: 2px dashed #e1e8ed;
    border-radius: 6px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.idv-form-file:hover {
    border-color: #3498db;
    background: #f0f8ff;
}

.idv-form-button {
    width: 100%;
    padding: 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.idv-form-button:hover {
    background: #2980b9;
}

.idv-form-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.idv-file-info {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

/* Alert Messages */
.idv-alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

.idv-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.idv-alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.idv-alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Camera Capture Styles */
.idv-camera-section {
    margin-bottom: 20px;
}

.idv-scanning-info {
    background: #e8f4fd;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.idv-scanning-info p {
    margin: 5px 0;
    color: #2c5aa0;
}

.idv-scanning-info strong {
    color: #1a4480;
}

.idv-phone-required {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.idv-phone-required-content p {
    margin: 8px 0;
    color: #856404;
}

.idv-phone-required-content strong {
    color: #533f03;
    font-size: 16px;
}

.idv-camera-container {
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    padding: 20px;
    background: #fff;
}

.idv-camera-preview {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.idv-camera-preview video {
    width: 100%;
    height: auto;
    display: block;
}

.idv-camera-preview canvas {
    width: 100%;
    height: auto;
}

.idv-camera-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.idv-camera-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #3498db;
    color: white;
    min-width: 120px;
}

.idv-camera-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.idv-camera-btn:active {
    transform: translateY(0);
}

.idv-camera-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.idv-camera-status {
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    font-weight: 500;
    min-height: 20px;
}

.idv-camera-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.idv-camera-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.idv-camera-status.processing {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .idv-form {
        margin: 10px;
        padding: 20px;
    }
    
    .idv-camera-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .idv-camera-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .idv-camera-preview {
        max-width: 100%;
    }
    
    .idv-scanning-info {
        padding: 12px;
        font-size: 13px;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.idv-camera-status.processing::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid #0c5460;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Focus and Accessibility */
.idv-camera-btn:focus,
.idv-toggle-label:focus-within {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .idv-form {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .idv-form h2 {
        color: #ecf0f1;
    }
    
    .idv-form-label {
        color: #bdc3c7;
    }
    
    .idv-form-input {
        background: #34495e;
        border-color: #4a5f7a;
        color: #ecf0f1;
    }
    
    .idv-form-input:focus {
        border-color: #3498db;
    }
    
    .idv-camera-container {
        background: #34495e;
        border-color: #4a5f7a;
    }
    
    .idv-camera-toggle {
        background: #34495e;
    }
    
    .idv-toggle-label {
        color: #bdc3c7;
    }
}
