/* Tech Growth Widget - Light Theme */
.tech-growth-widget {
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--border-color) 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    box-sizing: border-box;
}

.tech-growth-container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--surface-color);
    border-radius: 16px;
    box-shadow: 0 10px 40px color-mix(in srgb, var(--ink) 8%, transparent);
    overflow: hidden;
}

.tech-growth-header {
    background: var(--surface-color);
    color: var(--ink);
    padding: 40px 30px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.tech-growth-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: -0.025em;
    color: var(--ink);
}

.tech-growth-subtitle {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 400;
    color: var(--ink-faded);
}

.tech-growth-content {
    padding: 40px 30px;
}

.tech-growth-description {
    text-align: center;
    margin-bottom: 40px;
    color: var(--ink-faded);
    font-size: 1rem;
    line-height: 1.6;
}

.tech-growth-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.chart-type-selector {
    display: flex;
    background: var(--bg-light);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.chart-type-btn {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--ink-faded);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-type-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 30%, transparent);
}

.chart-type-btn:hover:not(.active) {
    background: var(--border-color);
    color: var(--ink-mid);
}

.tech-growth-chart-container {
    position: relative;
    height: 600px;
    margin: 0 auto;
    background: var(--surface-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--ink) 4%, transparent);
}

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

.tech-growth-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
    padding: 25px;
    background: var(--bg-light);
    border-radius: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--ink) 4%, transparent);
    transition: transform 0.2s ease;
}

.legend-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px color-mix(in srgb, var(--ink) 8%, transparent);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
}

.legend-value {
    font-size: 13px;
    color: var(--ink-faded);
    margin-left: auto;
    font-weight: 600;
}

.tech-growth-footer {
    padding: 30px;
    text-align: center;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.tech-growth-source {
    font-size: 13px;
    color: var(--ink-faded);
    margin: 0;
    font-style: italic;
}

/* Loading state */
.tech-growth-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    color: var(--ink-faded);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .tech-growth-chart-container {
        height: 500px;
    }

    .tech-growth-title {
        font-size: 2rem;
    }

    .tech-growth-content {
        padding: 30px 20px;
    }
}

@media (max-width: 768px) {
    .tech-growth-widget {
        padding: 10px;
        min-height: 100vh;
    }

    .tech-growth-header {
        padding: 30px 20px;
    }

    .tech-growth-title {
        font-size: 1.75rem;
    }

    .tech-growth-subtitle {
        font-size: 1rem;
    }

    .tech-growth-content {
        padding: 20px 15px;
    }

    .tech-growth-chart-container {
        height: 400px;
        padding: 15px;
    }

    .tech-growth-controls {
        flex-direction: column;
        gap: 15px;
    }

    .chart-type-selector {
        width: 100%;
        justify-content: center;
    }

    .legend-item {
        padding: 6px 10px;
    }

    .legend-label {
        font-size: 13px;
    }

    .legend-value {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .tech-growth-widget {
        padding: 5px;
    }

    .tech-growth-container {
        border-radius: 8px;
    }

    .tech-growth-header {
        padding: 20px 15px;
    }

    .tech-growth-title {
        font-size: 1.5rem;
    }

    .tech-growth-chart-container {
        height: 350px;
        padding: 10px;
    }

    .tech-growth-legend {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
    }

    .chart-type-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .tech-growth-widget {
        background: var(--surface-color);
    }

    .tech-growth-container {
        border: 2px solid var(--ink);
    }

    .legend-item {
        border: 1px solid var(--ink-mid);
    }
}

/* Print styles */
@media print {
    .tech-growth-widget {
        background: white;
        box-shadow: none;
    }

    .tech-growth-controls {
        display: none;
    }

    .tech-growth-chart-container {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}
