/* Chart Area */
.chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.hover-hint {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    font-style: italic;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.chart-container svg {
    width: 100%;
    max-width: 800px;
    height: auto;
    background-color: var(--chart-bg);
    box-shadow: var(--shadow);
    border-radius: 4px;
    padding: 10px;
}

/* SVG Elements */
.chart-line {
    stroke: var(--chart-line);
    stroke-width: 1.5;
    fill: none;
}

.border-rect {
    stroke-width: 2;
}

.house-text {
    font-size: 12px;
    font-weight: bold;
    fill: var(--text-color);
}

.sign-number {
    font-size: 14px;
    font-weight: 700;
    fill: var(--sign-color);
    opacity: 0.8;
}

.sign-name {
    font-size: 10px;
    fill: var(--sign-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.house-number {
    font-size: 12px;
    fill: #9e9e9e;
    font-weight: 400;
}

.planet-text {
    font-size: 12px;
    font-weight: 600;
    fill: var(--planet-color);
}

/* Chart Tooltip (JS based) */
.chart-tooltip {
    position: fixed;
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    max-width: 200px;
    text-align: center;
    transform: translate(-50%, -100%); /* Center above cursor */
    margin-top: -10px;
}

.chart-tooltip.visible {
    opacity: 1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .info-panel {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
        min-width: 0; /* Prevent grid overflow */
    }

    .chart-container {
        padding: 20px 10px;
    }
    
    /* Ensure tables can scroll if they are still too wide */
    .info-panel > div {
        overflow-x: auto;
        width: 100%;
        min-width: 0; /* Critical for grid item scrolling */
        margin-bottom: 15px;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

    /* Optimize table for mobile */
    table {
        font-size: 12px;
        width: 100%;
    }

    th, td {
        padding: 8px 5px;
        white-space: nowrap; /* Prevent wrapping, force horizontal scroll */
    }
}
