/* line chart elements */
svg.ct-chart-bar, svg.ct-chart-line{
  overflow: visible;
}
.ct-line, .ct-point { /* to make points visible assign bigger value than for line */
  stroke-width: 3px;
}
.ct-dagger {
  fill: #0544d3;
	fill-opacity: 1;
}

/* set colours for lines (lines are listed from the bottom - 'Untreated' - to the top one - 'Cetaphil DA Lotion') */
.ct-series-a .ct-line, .ct-series-a .ct-point { /* Untreated */
  stroke: #ACABBF;
}
.ct-series-b .ct-line, .ct-series-b .ct-point { /* Aveeno DM Lotion */
  stroke: #82A0AE;
}
.ct-series-c .ct-line, .ct-series-c .ct-point { /* CeraVe Lotion */
  stroke: #828383;
}
.ct-series-d .ct-line, .ct-series-d .ct-point { /* Eucerin(+) Lotion */
  stroke: #B0A57A;
}
.ct-series-e .ct-line, .ct-series-e .ct-point { /* Cetaphil Lotion */
  stroke: #19AB4B;
  stroke-width: 4px;
}
.ct-series-f .ct-line, .ct-series-f .ct-point { /* Cetaphil DA Lotion */
  stroke: #10ABDF;
  stroke-width: 4px;
}
.ct-chart .ct-grid.ct-horizontal.axis{stroke:dimgray; stroke-dasharray: none;}
.ct-chart .ct-grid.ct-vertical.axis{stroke:dimgray; stroke-dasharray: none;}

/* axis labels */
.ct-label {
  font-size: 1.2rem;
	color: #0544d3;
}
.ct-label.ct-horizontal.ct-end {
  display: block;
  text-align: center;
  white-space: nowrap;
}
@media (max-width: 1199px) {
  .ct-label.ct-horizontal.ct-end {
    text-align: right;
    transform: translate(0,0) rotate(-45deg); /* tilt X axis labels 45 degress counter-clockwise */
  }
}


/* axis titles */
/* https://stackoverflow.com/questions/29311970/how-to-add-axis-title-in-chartist */
[data-y-axis]::after {
  content: attr(data-y-axis);
  position: absolute;
  top: 40%;
  left: -8px;
  font-size: 1.2rem;
  line-height: 1.1;
  color: #0544d3;
  text-align: center;
  transform: translateX(-50%) rotate(-90deg);
  width: 50%;
}

/* legend -> */
.c-legend {
	position: absolute;
	top: 1rem;
	right: 1rem;
  padding: 10px;
  /* border:black 1px solid; */
  font-size: 1rem;
	color: #0544d3;
	max-width: 300px;
	z-index: 1;
}
.c-legend-value {
  display: flex;
	align-items: center;
	line-height: 1.5;
}
.c-legend-block {
  min-width: 40px;
  height: 20px;
  border: #bbb solid 1px;
  background-color: #D3D3D3;
}
.c-legend-label {
		margin-left: 4px;
		margin-right: 16px;
}
.c-legend-line {
  stroke-width: 7px;
}
.c-legend-point {
}
.c-legend-variance {
  text-align: right;
}
/* <- legend */

/* adjust for small devices */
@media (max-width: 767px) {
  .ct-line, .ct-point { /* to make points visible assign bigger value than for line */
    stroke-width: 3px;
	}
  .ct-dagger {
    stroke-width: 2px;
    transform-box: fill-box;
    transform: scale(1.0) translateX(0px) translateY(0px);
  }
	.ct-label {
    font-size: 0.9rem;
  }
  [data-y-axis]::after {
    left: 0px;
    top: 35%;
    font-size: 0.9rem;
	}
  .c-legend {
    position: absolute;
    top: 100%;
    right: 0px;
    left: 0px;
    display: flex;
    justify-content: center;
    flex-flow: wrap;
    align-items: center;
    max-width: 100%;
    padding: 0px;
    font-size: 0.9rem;
    line-height: 1.1;
  }
  .c-legend-value {
    line-height: 1.1;
    margin-bottom: 4px;
    margin-right: 0;
    width: 110px;
  }
  .c-legend-block {
    height: 16px;
		min-width: 16px;
  }
  .c-legend-label {
    margin-left: 4px;
		margin-right: 8px;
		text-align: left;
  }
  .c-legend-line {
    stroke-width: 3px;
    transform: scaleX(0.5)
  }
  .c-legend-point {
    transform: translateY(25%) scale(0.5);
  }
  .c-legend-variance {
    margin-top: 0.25rem;
    text-align: right;
    padding-left: 20px;
  }
}

/* adjust for small devices */
@media (max-width: 575px) {
  .c-legend-value {
    width: 105px;
  }
  .c-image {
    padding-top: 32px;
  }
}

/* adjust for really small devices */
@media (max-width: 374px) {
  .c-chart-title {
    font-size: 1rem;
  }
  .c-legend {
    font-size: 0.75rem;
    left: 8px;
  }
  .c-legend-value {
    width: 100px;
  }
  .ct-label {
    font-size: 0.75rem;
  }
  [data-y-axis]::after {
    font-size: 0.75rem;
  }
  .c-legend-variance {
    margin-top: 0.25rem;
  }
}

/* adjust for large devices */
@media (min-width: 1200px) {
  .c-chart {
    margin-left: 20%;
  }
  .ct-label {
  }
  [data-x-axis]::before {
    top: 80%;
    font-size: 1.5rem;
  }
  [data-y-axis]::after {
    top: 33%;
    left: -4%;
    font-size: 1.5rem;
    width: 42%;
  }
  .c-legend {
    font-size: 1.25rem;
    left: 45%;
  }
}

/* default chart settinigs for small width on desktops */
@media only screen 
  and (min-device-width: 1200px) 
  and (max-width: 1200px) {
    .ct-label {
      font-size: 1rem;
    }
    [data-x-axis]::before {
      font-size: 1rem;
    }
    [data-y-axis]::after {
      font-size: 1rem;
    }
    .c-legend {
      font-size: 1rem;
    }
}
@media only screen 
  and (min-device-width: 1200px) 
  and (max-width: 767px) {
    .ct-label {
      font-size: 0.9rem;
    }
    [data-x-axis]::before {
      font-size: 0.9rem;
    }
    [data-y-axis]::after {
      font-size: 0.9rem;
      width: 30%;
      top: 30%;
      left: -8px;
    }
    .c-legend {
      font-size: 0.75rem;
      left: 10%;
    }
}
@media only screen 
  and (min-device-width: 1200px) 
  and (max-width: 767px) {
    .ct-label {
      font-size: 0.75rem;
    }
    [data-x-axis]::before {
      font-size: 0.75rem;
    }
    [data-y-axis]::after {
      font-size: 0.75rem;
      width: 30%;
      top: 30%;
      left: -8px;
    }
    .c-legend {
      font-size: 0.75rem;
    }
}

