body {
    background-color: black;
    color: white; /* Makes your text readable on the black background */
}
.scroll-box {
    width: 300px;        /* Set your preferred width */
    height: 400px;       /* Critical: Sets the boundary limit */
    border: 1px solid #ccc;
    padding: 15px;
    
    /* The core mechanism */
    overflow-y: auto;    /* Adds a vertical scrollbar ONLY if content overflows */
}

.separator-line {
    border: none;               /* Remove default browser styling */
    height: 2px;                /* Sets the thickness of the line */
    margin-top: 10px;           /* Adds a small gap directly below the div */
    width: 300px;               /* Optional: Match the exact width of your box */
}

.x-axis-labels {
    display: flex;
    box-sizing: border-box;
    padding-top: 8px;
    padding-bottom: 12px;
    font-family: sans-serif;
    font-size: 12px;
    color: #444;
}

/* The blank spacer matching our left padding zone */
.axis-spacer {
    flex-shrink: 0;
}

/* Each individual tick text wrapper */
.tick-label {
    width: 0;
    position: relative;
    text-align: center;
    flex-shrink: 0;
}

/* Inner text centering trick to handle 0-width flex points */
.tick-label span {
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* This container handles the horizontal scrolling for BOTH the canvas and labels */
.chart-scroll-container {
    width: 100%;
    overflow-x: auto; 
    border: 1px solid #ccc;
    background: #f9f9f9;
}

/* Forces the inner elements to respect the dynamically calculated width */
.chart-content {
    position: relative;
}

canvas {
    display: block;
}

.tab-container {
    display: flex;
    gap: 4px; /* Space between tabs */
    font-family: sans-serif;
}

/* Hide the default radio circle entirely */
.tab-container input[type="radio"] {
    display: none;
}

/* Style the labels to look like buttons/tabs */
.tab-button {
    padding: 10px 20px;
    background-color: #808080;
    color: #333;
    border: 1px solid #ccc;
    border-bottom: none; /* Gives it a classic tab look */
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    user-select: none;
}

/* Hover effect */
.tab-button:hover {
    background-color: #e0e0e0;
}

/* The Magic: Style the label ONLY when its hidden radio is :checked */
.tab-container input[type="radio"]:checked + .tab-button {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}