/* Booth-page gallery — carousel + lightbox for the film strips
   (.rmb-strip templates and .ipbb-rmbstripc builder pages).
   Classes are added by js/ipb-gallery.js; without JS the strip stays a
   plain horizontal scroller. */

/* ── Carousel ── */
.ipbg-host-rel { position: relative; }

.ipbg-track {
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
}
.ipbg-track::-webkit-scrollbar { display: none; }
.rmb-strip.ipbg-track { scroll-padding-inline: 20px; }
.ipbb-rmbstripc .ipbg-track { scroll-padding-inline: 40px; }
.ipbg-track.is-dragging {
  scroll-snap-type: none;
  scroll-behavior: auto;
  cursor: grabbing;
  user-select: none;
}

.ipbg-track .ipbg-img {
  scroll-snap-align: start;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.ipbg-track.is-dragging .ipbg-img { cursor: grabbing; }
@media (hover: hover) {
  .ipbg-track:not(.is-dragging) .ipbg-img:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .45) !important;
  }
}
.ipbg-track .ipbg-img:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.ipbg-host .ipbg-nav {
  position: absolute;
  z-index: 20;   /* above Avada's .fusion-builder-row (z-index:10) */
  width: 46px;
  height: 46px;
  min-height: 0;
  margin: -23px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;   /* site rule: every button is square (style.css, 2026-08-03) */
  background: #fff;
  color: #1C1C1C;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .38);
  touch-action: manipulation;
  transition: opacity .2s ease, transform .2s ease, background-color .2s ease;
}
.ipbg-host .ipbg-nav svg { width: 24px; height: 24px; }
.ipbg-host .ipbg-nav:hover { transform: scale(1.08); background: #F4F1EC; }
.ipbg-host .ipbg-nav:focus-visible { outline: 3px solid var(--green, #1A4A2E); outline-offset: -6px; }
.ipbg-host .ipbg-nav[disabled] { opacity: 0; pointer-events: none; }

.ipbg-host .ipbg-dots {
  position: absolute;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  pointer-events: none;
}
.ipbg-host .ipbg-dot {
  position: relative;
  pointer-events: auto;
  width: 24px;
  height: 24px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: width .25s ease;
}
.ipbg-host .ipbg-dot::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 0;
  background: rgba(28, 28, 28, .55);
  transition: background-color .25s ease;
}
.ipbg-host .ipbg-dot:hover::before { background: rgba(28, 28, 28, .75); }
.ipbg-host .ipbg-dot.is-active { width: 40px; }
.ipbg-host .ipbg-dot.is-active::before { background: var(--green, #1A4A2E); }
.ipbg-host .ipbg-dot:focus-visible { outline: 2px solid var(--green, #1A4A2E); outline-offset: -2px; }

.ipbg-host .ipbg-bar {
  position: absolute;
  z-index: 20;
  height: 4px;
  background: rgba(28, 28, 28, .2);
  overflow: hidden;
  display: none;
}
.ipbg-host .ipbg-bar span {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--green, #1A4A2E);
}
.ipbg-host.ipbg-use-bar .ipbg-bar { display: block; }
.ipbg-host.ipbg-use-bar .ipbg-dots { display: none; }

.ipbg-host.ipbg-static .ipbg-nav,
.ipbg-host.ipbg-static .ipbg-dots,
.ipbg-host.ipbg-static .ipbg-bar { display: none; }

@media (max-width: 900px) {
  .rmb-strip.ipbg-track img { height: 260px; }
}
@media (max-width: 600px) {
  .rmb-strip.ipbg-track {
    padding: 12px;
    gap: 10px;
    border-radius: 10px;
    scroll-padding-inline: 12px;
  }
  .rmb-strip.ipbg-track img,
  .ipbb-rmbstripc .ipbg-track img { height: clamp(230px, 64vw, 280px); }
  .ipbb-rmbstripc .ipbg-track { padding: 16px 16px; gap: 10px; scroll-padding-inline: 16px; }
  .ipbg-host .ipbg-nav { width: 44px; height: 44px; margin-top: -22px; }
  .ipbg-host .ipbg-nav svg { width: 22px; height: 22px; }
}

/* ── Lightbox ── */
/* Body only: locking html too turns body into the scroller and the sticky
   #ipb-nav jumps away while the lightbox is open. */
body.ipbg-locked { overflow: hidden; padding-right: var(--ipbg-gap, 0); }

.ipbg-lb {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(12, 12, 12, .96);
  opacity: 0;
  transition: opacity .2s ease;
  overscroll-behavior: contain;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ipbg-lb[hidden] { display: none; }
.ipbg-lb.is-open { opacity: 1; }

.ipbg-lb-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 84px;
  box-sizing: border-box;
}
.ipbg-lb .ipbg-lb-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.ipbg-lb .ipbg-lb-img.is-ready { opacity: 1; }
.ipbg-lb .ipbg-lb-img.is-swiping { transition: none; }

.ipbg-lb-spin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border: 3px solid rgba(255, 255, 255, .2);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .2s ease;
  animation: ipbg-spin .8s linear infinite;
  pointer-events: none;
}
.ipbg-lb.is-loading .ipbg-lb-spin { opacity: 1; }
@keyframes ipbg-spin { to { transform: rotate(360deg); } }

.ipbg-lb .ipbg-lb-btn {
  position: absolute;
  z-index: 2;
  width: 52px;
  height: 52px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  transition: background-color .2s ease, transform .2s ease;
}
.ipbg-lb .ipbg-lb-btn svg { width: 28px; height: 28px; }
.ipbg-lb .ipbg-lb-btn:hover { background: rgba(255, 255, 255, .25); }
.ipbg-lb .ipbg-lb-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ipbg-lb .ipbg-lb-close { top: 14px; right: 14px; }
.ipbg-lb .ipbg-lb-prev { left: 16px; top: 50%; margin-top: -26px; }
.ipbg-lb .ipbg-lb-next { right: 16px; top: 50%; margin-top: -26px; }

.ipbg-lb-count {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  padding: 9px 15px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font: 600 14px/1 "DM Sans", system-ui, sans-serif;
  letter-spacing: .06em;
  white-space: nowrap;
}

.ipbg-lb-single .ipbg-lb-prev,
.ipbg-lb-single .ipbg-lb-next,
.ipbg-lb-single .ipbg-lb-count { display: none; }

@media (max-width: 600px) {
  .ipbg-lb-stage { padding: 64px 0 108px; }
  .ipbg-lb .ipbg-lb-img { border-radius: 0; box-shadow: none; }
  .ipbg-lb .ipbg-lb-btn { width: 46px; height: 46px; }
  .ipbg-lb .ipbg-lb-close { top: 10px; right: 10px; }
  .ipbg-lb-count { top: 20px; }
  .ipbg-lb .ipbg-lb-prev,
  .ipbg-lb .ipbg-lb-next { top: auto; bottom: 34px; margin-top: 0; }
  .ipbg-lb .ipbg-lb-prev { left: calc(50% - 62px); }
  .ipbg-lb .ipbg-lb-next { right: calc(50% - 62px); }
}

/* Phones on their side: give the photo the height */
@media (max-height: 500px) and (orientation: landscape) {
  .rmb-strip.ipbg-track img,
  .ipbb-rmbstripc .ipbg-track img { height: clamp(160px, 52vh, 260px); }
  .ipbg-lb-stage { padding: 8px 68px; }
  .ipbg-lb .ipbg-lb-img { border-radius: 4px; }
  .ipbg-lb .ipbg-lb-btn { width: 44px; height: 44px; }
  .ipbg-lb .ipbg-lb-close { top: 8px; right: 12px; }
  .ipbg-lb .ipbg-lb-prev,
  .ipbg-lb .ipbg-lb-next { top: 50%; bottom: auto; margin-top: -22px; }
  .ipbg-lb .ipbg-lb-prev { left: 12px; }
  .ipbg-lb .ipbg-lb-next { right: 12px; }
  .ipbg-lb-count { top: auto; bottom: 10px; left: 12px; transform: none; }
}

/* Screen-reader-only text */
.ipbg-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Windows high contrast: keep the dots and progress visible */
@media (forced-colors: active) {
  .ipbg-host .ipbg-dot::before { forced-color-adjust: none; background: ButtonText; }
  .ipbg-host .ipbg-dot.is-active::before { background: Highlight; }
  .ipbg-host .ipbg-bar { border: 1px solid ButtonText; }
  .ipbg-host .ipbg-bar span { forced-color-adjust: none; background: Highlight; }
}

@media (prefers-reduced-motion: reduce) {
  .ipbg-track { scroll-behavior: auto; }
  .ipbg-track .ipbg-img,
  .ipbg-host .ipbg-nav,
  .ipbg-host .ipbg-dot,
  .ipbg-host .ipbg-dot::before,
  .ipbg-lb,
  .ipbg-lb .ipbg-lb-img { transition: none; }
}
