/* Business Chart Web Component Styles */

business-chart {
    display: block;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chart-header {
    text-align: center;
    padding: 24px 24px 16px 24px;
    background: linear-gradient(135deg, #8b5cf6, #10b981);
    color: white;
}

.chart-header.dark {
    background: linear-gradient(135deg, #4c1d95, #065f46);
}

.chart-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
}

.chart-subtitle {
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.chart-container {
    position: relative;
    padding: 24px;
}

.chart-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.chart-canvas {
    display: block;
}

.chart-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.875rem;
    margin-bottom: 24px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.2s;
}

.legend-item:hover {
    opacity: 0.8;
}

.legend-item.hidden {
    opacity: 0.4;
}

.legend-color {
    width: 16px;
    height: 3px;
    border-radius: 2px;
}

.metrics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 0 24px 24px 24px;
}

.metric-card {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.metric-card.revenue { 
    border-left-color: #8b5cf6; 
}

.metric-card.leads { 
    border-left-color: #10b981; 
}

.metric-card.conversion { 
    border-left-color: #f59e0b; 
}

.metric-card.customers { 
    border-left-color: #ef4444; 
}

.metric-card.pipeline { 
    border-left-color: #3b82f6; 
}

.metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 4px;
    color: #1f2937;
}

.metric-label {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Dark theme styles */
business-chart[theme="dark"] {
    background: #1f2937;
    color: #f9fafb;
}

business-chart[theme="dark"] .metric-card {
    background: #374151;
    color: #f9fafb;
}

business-chart[theme="dark"] .metric-value {
    color: #f9fafb;
}

business-chart[theme="dark"] .metric-label {
    color: #9ca3af;
}

/* Responsive design */
@media (max-width: 768px) {
    .chart-header {
        padding: 16px;
    }
    
    .chart-title {
        font-size: 1.5rem;
    }
    
    .chart-container {
        padding: 16px;
    }
    
    .chart-legend {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .metrics-summary {
        grid-template-columns: 1fr;
        padding: 0 16px 16px 16px;
    }
}

@media (max-width: 480px) {
    .chart-title {
        font-size: 1.25rem;
    }
    
    .chart-subtitle {
        font-size: 0.8rem;
    }
    
    .metric-card {
        padding: 12px;
    }
    
    .metric-value {
        font-size: 1.25rem;
    }
    
    .metric-label {
        font-size: 0.8rem;
    }
}
