/*
 * Lekki, responsywny lightbox bez ramki wokół zdjęcia.
 * functions0.php uruchamia plugin z containerBorderSize: 0,
 * dlatego zdjęcie i pasek podpisu mają dokładnie tę samą szerokość.
 */

#jquery-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99990;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.84) !important;
  backdrop-filter: blur(2px);
}

#jquery-lightbox {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100vw !important;
  height: 100vh !important;
  box-sizing: border-box;
  padding: 20px;
  text-align: center;
  line-height: 0;
  overflow: auto;
}

#jquery-lightbox a img,
#lightbox-image {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#lightbox-container-image-box {
  position: relative;
  flex: 0 0 auto;
  max-width: calc(100vw - 40px) !important;
  max-height: calc(100vh - 100px) !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 4px 4px 0 0;
  box-shadow: none !important;
  overflow: hidden;
}

#lightbox-container-image {
  position: relative;
  padding: 0 !important;
  background: transparent !important;
}

#lightbox-image {
  display: block;
  width: auto;
  max-width: calc(100vw - 40px) !important;
  height: auto;
  max-height: calc(100vh - 112px) !important;
  margin: 0 auto;
  object-fit: contain;
}

#lightbox-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  text-align: center;
  line-height: 0;
}

#lightbox-nav {
  position: absolute;
  inset: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
}

#lightbox-nav a {
  outline: none;
}

#lightbox-nav-btnPrev,
#lightbox-nav-btnNext {
  display: block;
  width: 49%;
  height: 100%;
  zoom: 1;
}

#lightbox-nav-btnPrev { float: left; }
#lightbox-nav-btnNext { float: right; }

/* Plugin ustawia width na szerokość obrazu. Bez paddingu i borderu
   pasek nie może już wystawać ani być węższy od zdjęcia. */
#lightbox-container-image-data-box {
  flex: 0 0 auto;
  max-width: calc(100vw - 40px) !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  background: #fff;
  border: 0 !important;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.26) !important;
  font: 12px/1.45 "Open Sans", Arial, sans-serif;
  overflow: hidden;
}

#lightbox-container-image-data {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  padding: 7px 10px;
  box-sizing: border-box;
  color: #475467;
  background: #fff;
  box-shadow: inset 0 1px 0 #edf1f3;
}

#lightbox-container-image-data #lightbox-image-details {
  float: none;
  min-width: 0;
  width: auto;
  text-align: left;
  line-height: 1.4;
}

#lightbox-image-details-caption {
  display: block;
  color: #475467;
  font-weight: 600;
}

#lightbox-image-details-currentNumber {
  display: block;
  clear: left;
  padding-bottom: 0;
  color: #7a8791;
  font-size: 11px;
}

#lightbox-secNav {
  flex: 0 0 auto;
}

#lightbox-secNav-btnClose {
  position: relative;
  float: none;
  display: block;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 3px;
  transition: background-color 150ms ease;
}

#lightbox-secNav-btnClose:hover {
  background: #f1f5f7;
}

#lightbox-secNav-btnClose img {
  width: 34px;
  height: 34px;
  opacity: 0;
}

#lightbox-secNav-btnClose::before,
#lightbox-secNav-btnClose::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 16px;
  width: 1.5px;
  height: 18px;
  background: #56636d;
  border-radius: 2px;
}

#lightbox-secNav-btnClose::before { transform: rotate(45deg); }
#lightbox-secNav-btnClose::after { transform: rotate(-45deg); }

@media (max-width: 600px) {
  #jquery-lightbox {
    justify-content: flex-start;
    padding: 10px;
  }

  #lightbox-container-image-box,
  #lightbox-container-image-data-box {
    max-width: calc(100vw - 20px) !important;
  }

  #lightbox-image {
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 100px) !important;
  }
}
