@import "../../styles/index.scss";

.chart-container {
  border-radius: 8px;
  padding: 12px 12px 0px 12px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
  transition: all 0.25s ease;
  transform-origin: center center;
  background: #fff;
  height: 100%;
  &.above-chart-component {
    gap: 16px;
  }
  &.card-container {
    box-shadow: 0px 0px 4px 0px $boxShadowColor;
  }
  &.fullscreen-animating {
    animation: expandAnim 0.2s ease forwards;
  }

  &.fullscreen-animating-out {
    animation: collapseAnim 0.2s ease forwards;
  }
  &.expanded {
    padding: 24px;
  }

  .chart-container-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    .chart-container-header-title {
      display: flex;
      align-items: center;
      gap: 6px;
      .chart-container-header-title-text {
        color: $darkColor;
        font-size: $mediumFontSize;
        font-style: normal;
        font-weight: $semiBoldFontWeight;
        line-height: 24px; /* 150% */
      }
    }
    .chart-container-header-actions {
      display: flex;
      gap: 12px;
      align-items: center;
      flex-wrap: wrap;
    }
  }
  .divider-line {
    background: $disabledSecondaryBorder;
    width: 1px;
    height: 16px;
  }
}

.chart-custom-actions {
  display: flex;
  align-items: center;
  gap: 12px; // spacing between user buttons/selects
}

.highcharts-xaxis-labels text,
.highcharts-yaxis-labels text {
  color: $textButtonFontColor !important;
  font-family: $fontFamily;
  font-size: $smallFontSize !important;
  font-weight: $normalFontWeight;
}

/* X & Y Axis Titles */
.highcharts-xaxis .highcharts-axis-title,
.highcharts-yaxis .highcharts-axis-title {
  color: $textButtonFontColor !important;
  font-family: $fontFamily;
  font-size: $normalFontSize !important;
  font-style: normal;
  font-weight: $normalFontWeight;
  line-height: 20px;
}

.tooltip-key {
  font-size: $smallFontSize;
  font-weight: $normalFontWeight;
  line-height: 16px;
}

.tooltip-value {
  font-size: $normalFontSize;
  font-weight: $semiBoldFontWeight;
  line-height: 24px;
}

.highcharts-text-outline {
  stroke-width: 0px;
}

.chart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;

  span {
    color: $inputInfoColor;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
  }
}

// SCALE UP on fullscreen
@keyframes expandAnim {
  0% {
    transform: scale(0.98);
    opacity: 0.6;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

// SCALE DOWN on exit
@keyframes collapseAnim {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.98);
    opacity: 0.6;
  }
}
