@import '../../_global/styles/mixins';
@import '../../_global/styles/vars';

.card-slider {
  margin: var(--section-margin) 0 var(--section-margin) 0;
  .magazine-article & {
    margin-left: -30px;
    margin-right: -30px;
  }

  &-inner {
    background: var(--theme-color-primary-dimmed-04);
    padding: 33px 30px 0 30px;
    @media(max-width: 645px) {
      padding-left: 20px;
      padding-right: 20px;
    }
  }

  .like-h2 {
    padding: 0 0 32px 0;
    max-width: 870px;
    margin: 0 auto;
  }

  .card-slider-container {
    position: relative;
    padding-bottom: 4rem;
    max-width: 870px;
    margin: 0 auto;
    display: flex;
    @media(max-width: 590px) {
      display: block;
    }
    .card {
      position: relative;
      margin: 0 12px;
      @media(max-width: 590px) {
        margin: 12px 0;
      }
      &:first-child {
        margin-left: 0;
      }
    }
  }

  .slide-overflow {
    overflow: hidden;
    margin-left: -12px;

    .slide-wrapper {
      position: relative;
      display: flex;
      align-items: flex-start;
      width: 37400px;
      contain: layout;
      @media(max-width: 645px) {
        width: 25400px;
      }
    }

    .card {
      &:first-child {
        margin-left: 12px;
      }
      @media(max-width: 590px) {
        margin: 0 12px;
      }
    }

    .prev-clone,
    .next-clone {
      position: absolute;
      display: flex;
      width: 100%;
    }

    .prev-clone {
      position: absolute;
      right: 100%;
      justify-content: flex-end;
    }
  }

  .controls {
    .count {
      display: none;
    }

    .slider-tabs, .tabs {
      position: absolute;
      bottom: 1.8rem;
      left: 50%;
      right: 0;
      padding: 0;
      list-style: none;
      transform: translate(-50%, 0);
      text-align: center;
      font-size: 0;
      line-height: 0;
      margin: 0;
      li {
        display: inline-block;
        vertical-align: top;

        &.active button:before {
          background-color: var(--theme-color-primary);
          //box-shadow: 0 0 0 2px var(--theme-color-primary);
        }
      }

      .btn {
        --button-min-size: 24px;
        font-size: 0;
        line-height: 0;
        display: flex;
        align-items: center;
        justify-content: center;

        &::before {
          content: "";
          position: relative;
          display: block;
          width: 15px;
          height: 15px;
          //border: 2px solid var(--theme-color-primary);
          background-color: var(--theme-color-primary-dimmed-02);
          border-radius: 15px;
          transition: 0.2s ease;
        }

        &::after {
          display: none;
        }

        &:hover {
          background-color: transparent;

          &::before {
            background-color: var(--theme-color-primary);
          }
        }
      }
    }

    button {
      border: 0;
      background-color: transparent;
      padding: 0;
      cursor: pointer;

      &.prev, &.next {
        position: absolute;
        top: -89px;
        width: 60px;
        height: 60px;
        text-align: center;
        line-height: 60px;
        right: 0;
        color: var(--theme-color-primary);
        border-radius: 24px;
        background: var(--theme-color-white);
        --button-hover-shadow-opacity: 0.4;
        --button-hover-shadow-size: 6px;
        @media(max-width: 768px) {
          display: none;
        }

        &:before {
          @include icon-small-arrow-right-simple;
          font-family: "Icons", sans-serif;
          font-size: 30px;
          content: "\e825";
        }

        &:after {
          content: "";
          position: absolute;
          display: block;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          border-radius: var(--border-radius-lg);
          box-shadow: 0 0 0 2px var(--theme-color-primary-dimmed-02);
          opacity: 0;
          transition: 0.3s ease;
        }

        &:hover:after {
          opacity: 0.4;
          box-shadow: 0 0 0 6px var(--theme-color-primary-dimmed-02);
        }
      }

      &.prev {
        right: 70px;
        transform: rotate(180deg);
      }
    }
  }
}