/* ==========================================================================
   Section nav (same layout as sn_site_prod's omnibus section nav)
   Pill badges for the in-page / sibling-page navigation rows, styled from
   the markup already in the node bodies:
     - .page-tabs .page-tabs-content            exclusive-* pages, rewards
     - .festive-tabs .festive-tabs-content      festive / campaign pages
     - .pseudo-tabs-container > .pseudo-tabs    section links (no data-url);
       the /offers and rewards filters keep their own look
   Desktop: centered row. Mobile: left-aligned, single row, horizontally
   scrollable with the scrollbar hidden. Active badge = solid fill.
   Behaviour lives in js/section-nav.js.
   Some rules need !important to beat inline styles authored in the body.
   ========================================================================== */

/* defined on the wrappers (not :root) so it follows .dark / [data-theme] */
.page-tabs,
.festive-tabs,
.pseudo-tabs-container:not(:has(a[data-url])) {
  --sn-secnav-line: color-mix(in srgb, var(--foreground) 22%, transparent);
}

/* --- Wrappers ------------------------------------------------------------ */

.page-tabs,
.festive-tabs,
.pseudo-tabs-container:not(:has(a[data-url])) {
  min-width: 0;
  max-width: 100%;
  margin-block: 0 2rem;
  border-top: 1px solid var(--sn-secnav-line);
  border-bottom: 1px solid var(--sn-secnav-line);
  background-color: var(--background);
}

/* .page-tabs is already sticky in _tabs.css */
.festive-tabs,
.pseudo-tabs-container:not(:has(a[data-url])) {
  position: sticky !important;
  top: var(--header-height);
  z-index: 100;
}

/* pinned by js/section-nav.js once the sticky parent has scrolled away */
.page-tabs.sn-secnav--fixed,
.festive-tabs.sn-secnav--fixed,
.pseudo-tabs-container.sn-secnav--fixed:not(:has(a[data-url])) {
  position: fixed !important;
  top: var(--header-height);
  z-index: 100;
  margin: 0 !important;
}

/* /rewards/mysolaire-app wraps the nav in a second .page-tabs */
.page-tabs .page-tabs {
  position: static;
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  margin: 0 !important;
  border: 0;
  background: none;
}

/* The inner .block-content is sized clamp(1200px, 80vw, 1600px) and centred
   with auto margins (_general.css); let it span the bar instead, like
   .block-content.full-width, so the pills centre on the page. */
.page-tabs .block-content,
.festive-tabs .block-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* one nav per page: the festive mobile copy duplicates the desktop one */
.festive-tabs~.festive-tabs-mobile {
  display: none !important;
}

/* Swiper arrows left over from the old mobile slider */
.pseudo-tabs-container:not(:has(a[data-url]))>.pseudo-tabs-button {
  display: none !important;
}

/* --- Scrolling row ------------------------------------------------------- */

.page-tabs .page-tabs-content,
.festive-tabs .festive-tabs-content,
.pseudo-tabs-container:not(:has(a[data-url]))>.pseudo-tabs {
  position: static;
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  /* the pills must not widen flex/grid parents (page zoom-out on mobile) */
  contain: inline-size;
  margin: 0 !important;
  padding: 14px 40px !important;
  list-style: none;
  border-radius: 0;
  background: transparent;
  font-size: inherit;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.page-tabs .page-tabs-content::-webkit-scrollbar,
.festive-tabs .festive-tabs-content::-webkit-scrollbar,
.pseudo-tabs-container:not(:has(a[data-url]))>.pseudo-tabs::-webkit-scrollbar {
  display: none;
}

/* Centered while it fits, left-aligned once it overflows */
.page-tabs .page-tabs-content>a:first-child,
.festive-tabs .festive-tabs-content>a:first-child,
.pseudo-tabs-container:not(:has(a[data-url]))>.pseudo-tabs>a:first-child {
  margin-left: auto !important;
}

.page-tabs .page-tabs-content>a:last-child,
.festive-tabs .festive-tabs-content>a:last-child,
.pseudo-tabs-container:not(:has(a[data-url]))>.pseudo-tabs>a:last-child {
  margin-right: auto !important;
}

/* --- Pill ---------------------------------------------------------------- */

.page-tabs .page-tabs-content>a,
.festive-tabs .festive-tabs-content>a,
.pseudo-tabs-container:not(:has(a[data-url]))>.pseudo-tabs>a {
  position: relative;
  flex: none;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: auto;
  margin: 0;
  padding: 9px 18px;
  border: 1px solid var(--sn-secnav-line) !important;
  border-radius: 999px;
  background-color: transparent;
  color: var(--foreground);
  font-family: var(--text-sans);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: normal;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  opacity: 1;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.page-tabs .page-tabs-content>a[style*="display:none"],
.page-tabs .page-tabs-content>a[style*="display: none"] {
  display: none;
}

/* drop the old underline pseudo elements / decorations */
.page-tabs .page-tabs-content>a::before,
.page-tabs .page-tabs-content>a::after,
.festive-tabs .festive-tabs-content>a::before,
.festive-tabs .festive-tabs-content>a::after,
.pseudo-tabs-container:not(:has(a[data-url]))>.pseudo-tabs>a::before,
.pseudo-tabs-container:not(:has(a[data-url]))>.pseudo-tabs>a::after,
.page-tabs .page-tabs-content>a img,
.page-tabs .page-tabs-content .bg,
.page-tabs .page-tabs-content .line,
.page-tabs .page-tabs-content .line-before,
.page-tabs .page-tabs-content [class|="icon"],
.festive-tabs .festive-tabs-content>a img,
.festive-tabs .festive-tabs-content .bg,
.festive-tabs .festive-tabs-content .line,
.festive-tabs .festive-tabs-content [class|="icon"] {
  display: none !important;
}

.page-tabs .page-tabs-content>a span,
.festive-tabs .festive-tabs-content>a span {
  display: inline;
}

.page-tabs .page-tabs-content>a:hover,
.festive-tabs .festive-tabs-content>a:hover,
.pseudo-tabs-container:not(:has(a[data-url]))>.pseudo-tabs>a:hover {
  border-color: var(--foreground) !important;
  color: var(--foreground);
  opacity: 1;
}

.page-tabs .page-tabs-content>a.active,
.festive-tabs .festive-tabs-content>a.active,
.pseudo-tabs-container:not(:has(a[data-url]))>.pseudo-tabs>a.active {
  border-color: var(--foreground) !important;
  background-color: var(--foreground);
  color: var(--background);
  font-weight: 600;
}

.page-tabs .page-tabs-content>a:focus-visible,
.festive-tabs .festive-tabs-content>a:focus-visible,
.pseudo-tabs-container:not(:has(a[data-url]))>.pseudo-tabs>a:focus-visible {
  outline: 2px solid #8c2230;
  outline-offset: 2px;
}

/* --- Mobile -------------------------------------------------------------- */

@media (max-width: 767px) {

  /* the body field is already full-bleed here, so no negative side margins */
  .page-tabs .page-tabs-content,
  .festive-tabs .festive-tabs-content,
  .pseudo-tabs-container:not(:has(a[data-url]))>.pseudo-tabs {
    padding: 14px 18px !important;
    scroll-padding-inline: 18px;
    scroll-snap-type: x proximity;
  }

  /* left-aligned on mobile */
  .page-tabs .page-tabs-content>a:first-child,
  .festive-tabs .festive-tabs-content>a:first-child,
  .pseudo-tabs-container:not(:has(a[data-url]))>.pseudo-tabs>a:first-child {
    margin-left: 0 !important;
  }

  .page-tabs .page-tabs-content>a,
  .festive-tabs .festive-tabs-content>a,
  .pseudo-tabs-container:not(:has(a[data-url]))>.pseudo-tabs>a {
    scroll-snap-align: start;
    font-size: 11.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}

/* ==========================================================================
   Content-switching tabs — same pills and hairlines, not sticky
   Tabs that swap or filter content in place:
     - .slider-tab / .slider-tab-2   tower switch, dining and offer filters,
                                     language switches (script.js)
     - .pseudo-tabs filters          /offers hash filter, rewards tier table,
                                     /solaire-rewards-offers (offers-swiper.js)
     - .promotion-tabs .nav-tabs__list   chocnut (promotion-tabs.js)
   Same hairline above and below the row as the section nav. They stick
   under the header while the content they switch is on screen (their
   parent's extent, native sticky), stacked below a sticky section nav when
   the page has one (--sn-secnav-offset, set by js/section-nav.js). The
   promotion tabs don't stick: that component is only as tall as its slider.
   Desktop: centered row. Mobile: one left-aligned row that scrolls sideways
   with the scrollbar hidden. Below 1024px the pseudo-tabs filters are a Swiper
   (offers-swiper.js drives their filtering) and the promotion tabs a
   dropdown (animation.js); both keep that and only take the pill look.
   The section-link pseudo-tabs above are excluded from the filter rules.
   A .slider-tab may hold <button>s instead of links, for a filter that
   changes the list in place (js/filter-tabs.js):
     <div class="slider-tab" role="group" aria-label="Filter shows"
          data-filter-tabs="LIST_ID" hidden>
       <button type="button" class="active" data-filter="all"
               aria-pressed="true">All <span class="tab-count"
               data-filter-count></span></button> …
     </div>
   It ships `hidden`; the script shows it, so without JS the whole list
   shows and the row doesn't.
   ========================================================================== */

.slider-tab[hidden] {
  display: none;
}

.slider-tab,
.slider-tab-2,
.pseudo-tabs:not(.pseudo-tabs-container > .pseudo-tabs:not(:has(a[data-url]))),
.promotion-tabs .nav-tabs__list {
  --sn-secnav-line: color-mix(in srgb, var(--foreground) 22%, transparent);
}

/* Sticky under the header (and under the section nav, if any) */
.slider-tab,
.slider-tab-2,
.pseudo-tabs:not(.pseudo-tabs-container > .pseudo-tabs:not(:has(a[data-url]))) {
  position: sticky;
  top: calc(var(--header-height) + var(--sn-secnav-offset, 0px));
  z-index: 90;
  background-color: var(--background);
}

/* .no-prevent rows are links to other pages (the exclusive-* language
   toggle). They switch nothing on this page, and their parent is the whole
   page, so sticking would pin a second bar for the entire scroll. */
.slider-tab.no-prevent {
  position: static;
}

/* --- Row (plain rows; not while a Swiper owns it) ------------------------ */

.slider-tab,
.slider-tab-2,
.pseudo-tabs:not(.swiper):not(.pseudo-tabs-container > .pseudo-tabs:not(:has(a[data-url]))) {
  /* display is left to _tabs.css (flex) so rules that hide a row, like
     .rewards-pseudo-tabs on desktop, still win */
  flex-direction: row;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  padding-block: 14px;
  border-top: 1px solid var(--sn-secnav-line);
  border-bottom: 1px solid var(--sn-secnav-line);
  /* the pills must not widen flex/grid parents (page zoom-out on mobile) */
  contain: inline-size;
  font-size: inherit;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.slider-tab::-webkit-scrollbar,
.slider-tab-2::-webkit-scrollbar,
.pseudo-tabs::-webkit-scrollbar {
  display: none;
}

/* Centered while it fits, left-aligned once it overflows. :not(#sn-secnav)
   only raises specificity: some node bodies carry inline rules such as
   `.slider-with-tab .slider-tab a { margin-right: 0 !important }`. */
.slider-tab:not(#sn-secnav)>a:first-child,
.slider-tab:not(#sn-secnav)>button:first-child,
.slider-tab-2:not(#sn-secnav)>a:first-child,
.pseudo-tabs:not(#sn-secnav):not(.swiper):not(.pseudo-tabs-container > .pseudo-tabs:not(:has(a[data-url])))>a:first-child {
  margin-left: auto !important;
}

.slider-tab:not(#sn-secnav)>a:last-child,
.slider-tab:not(#sn-secnav)>button:last-child,
.slider-tab-2:not(#sn-secnav)>a:last-child,
.pseudo-tabs:not(#sn-secnav):not(.swiper):not(.pseudo-tabs-container > .pseudo-tabs:not(:has(a[data-url])))>a:last-child {
  margin-right: auto !important;
}

/* Swiper row: full width so the hairlines span the row, not just the pills
   (offers-swiper.css sizes it to max-content) */
.pseudo-tabs.swiper:not(.pseudo-tabs-container > .pseudo-tabs:not(:has(a[data-url]))) {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding-block: 14px;
  border-top: 1px solid var(--sn-secnav-line);
  border-bottom: 1px solid var(--sn-secnav-line);
}

/* Promotion tabs: a pill row between hairlines from 1024px; below that,
   its dropdown */
.promotion-tabs .nav-tabs__list li {
  padding: 0;
  overflow: visible;
  border-bottom: 0 !important;
}

@media (min-width: 1024px) {
  .promotion-tabs .nav-tabs__list {
    gap: 10px;
    padding-block: 14px !important;
    border-top: 1px solid var(--sn-secnav-line);
    border-bottom: 1px solid var(--sn-secnav-line);
  }
}

@media (max-width: 1023px) {
  .promotion-tabs .nav-tabs__list.nav-tabs__list--open {
    justify-items: start;
    gap: 8px;
    padding: 0.75rem !important;
  }
}

/* --- Pill ---------------------------------------------------------------- */

.slider-tab>a,
.slider-tab>button,
.slider-tab-2>a,
.pseudo-tabs:not(.pseudo-tabs-container > .pseudo-tabs:not(:has(a[data-url]))) a,
.promotion-tabs .nav-tabs__list .nav-tabs__link {
  position: relative;
  flex: none;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 9px 18px;
  border: 1px solid var(--sn-secnav-line) !important;
  border-radius: 999px;
  background-color: transparent;
  color: var(--foreground);
  font-family: var(--text-sans);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: normal;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  opacity: 1;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.slider-tab>a::before,
.slider-tab>a::after,
.slider-tab-2>a::before,
.slider-tab-2>a::after,
.pseudo-tabs:not(.pseudo-tabs-container > .pseudo-tabs:not(:has(a[data-url]))) a::before,
.pseudo-tabs:not(.pseudo-tabs-container > .pseudo-tabs:not(:has(a[data-url]))) a::after,
.promotion-tabs .nav-tabs__list .nav-tabs__link::before,
.promotion-tabs .nav-tabs__list .nav-tabs__link::after {
  display: none !important;
}

.slider-tab>a:hover,
.slider-tab>button:hover,
.slider-tab-2>a:hover,
.pseudo-tabs:not(.pseudo-tabs-container > .pseudo-tabs:not(:has(a[data-url]))) a:hover,
.promotion-tabs .nav-tabs__list .nav-tabs__link:hover {
  border-color: var(--foreground) !important;
  color: var(--foreground);
  opacity: 1;
}

.slider-tab>a.active,
.slider-tab>button.active,
.slider-tab-2>a.active,
.pseudo-tabs:not(.pseudo-tabs-container > .pseudo-tabs:not(:has(a[data-url]))) a.active,
.promotion-tabs .nav-tabs__list .nav-tabs__link.active {
  border-color: var(--foreground) !important;
  background-color: var(--foreground);
  color: var(--background);
  font-weight: 600;
}

.slider-tab>a:focus-visible,
.slider-tab>button:focus-visible,
.slider-tab-2>a:focus-visible,
.pseudo-tabs:not(.pseudo-tabs-container > .pseudo-tabs:not(:has(a[data-url]))) a:focus-visible,
.promotion-tabs .nav-tabs__list .nav-tabs__link:focus-visible {
  outline: 2px solid #8c2230;
  outline-offset: 2px;
}

/* a count after the label, e.g. "Theatre Shows 10". The pill is a flex
   box, which drops the space before it, so the margin is the space. */
.slider-tab .tab-count {
  margin-left: 0.4em;
  font-weight: 500;
  opacity: 0.7;
}

@media (max-width: 767px) {

  .slider-tab,
  .slider-tab-2,
  .pseudo-tabs:not(.swiper):not(.pseudo-tabs-container > .pseudo-tabs:not(:has(a[data-url]))) {
    scroll-snap-type: x proximity;
  }

  /* left-aligned on mobile */
  .slider-tab:not(#sn-secnav)>a:first-child,
  .slider-tab:not(#sn-secnav)>button:first-child,
  .slider-tab-2:not(#sn-secnav)>a:first-child,
  .pseudo-tabs:not(#sn-secnav):not(.swiper):not(.pseudo-tabs-container > .pseudo-tabs:not(:has(a[data-url])))>a:first-child {
    margin-left: 0 !important;
  }

  /* Full-width bars like the section nav, pills lined up with its pills
     (18px in). They sit in wrappers with different side padding
     (.block-content, .slider-with-tab, main), so they break out to the
     viewport edges rather than undo one wrapper's padding. Swiper rows
     (/offers) lay their slides out inside this padding too. :not(#sn-secnav)
     outranks the Swiper row width and `.slider-with-tab .slider-tab`
     padding rules. --sn-scrollbar (js/section-nav.js) takes a classic
     scrollbar out of 100vw; phones have overlay scrollbars, so it's 0. */
  .slider-tab:not(#sn-secnav),
  .slider-tab-2:not(#sn-secnav),
  .pseudo-tabs:not(#sn-secnav):not(.pseudo-tabs-container > .pseudo-tabs:not(:has(a[data-url]))) {
    width: calc(100vw - var(--sn-scrollbar, 0px));
    max-width: none;
    margin-inline: calc(50% - 50vw + var(--sn-scrollbar, 0px) / 2);
    padding-inline: 18px;
    scroll-padding-inline: 18px;
  }

  .slider-tab > a,
  .slider-tab > button,
  .slider-tab-2 > a,
  .pseudo-tabs:not(.pseudo-tabs-container > .pseudo-tabs:not(:has(a[data-url]))) a,
  .promotion-tabs .nav-tabs__list .nav-tabs__link {
    scroll-snap-align: start;
    font-size: 11.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}