/* Servo media gallery (hand-written: tailwind.min.css is precompiled and can't be rebuilt here). */

.sdb-gallery { width: 100%; }
.sdb-main { position: relative; background: #fff; border-radius: .5rem; overflow: hidden; }

.sdb-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.sdb-track::-webkit-scrollbar { display: none; }
.sdb-track:focus-visible { outline: 2px solid #2563eb; outline-offset: -2px; }

.sdb-slide {
  flex: 0 0 100%;
  aspect-ratio: 4 / 3;
  margin: 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  position: relative;
  background: #fff;
}
.sdb-slide a { display: block; width: 100%; height: 100%; position: relative; }
.sdb-slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sdb-slide .sdb-zoom { cursor: zoom-in; }
.sdb-slide iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }

.sdb-slide-video { background: #0f172a; }
.sdb-video-fallback { display: flex; align-items: center; justify-content: center; height: 100%; padding: 1rem; color: #e2e8f0; font-size: .875rem; text-align: center; }
.sdb-play {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%; background: rgba(0, 0, 0, .65);
}
.sdb-play::after {
  content: ""; position: absolute; left: 22px; top: 17px;
  border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff;
}

/* Controls are only useful with JS, so they stay hidden until gallery.js adds .sdb-js. */
.sdb-arrow, .sdb-enlarge, .sdb-counter { display: none; }
.sdb-js .sdb-enlarge, .sdb-js .sdb-counter { display: flex; }
.sdb-enlarge {
  position: absolute; top: .25rem; right: .25rem; width: 44px; height: 44px;
  align-items: center; justify-content: center; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .85); color: #334155; cursor: pointer;
}
.sdb-counter {
  position: absolute; left: .5rem; bottom: .5rem; padding: .125rem .5rem; border-radius: 9999px;
  background: rgba(15, 23, 42, .7); color: #fff; font-size: .75rem; line-height: 1.25rem; pointer-events: none;
}
.sdb-arrow {
  position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .85); color: #334155; font-size: 28px; line-height: 1; cursor: pointer;
  align-items: center; justify-content: center;
}
.sdb-prev { left: .25rem; }
.sdb-next { right: .25rem; }
@media (hover: hover) and (pointer: fine) {
  .sdb-js .sdb-arrow { display: flex; }
}

.sdb-thumbs {
  display: flex; gap: .5rem; margin-top: .5rem; padding: 2px;
  overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.sdb-thumb {
  flex: 0 0 auto; position: relative; width: 56px; height: 56px; padding: 0; overflow: hidden;
  border: 2px solid transparent; border-radius: .375rem; background: #e2e8f0; cursor: pointer;
}
.sdb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sdb-thumb.is-active { border-color: #2563eb; }
.sdb-thumb.is-video::after {
  content: ""; position: absolute; left: 50%; top: 50%; margin: -7px 0 0 -4px;
  border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent #fff;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, .8));
}

/* Lightbox */
html.sdb-lb-open, html.sdb-lb-open body { overflow: hidden; }
.sdb-lb {
  position: fixed; inset: 0; z-index: 2147483000; display: flex; flex-direction: column;
  height: 100vh; height: 100dvh; background: rgba(2, 6, 23, .96); color: #fff;
}
.sdb-lb-bar {
  display: flex; align-items: center; gap: .75rem; padding: .5rem .5rem .5rem 1rem;
  padding-top: max(.5rem, env(safe-area-inset-top));
}
.sdb-lb-count { font-size: .875rem; opacity: .8; white-space: nowrap; }
.sdb-lb-caption { flex: 1; min-width: 0; margin: 0; font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdb-lb-btn {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
}
.sdb-lb-btn:focus-visible { outline: 2px solid #93c5fd; }
.sdb-lb-body { position: relative; flex: 1; min-height: 0; }
.sdb-lb-stage {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  overflow: hidden; touch-action: pan-y pinch-zoom;
  padding-bottom: env(safe-area-inset-bottom);
}
.sdb-lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; user-select: none; -webkit-user-drag: none; }
.sdb-lb-stage iframe { width: min(100%, 177vh); max-height: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.sdb-lb-stage.is-zoomed { overflow: auto; touch-action: auto; display: block; }
.sdb-lb-stage.is-zoomed img { max-width: none; max-height: none; width: 200%; height: auto; cursor: zoom-out; }
.sdb-lb-nav { position: absolute; top: 50%; margin-top: -22px; z-index: 1; }
.sdb-lb-prev { left: .5rem; }
.sdb-lb-next { right: .5rem; }
