body.lb-disable-scrolling {
  overflow: hidden;
}

.lightboxOverlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9999;
  background-color: black;
  opacity: 0.8;
  display: none;
}


.lightbox {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: auto !important;
  max-width: 95vw !important; /* 90% от ширины экрана */
  max-height: 85vh !important; /* 85% от высоты экрана */
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  z-index: 10000;
}

.lightbox .lb-image {
  display: block;
  height: auto;
  max-width: inherit;
  max-height: none;
  border-radius: 8px;
  border: 4px solid white;
}

.lightbox a img {
  border: none;
}

.lb-outerContainer {
  position: relative;
  width: auto;
  height: auto;
  margin: 0;
  border-radius: 4px;
  background-color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lb-outerContainer:after {
  content: "";
  display: table;
  clear: both;
}

.lb-loader {
  position: absolute;
  top: 43%;
  left: 0;
  height: 25%;
  width: 100%;
  text-align: center;
  line-height: 0;
}

.lb-cancel {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto;
  background: url(../images/lightbox/loading.gif) no-repeat;
}

.lb-nav {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 10;
}

.lb-container > .nav {
  left: 0;
}

.lb-nav a {
  outline: none;
  background-image: url('data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
}

.lb-prev, .lb-next {
  height: 100%;
  cursor: pointer;
  display: block;
}

.lb-nav a.lb-prev {
  width: 34%;
  left: 0;
  float: left;
  background: url(../images/lightbox/prev.png) left 48% no-repeat;
  opacity: 0;
  -webkit-transition: opacity 0.6s;
  -moz-transition: opacity 0.6s;
  -o-transition: opacity 0.6s;
  transition: opacity 0.6s;
}

.lb-nav a.lb-prev:hover {
  opacity: 1;
}

.lb-nav a.lb-next {
  width: 64%;
  right: 0;
  float: right;
  background: url(../images/lightbox/next.png) right 48% no-repeat;
  opacity: 0;
  -webkit-transition: opacity 0.6s;
  -moz-transition: opacity 0.6s;
  -o-transition: opacity 0.6s;
  transition: opacity 0.6s;
}

.lb-nav a.lb-next:hover {
  opacity: 1;
}

.lb-dataContainer {
  position: relative !important;
   /* bottom: -60px !important; отступ от нижней границы окна */
  left: 50% !important;
  transform: translateX(-50%) !important;
   /* width: auto !important; */
   /* max-width: 80% !important; */
  padding: 12px 20px !important;
   /* background: white !important;  */
  border-radius: 6px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  z-index: 10001 !important;
  margin: 0 !important;
  text-align: center !important;
}

.lb-dataContainer:after {
  content: "";
  display: table;
  clear: both;
}

.lb-data {
  padding: 0 4px;
  color: #ccc;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lb-data .lb-details {
   /*  width: 85%; */
  float: left;
  text-align: left;
  line-height: 1.1em;
}

.lb-data .lb-caption {
  font-size: 13px;
  font-weight: bold;
  line-height: 1em;
}

.lb-data .lb-caption a {
  color: #4ae;
}

.lb-data .lb-number {
  display: block;
  clear: left;
  padding-bottom: 1em;
  font-size: 14px;
  color: #a6a6a6;
}

.lb-data .lb-close {
  position: absolute !important;
  top: 10px !important;    /* выше верхней границы окна */
  right: 40px !important;  /* правее правой границы */
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background: #333 !important;
  opacity: 1 !important;
  color: #ff5000 !important;
  border: 3px solid #F55000 !important;
  text-align: center !important;
  line-height: 40px !important;
  cursor: pointer !important;
  font-size: 24px !important;
  z-index: 10003 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.lb-data .lb-close:before {
  content: '×' !important;
}

.lb-data .lb-close:hover {
  background: #FF5000 !important;
  color: #fff !important;
}

/* МОБИЛЬНЫЕ КОРРЕКТИРОВКИ */
@media (max-width: 768px) {
  .lightbox {
    max-height: 75vh !important; /* меньше места на маленьких экранах */
  }
  
  .lb-dataContainer {
     /* bottom: -80px !important; */
    padding: 10px !important;
    font-size: 14px !important;
  }
  
  .lb-data .lb-close {
    top: 5px !important;
    right: 10px !important;
    width: 30px !important;
    height: 30px !important;
    line-height: 50px !important;
    font-size: 30px !important;
  }
}