@import "../tfl-lib";


/* ------------------ Slider Arrow Styles ------------------- */

.tfl-posts-slider, .tfl-posts-gridbox-slider, .tfl-posts-multislider {

  .slick-prev, .slick-next {
    &:before {
      display: block;
      font-size: inherit;
      line-height: inherit;
      color: inherit;
      font-family: 'tfl-icomoon' !important;
      margin: 0;
      padding: 0;
    }
  }

  .slick-prev:before {
    content: "\f104";
  }

  .slick-next:before {
    content: "\f105";
  }

  .slick-prev, .slick-next {
    cursor: pointer;
    width: 34px;
    height: 34px;
    display: inline-block;
    vertical-align: top;
    font-size: 18px;
    position: absolute;
    top: auto;
    right: auto;
    left: auto;
    bottom: auto;
    z-index: 10;
    line-height: 34px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    &:hover {
      &:before {
        color: inherit;
      }
    }
  }

  .tfl-slider-arrow-placement-middle-center & {
    .slick-prev, .slick-next {
      top: 50%;
      margin-top: -18px;
      /* transform: translateY(-50%); */
    }
    .slick-prev {
      left: 10px;
    }
    .slick-next {
      right: 10px;
    }
  }

  .tfl-slider-arrow-placement-middle-center.tfl-slider-arrow-shape-square & {

    .slick-prev {
      left: 0;
    }

    .slick-next {
      right: 0;
    }
  }

  .tfl-slider-arrow-placement-bottom-center & {
    .slick-prev, .slick-next {
      bottom: 0;
      left: 50%;
      transform: translateY(42px);
    }
    .slick-prev {
      margin-left: -36px;
    }
    .slick-next {
      margin-left: 2px;
    }
  }

  .tfl-slider-arrow-placement-bottom-right & {
    .slick-prev, .slick-next {
      bottom: 20px;
    }
    .slick-prev {
      right: 65px;
    }

    .slick-next {
      right: 25px;
    }
  }

  .tfl-slider-arrow-placement-bottom-left & {
    .slick-prev, .slick-next {
      bottom: 20px;
    }
    .slick-prev {
      left: 25px;
    }

    .slick-next {
      left: 65px;
    }
  }

  .tfl-slider-arrow-placement-top-right & {
    .slick-prev, .slick-next {
      top: 20px;
    }
    .slick-prev {
      right: 65px;
    }

    .slick-next {
      right: 25px;
    }
  }

  .tfl-slider-arrow-placement-top-left & {
    .slick-prev, .slick-next {
      top: 20px;
    }
    .slick-prev {
      left: 25px;
    }

    .slick-next {
      left: 65px;
    }
  }

  .tfl-slider-arrow-shape-square & {
    .slick-prev, .slick-next {
      border-radius: 0;
    }
  }
  .tfl-slider-arrow-shape-rounded-corners & {
    .slick-prev, .slick-next {
      border-radius: 5px;
    }
  }
  .tfl-slider-arrow-shape-circle & {
    .slick-prev, .slick-next {
      border-radius: 50%;
    }
  }
  .tfl-slider-arrow-visibility-on-hover & {

    .slick-prev, .slick-next {
      opacity: 0;
      @include respond-to-max(1200) {
        opacity: 0.8;
      }
    }

    &:hover {
      .slick-prev, .slick-next {
        opacity: 0.8;
      }
    }

    .slick-prev, .slick-next {
      &:hover {
        opacity: 1.0;
      }
    }
  }

  .tfl-slider-arrow-visibility-always & {
    .slick-prev, .slick-next {
      opacity: 0.8;
    }

    .slick-prev, .slick-next {
      &:hover {
        opacity: 1.0;
      }
    }
  }

  .tfl-slider-arrow-color-light & {
    .slick-prev, .slick-next {
      background: #fff;
      color: #010101;
    }
  }

  .tfl-slider-arrow-color-dark & {
    .slick-prev, .slick-next {
      background: #000;
      /* background: rgba(0, 0, 0, 0.8); */
      color: #fff;
    }
  }
}

/* ----------------------------------------------------------- Posts Slider and Posts GridBox Slider Widget ----------------------------------------- */

.tfl-posts-slider, .tfl-posts-gridbox-slider, .tfl-posts-multislider {
  .tfl-post-meta {
    margin-top: 15px;
  }
}

.tfl-posts-slider {
  .slick-slide > div {
    line-height: 0;
  }

  .tfl-post-entry {
    position: relative;
    line-height: normal;
  }

  .tfl-post-featured-img-bg {
    width: 100%;
    height: 400px;
  }

  .tfl-post-featured-img-bg {
    margin: 0;
  }
}

.tfl-posts-slider-style-1, .tfl-posts-slider-style-2, .tfl-posts-slider-style-3, .tfl-posts-slider-style-7, .tfl-posts-slider-style-8 {

  .tfl-post-text {

    .tfl-terms, .tfl-terms a, .tfl-post-title a, .tfl-post-meta, .tfl-post-meta a, .tfl-read-more, .tfl-post-summary {
      color: #fff;
    }

    .tfl-post-meta a {
      color: rgba(255, 255, 255, .75);
    }

    .tfl-terms, .tfl-terms a {
      &:hover {
        color: #ddd;
      }
    }
  }
}

.tfl-posts-slider-style-1, .tfl-posts-slider-style-2, .tfl-posts-slider-style-3, .tfl-posts-slider-style-4, .tfl-posts-slider-style-5, .tfl-posts-slider-style-6, .tfl-posts-slider-style-7, .tfl-posts-slider-style-8 {

  .tfl-post-text {
    .tfl-post-meta a, .tfl-post-meta span, .tfl-terms a, .tfl-read-more {
      text-transform: uppercase;
      font-size: 0.625rem;
    }

    .tfl-post-title {
      margin: 10px 0 0 0;
    }

    .tfl-post-meta span + span {
      margin: 0 0 0 5px;

      &:before {
        margin-right: 5px;
        content: "\b7";
      }
    }

    .tfl-terms, .tfl-terms a {
      border: none;
    }

    .tfl-post-summary {
      margin-top: 20px;
      font-size: 0.875rem;
      line-height: 1.5;
    }
  }
}

.tfl-posts-slider-style-1, .tfl-posts-slider-style-2 {

  .tfl-post-featured-img-bg:before {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    content: "";
    transition: all .2s ease;
    background-color: rgba(40, 40, 40, 0.125);
  }
}

.tfl-posts-slider-style-1, .tfl-posts-slider-style-3, .tfl-posts-slider-style-4 {
  .tfl-post-text-wrap {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    margin: 0;
    padding: 0 25px;
    z-index: 99;
  }
}

.tfl-posts-slider-style-1 {
  .tfl-post-text-wrap {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    margin: 0;
    padding: 0 25px;
    z-index: 99;
  }

  .tfl-post-text {
    position: relative;
    display: block;
    text-align: center;
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 12px;

    .tfl-post-title a {
      font-size: 3rem;
      line-height: 1.2;
      @include respond-to-max(640) {
        font-size: 2.25rem;
      }
    }

    .tfl-read-more {
      border: none;
      background: #282828;
      color: #eee;
      padding: 8px 16px;
      margin-top: 25px;

      &:hover {
        background: #4e4e4e;
      }
    }
  }
}

.tfl-posts-slider-style-2 {

  .tfl-post-text-wrap {
    position: absolute;
    bottom: 0;
    width: 100%;
    margin: 0;
    z-index: 99;
  }

  .tfl-post-text {
    position: relative;
    display: block;
    text-align: left;
    max-width: 680px;
    width: 100%;
    margin: 0;
    padding: 42px;

    .tfl-post-title a {
      font-size: 2.25rem;
      line-height: 1.2;
      font-weight: normal;
      @include respond-to-max(640) {
        font-size: 1.75px;
      }
    }
  }
}


/* ------------------ Posts Grid Box Slider and Posts Multislider ----------------------- */


.tfl-posts-gridbox-item, .tfl-posts-multislider-item {
  position: relative;

  .tfl-post-entry {
    height: 100%;
  }

  .tfl-post-featured-img-bg {
    height: 100%;
  }

  .tfl-post-featured-img-bg {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    transition: all 200ms linear;

    &::before {
      position: absolute;
      z-index: 0;
      left: 0;
      top: 0;
      right: 0;
      bottom: 0;
      content: '';
      background-color: rgba(40, 40, 40, 0.125);
      transition: all 200ms linear;
    }
  }

  .tfl-post-text {
    .tfl-post-title a {
      margin: 0;
    }

    & > * + * {
      margin: 10px 0 0 0;
    }

    .tfl-post-meta {
      margin-top: 15px;
    }

    .tfl-post-meta span + span {
      margin: 0 0 0 5px;

      &:before {
        margin-right: 5px;
        content: "\b7";
      }
    }
  }

  .tfl-post-text {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;

    .tfl-terms, .tfl-terms a {
      color: #999;
      font-size: 0.625rem;
      line-height: 1;
      text-transform: uppercase;

      &:hover {
        color: #666;
      }
    }

    .tfl-post-title {
      font-size: 0;
      line-height: 1;

      a {
        color: #000;
        font-size: 1.3125rem;
        line-height: 1.2;

        &:hover {
          color: #333;
        }
      }
    }

    .tfl-post-meta {
      font-size: 0.625rem;
      line-height: 1.5;

      span {
        color: #777;
        font-size: 0.625rem;
        line-height: 1.2;
        text-transform: uppercase;

        a {
          color: #888;

          &:hover {
            color: #555;
          }
        }
      }
    }

    .tfl-post-summary {
      font-size: 0.875rem;
      line-height: 1.5;
    }

    .tfl-read-more {
      line-height: 1;
      color: #fff;
      border: 1px solid rgba(0, 0, 0, 0.75);
      background: rgba(0, 0, 0, 0.75);

      &:hover {
        border: 1px solid rgba(0, 0, 0, 0.95);
        background: rgba(0, 0, 0, 0.95);
      }
    }
  }

  .tfl-post-overlay {
    .tfl-post-text {
      z-index: 99;
      position: absolute;
      left: 0;
      right: 0;
      padding: 20px;

      .tfl-terms, .tfl-terms a {
        color: #fff;
        color: rgba(255, 255, 255, 0.9);
      }

      .tfl-terms a:hover {
        text-decoration: underline;
      }

      .tfl-post-title {
        color: #fff;

        a {
          color: #fff;

          &:hover {
            text-decoration: underline;
          }
        }
      }

      .tfl-post-meta {
        color: #fff;

        span {
          color: #fff;
        }

        span a {
          color: #DEDEDE;

          &:hover {
            color: #fff;
          }
        }
      }

      .tfl-post-content {
        color: #fff;

        .tfl-read-more {
          color: #fff;
          border: 1px solid #fff;
          background: transparent;

          &:hover {
            background: rgba(255, 255, 255, 0.3);
          }
        }
      }
    }
  }
}

.tfl-posts-gridbox-item, .tfl-posts-multislider-item {

  &.tfl-align-top-left, &.tfl-align-top-right, &.tfl-align-top-center {
    .tfl-post-overlay {
      .tfl-post-text {
        top: 0;
      }
    }
  }

  &.tfl-align-middle-center, &.tfl-align-middle-left, &.tfl-align-middle-right {
    .tfl-post-overlay {
      .tfl-post-text {
        top: 50%;
        transform: translateY(-50%);
      }
    }
  }

  &.tfl-align-bottom-center, &.tfl-align-bottom-left, &.tfl-align-bottom-right {
    .tfl-post-overlay {
      .tfl-post-text {
        bottom: 0;
      }
    }
  }

  &.tfl-align-top-left, &.tfl-align-bottom-left, &.tfl-align-middle-left, &.tfl-align-left {
    .tfl-post-text {
      align-items: flex-start;
      text-align: left;
    }
  }

  &.tfl-align-top-center, &.tfl-align-bottom-center, &.tfl-align-middle-center, &.tfl-align-center {
    .tfl-post-text {
      align-items: center;
      text-align: center;
    }
  }

  &.tfl-align-top-right, &.tfl-align-bottom-right, &.tfl-align-middle-right, &.tfl-align-right {
    .tfl-post-text {
      align-items: flex-end;
      text-align: right;
    }
  }
}

/* --- Style 1 --------- */
.tfl-posts-gridbox-slider-style-1 {

  .tfl-posts-gridbox {
    display: grid;
    grid-gap: 1px;
    grid-template-columns: 1fr;
    grid-template-areas: 'tile1' 'tile1' 'tile2' 'tile3';

    .tfl-posts-gridbox-item:nth-child(1) {
      grid-area: tile1;
    }

    .tfl-posts-gridbox-item:nth-child(2) {
      grid-area: tile2;
    }

    .tfl-posts-gridbox-item:nth-child(3) {
      grid-area: tile3;
    }

    @media (min-width: 760px) {
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-template-areas: 'tile1 tile1' 'tile2 tile3';
      grid-gap: 2px;
    }
    @media (min-width: 1024px) {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr 1fr;
      grid-template-areas: 'tile1 tile1 tile2 tile2' 'tile1 tile1 tile3 tile3';
      grid-gap: 2px;
    }
  }
}

/* --- Style 2 --------- */
.tfl-posts-gridbox-slider-style-2 {

  .tfl-posts-gridbox {
    display: grid;
    grid-gap: 1px;
    grid-template-columns: 1fr;
    grid-template-areas: 'tile1' 'tile1' 'tile2' 'tile3' 'tile4' 'tile5';

    .tfl-posts-gridbox-item:nth-child(1) {
      grid-area: tile1;
    }

    .tfl-posts-gridbox-item:nth-child(2) {
      grid-area: tile2;
    }

    .tfl-posts-gridbox-item:nth-child(3) {
      grid-area: tile3;
    }

    .tfl-posts-gridbox-item:nth-child(4) {
      grid-area: tile4;
    }

    .tfl-posts-gridbox-item:nth-child(5) {
      grid-area: tile5;
    }

    @media (min-width: 760px) {
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-template-areas: 'tile1 tile1' 'tile1 tile1' 'tile2 tile3' 'tile4 tile5';
      grid-gap: 2px;
    }
    @media (min-width: 1024px) {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr 1fr;
      grid-template-areas: 'tile1 tile1 tile2 tile3' 'tile1 tile1 tile4 tile5';
      grid-gap: 2px;
    }
  }
}

/* --- Style 3 --------- */
.tfl-posts-gridbox-slider-style-3 {

  .tfl-posts-gridbox {
    display: grid;
    grid-gap: 1px;
    grid-template-columns: 1fr;
    grid-template-areas: 'tile1' 'tile2' 'tile3' 'tile4' 'tile5';

    .tfl-posts-gridbox-item:nth-child(1) {
      grid-area: tile1;
    }

    .tfl-posts-gridbox-item:nth-child(2) {
      grid-area: tile2;
    }

    .tfl-posts-gridbox-item:nth-child(3) {
      grid-area: tile3;
    }

    .tfl-posts-gridbox-item:nth-child(4) {
      grid-area: tile4;
    }

    .tfl-posts-gridbox-item:nth-child(5) {
      grid-area: tile5;
    }

    .tfl-posts-gridbox-item .tfl-post-text .tfl-post-content .tfl-post-summary {
      display: none;
    }

    @media (min-width: 760px) {
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-template-areas: 'tile1 tile1' 'tile2 tile3' 'tile4 tile5';
      grid-gap: 2px;

    }
    @media (min-width: 1024px) {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
      grid-template-areas: 'tile1 tile1 tile1 tile2 tile2 tile2' 'tile3 tile3 tile4 tile4 tile5 tile5';
      grid-gap: 2px;

      .tfl-posts-gridbox-item .tfl-post-text .tfl-post-content .tfl-post-summary {
        display: block;
      }
    }
  }
}

/* ------------- Style 1, 2, 3 Multislider ------------------ */

.tfl-posts-multislider-style-1 {
  .tfl-post-featured-img-bg {
    margin-bottom: 0;
  }
}

.tfl-posts-multislider-style-2, .tfl-posts-multislider-style-3 {
  .tfl-slider-arrow-placement-bottom-right &, .tfl-slider-arrow-placement-bottom-left & {
    button.slick-next, button.slick-prev {
      bottom: -35px;
    }
  }
}

/* ------------- Style 3 Multislider ------------------ */

.tfl-posts-multislider-style-3 {
  .tfl-slider-arrow-placement-middle-center & {
    button.slick-next, button.slick-prev {
      margin-top: -6px;
    }
  }
  .tfl-post-featured-img-bg {
    margin-bottom: 0;
    border-radius: 5px 5px 0 0;
  }

  .tfl-post-text-wrap {
    padding: 25px;
    border: 1px solid #e4e4e4;
    box-shadow: 0 3px 12px 0 rgba(0, 0, 0, .03);
    border-radius: 0 0 5px 5px;
    margin-bottom: 12px;
  }
}

