/* Chart Component - Extends Design System */
.chart-component {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-md);
    border: var(--border-width-thin) solid var(--color-gray-200);
}

.chart-header {
    margin-bottom: var(--space-lg);
    text-align: center;
}

.chart-title {
    color: var(--color-adobe-red);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-sm);
}

.chart-subtitle {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin: 0;
}

.chart-container {
    position: relative;
    height: 400px;
    margin: var(--space-lg) 0;
}

.chart-canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-gray-200);
    border-top: 3px solid var(--color-adobe-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--space-md);
}

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

.chart-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-error);
    text-align: center;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-gray-200);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: var(--border-radius-sm);
}

.legend-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* Timeline chart legend dots */
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

.legend-dot.discovery {
    background: #007bff;
}

.legend-dot.plan {
    background: #28a745;
}

.legend-dot.build {
    background: #fd7e14;
}

.legend-dot.release {
    background: #6f42c1;
}

/* Chart component responsive design */
@media (max-width: 768px) {
    .chart-component {
        padding: var(--space-lg);
    }
    
    .chart-container {
        height: 300px;
    }
    
    .chart-legend {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

/* Chart types specific styling */
.chart-component[data-persona="investors"] .chart-title {
    color: var(--color-purple);
}

.chart-component[data-persona="clients"] .chart-title {
    color: var(--color-adobe-red);
}

.chart-component[data-persona="partners"] .chart-title {
    color: var(--color-peach);
}

/* Content loading states */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    margin: var(--space-lg) 0;
    padding: var(--space-xl);
}

.section-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--text-secondary);
}

.section-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--color-error);
    text-align: center;
}