/*
 * Lightbox — Fancybox'ın yerine yazılmış bağımlılıksız görsel/video penceresi (lightbox.js ile).
 * Görünüm Fancybox 6 varsayılan koyu temasıyla eşlenmiştir: arka plan, buton ölçüleri, sayaç, video kutusu.
 * Sınıflar `lb-` önekli; main.css bu sınıflara kural yazmaz.
 */
/* Pencere <dialog> + showModal() ile en üst katmanda açılır (Fancybox 6 gibi): sayfadaki çerez çubuğu,
   sabit butonlar vb. z-index ne olursa olsun altında kalır. */
.lb {
  --lb-backdrop: rgba(24, 24, 27, 0.95);
  --lb-color: #ddd;
  --lb-hover-color: #fff;
  --lb-button-size: 46px;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
  flex-direction: column;
  color: var(--lb-color);
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lb[open] {
  display: flex;
}

.lb::backdrop {
  background: transparent;
}

.lb.is-open {
  opacity: 1;
}

.lb:focus {
  outline: none;
}

.lb__backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--lb-backdrop);
}

.lb__toolbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px;
  pointer-events: none;
  font: 500 16px/46px -apple-system, BlinkMacSystemFont, "Segoe UI", "Liberation Sans", sans-serif;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.75);
}

.lb__toolbar > * {
  pointer-events: auto;
}

.lb__counter {
  padding: 0 10px;
  font-variant-numeric: tabular-nums;
}

.lb__button {
  width: var(--lb-button-size);
  height: var(--lb-button-size);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--lb-color);
  cursor: pointer;
  transition: color 0.15s ease;
}

.lb__button:hover {
  color: var(--lb-hover-color);
}

.lb__button:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.75);
}

.lb__button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.4));
  pointer-events: none;
}

.lb__close {
  margin-left: auto;
}

.lb__nav {
  position: absolute;
  top: 50%;
  z-index: 20;
  transform: translateY(-50%);
}

.lb__nav--prev {
  left: 0;
}

.lb__nav--next {
  right: 0;
}

.lb.is-single .lb__nav,
.lb.is-single .lb__counter {
  display: none;
}

.lb__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 8px;
  touch-action: pan-y;
}

.lb__content {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lb__content.is-changing {
  opacity: 0;
}

.lb__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 128px);
  max-height: calc(100dvh - 128px);
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.lb__frame {
  width: 960px;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 128px);
  max-height: calc(100dvh - 128px);
  background: rgba(0, 0, 0, 0.9);
}

.lb__frame iframe,
.lb__frame video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.lb__spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  margin: -25px 0 0 -25px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: lb-spin 0.75s linear infinite;
}

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

@media (min-width: 1024px) {
  .lb__stage {
    padding: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lb,
  .lb__content {
    transition: none;
  }
}
