/* Mobile: make Elementor Nested Tabs heading swipeable (swiper-like)
   Usage: add class "mob-n-tabs-swiper" to the Nested Tabs widget container */

@media (max-width: 767px){
  .mob-n-tabs-swiper{
    /* Elementor uses CSS vars; override to prevent wrapping on mobile */
    --n-tabs-heading-wrap: nowrap !important;
    --n-tabs-heading-overflow-x: auto !important;
    --n-tabs-title-white-space: nowrap !important;
  }

  /* Optional: allow line breaks inside tab titles (text only), while keeping the heading itself horizontal.
     Usage: add class "mob-n-tabs-swiper--multiline" alongside "mob-n-tabs-swiper" on the widget. */
  .mob-n-tabs-swiper.mob-n-tabs-swiper--multiline{
    --n-tabs-title-white-space: normal !important;
  }

  .mob-n-tabs-swiper .e-n-tabs-heading{
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px;

    /* Ensure the heading behaves as a true scroll container (not sized oddly by inline styles)
       so the first tab is reachable/visible without hacks like width:260%. */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    justify-content: flex-start;

    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;

    /* proximity = doesn't fight the user's finger; still feels swiper-like */
    scroll-snap-type: x proximity;
    scroll-padding-left: 16px;
    scroll-padding-right: 16px;

    padding: 0 16px 12px;
    margin: 0;

    touch-action: auto;
  }

  /* Hide scrollbar */
  .mob-n-tabs-swiper .e-n-tabs-heading::-webkit-scrollbar{display:none}
  .mob-n-tabs-swiper .e-n-tabs-heading{scrollbar-width:none}

  .mob-n-tabs-swiper .e-n-tab-title{
    flex: 0 0 auto;
    width: auto !important;
    scroll-snap-align: start;
  }

  .mob-n-tabs-swiper .e-n-tab-title-text{
    white-space: nowrap;
  }

  .mob-n-tabs-swiper.mob-n-tabs-swiper--multiline .e-n-tab-title-text{
    white-space: normal;
  }
}
