.isl-lightbox-overlay,
#isl-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 2vw, 28px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

#isl-lightbox.active {
  opacity: 1;
}

#isl-lightbox.show-closing-animation {
  opacity: 0;
}

#isl-lightbox[hidden] {
  display: none;
}

#isl-lightbox-backdrop,
#isl-lightbox .scrim {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  cursor: pointer;
}

.lightbox-image-container {
  position: relative;
  z-index: 2;
  width: min(96vw, 1280px);
  max-height: calc(100vh - 56px);
  display: flex;
  justify-content: center;
}

#isl-lightbox-figure {
  position: relative;
  margin: 0;
  max-width: 100%;
  max-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

#isl-lightbox-img {
  display: block;
  width: auto;
  max-width: min(95vw, 1240px);
  max-height: calc(100vh - 112px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 18px 46px rgba(17, 26, 39, 0.2);
  cursor: zoom-out;
}

#isl-lightbox-caption {
  color: #101828;
  font-size: 0.92rem;
  margin-top: 0.7rem;
  text-align: center;
  max-width: min(90vw, 900px);
  line-height: 1.4;
  opacity: 0.8;
}

#isl-lightbox-close,
#isl-lightbox .close-button {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  color: #101828;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

#isl-lightbox-close svg,
#isl-lightbox .close-button svg {
  fill: #101828;
}

#isl-lightbox-close:hover,
#isl-lightbox .close-button:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.2);
  background: #fff;
}

#isl-lightbox-close:focus-visible,
#isl-lightbox .close-button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

@media (max-width: 782px) {
  #isl-lightbox {
    padding: 10px;
  }

  #isl-lightbox-close,
  #isl-lightbox .close-button {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
  }

  #isl-lightbox-img {
    max-width: 96vw;
    max-height: calc(100vh - 88px);
    border-radius: 8px;
  }

  #isl-lightbox-caption {
    font-size: 0.84rem;
    margin-top: 0.5rem;
  }
}


figure.wp-block-image img.hide {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}


figure.wp-block-image button.lightbox-trigger {
  display: none !important;
}