body.isbat-ux-project [data-isbat-project-gallery] .sv-gal-item {
  color: inherit;
  text-decoration: none;
}

body.isbat-ux-project [data-isbat-project-gallery] .sv-gal-item:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -4px;
  box-shadow: inset 0 0 0 6px #002b82;
}

body.isbat-ux-project [data-isbat-project-gallery] .sv-gal-item:not([hidden]) {
  opacity: 1;
  transform: none;
}

body.isbat-ux-project [data-isbat-project-gallery] .sv-gal-item:has(.sv-gal-caption) {
  display: flex !important;
  flex-direction: column !important;
  aspect-ratio: auto !important;
  height: auto !important;
  min-height: 0 !important;
}

body.isbat-ux-project [data-isbat-project-gallery] .sv-gal-item[hidden],
body.isbat-ux-project [data-isbat-project-gallery-load][hidden] {
  display: none !important;
}

body.isbat-ux-project [data-isbat-project-gallery] .sv-gal-item > img {
  flex: none;
  width: 100%;
  height: auto !important;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

body.isbat-ux-project [data-isbat-project-gallery] .sv-gal-caption-bar {
  position: static !important;
  display: block !important;
  box-sizing: border-box;
  width: 100%;
  max-height: none !important;
}

body.isbat-ux-project [data-isbat-project-gallery] .sv-gal-caption {
  display: block !important;
  -webkit-line-clamp: unset !important;
  max-height: none !important;
  overflow: visible !important;
  overflow-wrap: anywhere;
  white-space: normal !important;
}

body.isbat-ux-project #isbatSitewideLightbox {
  background: #10151e;
  color: #f8fafc;
  padding: 4.25rem clamp(3.75rem, 7vw, 6rem) 1.75rem;
  overflow-y: auto;
}

body.isbat-ux-project #isbatSitewideLightbox .isbat-lightbox__figure {
  grid-template-rows: minmax(0, 1fr) auto;
  height: auto;
  min-height: 0;
  gap: .5rem;
}

body.isbat-ux-project #isbatSitewideLightbox .isbat-lightbox__image {
  max-height: calc(100dvh - 10rem);
}

body.isbat-ux-project #isbatSitewideLightbox:has(.isbat-project-photo-actions:not([hidden])) .isbat-lightbox__image {
  max-height: calc(100dvh - 15rem);
}

body.isbat-ux-project #isbatSitewideLightbox .isbat-lightbox__caption,
body.isbat-ux-project #isbatSitewideLightbox .isbat-lightbox__counter {
  color: #f8fafc;
  overflow-wrap: anywhere;
}

body.isbat-ux-project #isbatSitewideLightbox :is(button, .isbat-project-photo-actions a):focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.isbat-project-photo-fullscreen {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 18px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: #fff;
  font: inherit;
  font-size: 1.5rem;
  cursor: pointer;
}

body.isbat-ux-project #isbatSitewideLightbox .isbat-lightbox__figure {
  touch-action: pan-y pinch-zoom;
}

body.isbat-ux-project #isbatSitewideLightbox [hidden] {
  display: none !important;
}

.isbat-project-photo-recovery {
  text-align: center;
}

.isbat-project-photo-status {
  margin: .75rem 0 .5rem;
  color: #f8fafc;
}

.isbat-project-photo-status:empty {
  margin: 0;
}

.isbat-project-photo-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem 1rem;
}

.isbat-project-photo-actions button {
  min-height: 44px;
  padding: .5rem 1rem;
  border: 1px solid #8ebff5;
  border-radius: 5px;
  background: #002b82;
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.isbat-project-photo-actions a {
  padding: .5rem .125rem;
  color: #dcefff;
  -webkit-text-fill-color: #dcefff;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  body.isbat-ux-project #isbatSitewideLightbox {
    padding: 3.75rem 1rem 4.75rem;
  }

  body.isbat-ux-project #isbatSitewideLightbox .isbat-lightbox__image {
    max-height: calc(100dvh - 11rem);
  }

  body.isbat-ux-project #isbatSitewideLightbox:has(.isbat-project-photo-actions:not([hidden])) .isbat-lightbox__image {
    max-height: calc(100dvh - 17rem);
  }

  body.isbat-ux-project #isbatSitewideLightbox .isbat-lightbox__nav {
    position: fixed;
    top: auto;
    bottom: 1rem;
    transform: none;
  }
}
