/* Chart Visualization Styles */

.chart-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid #e2e8f0;
}

.chart-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.chart-header h4 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.chart-header p {
    color: #64748b;
    font-size: 0.95rem;
}

.chart-container {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
}

.chart-tab {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.chart-tab:hover {
    background: #e2e8f0;
    color: #475569;
}

.chart-tab.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

#chart-canvas-container {
    position: relative;
    height: 300px;
    margin-bottom: 1rem;
}

#tax-chart {
    max-width: 100%;
    height: auto;
}

/* Tax Scenarios */
.tax-scenarios {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.tax-scenarios h5 {
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.scenario-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.scenario-btn {
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scenario-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.scenario-results {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 1px solid #e2e8f0;
    display: none;
}

.scenario-results.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scenario-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.scenario-item {
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
}

.scenario-current {
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.scenario-proposed {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}

.scenario-savings {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    grid-column: 1 / -1;
    text-align: center;
    font-weight: 600;
    color: #1e40af;
}

/* Tax Education Section */
.tax-education {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid #bae6fd;
}

.education-header {
    text-align: center;
    margin-bottom: 2rem;
}

.education-header h4 {
    color: #0c4a6e;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.education-header p {
    color: #075985;
    font-size: 0.95rem;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.education-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0f2fe;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.education-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.education-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.education-card h5 {
    color: #0c4a6e;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-align: center;
}

.education-card p {
    color: #334155;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
}

.education-card ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.education-card li {
    color: #334155;
    font-size: 0.9rem;
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.education-card li::before {
    content: '✓';
    color: #10b981;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Result Card Enhancements */
.result-card {
    position: relative;
}

.result-description {
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chart-section {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .chart-tabs {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .scenario-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .scenario-btn {
        width: 100%;
        max-width: 280px;
    }
    
    .scenario-comparison {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tax-education {
        padding: 1.5rem;
    }
    
    #chart-canvas-container {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .chart-section,
    .tax-education {
        padding: 1rem;
    }
    
    .education-card {
        padding: 1rem;
    }
}

/* Animation for showing charts */
.chart-fade-in {
    animation: chartFadeIn 0.5s ease-in-out;
}

@keyframes chartFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}