/* CSV Analyzer Styles */

.csv-analyzer-modal .modal-dialog {
    max-width: 95%;
    height: 90%;
    margin: 2rem auto;
}

.csv-analyzer-modal .modal-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.csv-analyzer-modal .modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 0;
}

.csv-analyzer-tabs {
    display: flex;
    width: 100%;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 1rem;
}

.csv-analyzer-tab {
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    border-bottom: 3px solid transparent;
}

.csv-analyzer-tab:hover {
    background-color: rgba(13, 110, 253, 0.05);
    border-bottom-color: #a9c7ff;
}

.csv-analyzer-tab.active {
    color: #0d6efd;
    border-bottom-color: #0d6efd;
}

.csv-analyzer-pane {
    display: none;
    padding: 1rem;
}

.csv-analyzer-pane.active {
    display: block;
}

/* Data Preview Styles */
.csv-preview {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.csv-preview table {
    font-size: 0.85rem;
    white-space: nowrap;
    border-collapse: collapse;
    width: 100%;
}

.csv-preview th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 1;
    padding: 0.5rem;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.csv-preview td {
    padding: 0.5rem;
    border-bottom: 1px solid #e9ecef;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.csv-preview tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.csv-preview tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Column selector styles */
.column-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.column-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    font-size: 0.85rem;
    position: relative;
    cursor: pointer;
}

.column-item.selected {
    background-color: #e6f2ff;
    border-color: #0d6efd;
}

.column-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.column-item-badge {
    margin-left: 0.5rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-size: 0.7rem;
    background-color: #e9ecef;
}

.column-item-badge.numeric {
    background-color: #dcedc8;
    color: #33691e;
}

.column-item-badge.string {
    background-color: #ffecb3;
    color: #ff6f00;
}

.column-item-badge.date {
    background-color: #bbdefb;
    color: #0d47a1;
}

.column-item-badge.boolean {
    background-color: #d1c4e9;
    color: #4527a0;
}

/* Insight panel styles */
.insight-panel {
    padding: 1rem;
    border-radius: 4px;
    background-color: #f8f9fa;
    margin-bottom: 1rem;
}

.insight-panel h5 {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.insight-panel h5 i {
    margin-right: 0.5rem;
    color: #0d6efd;
}

.insight-panel pre {
    background-color: #272822;
    color: #f8f8f2;
    padding: 1rem;
    border-radius: 0.25rem;
    overflow-x: auto;
    font-size: 0.85rem;
}

.insight-category {
    margin-bottom: 1.5rem;
}

/* Visualization container styles */
.visualization-container {
    height: 400px;
    max-width: 100%;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background-color: white;
    padding: 0.5rem;
}

.mini-stat {
    padding: 1rem;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.mini-stat-title {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0.25rem 0;
}

.mini-stat-change {
    font-size: 0.75rem;
}

.mini-stat-change.positive {
    color: #28a745;
}

.mini-stat-change.negative {
    color: #dc3545;
}

/* Quality indicators */
.quality-heatmap {
    width: 100%;
    font-size: 0.85rem;
}

.quality-heatmap th {
    background-color: #f8f9fa;
    text-align: center;
}

.quality-heatmap td {
    vertical-align: middle;
}

.quality-indicator {
    position: relative;
}

.quality-text {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

/* Relationship visualization */
.relationship-container {
    width: 100%;
    height: 400px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #fafafa;
}

/* Transformation preview */
.transformation-preview {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1rem;
    background-color: #f8f9fa;
    max-height: 500px;
    overflow-y: auto;
}

.transformation-option {
    margin-bottom: 0.5rem;
}

.narrative-section {
    margin-bottom: 2rem;
}

.narrative-section h4 {
    margin-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
}

.suggestion-chip {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    margin: 0.25rem;
    border-radius: 16px;
    background-color: #e9ecef;
    color: #495057;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-chip:hover {
    background-color: #dee2e6;
}

.suggestion-chip i {
    margin-right: 0.25rem;
}

/* Responsive adaptations */
@media (max-width: 768px) {
    .csv-analyzer-tab {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .csv-preview th, .csv-preview td {
        padding: 0.3rem;
        font-size: 0.8rem;
    }
}
