/* =============================================================================
   Zitat-Slider — Verhalten in scripts/modules/slider.js (via testimonials.js).
   Punkte = Seiten (ab 768px 2 Zitate pro Seite).
   ========================================================================== */

@scope (.testimonials) {
  .testimonial-slider {
    position: relative;
    height: auto;
    padding-top: var(--space-s);
    background-color: transparent;
    text-align: center;
    clear: both;
  }

  .mask {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    overflow: hidden;
    text-align: left;
  }

  .track {
    display: flex;
    align-items: flex-start;
    transition: transform 500ms ease;
  }

  .slide {
    position: relative;
    flex: 0 0 49%;
    min-width: 0;
    margin-right: 2%;
    text-align: left;
  }

  .testimonial_slide {
    padding: var(--space-m);
    border-radius: var(--radius-l);
    background-color: var(--color-ivory);
  }

  .testimonial-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 460px;
    margin-right: 40px;
  }

  .testimonial-quote-icon {
    width: 3rem;
    height: auto;
    margin-bottom: 24px;
    opacity: 0.2;
  }

  .testimonial-quote {
    margin-bottom: var(--space-s);
    font-size: var(--p-large-size);
    line-height: var(--line-height-base);
  }

  .testimonial-info-two {
    display: flex;
    align-items: center;
  }

  .testimonial_author-name {
    font-size: var(--p-size);
    font-weight: var(--font-weight-bold);
  }

  .testimonial-slider-arrow {
    position: absolute;
    z-index: 4;
    inset: 38% -2rem auto auto;
    display: block;
    width: 1.2rem;
    height: 3rem;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: none;
    color: white;
    font-size: 40px;
    line-height: 20px;
    cursor: pointer;
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;

    &.is-left {
      z-index: 3;
      inset-inline: -2rem auto;
    }
  }

  .arrow-icon {
    width: auto;
    height: 100%;
  }

  .testimonial-slider-nav {
    position: static;
    z-index: 2;
    height: 24px;
    margin: var(--space-s) auto 0; /* mehr Luft unter langen Zitaten */
    padding-top: 8px;
    color: var(--color-brown);
    font-size: 8px;
    text-align: center;
  }

  .testimonial-slider-dot {
    position: relative;
    display: inline-block;
    width: 1em;
    height: 1em;
    margin: 0 2px 0.5em;
    border-radius: 100%;
    background-color: rgb(34 34 34 / 40%);
    cursor: pointer;
    transition:
      background-color 100ms,
      color 100ms;

    &[aria-current='true'] {
      background-color: #222;
    }

    &:focus-visible {
      outline: none;
      box-shadow: 0 0 0 2px #fff;
    }
  }

  @media (width <= 991px) {
    .testimonial-slider {
      display: flex;
      flex-flow: column;
      height: 100%;
    }

    .testimonial_slide {
      height: 100%;
    }

    .testimonial-quote {
      overflow: visible;
    }

    .mask {
      height: 100%;
    }
  }

  @media (width <= 767px) {
    .slide {
      flex-basis: 100%;
      margin-right: 0;
    }

    .testimonial_slide {
      flex-direction: column;
      padding: 23px;
    }

    .testimonial-content {
      max-width: none;
      margin-right: 0;
      margin-bottom: 40px;
    }

    .testimonial-quote-icon {
      width: 50px;
      margin-bottom: 16px;
    }

    .testimonial-slider-arrow,
    .testimonial-slider-arrow.is-left {
      display: none;
    }
  }

  @media (width <= 479px) {
    .testimonial-quote-icon {
      width: 40px;
    }

    .testimonial-quote {
      font-size: 18px;
      line-height: 1.4;
    }

    .testimonial-slider-nav {
      max-height: 22px;
    }

    .arrow-icon {
      height: 1.6rem;
    }
  }
}
