/* =========================================================
   CA Tabs Pro V2
   Keep desktop behaviour unchanged.
   On mobile, tabs stay on one line and scroll between fixed
   left/right arrow buttons without widening the page.
========================================================= */

.ca-tabs-container,
.ca-tabs-wrapper,
.ca-tabs-content,
.ca-tab-panel,
.ca-tabs-nav-shell,
.ca-tabs-nav {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.ca-tabs-container,
.ca-tabs-wrapper,
.ca-tabs-content,
.ca-tab-panel {
  width: 100%;
}

/* Desktop tab bar */
.ca-tabs-nav-shell {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  overflow: hidden;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
  background: #fff;
  z-index: 100;
}

.ca-tabs-nav-shell.sticky-tabs {
  position: sticky;
  top: 78px;
}

.ca-tabs-nav {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  width: auto;
  gap: 25px;
  margin: 0;
  padding: 0;
  background: #fff;
}

/* Tab button */
.ca-tab-btn {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  background: none;
  border: none;
  padding: 15px 20px 10px 10px;
  font-family: "montserratbold", sans-serif !important;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  color: #222328;
  cursor: pointer;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.ca-tab-btn:hover,
.ca-tab-btn:focus-visible {
  color: #ff0068;
}

.ca-tab-btn.active {
  color: #ff2d7a;
  border-bottom: 2px solid #ff2d7a;
}

/* Tab content */
.ca-tab-panel {
  display: none;
}

.ca-tab-panel.active {
  display: block;
}

/* Arrow buttons: desktop hidden */
.ca-tabs-arrow {
  display: none;
  flex: 0 0 36px;
  width: 36px;
  min-width: 36px;
  height: 55px;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  background: #fff;
  color: #222328;
  cursor: pointer;
  z-index: 3;
}

.ca-tabs-arrow svg {
  display: block;
  width: 17px;
  height: 17px;
}

.ca-tabs-arrow:hover:not(:disabled),
.ca-tabs-arrow:focus-visible:not(:disabled) {
  color: #ff0068;
}

.ca-tabs-arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

/* Tablet */
@media (max-width: 1024px) {
  .ca-tabs-nav {
    gap: 15px;
  }

  .ca-tab-btn {
    font-size: 14px;
  }
}

/* =========================================================
   Mobile
========================================================= */
@media (max-width: 768px) {

  /* Prevent this module from ever increasing document width. */
  .ca-tabs-container,
  .ca-tabs-wrapper,
  .ca-tabs-content,
  .ca-tab-panel {
    /* width: 100% !important; */
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .ca-tabs-nav-shell {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    margin-bottom: 18px;
  }

  /* Both arrows remain inside the viewport at all times. */
  .ca-tabs-arrow {
    display: flex !important;
    flex: 0 0 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 54px;
  }

  .ca-tabs-nav {
    display: flex !important;
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    gap: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .ca-tabs-nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .ca-tab-btn {
    flex: 0 0 auto !important;
    max-width: none !important;
    min-height: 54px;
    padding: 17px 15px 13px;
    font-size: 13px;
    line-height: 18px;
    white-space: nowrap !important;
    overflow: visible !important;
  }

  /* Keep active line inside the tab row. */
  .ca-tab-btn.active {
    border-bottom-width: 2px;
  }

  /* Protect responsive shortcode content from flex intrinsic sizing. */
  .ca-tab-panel > * {
    min-width: 0;
    max-width: 100%;
  }

  /* Timetable cards must be allowed to shrink inside the tab panel. */
  .ca-tab-panel .ca-timetable-wrap,
  .ca-tab-panel .ca-filter-wrapper,
  .ca-tab-panel .ca-mobile-view,
  .ca-tab-panel .ca-tablecard,
  .ca-tab-panel .ca-tablecard-soon,
  .ca-tab-panel .ca-card-content,
  .ca-tab-panel .ca-card-info,
  .ca-tab-panel .ca-card-detail {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .ca-tab-panel .ca-tablecard,
  .ca-tab-panel .ca-tablecard-soon {
    width: 100% !important;
  }

  .ca-tab-panel .ca-card-content {
    flex: 1 1 0 !important;
    overflow-wrap: anywhere;
  }

  .ca-tab-panel .ca-card-value {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .ca-tabs-arrow {
    flex-basis: 32px !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 52px;
  }

  .ca-tabs-arrow svg {
    width: 16px;
    height: 16px;
  }

  .ca-tab-btn {
    min-height: 52px;
    padding: 16px 13px 12px;
    font-size: 12.5px;
    line-height: 17px;
  }
}

.ca-tabs-wrapper .container{
  margin: 0;
  width: min(100% - 0px, var(--ca-container)) !important;
}
