@import "../../../base/display/set2-template";
@import "../../../slider";
@import "../../../grid";

@font-face {
  font-family: '#{$navigation-icon}';
  src: url('../../fonts/default-template/tvo-default-t-icons.eot?62scwa');
  src: url('../../fonts/default-template/tvo-default-t-icons.eot?#iefix62scwa') format('embedded-opentype'),
  url('../../fonts/default-template/tvo-default-t-icons.woff?62scwa') format('woff'),
  url('../../fonts/default-template/tvo-default-t-icons.ttf?62scwa') format('truetype'),
  url('../../fonts/default-template/tvo-default-t-icons.svg?62scwa#tlp-icon-authorfocused') format('svg');
  font-weight: normal;
  font-style: normal;
}

.tvo-#{$template-name}-template {
  &.tvo-testimonials-display-slider {
    @include tvo-relative;
    padding: 0 $slider-spacing;
    .tvo-item-grid {
      margin-left: 0;
      margin-right: 0;
    }
    .tvo-testimonial-display-item {
      padding: $slider-spacing 0;
      h4 {
        color: $title-color-large;
        font-size: $title-size-large;
        font-weight: $title-weight-large;
        line-height: $title-line-height-large;
        margin-bottom: $title-small-margin-bottom;
        margin-top: 0;
      }
      p {
        color: $font-color;
        font-size: $font-size;
        font-weight: $font-weight;
        line-height: $font-line-height;
        margin-bottom: $font-margin-bottom;
      }
    }
    .tvo-testimonial-name {
      color: $name-color-light;
      font-size: $name-size;
      font-weight: $name-weight;
      line-height: $name-line-height;
    }
    .tvo-testimonial-role {
      color: $name-color-light;
      font-size: $job-size;
      font-weight: $job-weight;
      line-height: $job-line-height;
      a {
        color: inherit;
        text-decoration: none;
      }
    }
    .tvo-image-wrapper {
      min-width: $image-size;
    }
    .tvo-testimonial-quote {
      position: absolute;
      left: 15px;
      top: (-$quotes-line-height);
    }
    .tvo-testimonial-content {
      -webkit-flex: 1;
      flex: 1;
      padding: 0 $grid-item-padding-side 0 ($slider-spacing*1.5);
    }
    .thrlider-nav {
      margin: 0;

      @media (max-device-width: 450px) {
        margin: 0 auto (($slider-spacing -  $bullet-size) /2);
      }

      text-align: center;
      position: relative;
      z-index: 1;
    }
    .thrlider-navItem {
      @media (min-width: 451px) {
        float: none;
        display: inline-block;
      }
      &:hover {
        .thrlider-navItem-inner {
          background: $bullet-bg-hover;
        }
      }
      .thrlider-navItem-inner {
        border-radius: $bullet-border-radius;
        background: $bullet-bg;
        display: block;
        height: $bullet-size;
        margin: 0 5px;
        width: $bullet-size;
      }
    }
    .thrlider-prev, .thrlider-next {
      margin: auto;
      position: absolute;
      top: 140px;
      transform: translateY(-50%);
    }
    .thrlider-prev {
      left: ($slider-spacing/3);
    }
    .thrlider-next {
      right: ($slider-spacing/3);
    }
  }
  [id*='thrlider'] {
    &:after {
      background: $navigation-bg;
      border-bottom: 1px solid $testimonial-info-border;
      content: '';
      display: block;
      height: $slider-spacing;
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
    }
  }
}

@media (max-width: 940px) {
  .tvo-set2-template.tvo-testimonials-display-slider .tvo-image-wrapper {
    min-width: 100%;
    margin-bottom: 10px;
  }
  .tvo-set2-template.tvo-testimonials-display-slider {
    padding: 0;
  }
  .tvo-set2-template [id*='thrlider']:after {
    border-left: 1px solid $testimonial-info-border;
    border-right: 1px solid $testimonial-info-border;
  }
}

@media (max-width: 540px) {
  .tvo-set2-template.tvo-testimonials-display-slider .tvo-testimonial-quote {
    text-align: center;
    position: relative;
    left: 0;
    right: 0;
  }
  .tvo-set2-template.tvo-testimonials-display-slider h4 {
    @include center-text;
  }
  .tvo-set2-template.tvo-testimonials-display-slider .tvo-testimonial-content {
    padding: 0 20px;
  }
  .tvo-set2-template.tvo-testimonials-display-slider {
    .tvo-image-wrapper, .tvo-testimonial-content {
      -webkit-flex-basis: 100%;
      flex-basis: 100%;
    }
  }
}
