@tooltip-border-color: #e1e1e1;
@tooltip-shadow: 0 3px 6px -4px rgba(0,0,0,.12), 0 6px 16px 0 rgba(0,0,0,.08), 0 9px 28px 8px rgba(0,0,0,.05);
//@tooltip-border-color: #c0c2c8;

.chart-tooltip {
  box-shadow: @tooltip-shadow;
  border: 1px solid @tooltip-border-color;
  //border: 1px solid #c0c2c8;
  color: #3f3f3f;
  border-radius: 2px;
  line-height: 1em;
  font-size: 12px;
  min-height: 50px;
  transition: opacity .2s ease-in;
  position: absolute;
  z-index: 9999;
  //max-width: 100%;
  display: flex;
  flex-direction: column;
  max-height: 400px;

  &.fixed {
    position: fixed;
  }

  &.hide {
    display: none;
  }

  &.in-chart {
    transform: translateY(-50%);

    .tooltip-top-kick {
      transform: rotate(-45deg) skew(10deg, 10deg) translate(30%, -40%) !important;
    }
  }

  .tooltip-container {
  }

  .tooltip-top-kick {
    background-color: #fff;
    box-shadow: @tooltip-shadow;
    border: 1px solid @tooltip-border-color;
    height: 20px;
    left: 18px;
    position: absolute;
    transform: rotate(45deg) skew(10deg, 10deg) translate(-70%, 16%);
    width: 20px;
    z-index: 1;
  }

  .tooltip-title {
    border-bottom: 1px solid @tooltip-border-color;
    position: relative;
    background: #fff;
    z-index: 2;
    padding: 0.5em 0.5em;
    white-space: nowrap;
    color: #3f3f3f;
    font-family: monospace;
    display: flex;
    /*justify-content: space-between;*/
    align-items: center;
    flex-shrink: 0;
    border-radius: 5px 5px 0 0;
    //overflow: hidden;

    time {
      flex: 1 0 auto;
      text-align: center;
    }

    .tooltip-btn {
      padding-right: 5px !important;
      padding-left: 5px !important;
      vertical-align: middle;

      & > i {
        line-height: 22px !important;
        font-size: 14px;
      }
    }
  }

  .tooltip-content-wrapper {
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.6em;
    position: relative;
    z-index: 2;
    background: #fff;
    color: #5c5e62;
    width: 100%;
    flex: 1;
    border-radius: 0 0 5px 5px;

    .tooltip-content {
      width: 100%;
      display: table;

      .tooltip-list-item {
        display: table-row;
        transition: opacity 0.25s;

        &.unselected {
          opacity: 0.35;
        }

        .tooltip-color {
          display: table-cell;
          width: 10px;
          padding: 5px 3px;

          .tooltip-icon {
            display: inline-block;
            width: 10px;
            height: 10px;
            border-radius: 50%;
          }
        }

        .tooltip-key {
          display: table-cell;
          padding: 0 0.6em;
          text-align: left;
          cursor: pointer;
          white-space: nowrap;
        }

        .tooltip-value {
          display: table-cell;
          padding-left: 15px;
          text-align: right;
          font-family: monospace;
        }
      }
    }
  }
}
