/**
 * Mobile slider for longevity intro + package benefits blocks.
 * Active only below 767px.
 */

.bc-home-slider {
  position: relative;
}

.bc-home-slider__track {
  display: block;
}

.bc-home-slider__dots {
  display: none;
}

@media (max-width: 766px) {
  .bc-home-slider {
    margin-inline: 0;
  }

  .bc-home-slider__track {
    display: flex;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .bc-home-slider__track::-webkit-scrollbar {
    display: none;
  }

  .bc-home-slider__track > .block {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    box-sizing: border-box;
  }

  /* Hide Drupal contextual UI from affecting slide width */
  .bc-home-slider__track > .block > .contextual {
    position: absolute;
  }

  .bc-home-slider__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 0;
    list-style: none;
  }

  .bc-home-slider__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
  }

  .bc-home-slider__dot.is-active {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.15);
  }

  .bc-home-slider__dot:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }
}
