/* Line styles - using attribute selector to match dynamic class names */
[class*="line-chart-"] {
    fill: none;
    stroke: var(--color-olive);
    stroke-width: 3px;
}

/* Alternative line style */
[class*="line-chart-"].style-2 {
    stroke: var(--color-coral);
    stroke-width: 2px;
    stroke-dasharray: 5,5;
}
/* Axis styles - using attribute selector to match dynamic class names */
[class*="x-axis-chart-"] text,
[class*="y-axis-chart-"] text {
    font: 10px sans-serif;
}
[class*="x-axis-chart-"] path,
[class*="x-axis-chart-"] line,
[class*="y-axis-chart-"] path,
[class*="y-axis-chart-"] line {
    fill: none;
    stroke: #000;
    shape-rendering: crispEdges;
}
/* Grid styles - using attribute selector to match dynamic class names */
[class*="grid-chart-"] line {
    stroke: lightgrey;
    stroke-opacity: 0.7;
    shape-rendering: crispEdges;
}

/* Alternative grid style */
[class*="grid-chart-"].style-2 line {
    stroke: var(--color-coral);
    stroke-opacity: 0.3;
    stroke-dasharray: 2,2;
}
.button-container {
    padding: 1rem 0;
    margin: 0;
}
.button-container button {
    background-color: var(--color-lavender);
    border: 1px solid var(--color-lavender);
    border-radius: 15px;
    padding: 0.5rem 1rem;
    font-size: 12px;
    cursor: pointer;
}
.button-container button:hover {
    background-color: white;
    color: var(--color-olive);
}
/* Button selected state - using attribute selector to match dynamic class names */
.button-container [class*="selected-chart-"] {
    background-color: var(--color-ocre); /* Gold color for selected button */
    color: white;
}

/* Alternative selected button style */
.button-container [class*="selected-chart-"].style-2 {
    background-color: var(--color-coral);
    color: white;
}

#chart svg {
    width: 100%;
    height: auto;
}
/* Annotation styles - using attribute selector to match dynamic class names */
.annotationpoint,
[class*="annotation-circle-chart-"] {
    fill: var(--color-darkgrey);
}

/* Alternative annotation style */
[class*="annotation-circle-chart-"].style-2 {
    fill: var(--color-coral);
    stroke: var(--c-white);
    stroke-width: 2px;
}
.datapoint {
    fill: var(--color-olive);
}

.chart--month-select {
    border-radius: 5px 5px 0 0;
    border: 0px;
    background-color: var(--color-lavender);
    padding-left: 1rem;
}

.chart-button-time-range:hover {
    opacity: .8;
}
.chart-button-time-range.selected {
    background-color: var(--color-ocre);
    color: var(--color-base);
}
.chart--latest-value {
    width: 100%; 
    background-color: var(--color-violet);
    text-align: left;
    padding: 0.5rem 2rem;
    border-radius: 0 0 15px 15px;
    color: var(--color-contrast);
    display: grid;
    grid-template-columns: 50% auto auto;
    margin-bottom: 1rem;
}
.chart--latest-value span:nth-child(2) {
    text-align: right;
}
.chart--latest-value span:nth-child(3) {
    text-align: right;
    font-weight: 600;
}


.value-tooltip, .date-tooltip, .annotation-tooltip {
    position: absolute;
    text-align: left;
    padding: 6px;
    font: 12px sans-serif;
    background: var(--color-olive);
    border: 1px solid var(--color-olive);
    border-radius: 8px;
    pointer-events: none;
}

.annotation-tooltip {
    /* Optional styling specific to annotation tooltip */
    background: var(--color-burgundy);
}

.date-tooltip {
    /* Center text alignment for date tooltip */
    text-align: center;
}

/* Crosshair line styling - using attribute selector to match dynamic class names */
[class*="vertical-line-chart-"] {
    stroke: gray;
    stroke-width: 1px;
    stroke-dasharray: 3,3;
}

/* Alternative vertical line style */
[class*="vertical-line-chart-"].style-2 {
    stroke: var(--color-coral);
    stroke-width: 2px;
    stroke-dasharray: 5,5;
}

/* Button selected state */
.button-container .selected {
    background-color: var(--color-olive); /* Gold color for selected button */
    color: white;
}

/* Set SVG background color to white */
#chart svg {
    background-color: white;
}

/* Hover state and cursor for annotation circles */
.annotation-circle {
    transition: fill 0.2s;
}

.annotation-circle:hover {
    fill: var(--color-burgundy);
    stroke: var(--color-contrast);
}

.date-tooltip,
.value-tooltip,
.annotation-tooltip {
    z-index: 1000;
    background-color: var(--color-olive);
}


.tooltip {
    z-index:3000;
    text-align: center;
    padding: 5px;
    font: 12px sans-serif;
    background: var(--color-lavender);
    border: 1px solid var(--color-lavender);
    border-radius: 15px;
    pointer-events: none;
    border-radius: var(--z-content-radius-tight);
}
.tooltip::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 6px solid transparent;
}

.value-tooltip::after {
    top: 50%;
    transform: translateY(-50%);
}

.date-tooltip::after {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
}


.date-tooltip::after {
    bottom: 100%;
    border-bottom-color: var(--color-olive);
}

.date-tooltip {
    /* Center text alignment for date tooltip */
    text-align: center;
}

/* Crosshair line styling - using attribute selector to match dynamic class names */
[class*="vertical-line-chart-"] {
    stroke: gray;
    stroke-width: 1px;
    stroke-dasharray: 3,3;
}

/* Alternative vertical line style */
[class*="vertical-line-chart-"].style-2 {
    stroke: var(--color-coral);
    stroke-width: 2px;
    stroke-dasharray: 5,5;
}

/* Highlighted data point - using attribute selector to match dynamic class names */
[class*="focus-circle-chart-"] {
    fill: var(--color-olive);
    stroke: var(--color-base);
    stroke-width: 2px;
}

/* Alternative focus circle style */
[class*="focus-circle-chart-"].style-2 {
    fill: var(--color-coral);
    stroke: var(--color-base);
    stroke-width: 3px;
}


/* Set SVG background color to white */
#chart svg {
    background-color: white;
}

/* Hover state and cursor for annotation circles - using attribute selector to match dynamic class names */
[class*="annotation-circle-chart-"] {
    transition: fill 0.2s;
}

[class*="annotation-circle-chart-"]:hover {
    fill: var(--color-olive);
    stroke: var(--color-base);
}

/* Alternative annotation hover style */
[class*="annotation-circle-chart-"].style-2:hover {
    fill: var(--color-coral);
    stroke: var(--color-base);
    transform: scale(1.2);
}




@media (max-width: 1024px) {
    .chart--month-select {
        padding-left: 0.4rem;
    }
    .chart--month-select div .t-btn--pill {
        padding: 0.4rem;
        margin: 0.2rem;
    }
    .chart--latest-value {
        font-size: var(--f-size--small);
    }

    .chart--latest-value span:nth-child(3) {
        text-align: right;
        font-weight: var(--f-weight-bold);
    }
}
