/* Premium fullscreen gallery lightbox — scoped to akoma-gallery-lightbox */

body.akoma-gallery-lightbox-open {
  overflow: hidden;
}

.akoma-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.akoma-gallery-lightbox.is-visible {
  opacity: 1;
  visibility: visible;
}

.akoma-gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: #1a202af7;
  backdrop-filter: blur(20px);
}

.akoma-gallery-lightbox__stage {
  position: relative;
  z-index: 2;
  width: min(140vw, 1600px);
  height: min(90vh, 896px);
  margin: 0 auto 90px;
  padding: 0 40px;
  box-sizing: border-box;
}

.akoma-gallery-lightbox__viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.akoma-gallery-lightbox__track {
  display: flex;
  flex-wrap: nowrap;
  height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.akoma-gallery-lightbox__track.is-instant {
  transition: none;
}

.akoma-gallery-lightbox__slide {
  flex: 0 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0 4px;
}

.akoma-gallery-lightbox__zoom-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 21px;
  cursor: zoom-in;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.akoma-gallery-lightbox__zoom-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: inherit;
  user-select: none;
  pointer-events: none;
  transform: scale(1);
  transform-origin: 50% 50%;
  will-change: transform;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.akoma-gallery-lightbox__zoom-image.is-smooth-zoom {
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.akoma-gallery-lightbox__zoom-image.is-panning {
  transition: none;
}

.akoma-gallery-lightbox__zoom-frame.is-zoom-active {
  cursor: crosshair;
}

.akoma-gallery-lightbox__zoom-hint {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.akoma-gallery-lightbox__zoom-hint::before {
  content: "";
  width: 52px;
  height: 52px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='52' viewBox='0 0 52 52'%3E%3Ccircle cx='22' cy='22' r='12' fill='none' stroke='%23fff' stroke-width='2.5'/%3E%3Cpath d='M31 31l12 12' stroke='%23fff' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.95;
}

.akoma-gallery-lightbox__zoom-hint-label {
  position: relative;
  z-index: 1;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgb(0 0 0 / 45%);
  backdrop-filter: blur(4px);
}

.akoma-gallery-lightbox__zoom-hint.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.akoma-gallery-lightbox__zoom-lens {
  display: none;
}

.akoma-gallery-lightbox.is-image-zoom-active .akoma-gallery-lightbox__track {
  transition-duration: 0.45s;
}

.akoma-gallery-lightbox.is-image-zoom-active .akoma-gallery-lightbox__nav {
  opacity: 0.35;
  pointer-events: none;
}

.akoma-gallery-lightbox__close,
.akoma-gallery-lightbox__fullscreen,
.akoma-gallery-lightbox__nav {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgb(255 255 255 / 10%);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.akoma-gallery-lightbox__top-actions {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 4;
  display: flex;
  gap: 10px;
  align-items: center;
}

.akoma-gallery-lightbox__top-actions .akoma-gallery-lightbox__close,
.akoma-gallery-lightbox__top-actions .akoma-gallery-lightbox__fullscreen {
  position: static;
}

.akoma-gallery-lightbox__close:hover,
.akoma-gallery-lightbox__close:focus-visible,
.akoma-gallery-lightbox__fullscreen:hover,
.akoma-gallery-lightbox__fullscreen:focus-visible,
.akoma-gallery-lightbox__nav:hover,
.akoma-gallery-lightbox__nav:focus-visible {
  background: rgb(255 255 255 / 18%);
  outline: none;
  transform: scale(1.04);
}

.akoma-gallery-lightbox__close,
.akoma-gallery-lightbox__fullscreen {
  width: 48px;
  height: 48px;
  border-radius: 999px;
}

.akoma-gallery-lightbox__fullscreen.is-active {
  background: rgb(255 255 255 / 20%);
}

.akoma-gallery-lightbox__fullscreen .akoma-gallery-lightbox__icon-compress {
  display: none;
}

.akoma-gallery-lightbox__fullscreen.is-active .akoma-gallery-lightbox__icon-expand {
  display: none;
}

.akoma-gallery-lightbox__fullscreen.is-active .akoma-gallery-lightbox__icon-compress {
  display: block;
}

.akoma-gallery-lightbox__close {
  top: auto;
  right: auto;
}

.akoma-gallery-lightbox__nav {
  top: 50%;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  transform: translateY(-50%);
}

.akoma-gallery-lightbox__nav:hover,
.akoma-gallery-lightbox__nav:focus-visible {
  transform: translateY(-50%) scale(1.04);
}

.akoma-gallery-lightbox__nav--prev {
  left: 20px;
}

.akoma-gallery-lightbox__nav--next {
  right: 20px;
}

.akoma-gallery-lightbox__thumbs-wrap {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 24px;
  width: min(92vw, 920px);
  transform: translateX(-50%);
  cursor: grab;
  touch-action: pan-y;
}

.akoma-gallery-lightbox__thumbs-wrap.is-dragging {
  cursor: grabbing;
}

.akoma-gallery-lightbox__thumbs {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  padding: 10px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
  border-radius: 999px;
  background: rgb(0 0 0 / 42%);
  backdrop-filter: blur(8px);
}

.akoma-gallery-lightbox__thumbs.is-centered {
  justify-content: center;
}

.akoma-gallery-lightbox__thumbs-wrap.is-centered {
  cursor: default;
}

.akoma-gallery-lightbox__thumbs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.akoma-gallery-lightbox__thumbs-wrap.is-dragging .akoma-gallery-lightbox__thumb {
  pointer-events: none;
}

.akoma-gallery-lightbox__thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 52px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 6px;
  background: rgb(255 255 255 / 8%);
  cursor: pointer;
  opacity: 0.72;
  transform: scale(1);
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.akoma-gallery-lightbox__thumb.is-active,
.akoma-gallery-lightbox__thumb:hover,
.akoma-gallery-lightbox__thumb:focus-visible {
  opacity: 1;
  border-color: #fff;
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgb(0 0 0 / 35%);
}

.akoma-gallery-lightbox__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.akoma-collection-gallery__main.akoma-gallery-lightbox-trigger {
  cursor: zoom-in;
}

.akoma-gallery-lightbox.is-browser-fullscreen .akoma-gallery-lightbox__stage,
.akoma-gallery-lightbox.is-expanded .akoma-gallery-lightbox__stage {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 72px 80px 120px;
}

.akoma-gallery-lightbox.is-browser-fullscreen .akoma-gallery-lightbox__zoom-frame,
.akoma-gallery-lightbox.is-expanded .akoma-gallery-lightbox__zoom-frame {
  border-radius: 12px;
}

.akoma-gallery-lightbox:fullscreen,
.akoma-gallery-lightbox:-webkit-full-screen {
  width: 100%;
  height: 100%;
  background: #1a202a;
}

.akoma-gallery-lightbox:fullscreen .akoma-gallery-lightbox__backdrop,
.akoma-gallery-lightbox:-webkit-full-screen .akoma-gallery-lightbox__backdrop {
  background: #1a202a;
  backdrop-filter: none;
}

@media (max-width: 768px) {
  .akoma-gallery-lightbox__stage {
    width: 100%;
    height: min(58vh, 520px);
    margin-bottom: 108px;
    padding: 0 56px;
  }

  .akoma-gallery-lightbox__nav {
    width: 44px;
    height: 44px;
  }

  .akoma-gallery-lightbox__nav--prev {
    left: 10px;
  }

  .akoma-gallery-lightbox__nav--next {
    right: 10px;
  }

  .akoma-gallery-lightbox__top-actions {
    top: 12px;
    right: 12px;
    gap: 8px;
  }

  .akoma-gallery-lightbox__close,
  .akoma-gallery-lightbox__fullscreen {
    width: 42px;
    height: 42px;
  }

  .akoma-gallery-lightbox.is-browser-fullscreen .akoma-gallery-lightbox__stage,
  .akoma-gallery-lightbox.is-expanded .akoma-gallery-lightbox__stage {
    padding: 56px 16px 108px;
  }

  .akoma-gallery-lightbox__thumbs-wrap {
    bottom: 14px;
    width: calc(100% - 24px);
  }

  .akoma-gallery-lightbox__zoom-hint-label {
    font-size: 0.75rem;
  }

  .akoma-gallery-lightbox__zoom-frame {
    cursor: pointer;
  }

  .akoma-gallery-lightbox__zoom-frame.is-zoom-active {
    cursor: grab;
  }
}
