/* MBI – Lightbox für Objektbilder (ohne externe Bibliothek) */
.mbi-lb {
  --mbi-lb-gold: #D4AF5A;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(14, 12, 11, 0.97);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #f2efe8;
  font-family: "Neue Haas Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  overflow: hidden;
}
.mbi-lb::backdrop { background: rgba(14, 12, 11, 0.6); }
.mbi-lb[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; animation: mbi-lb-ein 0.2s ease; }
@keyframes mbi-lb-ein { from { opacity: 0; } to { opacity: 1; } }

.mbi-lb__buehne {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 88px 96px 16px;
  overflow: hidden;
  touch-action: none; /* Gesten (Pinch, Verschieben, Wischen) übernimmt das Script */
}
.mbi-lb__bild {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  transition: opacity 0.2s ease, transform 0.18s ease-out;
  cursor: zoom-in;
  will-change: transform;
}
.mbi-lb.ist-gezoomt .mbi-lb__bild { cursor: grab; transition: opacity 0.2s ease; }
.mbi-lb.ist-gezoomt .mbi-lb__bild:active { cursor: grabbing; }
.mbi-lb__bild.ist-hell { background: #fff; } /* Grundrisse mit Transparenz */
.mbi-lb__bild.laedt { opacity: 0.3; }

.mbi-lb__fuss {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 14px 96px 28px;
  font-size: 18px;
  line-height: 1.45;
  color: rgba(242, 239, 232, 0.8);
}
.mbi-lb__zaehler { color: var(--mbi-lb-gold); font-size: 17px; letter-spacing: 0.08em; white-space: nowrap; }

/* Buttons – gleiches Design wie die Zoom-Buttons am 3D-Modell */
.mbi-lb__oben { position: absolute; top: 18px; right: 20px; display: flex; gap: 12px; z-index: 2; }
.mbi-lb__knopf {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid rgba(212, 175, 90, 0.45);
  border-radius: 50%;
  background: rgba(14, 12, 11, 0.6);
  color: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease, transform 0.15s ease;
}
.mbi-lb__knopf svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mbi-lb__knopf:hover { border-color: var(--mbi-lb-gold); color: var(--mbi-lb-gold); }
.mbi-lb__knopf:active { transform: scale(0.94); }
.mbi-lb__knopf:focus-visible { outline: 2px solid var(--mbi-lb-gold); outline-offset: 2px; }
.mbi-lb__knopf:disabled { opacity: 0.35; cursor: default; border-color: rgba(212, 175, 90, 0.45); color: #fff; }
.mbi-lb__knopf[hidden] { display: none; }
.mbi-lb__zurueck, .mbi-lb__weiter { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); }
.mbi-lb__zurueck { left: 20px; }
.mbi-lb__weiter { right: 20px; }
.mbi-lb__zurueck:active, .mbi-lb__weiter:active { transform: translateY(-50%) scale(0.94); }

/* Auslöser auf der Seite */
[data-lightbox] { cursor: zoom-in; display: block; }

@media (max-width: 720px) {
  .mbi-lb__buehne { padding: 84px 0 8px; }
  .mbi-lb__fuss { padding: 12px 20px 92px; font-size: 16px; }
  .mbi-lb__oben { top: 14px; right: 14px; gap: 10px; }
  .mbi-lb__knopf { width: 50px; height: 50px; }
  .mbi-lb__zurueck, .mbi-lb__weiter { top: auto; bottom: 22px; transform: none; position: fixed; }
  .mbi-lb__zurueck:active, .mbi-lb__weiter:active { transform: scale(0.94); }
  .mbi-lb__zurueck { left: 20px; }
  .mbi-lb__weiter { right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .mbi-lb[open] { animation: none; }
  .mbi-lb__bild { transition: none; }
}
