/* SR-101c — tour lightbox: frosted control chips (readable on light + dark images) */
.sr-lightbox[hidden] {
  display: none !important;
}
.sr-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: grid;
  place-items: center;
  touch-action: none;
}
.sr-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.92);
}

/* Shared frosted chip language — works over light/dark photo areas */
.sr-lightbox__chip {
  background: rgba(18, 20, 26, 0.52);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 6px 22px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(0, 0, 0, 0.28);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

/* High-contrast Close (X) — always visible, tappable */
.sr-lightbox__close {
  position: absolute;
  top: max(0.65rem, env(safe-area-inset-top, 0px));
  right: max(0.65rem, env(safe-area-inset-right, 0px));
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 48px;
  min-width: 48px;
  padding: 0.45rem 0.85rem 0.45rem 0.55rem;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #c62828;
  color: #fff !important;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
.sr-lightbox__close-x {
  display: inline-grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  font-size: 1.65rem;
  line-height: 1;
  font-weight: 700;
  color: #fff !important;
}
.sr-lightbox__close:hover,
.sr-lightbox__close:focus-visible {
  background: #b71c1c;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Side next / prev — frosted chips (not solid white) */
.sr-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  /* chip look */
  background: rgba(18, 20, 26, 0.52);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 6px 22px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(0, 0, 0, 0.28);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}
.sr-lightbox__nav span {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.sr-lightbox__nav--prev {
  left: max(0.5rem, env(safe-area-inset-left, 0px));
}
.sr-lightbox__nav--next {
  right: max(0.5rem, env(safe-area-inset-right, 0px));
}
.sr-lightbox__nav:hover,
.sr-lightbox__nav:focus-visible {
  background: rgba(18, 20, 26, 0.72);
  border-color: rgba(255, 255, 255, 0.85);
  outline: 3px solid #7eb6ff;
  outline-offset: 2px;
}
.sr-lightbox__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.sr-lightbox__stage {
  position: relative;
  z-index: 1;
  width: min(96vw, 1200px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 3.5rem 3.75rem 0.75rem;
  box-sizing: border-box;
}

.sr-lightbox__viewport {
  position: relative;
  width: 100%;
  height: min(72vh, 820px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: #0c0e12;
  touch-action: none;
  cursor: grab;
}
.sr-lightbox__viewport.is-zoomed {
  cursor: grab;
}

.sr-lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  will-change: transform;
  background: transparent;
  transition: none;
}
.sr-lightbox__img.is-zoomed {
  cursor: grab;
}

.sr-lightbox__toolbar {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.sr-lightbox__btn {
  appearance: none;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  font-weight: 700;
  background: rgba(18, 20, 26, 0.52);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 6px 22px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(0, 0, 0, 0.28);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}
.sr-lightbox__btn:hover,
.sr-lightbox__btn:focus-visible {
  background: rgba(18, 20, 26, 0.72);
  border-color: rgba(255, 255, 255, 0.85);
  outline: 2px solid #7eb6ff;
  outline-offset: 2px;
}
.sr-lightbox__counter {
  margin: 0 0.25rem;
  color: #f5f6f8;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  min-width: 4.5rem;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(18, 20, 26, 0.4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.sr-lightbox__hint {
  margin: 0;
  color: rgba(245, 246, 248, 0.72);
  font-size: 0.78rem;
}

html.sr-lightbox-open,
html.sr-lightbox-open body {
  overflow: hidden;
}
body.sr-has-tour-lightbox img[data-sr-lightbox="1"] {
  cursor: zoom-in;
}

@media (max-width: 720px) {
  .sr-lightbox__stage {
    padding: 3.25rem 0.35rem 0.5rem;
    width: 100vw;
  }
  .sr-lightbox__viewport {
    height: min(68vh, 640px);
    border-radius: 0;
  }
  .sr-lightbox__nav {
    width: 46px;
    height: 46px;
    font-size: 1.75rem;
  }
  .sr-lightbox__close-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .sr-lightbox__close {
    padding: 0;
    width: 48px;
    justify-content: center;
  }
  .sr-lightbox__hint {
    display: none;
  }
}

/* Fallback when backdrop-filter unsupported — still readable chips */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sr-lightbox__nav,
  .sr-lightbox__btn {
    background: rgba(18, 20, 26, 0.82);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sr-lightbox__img {
    transition: none !important;
  }
}
