/*health charts used on /health*/

.health-charts {
    --health-weight-color: light-dark(#4c7bef, #6690e8);
    --health-sleep-color: light-dark(#c9820a, #b8842f);
    margin: 1.25rem 0 1.5rem;
}

.health-chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.health-chart-value {
    font-size: var(--text-sm);
    color: var(--muted-color);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.health-chart-svg-wrap {
    position: relative;
    width: 100%;
}

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

.health-chart-grid-line {
    stroke: var(--border-color);
    stroke-width: 1;
    shape-rendering: crispEdges;
}

.health-chart-axis-label {
    fill: var(--muted-color);
    font-size: var(--text-xs);
    font-family: var(--font-family);
}

.health-chart-endpoint-label {
    font-size: var(--text-xs);
    font-family: var(--font-family);
    fill: var(--text-color);
    font-variant-numeric: tabular-nums;
}

.health-chart-crosshair {
    stroke: var(--muted-color);
    stroke-width: 1;
    pointer-events: none;
    opacity: 0;
}

.health-chart-hover-dot {
    pointer-events: none;
    opacity: 0;
}

.health-chart-empty {
    font-size: var(--text-xs);
    color: var(--muted-color);
    padding: 1.5rem 0;
    text-align: center;
}

.health-table-sleep-stages {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.4em;
    font-size: var(--text-xs);
    color: var(--muted-color);
}

.health-table-sleep-stages span:not(:last-child)::after {
    content: ' \00b7';
}

.health-table-sleep-naps,
.health-table-stacked {
    flex-direction: column;
    gap: 0;
}

.health-table-sleep-naps span:not(:last-child)::after,
.health-table-stacked span:not(:last-child)::after {
    content: '';
}

@media (max-width: 600px) {
    .health-table-sleep-stages {
        flex-direction: column;
        gap: 0;
    }

    .health-table-sleep-stages span:not(:last-child)::after {
        content: '';
    }
}
