timeline-chart {
  display: block;
  position: relative;

  $leftpart-width: 330px;
  $max-content-height: 400px;

  dl, ul, ol {
    margin: 0;
  }

  > dl {
    padding-top: 1px;
    max-height: $max-content-height;
    overflow-y: auto;
  }

  .line {
    display: flex;

    &-label {
      display: flex;
      width: $leftpart-width;
      height: 24px;
      box-sizing: content-box;
      align-items: center;
      padding-right: 10px;

      > a {
        flex: 1;
      }

      &::before {
        content: "";
        width: 14px;
        height: 14px;
        border-radius: 7px;
        margin-right: 4px;
        flex-shrink: 0;
      }

      &.warn::before {
        background: #F12125;
      }

      &.info::before {
        background: #388EE1;
      }
    }

    &-chart {
      flex: 1;
      position: relative;
      border-bottom: 1px solid #ddd;
      background: #F8F7F8;
      overflow: hidden;

      &-rect {
        background: #00E;
        position: absolute;
        top: 2px;
        bottom: 2px;
        left: 0;
        width: 1px;
        transform-origin: left center;
        animation: timelineMoveRect .8s;

        div {
          width: 1px;
          height: 100%;
          transition: opacity .1s, z-index .1s;
          pointer-events: none;
        }

        &:hover {
          z-index: 2;

          div {
            opacity: .9;
          }
        }
      }
    }
  }

  .timeline-cover {
    display: block;
    position: absolute;
    left: ($leftpart-width + 10px);
    top: 0;
    right: 0;
    bottom: 0;
    width: calc(100% - calc(#{$leftpart-width} + 10px));
    height: calc(100% - 25px);
    pointer-events: none;
    z-index: 10;

    .axis-ticks {
      line {
        stroke-dasharray: 4 10;
      }
    }

    .specified-time-line {
      stroke: rgba(255, 52, 52, 0.48);
      stroke-width: 4px;
    }
  }

  .timeline-axis {
    margin-top: 2px;
    width: calc(100% + 10px);

    .axis-numbers {
      transform: translateX(340px);
    }
  }

  .axis {
    pointer-events: none;

    .tick line {
      stroke: #ACACAC;
    }

    text {
      font: 12px Dosis;
      stroke: none;
    }
  }

  .axis-time {
    position: relative;
    top: -8px;
  }

  .axis path,
  .axis line {
    fill: none;
    stroke: black;
    shape-rendering: crispEdges;
  }

  .indicator {
    pointer-events: none;
    font-size: 12px;

    line {
      stroke: #2d8f89;
      stroke-width: 2px;
      shape-rendering: crispEdges;
    }

    rect {
      fill: rgba(0, 0, 0, .6);
    }

    text {
      fill: white;
      dominant-baseline: middle;
      text-anchor: start;
    }
  }

  .timeline-label {
    font-size: 12px;
  }

  .hidden {
    visibility: hidden;
  }

  .specified-time-line {
    pointer-events: none;
  }
}

@keyframes timelineMoveRect {
  from { transform: none; }
  50% { transform: none; }
}
