/* -------------------------------- 

File#: _2_chart
Title: Chart
Descr: A plugin to create custom SVG charts
Usage: codyhouse.co/license

-------------------------------- */
/* reset */
*, *::after, *::before {
    box-sizing: border-box;
  }
  
  * {
    font: inherit;
    margin: 0;
    padding: 0;
    border: 0;
  }
  
  body {
    background-color: hsl(0, 0%, 100%);
    font-family: system-ui, sans-serif;
    color: hsl(230, 7%, 23%);
    font-size: 1rem;
  }
  
  h1, h2, h3, h4 {
    line-height: 1.2;
    color: hsl(230, 13%, 9%);
    font-weight: 700;
  }
  
  h1 {
    font-size: 2.0736rem;
  }
  
  h2 {
    font-size: 1.728rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  h4 {
    font-size: 1.2rem;
  }
  
  ol, ul, menu {
    list-style: none;
  }
  
  button, input, textarea, select {
    background-color: transparent;
    border-radius: 0;
    color: inherit;
    line-height: inherit;
    appearance: none;
  }
  
  textarea {
    resize: vertical;
    overflow: auto;
    vertical-align: top;
  }
  
  a {
    color: hsl(250, 84%, 54%);
  }
  
  table {
    border-collapse: collapse;
    border-spacing: 0;
  }
  
  img, video, svg {
    display: block;
    max-width: 100%;
  }
  
  @media (min-width: 64rem) {
    body {
      font-size: 1.25rem;
    }
  
    h1 {
      font-size: 3.051rem;
    }
  
      h2 {
      font-size: 2.44rem;
    }
  
      h3 {
      font-size: 1.75rem;
    }
  
      h4 {
      font-size: 1.5625rem;
    }
  }
  
  /* variables */
  :root {
    /* colors */
    --cl8-color-primary-hsl: 250, 84%, 54%;
    --cl8-color-bg-hsl: 0, 0%, 100%;
    --cl8-color-contrast-high-hsl: 230, 7%, 23%;
    --cl8-color-contrast-higher-hsl: 230, 13%, 9%;
    --cl8-color-contrast-lower-hsl: 240, 4%, 85%;
    --cl8-color-contrast-low-hsl: 240, 4%, 65%;
    --cl8-color-contrast-medium-hsl: 225, 4%, 47%;
    --cl8-color-accent-hsl: 342, 89%, 48%;
  
    /* spacing */
    --cl8-space-sm: 0.75rem;
    --cl8-space-md: 1.25rem;
    --cl8-space-xs: 0.5rem;
  
    /* typography */
    --cl8-text-3xl: 2.488rem;
    --cl8-text-xs: 0.694rem;
    --cl8-text-sm: 0.833rem;
  }
  
  @media(min-width: 64rem){
    :root {
      /* spacing */
      --cl8-space-sm: 1.125rem;
      --cl8-space-md: 2rem;
      --cl8-space-xs: 0.75rem;
  
      /* typography */
      --cl8-text-3xl: 3.815rem;
      --cl8-text-xs: 0.8rem;
      --cl8-text-sm: 1rem;
    }
  }
  
  /* component */
  :root {
    --chart-height: 360px;
    --chart-data-line-stroke-width: 2px;
    --chart-marker-size: 4px;
    --chart-axis-stroke-width: 1px;
    --chart-guides-stroke-width: 1px;
    --chart-y-indicator-dash: 3px;
    --chart-y-indicator-stroke-width: 1px;
    --chart-data-color: hsl(var(--cl8-color-primary-hsl));
    --chart-data-fill-opacity: 0.2;
    --chart-legend-bullet-size: 10px;
  }
  
  .chart__area {
    position: relative;
    height: var(--chart-height); /* Keep the height as is or make it responsive as well */
    max-width: 1440px; /* Limit the maximum width */
    margin-left: auto;
    margin-right: auto; /* Center the chart area if needed */
  }
  
  .chart__svg {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; /* Make SVG responsive */
    height: 100%; /* Adjust height accordingly */
  }
  .chart__svg text {
    fill: hsl(var(--cl8-color-contrast-high-hsl));
  }
  
  .chart__tooltip {
    position: absolute;
    font-size: var(--cl8-text-xs);
    background-color: hsl(var(--cl8-color-contrast-lower-hsl));
    padding: var(--cl8-space-sm);
    pointer-events: none;
    white-space: nowrap;
  }
  
  .chart__bullet {
    display: block;
    width: var(--chart-legend-bullet-size);
    height: var(--chart-legend-bullet-size);
    border-radius: 50%;
    flex-shrink: 0;
  }
  
  .chart__axis-legend {
    font-size: var(--cl8-text-xs);
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
  }
  
  .chart__axis-label {
    font-size: var(--cl8-text-xs);
    pointer-events: none;
  }
  
  .chart__axis {
    pointer-events: none;
    stroke: hsl(var(--cl8-color-contrast-low-hsl));
    stroke-width: var(--chart-axis-stroke-width);
  }
  
  .chart__tick {
    stroke-width: var(--chart-axis-stroke-width);
    stroke: hsl(var(--cl8-color-contrast-low-hsl));
  }
  
  .chart__guides {
    fill: transparent;
    stroke-width: var(--chart-guides-stroke-width);
    stroke: hsl(var(--cl8-color-contrast-lower-hsl));
  }
  
  .chart__dataset {
    pointer-events: none;
  }
  
  .chart__data-line {
    fill: none;
    stroke-width: var(--chart-data-line-stroke-width);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke: var(--chart-data-color);
  }
  
  .chart__data-fill {
    pointer-events: none;
    fill: none;
  }
  
  .chart--area .chart__data-fill {
    fill: var(--chart-data-color);
    opacity: var(--chart-data-fill-opacity);
  }
  
  .chart__marker {
    r: var(--chart-marker-size);
    opacity: 0;
    fill: var(--chart-data-color);
  }
  
  .chart__marker--selected {
    opacity: 1;
  }
  
  .chart__y-indicator {
    stroke-width: var(--chart-y-indicator-stroke-width);
    stroke: hsl(var(--cl8-color-contrast-low-hsl));
    stroke-dasharray: var(--chart-y-indicator-dash);
    pointer-events: none;
  }
  
  .chart__data-bar {
    pointer-events: none;
    fill: var(--chart-data-color);
  }
  
  .chart--column .chart__marker {
    visibility: hidden;
  }
  .chart--column .chart__y-indicator {
    display: none;
  }
  
  /* utility classes */
  .cl8-sr-only {
    position: absolute;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
    padding: 0;
    border: 0;
    white-space: nowrap;
  }
  
  .cl8-color-contrast-medium {
    --cl8-color-o: 1;
    color: hsla(var(--cl8-color-contrast-medium-hsl), var(--cl8-color-o, 1));
  }
  
  .cl8-text-3xl {
    font-size: var(--cl8-text-3xl);
  }
  
  .cl8-text-center {
    text-align: center;
  }
  
  .cl8-text-component :where(h1, h2, h3, h4) {
    line-height: var(--cl8-heading-line-height, 1.2);
    margin-top: calc(var(--cl8-space-md) * var(--cl8-space-multiplier, 1));
    margin-bottom: calc(var(--cl8-space-sm) * var(--cl8-space-multiplier, 1));
  }
  
  .cl8-text-component :where(p, blockquote, ul li, ol li) {
    line-height: var(--cl8-body-line-height, 1.4);
  }
  
  .cl8-text-component :where(ul, ol, p, blockquote, .cl8-text-component__block) {
    margin-bottom: calc(var(--cl8-space-sm) * var(--cl8-space-multiplier, 1));
  }
  
  .cl8-text-component :where(ul, ol) {
    padding-left: 1.25em;
  }
  
  .cl8-text-component ul :where(ul, ol), .cl8-text-component ol :where(ul, ol) {
    padding-left: 1em;
    margin-bottom: 0;
  }
  
  .cl8-text-component ul {
    list-style-type: disc;
  }
  
  .cl8-text-component ol {
    list-style-type: decimal;
  }
  
  .cl8-text-component img {
    display: block;
    margin: 0 auto;
  }
  
  .cl8-text-component figcaption {
    margin-top: calc(var(--cl8-space-xs) * var(--cl8-space-multiplier, 1));
    font-size: var(--cl8-text-sm);
    text-align: center;}
  
  .cl8-text-component em {
    font-style: italic;
  }
  
  .cl8-text-component strong {
    font-weight: bold;
  }
  
  .cl8-text-component s {
    text-decoration: line-through;
  }
  
  .cl8-text-component u {
    text-decoration: underline;
  }
  
  .cl8-text-component mark {
    background-color: hsla(var(--cl8-color-accent-hsl), 0.2);
    color: inherit;
  }
  
  .cl8-text-component blockquote {
    padding-left: 1em;
    border-left: 4px solid hsl(var(--cl8-color-contrast-lower-hsl));
    font-style: italic;
  }
  
  .cl8-text-component hr {
    margin: calc(var(--cl8-space-md) * var(--cl8-space-multiplier, 1)) auto;
    background: hsl(var(--cl8-color-contrast-lower-hsl));
    height: 1px;
  }
  
  .cl8-text-component > *:first-child {
    margin-top: 0;
  }
  
  .cl8-text-component > *:last-child {
    margin-bottom: 0;
  }
  
  .cl8-text-component.cl8-line-height-xs {
    --cl8-heading-line-height: 1;
    --cl8-body-line-height: 1.1;
  }
  
  .cl8-text-component.cl8-line-height-sm {
    --cl8-heading-line-height: 1.1;
    --cl8-body-line-height: 1.2;
  }
  
  .cl8-text-component.cl8-line-height-md {
    --cl8-heading-line-height: 1.15;
    --cl8-body-line-height: 1.4;
  }
  
  .cl8-text-component.cl8-line-height-lg {
    --cl8-heading-line-height: 1.22;
    --cl8-body-line-height: 1.58;
  }
  
  .cl8-text-component.cl8-line-height-xl {
    --cl8-heading-line-height: 1.3;
    --cl8-body-line-height: 1.72;
  }
  
  .cl8-hide {
    display: none !important;
  }
  
  .cl8-opacity-0 {
    opacity: 0;
  }