/* Image viewer is deliberately independent of the site's day/night palettes. */
body.at-photo-lightbox-open { overflow: hidden !important; }
body.at-post-images-enlargeable .at-article-shell .wp-block-post-content img:not(.emoji),
body.at-post-images-enlargeable .at-story-fullbleed .wp-block-cover__image-background { cursor: zoom-in; }
.at-photo-lightbox[hidden], .at-photo-lightbox [hidden] { display: none !important; }
.at-photo-lightbox {
  position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box; isolation: isolate; color: #f5fbfb !important;
}
.at-photo-lightbox__backdrop {
  position: absolute; inset: 0; background: rgba(5, 17, 22, .70);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.at-photo-lightbox__frame {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: min(100%, 1500px); height: 100%; min-height: 0; pointer-events: none;
}
.at-photo-lightbox__figure {
  margin: 0 !important; padding: 0 !important; min-width: 0; min-height: 0;
  max-width: 100%; max-height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 9px; pointer-events: auto;
}
.at-photo-lightbox__image {
  display: block; box-sizing: border-box; width: auto !important; height: auto !important;
  max-width: min(100%, 1420px) !important; max-height: calc(100dvh - 110px) !important;
  object-fit: contain !important; border-radius: 8px; box-shadow: 0 15px 60px rgba(0,0,0,.28);
  background: transparent !important; transition: opacity .15s ease;
}
.at-photo-lightbox__caption {
  max-width: 80ch; text-align: center; font: 400 13px/1.5 system-ui,sans-serif !important;
  color: #e2f3f3 !important; margin: 0 !important;
}
.at-photo-lightbox button {
  position: absolute; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.4) !important;
  padding: 0 !important; background: rgba(7, 57, 64, .88) !important; color: #fff !important;
  border-radius: 999px !important; width: 44px; height: 44px; cursor: pointer;
  pointer-events: auto; font: 400 30px/1 system-ui,sans-serif !important;
  box-shadow: 0 3px 14px rgba(0,0,0,.2);
}
.at-photo-lightbox button:hover, .at-photo-lightbox button:focus-visible {
  background: #087c84 !important; outline: 2px solid #fff; outline-offset: 2px;
}
.at-photo-lightbox__close { top: 0; right: 0; }
.at-photo-lightbox__prev { left: 0; top: 50%; transform: translateY(-50%); }
.at-photo-lightbox__next { right: 0; top: 50%; transform: translateY(-50%); }
.at-photo-lightbox__count {
  position: absolute; bottom: 0; color: #e2f3f3; text-align: center;
  font: 500 12px/1.4 system-ui,sans-serif; pointer-events: none;
}
@media (max-width: 700px) {
  .at-photo-lightbox { padding: 12px; }
  .at-photo-lightbox__frame { padding-bottom: 36px; box-sizing: border-box; }
  .at-photo-lightbox__image { max-height: calc(100dvh - 135px) !important; }
  .at-photo-lightbox__prev { left: 3px; bottom: 0; top: auto; transform: none; }
  .at-photo-lightbox__next { right: 3px; bottom: 0; top: auto; transform: none; }
  .at-photo-lightbox__close { top: 0; right: 0; }
}
@media (prefers-reduced-motion: reduce) { .at-photo-lightbox__image { transition: none; } }
