/* Business Plan Specific Styles */

.business-plan {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.plan-header {
    text-align: center;
    padding: 3rem 0;
    border-bottom: 3px solid var(--primary-color);
    margin-bottom: 3rem;
}

.plan-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.plan-header .subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
}

/* Table of Contents */
.toc {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 3rem;
}

.toc h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: var(--text-dark);
    display: block;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.3s ease;
}

.toc a:hover {
    background-color: white;
}

/* Plan Sections */
.plan-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.plan-section h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.plan-section h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.plan-section h4 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.plan-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.plan-section ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.plan-section li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

/* Tables */
.plan-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: var(--shadow);
    border-radius: 0.5rem;
    overflow: hidden;
}

.plan-table thead {
    background-color: var(--primary-color);
    color: white;
}

.plan-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.plan-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.plan-table tbody tr:hover {
    background-color: var(--bg-light);
}

.plan-table tbody tr:last-child td {
    border-bottom: none;
}

/* Highlight Boxes */
.highlight-box {
    background-color: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0.25rem;
}

.highlight-box h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.success-box {
    background-color: #d1fae5;
    border-left-color: var(--secondary-color);
}

.info-box {
    background-color: #dbeafe;
    border-left-color: var(--primary-color);
}

.warning-box {
    background-color: #fef3c7;
    border-left-color: var(--accent-color);
}

/* Value Cards */
.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.value-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.value-card h4 {
    color: var(--primary-color);
    margin-top: 0;
}

/* Phase Timeline */
.phase-timeline {
    position: relative;
    padding-left: 2rem;
    margin: 2rem 0;
}

.phase-item {
    position: relative;
    padding-bottom: 2rem;
    border-left: 2px solid var(--border-color);
    padding-left: 2rem;
}

.phase-item:last-child {
    border-left: none;
}

.phase-item::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0;
    width: 1rem;
    height: 1rem;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.phase-item h4 {
    margin-top: 0;
}

/* Charts and Visualizations */
.chart-container {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 0.5rem;
    margin: 2rem 0;
    overflow-x: auto;
}

.chart-title {
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

/* Line Chart */
.line-chart {
    position: relative;
    height: 300px;
    padding: 20px;
    overflow: visible;
}

.line-chart svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Bar Chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 300px;
    padding: 20px;
    gap: 1rem;
    min-width: 300px;
    width: 100%;
}

.bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.bar {
    width: 100%;
    background: linear-gradient(to top, var(--primary-color), var(--secondary-color));
    border-radius: 0.5rem 0.5rem 0 0;
    position: relative;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bar:hover {
    transform: translateY(-5px);
}

.bar-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.bar-label {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Pie Chart */
.pie-chart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    padding: 2rem;
}

.pie-chart {
    width: 250px;
    height: 250px;
    flex-shrink: 0;
}

.pie-chart svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.pie-legend {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 0.25rem;
    flex-shrink: 0;
}

.legend-label {
    font-size: 0.875rem;
    color: var(--text-dark);
}

.legend-value {
    font-weight: 600;
    color: var(--primary-color);
    margin-left: auto;
}

/* Horizontal Bar Chart */
.horizontal-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
    width: 100%;
    min-width: 280px;
}

.h-bar-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.h-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.h-bar-label {
    font-weight: 600;
    color: var(--text-dark);
}

.h-bar-value {
    font-weight: 600;
    color: var(--primary-color);
}

.h-bar-track {
    width: 100%;
    height: 30px;
    background-color: #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.h-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 0.5rem;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
}

/* Chart Legend */
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.legend-item-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Responsive Charts */
@media (max-width: 768px) {
    .chart-container {
        padding: 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .chart-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Line Chart Mobile */
    .line-chart {
        height: 250px;
        padding: 10px;
        min-width: 100%;
        width: 500px;
    }
    
    .line-chart svg {
        width: 100%;
        height: 100%;
        min-width: 450px;
    }
    
    /* Bar Chart Mobile */
    .bar-chart {
        height: 220px;
        padding: 10px;
        min-width: 100%;
        width: 100%;
    }
    
    .bar-item {
        min-width: 80px;
    }
    
    .bar-label {
        font-size: 0.75rem;
    }
    
    .bar-value {
        font-size: 0.875rem;
        white-space: nowrap;
    }
    
    /* Pie Chart Mobile */
    .pie-chart-container {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .pie-chart {
        width: 220px;
        height: 220px;
        margin: 0 auto;
    }
    
    .pie-legend {
        width: 100%;
    }
    
    .legend-item {
        font-size: 0.875rem;
    }
    
    /* Horizontal Bar Chart Mobile */
    .horizontal-bar-chart {
        padding: 0.5rem;
        gap: 1rem;
        min-width: 100%;
    }
    
    .h-bar-header {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .h-bar-label {
        font-size: 0.8rem;
        flex: 1;
        min-width: 150px;
    }
    
    .h-bar-value {
        font-size: 0.875rem;
        font-weight: 700;
    }
    
    .h-bar-track {
        height: 28px;
    }
    
    /* Chart Legend Mobile */
    .chart-legend {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .legend-item-inline {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .chart-container {
        padding: 0.75rem;
    }
    
    .chart-title {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .line-chart {
        height: 220px;
        width: 450px;
    }
    
    .bar-chart {
        height: 200px;
        gap: 0.5rem;
    }
    
    .bar-item {
        min-width: 70px;
    }
    
    .pie-chart {
        width: 200px;
        height: 200px;
    }
    
    .h-bar-label {
        font-size: 0.75rem;
        min-width: 120px;
    }
    
    .h-bar-value {
        font-size: 0.8rem;
    }
    
    .h-bar-track {
        height: 24px;
    }
}

/* Print Styles */
@media print {
    @page {
        margin: 0.75in;
    }
    
    body {
        font-size: 11pt;
    }
    
    .plan-section {
        page-break-inside: avoid;
    }
    
    .plan-section h2 {
        page-break-after: avoid;
    }
    
    header, footer {
        display: none;
    }
    
    .toc {
        page-break-after: always;
    }
    
    a {
        color: var(--text-dark);
        text-decoration: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .business-plan {
        padding: 1rem;
    }
    
    .plan-header h1 {
        font-size: 2rem;
    }
    
    .plan-table {
        font-size: 0.875rem;
    }
    
    .plan-table th,
    .plan-table td {
        padding: 0.5rem;
    }
}