/* Preview-Lightbox — gehört zu preview.js.

   Nutzt die Farbtokens der Seite (--bg, --accent-teal, --line, --dim).
   Fallbacks stehen daneben, falls die Datei mal ohne style.css läuft. */

/* ------------------------------------------------------- Button */

.pv-open {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 7px 13px;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent-teal, #00ffe0);
  background: transparent;
  border: 1px solid var(--accent-teal, #00ffe0);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.pv-open:hover,
.pv-open:focus-visible {
  background: var(--accent-teal, #00ffe0);
  color: var(--bg, #060608);
}

.pv-icon { font-size: 13px; line-height: 1; }

/* ------------------------------------------------------ Overlay */

.pv-box {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;               /* über der Demo-Leiste (die liegt bei 100) */
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 24px 64px;
  background: rgba(6, 6, 8, 0.94);
  backdrop-filter: blur(3px);
}

.pv-box.is-open { display: flex; }

body.pv-locked { overflow: hidden; }

.pv-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0;
  max-width: 100%;
  max-height: 100%;
}

.pv-img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 170px);
  width: auto;
  height: auto;
  border: 1px solid var(--line, #24242c);
  border-radius: 3px;
  background: var(--bg, #060608);
}

.pv-cap {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--dim, #8b8b96);
  text-align: center;
  max-width: 60ch;
}

/* ---------------------------------------------- Navigation */

.pv-close,
.pv-nav {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid transparent;
  color: var(--dim, #8b8b96);
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.pv-close:hover, .pv-close:focus-visible,
.pv-nav:hover,   .pv-nav:focus-visible {
  color: var(--accent-teal, #00ffe0);
  border-color: var(--accent-teal, #00ffe0);
}

.pv-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 36px;
  height: 36px;
  font-size: 24px;
  border-radius: 2px;
}

.pv-nav {
  width: 44px;
  height: 64px;
  font-size: 32px;
  border-radius: 2px;
}

.pv-nav[hidden], .pv-count[hidden] { display: none; }

.pv-count {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--dim, #8b8b96);
}

/* --------------------------------------------------- Schmal */

@media (max-width: 640px) {
  .pv-box { padding: 40px 10px 56px; }
  .pv-img { max-height: calc(100vh - 150px); }
  .pv-nav { width: 34px; height: 52px; font-size: 26px; }
}

/* Wer Bewegung reduziert haben will, kriegt keine Übergänge. */
@media (prefers-reduced-motion: reduce) {
  .pv-open, .pv-close, .pv-nav { transition: none; }
}
