/* Thumbnail / lightbox — uodev (full-screen overlay) */

body.uodev-lbx--scroll-lock {
  overflow: hidden;
}

#thumbBox.uodev-lbx {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 32px);
  box-sizing: border-box;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

#thumbBox.uodev-lbx.uodev-lbx--open {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
}

.uodev-lbx__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@supports not (backdrop-filter: blur(1px)) {
  .uodev-lbx__backdrop {
    background: rgba(10, 12, 18, 0.9);
  }
}

.uodev-lbx__surface {
  position: relative;
  z-index: 2;
  max-width: min(96vw, 1200px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(32, 36, 44, 0.96) 0%, rgba(18, 20, 26, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.3) inset;
  overflow: hidden;
  transform: scale(0.98);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  isolation: isolate;
}

#thumbBox.uodev-lbx--open.uodev-lbx--show-img .uodev-lbx__surface {
  transform: scale(1);
  opacity: 1;
}

#thumbBox.uodev-lbx--open.uodev-lbx--loading .uodev-lbx__surface {
  min-height: 120px;
  min-width: min(80vw, 400px);
  transform: scale(1);
  opacity: 1;
}

/* Viewport sağ üst: resim kartının dışında, üstüne binmez */
#thumbBox .uodev-lbx__close {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px) + 4px);
  right: max(12px, env(safe-area-inset-right, 0px) + 4px);
  z-index: 10052;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.uodev-lbx__close:hover {
  background: rgba(220, 60, 60, 0.5);
  border-color: rgba(255, 120, 120, 0.4);
  color: #fff;
}

.uodev-lbx__close:focus-visible {
  outline: 2px solid rgba(100, 180, 255, 0.9);
  outline-offset: 2px;
}

.uodev-lbx__close .bi {
  font-size: 1.1rem;
  line-height: 1;
}

.uodev-lbx__image-wrap {
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.25);
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

#thumbImage.uodev-lbx__image-wrap .uodev-lbx__img {
  display: block;
  max-width: 100%;
  max-height: min(80vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  vertical-align: middle;
}

.uodev-lbx__caption {
  margin: 0;
  padding: 12px 16px 16px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: rgba(220, 224, 232, 0.95);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

#thumbBox.uodev-lbx--loading .uodev-lbx__image-wrap {
  min-height: 0;
}

.uodev-lbx__error {
  margin: 2rem 1.5rem;
  color: #f6a0a0;
  text-align: center;
  font-size: 0.95rem;
}

#thumbLoading.uodev-lbx__loading {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(8, 10, 14, 0.55);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  visibility: hidden;
}

#thumbLoading.uodev-lbx__loading.uodev-lbx__loading--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.uodev-lbx__spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: rgba(100, 180, 255, 0.95);
  animation: uodev-lbx-spin 0.75s linear infinite;
}

.uodev-lbx__loading-txt {
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(230, 234, 242, 0.88);
}

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

#thumbBox.uodev-lbx--loading .uodev-lbx__image-wrap {
  min-height: 200px;
}
