/* Tech Growth Widget - Light Theme */
.tech-growth-widget {
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 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: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.tech-growth-header {
    background: #ffffff;
    color: #1f2937;
    padding: 40px 30px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.tech-growth-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: -0.025em;
    color: #1f2937;
}

.tech-growth-subtitle {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 400;
    color: #64748b;
}

.tech-growth-content {
    padding: 40px 30px;
}

.tech-growth-description {
    text-align: center;
    margin-bottom: 40px;
    color: #64748b;
    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: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.chart-type-btn {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-type-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.chart-type-btn:hover:not(.active) {
    background: #e2e8f0;
    color: #475569;
}

.tech-growth-chart-container {
    position: relative;
    height: 600px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.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: #f8fafc;
    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 rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease;
}

.legend-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-label {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
}

.legend-value {
    font-size: 13px;
    color: #64748b;
    margin-left: auto;
    font-weight: 600;
}

.tech-growth-footer {
    padding: 30px;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.tech-growth-source {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    font-style: italic;
}

/* Loading state */
.tech-growth-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    color: #64748b;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    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: #ffffff;
    }

    .tech-growth-container {
        border: 2px solid #000000;
    }

    .legend-item {
        border: 1px solid #666666;
    }
}

/* 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 #ccc;
    }
}
