/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
@import "~@bentley/ui-core/lib/ui-core/style/themecolors";

.timeline-component {
  box-sizing: border-box;
  background: $buic-background-2;
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 8px 16px;
  min-width: 275px;

  > .header {
    display: flex;
    align-items: center;
    height: 38px;
    position: relative;

    > .play-backward {
      border-radius: 3px 0 0 3px;
    }

    > .play-button-step {
      border-left: none;
      border-right: none;
      border-radius: 0;
    }

    > .play-forward {
      border-radius: 0px 3px 3px 0;
    }

    > .current-date {
      font-size: 14px;
      min-width: 180px;
      padding: 8px;
      color: $buic-foreground-body;
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      border-radius: 3px;
      border: solid 1px $buic-background-5;
      background-color: $buic-background-1;
      text-align: center;
      box-sizing: border-box;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }

  .play-button {
    margin-right: 10px;
  }

  > .timeline-timeline {
    margin: 8px 0;
  }

  > .scrubber {
    min-height: 20px;
    display: flex;
    align-items: center;
    position: relative;

    .start-time-container, .end-time-container {
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .start-time, .end-time {
      font-size: 12px;
      color: $buic-foreground-muted;
      text-align: center;
      min-height: inherit;
    }

    .duration-start-time, .duration-end-time {
      font-size: 14px;
      width: 40px;
      color: $buic-foreground-body;
      text-align: center;
      min-height: inherit;
    }

    .start-date, .end-date {
      font-size: 12px;
      color: $buic-foreground-muted;
      padding-bottom: 4px;
    }

    .slider {
      position: relative;
      flex: 1;
      margin: 0 20px;
    }
  }
}

.timeline-settings {
  margin-left: auto;
  font-size: 14px;
  color: $buic-foreground-body;
  cursor: pointer;

  &:hover {
    color: $buic-foreground-activehover;
  }
  &:focus {
    outline: none;
  }
}

.timeline-component.minimized .timeline-settings {
  margin-left: 8px;
  margin-right: -6px;
}

.timeline-component.has-dates .start-time-container {
  margin-right: 8px
}

.timeline-component.has-dates .end-time-container {
  margin-left: 8px
}

.timeline-component.minimized .header,
.timeline-component.minimized .timeline-timeline,
.timeline-component:not(.minimized) .scrubber .start-date,
.timeline-component:not(.minimized) .scrubber .end-date,
.timeline-component:not(.has-dates) .scrubber .start-date,
.timeline-component:not(.has-dates) .scrubber .end-date,
.timeline-component:not(.minimized) .scrubber .play-button,
.timeline-component:not(.minimized) .scrubber .timeline-settings {
  display: none;
}
.separator {
    padding: .5em 0;
    position: relative;

    &:before {
      content: '';
      position: absolute;
      top: 50%;
      left: 4px;
      right: 4px;
      width: auto;
      height: 1px;
      background: #dce0e3;
      transform: translateY(-50%);
    }
  }

