/* CCCD Form Styles */

/* Tab buttons */
.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-buttons .btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tab-buttons .btn-primary {
    background-color: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.tab-buttons .btn-default {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #495057;
}

.tab-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Form content sections */
.form-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* File upload container */
.wt-upload-container {
    border: 3px dashed #dee2e6;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    margin-top: 10px;
}

.wt-upload-container:hover {
    border-color: #4CAF50;
    background-color: #f0f9f0;
}

.wt-upload-container .icon {
    color: #adb5bd;
    transition: color 0.3s ease;
}

.wt-upload-container:hover .icon {
    color: #4CAF50;
}

.wt-upload-container h4 {
    color: #6c757d;
    margin: 10px 0;
    font-size: 14px;
}

.wt-upload-container label {
    color: #6c757d;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.wt-upload-container:hover label {
    color: #4CAF50;
}

/* Image preview */
.image-preview {
    text-align: center;
    padding: 20px;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.remove-image-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.remove-image-btn:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

/* Preview section */
.preview-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
}

.preview-placeholder {
    text-align: center;
    color: #6c757d;
}

.preview-placeholder i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #adb5bd;
}

.preview-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Loading animation */
.loading {
    text-align: center;
    padding: 40px;
    background-color: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #495057;
    font-size: 16px;
    font-weight: 500;
}

/* Result section */
.result-section {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-image {
    max-width: 100%;
    max-height: 500px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

/* Form validation styles */
.form-control:invalid {
    border-color: #dc3545;
}

.form-control:valid {
    border-color: #28a745;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tab-buttons {
        flex-direction: column;
    }
    
    .tab-buttons .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .preview-container {
        min-height: 200px;
        padding: 20px;
    }
    
    .result-image {
        max-height: 300px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wt-upload-container {
        background-color: #2d3748;
        border-color: #4a5568;
    }
    
    .wt-upload-container:hover {
        background-color: #374151;
        border-color: #4CAF50;
    }
    
    .preview-container {
        background-color: #2d3748;
    }
    
    .preview-placeholder {
        color: #a0aec0;
    }
    
    .preview-placeholder i {
        color: #718096;
    }
    
    .loading {
        background-color: #2d3748;
    }
    
    .loading p {
        color: #e2e8f0;
    }
}