/**
 * Unified Data Source Picker Styles
 */

/* Data Source Modal */
.data-source-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s;
}

.data-source-modal-content {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s;
    transition: all 0.3s ease;
    position: relative;
}

.data-source-modal-content.drag-over {
    background: linear-gradient(to bottom, #f0f8ff 0%, #e6f2ff 100%);
    border: 3px dashed #667eea;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4), 0 10px 30px rgba(102, 126, 234, 0.25);
}

.data-source-modal-content.drag-over::after {
    content: "📁 Drop files here to upload";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 600;
    color: #667eea;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    pointer-events: none;
    z-index: 10;
}

.data-source-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-source-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
}

.data-source-close {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.data-source-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.data-source-modal-body {
    padding: 24px;
}

/* Source Grid */
.source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.source-card {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.source-card:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8eaff 100%);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25);
}

.source-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.source-card.disabled:hover {
    border-color: #e0e0e0;
    background: #f5f5f5;
    transform: none;
    box-shadow: none;
}

.source-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.source-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 4px;
}

.source-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
    font-weight: 600;
}

.source-description {
    font-size: 0.75rem;
    color: #666;
    margin-top: 4px;
}

/* Connected Sources List */
.connected-sources {
    margin-top: 20px;
}

.connected-sources h3 {
    font-size: 1rem;
    color: #666;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sources-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.source-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.source-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.source-item-icon {
    font-size: 1.5rem;
}

.source-item-details {
    display: flex;
    flex-direction: column;
}

.source-item-name {
    font-weight: 500;
    color: #2c3e50;
}

.source-item-meta {
    font-size: 0.85rem;
    color: #666;
}

.source-item-actions {
    display: flex;
    gap: 8px;
}

.source-item-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.source-item-btn:hover {
    background: #f0f0f0;
    border-color: #999;
}

.source-item-btn.danger:hover {
    background: #fee;
    border-color: #f44336;
    color: #f44336;
}

/* File Upload Dialog */
.file-upload-dialog {
    margin-top: 16px;
}

.file-upload-area-modal {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}

.file-upload-area-modal:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.file-upload-area-modal.dragover {
    border-color: #667eea;
    background: #f0f3ff;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive */
@media (max-width: 600px) {
    .source-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-source-modal-content {
        width: 95%;
        margin: 10% auto;
    }
}
