/*
  Full-screen lightbox for sample-image galleries (.xrt-location-gallery),
  used on /satellite-imagery/<country> and /applications/<industry> pages.
  Paired with /js/xrt-sample-lightbox.js, which builds this overlay once
  per page and reuses it for every gallery on it.

  Deliberately namespaced .xrt-splb (not .xrt-lightbox) so it can never
  collide with the unrelated blog-post lightbox defined in blog.css, even
  on pages (mining, agriculture, forestry, urban-planning, disaster-
  monitoring, gold-map) that already load blog.css for other components.

  Sits above the sticky header (layout.css tops out at z-index 5999) and
  the homepage/v6 modals (up to 6000), matching the blog lightbox's 9000.

  Colors/radii/fonts below are the site's --xrt-lime/--xrt-lime-ink/
  --xrt-r-sm/--xrt-r-md/--xrt-font-h/--xrt-font-b values inlined literally,
  not referenced via var() — those custom properties are scoped to
  .xrt-scope in layout.css (not :root), but xrt-sample-lightbox.js appends
  this overlay straight onto <body>, outside that scope, so var() would
  resolve to nothing there.
*/
.xrt-splb {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  background: rgba(6, 10, 7, 0.94);
  padding: 24px;
}

.xrt-splb.is-open {
  display: flex;
  flex-direction: column;
}

.xrt-splb__bar {
  display: flex;
  justify-content: flex-end;
  flex: none;
}

.xrt-splb__close,
.xrt-splb__zoom-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.xrt-splb__zoom-btn {
  margin-right: 8px;
  font-size: 15px;
}

.xrt-splb__close:hover,
.xrt-splb__zoom-btn:hover,
.xrt-splb__arrow:hover {
  background: rgba(255, 255, 255, 0.16);
}

.xrt-splb__zoom-btn[aria-pressed='true'] {
  background: #c8f36a;
  border-color: #c8f36a;
  color: #123d33;
}

.xrt-splb__stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 0;
}

.xrt-splb__arrow {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.xrt-splb__frame {
  max-width: min(1100px, 100%);
  max-height: 64vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.xrt-splb__frame img {
  max-width: 100%;
  max-height: 64vh;
  object-fit: contain;
  border-radius: 12px;
  cursor: zoom-in;
  display: block;
}

/* Zoom state, toggled by clicking the image or the zoom button. The frame
   swaps to an explicit viewport-relative box so overflow:auto has
   something fixed to scroll within once the image grows past it; the JS
   sets the img's width to its real natural pixel size (not a CSS scale),
   so zoom reveals genuine extra detail rather than a blurry upscale. */
.xrt-splb__frame.is-zoomed {
  width: min(1100px, 100%);
  height: 64vh;
  max-width: min(1100px, 100%);
  overflow: auto;
  align-items: flex-start;
  justify-content: flex-start;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}

.xrt-splb__frame.is-zoomed:active {
  cursor: grabbing;
}

.xrt-splb__frame.is-zoomed img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
  border-radius: 0;
}

.xrt-splb__info {
  flex: none;
  max-width: 720px;
  margin: 16px auto 0;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  color: #fff;
}

.xrt-splb__caption {
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0 0 6px;
}

.xrt-splb__caption:empty,
.xrt-splb__meta:empty {
  display: none;
}

.xrt-splb__meta {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.68);
  margin: 0 0 14px;
}

/* The one place this "buy the whole set" line is allowed to appear — inside
   the zoomed-in viewer, never on the plain grid thumbnails. Showing it
   here catches the visitor at peak intent, right as they're actively
   trying to see more detail than the sample offers. */
.xrt-splb__cta {
  margin: 0 0 14px;
}

.xrt-splb__cta:empty {
  display: none;
  margin: 0;
}

.xrt-splb__cta a {
  display: inline-block;
  background: #c8f36a;
  color: #123d33;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  padding: 10px 18px;
  border-radius: 9px;
  text-decoration: none;
}

.xrt-splb__cta a:hover {
  filter: brightness(1.05);
}

.xrt-splb__count {
  font-family: 'Manrope', sans-serif;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  margin-top: 4px;
}

@media (max-width: 700px) {
  .xrt-splb {
    padding: 14px;
  }

  .xrt-splb__arrow {
    width: 38px;
    height: 38px;
  }

  .xrt-splb__frame,
  .xrt-splb__frame img {
    max-height: 52vh;
  }

  .xrt-splb__frame.is-zoomed {
    height: 52vh;
  }
}
