/* Static replacements for behavior previously supplied by the hosted platform. */

.static-gallery-track {
  display: flex !important;
  left: 0 !important;
  position: relative;
  transition: transform 500ms ease;
  width: 100% !important;
  will-change: transform;
}

.static-gallery-slide {
  flex: 0 0 100%;
  min-width: 100%;
}

.video-thumb-bg.play-on-click {
  cursor: pointer;
}

.video-thumb-bg.is-playing {
  background: #000 !important;
  cursor: default;
}

.parallax-bg {
  inset: 0;
  overflow: hidden;
  position: absolute;
}

.parallax-bg img {
  height: 100% !important;
  left: 0 !important;
  object-fit: cover;
  position: absolute;
  top: 0 !important;
  transform: none !important;
  width: 100% !important;
}

.static-lightbox[hidden] {
  display: none;
}

.static-lightbox {
  align-items: center;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 100000;
}

.static-lightbox__image {
  max-height: 90vh;
  max-width: min(90vw, 1400px);
  object-fit: contain;
}

.static-lightbox button {
  appearance: none;
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  font: 300 52px/1 Arial, sans-serif;
  padding: 16px;
  position: absolute;
}

.static-lightbox__close {
  right: 12px;
  top: 4px;
}

.static-lightbox__previous {
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.static-lightbox__next {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

body.lightbox-open {
  overflow: hidden;
}

/* Keep the three-row contact/footer block at the bottom of tall viewports on
 * short routes without fixing it over content. Long routes remain content-led.
 * The homepage hero/video sizing is intentionally outside this page-shell rule. */
.page-layout > .content.slide > .content-wrapper > .content {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
}

.site-footer {
  display: block;
  margin-top: auto;
}

/* Size non-mobile card actions from their content, not the source's fractional
 * widget slots. The original fractions let the button paint outside its slot
 * and collide with the ticket link even though the row itself has ample room. */
@media (min-width: 769px) {
  .grid-row.stretched-tablet
    .widget-row.with-centered-content:has(.buttonWidget) {
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: clamp(16px, 2vw, 28px);
    justify-content: center;
  }

  .grid-row.stretched-tablet
    .widget-row.with-centered-content:has(.buttonWidget)
    > .widgetResponsive {
    flex: 0 0 auto;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: auto !important;
  }

  .grid-row.stretched-tablet
    .widget-row.with-centered-content:has(.buttonWidget)
    .buttonWidget
    a.theme-button span:not(.second-line-button-text) {
    white-space: nowrap;
  }

  .grid-row.stretched-tablet
    .widget-row.with-centered-content:has(.buttonWidget)
    .responsive-rich-align,
  .grid-row.stretched-tablet
    .widget-row.with-centered-content:has(.buttonWidget)
    .text-widget-content,
  .grid-row.stretched-tablet
    .widget-row.with-centered-content:has(.buttonWidget)
    .text-widget-content p {
    text-align: center !important;
  }
}

/* Phone layouts intentionally stack the ticket link below the button. Reserve
 * enough space after the link to keep it clear of the rugged section divider. */
@media (max-width: 768px) {
  .grid-row.stretched-tablet
    .widget-row.with-centered-content:has(> .buttonWidget):has(> .textWidget) {
    align-items: center;
    box-sizing: border-box;
    flex-direction: column;
    gap: 14px;
    padding-bottom: clamp(28px, 8vw, 40px);
  }

  .grid-row.stretched-tablet
    .widget-row.with-centered-content:has(> .buttonWidget):has(> .textWidget)
    > .widgetResponsive {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
  }

  .grid-row.stretched-tablet
    .widget-row.with-centered-content:has(> .buttonWidget):has(> .textWidget)
    .responsive-rich-align,
  .grid-row.stretched-tablet
    .widget-row.with-centered-content:has(> .buttonWidget):has(> .textWidget)
    .text-widget-content,
  .grid-row.stretched-tablet
    .widget-row.with-centered-content:has(> .buttonWidget):has(> .textWidget)
    .text-widget-content p {
    text-align: center !important;
  }
}

/* Platform service overlays are not part of the static visitor experience. */
#client-ajax-overlay,
#tmdp-simple-lightbox-overlay,
#tmdp-simple-lightbox,
.next-step-popup {
  display: none !important;
}
