/* Spreadsheet Converter Specific Styles */

/* Upload Section */
.upload-section {
    padding: 3rem;
    text-align: center;
}

.upload-info {
    margin-bottom: 3rem;
}

.upload-info h2 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.upload-info p {
    color: #64748b;
    font-size: 1.1rem;
}

.file-upload-area {
    border: 3px dashed #e2e8f0;
    border-radius: 16px;
    padding: 4rem 2rem;
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 2rem;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: #667eea;
    background: #f1f5f9;
    transform: translateY(-2px);
}

.upload-content svg {
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

.upload-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.upload-content p {
    color: #64748b;
    margin: 0;
}

/* File Info Display */
.file-info {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    background: #667eea;
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    flex-shrink: 0;
}

.file-meta {
    flex: 1;
}

.file-meta h4 {
    margin: 0 0 0.25rem 0;
    color: #1e293b;
    font-size: 1.1rem;
}

.file-meta p {
    margin: 0 0 0.5rem 0;
    color: #64748b;
    font-size: 0.9rem;
}

.file-format-badge {
    background: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.remove-file-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.remove-file-btn:hover {
    background: #dc2626;
}

/* Conversion Section */
.conversion-section {
    padding: 3rem;
    border-top: 1px solid #e2e8f0;
}

.conversion-header {
    text-align: center;
    margin-bottom: 3rem;
}

.conversion-header h2 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.conversion-header p {
    color: #64748b;
    font-size: 1.1rem;
}

.format-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.format-option {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.format-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.format-option.selected {
    border-color: #667eea;
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.format-option.selected .format-icon {
    background: #667eea;
    color: white;
}

.format-icon {
    background: #f1f5f9;
    color: #64748b;
    padding: 1rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.format-details h3 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1.3rem;
}

.format-details p {
    margin: 0 0 0.5rem 0;
    color: #667eea;
    font-weight: 600;
}

.format-details small {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
}

.conversion-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

#convertBtn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

#convertBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Progress Section */
.progress-section {
    padding: 3rem;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.progress-container h3 {
    color: #1e293b;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.progress-bar {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.progress-fill {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

#progressText {
    color: #64748b;
    margin: 0;
}

/* Preview Section */
.preview-section {
    padding: 3rem;
    border-top: 1px solid #e2e8f0;
}

.preview-header {
    text-align: center;
    margin-bottom: 2rem;
}

.preview-header h2 {
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.preview-header p {
    color: #64748b;
    margin: 0;
}

.preview-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.preview-table-wrapper {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.preview-table th {
    background: #667eea;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.preview-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.preview-table tr:nth-child(even) {
    background: #f8fafc;
}

.preview-table tr:last-child td {
    border-bottom: none;
}

/* Format-specific colors */
.file-format-badge.csv {
    background: #10b981;
}

.file-format-badge.xlsx {
    background: #3b82f6;
}

.file-format-badge.xls {
    background: #f59e0b;
}

.file-format-badge.xml {
    background: #8b5cf6;
}

/* Error States */
.error-message {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
}

.success-message {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .upload-section,
    .conversion-section,
    .progress-section,
    .preview-section {
        padding: 2rem 1.5rem;
    }
    
    .file-upload-area {
        padding: 3rem 1.5rem;
    }
    
    .upload-content h3 {
        font-size: 1.2rem;
    }
    
    .format-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .format-option {
        padding: 1.5rem;
    }
    
    .conversion-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    #convertBtn {
        width: 100%;
        justify-content: center;
    }
    
    .file-details {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .preview-table-wrapper {
        max-height: 300px;
    }
    
    .preview-table {
        font-size: 0.8rem;
    }
    
    .preview-table th,
    .preview-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .upload-info h2,
    .conversion-header h2,
    .preview-header h2 {
        font-size: 1.5rem;
    }
    
    .file-upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-content svg {
        width: 48px;
        height: 48px;
    }
    
    .format-icon {
        padding: 0.75rem;
    }
    
    .format-icon svg {
        width: 32px;
        height: 32px;
    }
}