//Timeline bar

/* --------------------------------
Main Components
-------------------------------- */
.jtline {
  /* opacity: 0; */
  color: $theme-text-color;
  margin: $spacing-xxl auto;
  -webkit-transition: opacity 0.2s;
  -moz-transition: opacity 0.2s;
  transition: opacity 0.2s;
}
.jtline::before {
  /* never visible - this is used in jQuery to check the current MQ */
  content: 'mobile';
  display: none;
}
.jtline.loaded {
  /* show the timeline after events position has been set (using JavaScript) */
  opacity: 1;
}
.jtline .timeline {
  position: relative;
  height: 5rem; // 80px;
  width: 100%;
  max-width: calc(#{map-get($grid-breakpoints, "xxl")} - #{$spacing-xxxl});
  margin: 0 auto;
  border-bottom: $border-width solid $border-color;
}
.jtline .events-wrapper {
  position: relative;
  height: 90%;
  margin: -2.5rem 2.5rem 0 2.5rem; // -40px 40px 0 40px;
  overflow: hidden;
}
.jtline .events-wrapper::after, .jtline .events-wrapper::before {
  /* these are used to create a shadow effect at the sides of the timeline */
  content: '';
  position: absolute;
  z-index: 2;
  top: 0;
  height: 100%;
  width: $spacing-xl;
}
.jtline .events-wrapper::before {
  left: 0;
}
.jtline .events-wrapper::after {
  right: 0;
}
.jtline .events {
  /* this is the grey line/timeline */
  position: absolute;
  z-index: 1;
  left: 0;
  top: 3.0625rem; // 49px;
  height: $spacing-xs;
  /* width will be set using JavaScript */
  width: 62.5rem; // 1000px;
  background: $gray-400;
  -webkit-transition: -webkit-transform 0.4s;
  -moz-transition: -moz-transform 0.4s;
  transition: transform 0.4s;
}
.jtline .filling-line {
  /* this is used to create the green line filling the timeline */
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background-color: $theme-primary-color;
  -webkit-transform: scaleX(0);
  -moz-transform: scaleX(0);
  -ms-transform: scaleX(0);
  -o-transform: scaleX(0);
  transform: scaleX(0);
  -webkit-transform-origin: left center;
  -moz-transform-origin: left center;
  -ms-transform-origin: left center;
  -o-transform-origin: left center;
  transform-origin: left center;
  -webkit-transition: -webkit-transform 0.3s;
  -moz-transition: -moz-transform 0.3s;
  transition: transform 0.3s;
}
.jtline .events a {
  position: absolute;
  bottom: 0;
  z-index: 2;
  text-align: center;
  font-size: $font-size-base * 1.25;
  padding-bottom: $spacing-lg;
  color: $link-color;
  /* fix bug on Safari - text flickering while timeline translates */
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  -ms-transform: translateZ(0);
  -o-transform: translateZ(0);
  transform: translateZ(0);
  outline: none;
  &:hover {
    color: $link-hover-color;
  }
  &.selected {
    color: $theme-text-color;
  }
}
.jtline .events a::after {
  /* this is used to create the event spot */
  content: '';
  position: absolute;
  left: 50%;
  right: auto;
  -webkit-transform: translateX(-50%);
  -moz-transform: translateX(-50%);
  -ms-transform: translateX(-50%);
  -o-transform: translateX(-50%);
  transform: translateX(-50%);
  bottom: -$spacing-sm; // -5px;
  height: $spacing-lg; // 15px;
  width: $spacing-lg; // 15px;
  border-radius: 50%;
  border: 2px solid $gray-400;
  background-color: $gray-100;
  -webkit-transition: background-color 0.3s, border-color 0.3s;
  -moz-transition: background-color 0.3s, border-color 0.3s;
  transition: background-color 0.3s, border-color 0.3s;
}
.no-touch .jtline .events a:hover::after {
  background-color: $theme-primary-color;
  border-color: $theme-primary-color;
}
.jtline .events a.selected {
  pointer-events: none;
}
.jtline .events a.selected::after {
  background-color: $theme-primary-color;
  border-color: $theme-primary-color;
}
.jtline .events a.older-event::after {
  border-color: $theme-primary-color;
}
@media only screen and (min-width: 1100px) {
  .jtline {
    margin: 3em auto;
  }
  .jtline::before {
    /* never visible - this is used in jQuery to check the current MQ */
    content: 'desktop';
  }
}

ul.cd-timeline-navigation-second {
  list-style-type: none !important;
  padding: 0;
  top: 25rem; // 400px;
}

.cd-timeline-navigation-second a {
  top: 90%;
  bottom: $spacing-base;
}

.cd-timeline-navigation a {
  top: 64%;
}
.cd-timeline-navigation-second a {
  top: 5.625rem; // 90px;
}

.cd-timeline-navigation a,
.cd-timeline-navigation-second a {
  /* these are the left/right arrows to navigate the timeline */
  position: absolute;
  z-index: 8;
  bottom: auto;
  -webkit-transform: translateY(-50%);
  -moz-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  -o-transform: translateY(-50%);
  transform: translateY(-50%);
  height: 2.125rem; // 34px;
  width: 2.125rem; // 34px;
  list-style-type: none !important;
  text-indent: 100%;
  font-size: 0;
  -webkit-transition: border-color 0.3s;
  -moz-transition: border-color 0.3s;
  transition: border-color 0.3s;
  outline: 0;
  text-decoration: none;
  &::after {
    @include fonttype(solid);
    content: fa-content($fa-var-chevron-circle-right);
    color: $theme-primary-color;
    font-size: $font-size-base * 2;
    top: -$spacing-sm; // -5px;
    position: relative;

  }

  &.inactive::after {
    color: $gray-100;
  }
}

.cd-timeline-navigation a.prev,
.cd-timeline-navigation-second a.prev {
  left: 0;
  -webkit-transform: translateY(-50%) rotate(180deg);
  -moz-transform: translateY(-50%) rotate(180deg);
  -ms-transform: translateY(-50%) rotate(180deg);
  -o-transform: translateY(-50%) rotate(180deg);
  transform: translateY(-50%) rotate(180deg);
}
.cd-timeline-navigation a.next,
.cd-timeline-navigation-second a.next {
  right: 0;
}
.no-touch .cd-timeline-navigation a:hover,
.no-touch .cd-timeline-navigation-second a:hover {
  border-color: $theme-primary-color;
}
.cd-timeline-navigation a.inactive,
.cd-timeline-navigation-second a.inactive {
  cursor: not-allowed;
  pointer-events: none;
}
.cd-timeline-navigation a.inactive::after,
.cd-timeline-navigation-second a.inactive::after {
  background-position: 0 -1rem;
}
.no-touch .cd-timeline-navigation a.inactive:hover,
.no-touch .cd-timeline-navigation-second a.inactive:hover {
  border-color: $gray-400;
}

.jtline .events-content {
  margin:0 auto;
  position: relative;
  overflow: hidden;
  -webkit-transition: height 0.4s;
  -moz-transition: height 0.4s;
  transition: height 0.4s;
}
.jtline .events-content li.lineli {
  position: absolute;
  z-index: 1;
  width: 100%;
  left: 0;
  top: 0;
  -webkit-transform: translateX(-100%);
  -moz-transform: translateX(-100%);
  -ms-transform: translateX(-100%);
  -o-transform: translateX(-100%);
  transform: translateX(-100%);
  opacity: 0;
  -webkit-animation-duration: 0.4s;
  -moz-animation-duration: 0.4s;
  animation-duration: 0.4s;
  -webkit-animation-timing-function: ease-in-out;
  -moz-animation-timing-function: ease-in-out;
  animation-timing-function: ease-in-out;
  list-style: none !important;
}

.jtline .events-content li.selected {
  /* visible event content */
  position: relative;
  z-index: 2;
  opacity: 1;
  -webkit-transform: translateX(0);
  -moz-transform: translateX(0);
  -ms-transform: translateX(0);
  -o-transform: translateX(0);
  transform: translateX(0);
}
.jtline .events-content li.enter-right, .jtline .events-content li.leave-right {
  -webkit-animation-name: cd-enter-right;
  -moz-animation-name: cd-enter-right;
  animation-name: cd-enter-right;
}
.jtline .events-content li.enter-left, .jtline .events-content li.leave-left {
  -webkit-animation-name: cd-enter-left;
  -moz-animation-name: cd-enter-left;
  animation-name: cd-enter-left;
}
.jtline .events-content li.leave-right, .jtline .events-content li.leave-left {
  -webkit-animation-direction: reverse;
  -moz-animation-direction: reverse;
  animation-direction: reverse;
}
.jtline .events-content li > * {
  margin: 0 auto;
  list-style: none !important;
}

.jtline .events a:hover {
  outline: 0;
}
.jtline .events a:focus {
  outline: medium solid $input-focus-border-color;
}

.jtline .timeline .cd-timeline-navigation,
.jtline .timeline .cd-timeline-navigation-second {
  list-style: none !important;
}

.jtline .timeline .cd-timeline-navigation ul li,
.jtline #jtlinesection .timeline .cd-timeline-navigation-second li {
  list-style-type: none !important;
}

.jtline .timeline ol, .ListeOL {
  margin: 0 0 0 0;
  padding: $spacing-xxxl;
}

.jtline .events-content ol {
  margin: $spacing-lg;
  padding: 0 $spacing-xxl;
}

@-webkit-keyframes cd-enter-right {
  0% {
    opacity: 0;
    -webkit-transform: translateX(100%);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateX(0%);
  }
}
@-moz-keyframes cd-enter-right {
  0% {
    opacity: 0;
    -moz-transform: translateX(100%);
  }
  100% {
    opacity: 1;
    -moz-transform: translateX(0%);
  }
}
@keyframes cd-enter-right {
  0% {
    opacity: 0;
    -webkit-transform: translateX(100%);
    -moz-transform: translateX(100%);
    -ms-transform: translateX(100%);
    -o-transform: translateX(100%);
    transform: translateX(100%);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateX(0%);
    -moz-transform: translateX(0%);
    -ms-transform: translateX(0%);
    -o-transform: translateX(0%);
    transform: translateX(0%);
  }
}
@-webkit-keyframes cd-enter-left {
  0% {
    opacity: 0;
    -webkit-transform: translateX(-100%);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateX(0%);
  }
}
@-moz-keyframes cd-enter-left {
  0% {
    opacity: 0;
    -moz-transform: translateX(-100%);
  }
  100% {
    opacity: 1;
    -moz-transform: translateX(0%);
  }
}
@keyframes cd-enter-left {
  0% {
    opacity: 0;
    -webkit-transform: translateX(-100%);
    -moz-transform: translateX(-100%);
    -ms-transform: translateX(-100%);
    -o-transform: translateX(-100%);
    transform: translateX(-100%);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateX(0%);
    -moz-transform: translateX(0%);
    -ms-transform: translateX(0%);
    -o-transform: translateX(0%);
    transform: translateX(0%);
  }
}

#timeline {
  div {
    display: inline-block;
    border-bottom: 0;
    padding: $spacing-base 0 $spacing-xl 0;
    label {
        min-width: 0;
    }
    &.submit {
        padding: $spacing-base 0;
    }
  }
}

// TODO: remove this style when the embedded media video block is fixed to play in timeline
.video-js {
    width: 18.75rem; // 300px;
    height: 9.375rem; // 150px;
}
.vjs-fluid {
    padding-top: 56.25%
}

// version number
.jtline .events-content .lineli.selected .jtline .events-content p {
    margin-top: 1.125rem; // 18px;
    margin-bottom: $spacing-xl;
    font-size: $font-size-lg;
}

.jtline .events-content .container-fluid {
  padding-left: 0;
  padding-right: 0;
}
