.jig-custom-lb-open {
  overflow: hidden !important;
}

.jig-custom-lb {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  background: rgba(0, 0, 0, 0.94) !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  padding: 34px 96px 64px !important;
}

.jig-custom-lb.is-open {
  display: flex !important;
}

.jig-custom-lb,
.jig-custom-lb * {
  box-sizing: border-box !important;
}

.jig-custom-lb__stage {
  max-width: 96vw !important;
  max-height: 86vh !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.jig-custom-lb__image {
  max-width: 96vw !important;
  max-height: calc(86vh - 82px) !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.45) !important;
}

.jig-custom-lb__caption {
  margin-top: 18px !important;
  color: #fff !important;
  text-align: center !important;
  line-height: 1.42 !important;
  max-width: min(900px, 90vw) !important;
  font-family: inherit !important;
}

.jig-custom-lb__line {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
}

.jig-custom-lb__title {
  font-weight: 600 !important;
  font-size: 16px !important;
}

.jig-custom-lb__description {
  margin-top: 4px !important;
  font-size: 14px !important;
  opacity: 0.92 !important;
}

.jig-custom-lb__exif {
  margin-top: 4px !important;
  font-size: 13px !important;
  opacity: 0.82 !important;
}

/* Controles: anula estilos rojos/heredados del tema, Elementor o JIG. */
html body .jig-custom-lb button.jig-custom-lb__button,
html body .jig-custom-lb .jig-custom-lb__button,
html body .jig-custom-lb button.jig-custom-lb__button:hover,
html body .jig-custom-lb button.jig-custom-lb__button:focus,
html body .jig-custom-lb button.jig-custom-lb__button:active,
html body .jig-custom-lb button.jig-custom-lb__button:visited {
  position: fixed !important;
  z-index: 2147483647 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #fff !important;
  fill: #fff !important;
  stroke: #fff !important;
  opacity: 1 !important;
  cursor: pointer !important;
  line-height: 1 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  text-decoration: none !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85) !important;
  -webkit-text-fill-color: #fff !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-weight: 300 !important;
}

html body .jig-custom-lb button.jig-custom-lb__button::before,
html body .jig-custom-lb button.jig-custom-lb__button::after {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

html body .jig-custom-lb button.jig-custom-lb__close {
  top: 12px !important;
  right: 22px !important;
  width: 38px !important;
  height: 38px !important;
  font-size: 28px !important;
}



html body .jig-custom-lb button.jig-custom-lb__fullscreen {
  top: 12px !important;
  right: 66px !important;
  width: 38px !important;
  height: 38px !important;
  font-size: 24px !important;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

html body .jig-custom-lb.jig-custom-lb--fullscreen {
  padding: 24px 72px 48px !important;
}

html body .jig-custom-lb.jig-custom-lb--fullscreen .jig-custom-lb__stage {
  max-width: 100vw !important;
  max-height: 100vh !important;
}

html body .jig-custom-lb.jig-custom-lb--fullscreen .jig-custom-lb__image {
  max-width: 98vw !important;
  max-height: calc(100vh - 96px) !important;
}

html body .jig-custom-lb button.jig-custom-lb__prev,
html body .jig-custom-lb button.jig-custom-lb__next {
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 44px !important;
  height: 58px !important;
  font-size: 36px !important;
}

html body .jig-custom-lb button.jig-custom-lb__prev {
  left: 18px !important;
}

html body .jig-custom-lb button.jig-custom-lb__next {
  right: 18px !important;
}

html body .jig-custom-lb.jig-custom-lb--single button.jig-custom-lb__prev,
html body .jig-custom-lb.jig-custom-lb--single button.jig-custom-lb__next {
  display: none !important;
}

.jig-custom-lb__counter {
  position: fixed !important;
  top: 24px !important;
  left: 24px !important;
  z-index: 2147483647 !important;
  color: #fff !important;
  font-size: 13px !important;
  opacity: 0.85 !important;
}

@media (max-width: 767px) {
  .jig-custom-lb {
    padding: 44px 12px 54px !important;
  }

  .jig-custom-lb__image {
    max-width: 94vw !important;
    max-height: calc(82vh - 84px) !important;
  }

  html body .jig-custom-lb button.jig-custom-lb__close {
    top: 8px !important;
    right: 10px !important;
    width: 34px !important;
    height: 34px !important;
    font-size: 26px !important;
  }


  html body .jig-custom-lb button.jig-custom-lb__fullscreen {
    top: 8px !important;
    right: 52px !important;
    width: 34px !important;
    height: 34px !important;
    font-size: 22px !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  html body .jig-custom-lb:not(.jig-custom-lb--single) button.jig-custom-lb__prev,
  html body .jig-custom-lb:not(.jig-custom-lb--single) button.jig-custom-lb__next {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}


/* 1.0.23: flechas visibles también en pantallas táctiles cuando hay más de una imagen. */
html body .jig-custom-lb.is-open:not(.jig-custom-lb--single) button.jig-custom-lb__prev,
html body .jig-custom-lb.is-open:not(.jig-custom-lb--single) button.jig-custom-lb__next {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 2147483647 !important;
}
html body .jig-custom-lb.is-open.jig-custom-lb--single button.jig-custom-lb__prev,
html body .jig-custom-lb.is-open.jig-custom-lb--single button.jig-custom-lb__next {
  display: none !important;
}
