@import '~scss/variables';

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.chart {
  position: relative;
  padding: 0;
  background-color: transparent;
}

.center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: $dark;
  font-weight: bold;
  font-size: 16px;
  line-height: 40px;
  animation: fadeIn 1.5s ease;

  p {
    white-space: nowrap;

    strong {
      font-size: 24px;
    }

    span {
      margin: 0 2px;
    }
  }

  &.standard {
    font-size: 20px;
  }

  &.mid {
    font-size: 12px;

    strong {
      font-size: 15px;
    }
  }

  &.mini {
    transform: translate(-50%, -50%) scale(0.72);
  }

  &.white {
    color: $white;

    strong {
      color: $white;
    }
  }

  &.yellow {
    color: $yellow;

    strong {
      color: $yellow;
    }
  }

  &.red {
    color: $red;

    strong {
      color: $red;
    }
  }

  &.white {
    color: $white;

    strong {
      color: $white;
    }
  }

  &.yellow {
    color: $yellow;

    strong {
      color: $yellow;
    }
  }

  &.red {
    color: $red;

    strong {
      color: $red;
    }
  }
}

.tooltip {
  width: auto;
  min-width: 120px;
  padding: 8px 12px;
  color: $white;
  font-size: $size-small;
  line-height: 1.67;
  border-radius: 4px;
  background-color: rgba(36, 46, 66, 0.8);
  box-shadow: 0 6px 12px 0 rgba(2, 5, 8, 0.08), 0 1px 2px 0 rgba(2, 5, 8, 0.08);
  z-index: 100;
}

.label {
  font-weight: bold;
  margin-bottom: 2px;
  white-space: nowrap;
}

.item {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  height: 20px;

  i {
    width: 6px;
    height: 6px;
    margin-right: 7px;
    border-radius: 50%;
    background: $lightest;
    overflow: hidden;
  }

  label {
    margin-right: 3px;
    white-space: nowrap;
  }

  p {
    white-space: nowrap;
  }
}

.legend {
  display: flex;
  align-items: center;
  min-height: 20px;
  line-height: 20px;
  justify-content: center;
  .item {
    display: flex;
    align-items: center;
    padding: 0 4px;
    opacity: 0.85;
    user-select: none;
    cursor: pointer;

    &:hover {
      opacity: 1;
    }

    i {
      width: 6px;
      height: 6px;
      margin-right: 8px;
      background: $lightest;
      pointer-events: none;
      border-radius: 0;
    }
  }
}
