/* MW006 project gallery repair v1
   Restores thumbnail strips, captions and fullscreen image viewing on legacy project pages. */

.mw006-gallery-ready .viewer,
.mw006-gallery-ready .viewer-wrap .viewer {
  position: relative;
}

.mw006-gallery-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 0 4px;
  margin: 0;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.mw006-gallery-strip .thumb,
.strip.mw006-gallery-strip .thumb {
  flex: 0 0 auto;
  width: 74px;
  height: 54px;
  object-fit: cover;
  opacity: .48;
  border: 1px solid rgba(255,255,255,.12);
  background: #050505;
  cursor: pointer;
  scroll-snap-align: start;
  transition: opacity .18s, border-color .18s, transform .18s;
}

.mw006-gallery-strip .thumb:hover,
.mw006-gallery-strip .thumb.active {
  opacity: 1;
  border-color: rgba(0,229,255,.65);
  transform: translateY(-1px);
}

.mw006-gallery-caption {
  display: block;
  margin-top: 6px;
  color: rgba(232,224,212,.46);
  font-size: 10px;
  letter-spacing: .08em;
  line-height: 1.45;
}

.mw006-gallery-counter {
  color: rgba(232,224,212,.35);
}

.mw006-slideshow-controls,
.slideshow-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 20px;
  background: rgba(5,5,8,.82);
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.04);
}

.mw006-slideshow-controls .slide-label,
.slideshow-controls .slide-label,
.mw006-slideshow-controls .slide-status,
.slideshow-controls .slide-status {
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(232,224,212,.34);
}

.mw006-slideshow-controls button,
.slideshow-controls button {
  appearance: none;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.035);
  color: rgba(232,224,212,.72);
  min-height: 32px;
  padding: 7px 10px;
  font: 700 9px/1 var(--mono, "Space Mono", monospace);
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}

.mw006-slideshow-controls button:hover,
.slideshow-controls button:hover,
.mw006-slideshow-controls button.active,
.slideshow-controls button.active,
.mw006-slideshow-controls button[aria-pressed="true"],
.slideshow-controls button[aria-pressed="true"] {
  color: #00e5ff;
  border-color: rgba(0,229,255,.55);
  background: rgba(0,229,255,.09);
}

.mw006-gallery-ready #mainImg {
  cursor: zoom-in;
  transition: opacity .16s ease;
}

.mw006-gallery-ready #mainImg.fade {
  opacity: .18;
}

.mw006-gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.96);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  box-sizing: border-box;
}

.mw006-gallery-lightbox.open,
.lbox.open {
  display: flex;
}

.mw006-gallery-lightbox img,
.lbox.open #lbox-img {
  max-width: 96vw;
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.mw006-gallery-lightbox .lbox-cap,
.mw006-gallery-lightbox .lbox-ctr,
.lbox.open .lbox-cap,
.lbox.open .lbox-ctr {
  color: rgba(232,224,212,.5);
  font-size: 10px;
  letter-spacing: .12em;
  text-align: center;
  max-width: 86vw;
}

@media (max-width: 720px) {
  .mw006-gallery-strip {
    gap: 6px;
    padding-top: 10px;
  }

  .mw006-gallery-strip .thumb {
    width: 64px;
    height: 48px;
  }

  .mw006-slideshow-controls,
  .slideshow-controls {
    gap: 6px;
    padding: 9px 12px;
  }

  .mw006-slideshow-controls button,
  .slideshow-controls button {
    min-height: 38px;
    padding: 8px 9px;
  }

  .mw006-gallery-lightbox,
  .lbox.open {
    padding: 12px;
  }
}
