/* Image Story Lightbox */

.islb-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  -webkit-tap-highlight-color: transparent;
}

.islb-overlay.is-open {
  display: flex;
}

.islb-stage {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.islb-img {
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.islb-img.is-loaded {
  opacity: 1;
  transform: scale(1);
}

.islb-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  line-height: 40px;
  font-size: 32px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000000;
  padding: 0;
  transition: background 0.15s ease;
}

.islb-close:hover,
.islb-close:focus {
  background: rgba(255, 255, 255, 0.25);
  outline: none;
}

.islb-spinner {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: islb-spin 0.8s linear infinite;
}

@keyframes islb-spin {
  to { transform: rotate(360deg); }
}

/* Clickable hint on images inside the content area */
.postarea img {
  cursor: zoom-in;
}

body.islb-noscroll {
  overflow: hidden;
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .islb-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    line-height: 36px;
    font-size: 28px;
  }
}
