.chart-legend {
    width: 100%;
}

.chart-legend dl {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    row-gap: var(--spacing-200);
}

.chart-legend__item {
    align-items: center;
    display: flex;
    font-size: var(--font-size-small);
    width: 100%;
}

.chart-legend__item::before {
    border: 1px solid;
    border-radius: 2px;
    box-sizing: border-box;
    content: "";
    display: inline-block;
    height: 10px;
    margin-inline-end: var(--spacing-100);
    width: 10px;
}

.chart-legend dl > .chart-legend__item:nth-child(1)::before {
    background: var(--color-data-viz-chart-primary);
    border-color: var(--color-data-viz-chart-primary);
}

.chart-legend dl > .chart-legend__item:nth-child(2)::before {
    background: var(--color-data-viz-chart-secondary);
    border-color: var(--color-data-viz-chart-secondary);
}

.chart-legend dl > .chart-legend__item:nth-child(3)::before {
    background: repeating-linear-gradient(
        30deg,
        var(--color-data-viz-chart-tertiary-background),
        var(--color-data-viz-chart-tertiary-background) 2px,
        var(--color-data-viz-chart-tertiary-stroke) 2px,
        var(--color-data-viz-chart-tertiary-stroke) 3px,
        var(--color-data-viz-chart-tertiary-background) 3px,
        var(--color-data-viz-chart-tertiary-background) 4px
    );
    border: 1px solid var(--color-data-viz-chart-tertiary-stroke);
}

.chart-legend dl > .chart-legend__item:nth-child(4)::before {
    background: repeating-linear-gradient(
        0deg,
        var(--color-data-viz-chart-quaternary-background),
        var(--color-data-viz-chart-quaternary-background) 2px,
        var(--color-data-viz-chart-quaternary-stroke) 2px,
        var(--color-data-viz-chart-quaternary-stroke) 3px,
        var(--color-data-viz-chart-quaternary-background) 3px,
        var(--color-data-viz-chart-quaternary-background) 4px
    );
    border: 1px solid var(--color-data-viz-chart-quaternary-stroke);
}

.chart-legend dl > .chart-legend__item:nth-child(5)::before {
    background: var(--color-data-viz-chart-quinary-background);
    border-color: var(--color-data-viz-chart-quinary-stroke);
}

.chart-legend__label {
    flex: 1;
}
