a.rkx-lightbox-item {
  display: block;
  text-decoration: none;
  color: inherit;
}
.rkx-lightbox-item,
.rkx-main-img.rkx-lightbox-item { cursor: pointer; }
.rkx-lightbox-item .newpictt,
.rkx-lightbox-item .pic { cursor: pointer; }

.rkx-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  box-sizing: border-box;
}
.rkx-lightbox.is-open { display: flex; }

.rkx-lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.rkx-lightbox-stage {
  position: relative;
  z-index: 1;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  animation: rkxLbIn .28s ease;
}
@keyframes rkxLbIn {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: none; }
}

.rkx-lightbox-image-wrap {
  position: relative;
  background: #111;
  border-radius: 4px;
  overflow: hidden;
  line-height: 0;
  max-height: calc(88vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.rkx-lightbox-image-wrap img {
  display: block;
  max-width: 100%;
  max-height: calc(88vh - 56px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform .25s ease;
}
.rkx-lightbox.is-zoomed .rkx-lightbox-image-wrap {
  overflow: auto;
  max-height: calc(88vh - 56px);
}
.rkx-lightbox.is-zoomed .rkx-lightbox-image-wrap img {
  max-width: none;
  max-height: none;
}

.rkx-lightbox-toolbar {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 4px;
  overflow: hidden;
}
.rkx-lightbox-toolbar button {
  width: 40px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .2s;
}
.rkx-lightbox-toolbar button:hover { background: rgba(255,255,255,.12); }
.rkx-lightbox-toolbar button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.rkx-lightbox-toolbar button.is-disabled {
  opacity: .35;
  pointer-events: none;
}

.rkx-lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.rkx-lb-close:hover { background: rgba(0, 0, 0, 0.9); }

.rkx-lightbox-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
}

body.rkx-lightbox-open { overflow: hidden; }

@media (max-width: 767px) {
  .rkx-lightbox { padding: 16px 10px; }
  .rkx-lightbox-toolbar button { width: 36px; height: 34px; }
  .rkx-lb-close { width: 34px; height: 34px; }
}
