/* bounce-cards runtime.css — Modulkern (kein Demo-Chrome). */

.mm-bounce {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0f0f12;
  font-family: inherit;
}

.mm-bounce,
.mm-bounce * {
  box-sizing: border-box;
}

/* Hintergrund-Buehne (Farbe oder Bild + Overlay) hinter dem Kartenstapel. */
.mm-bounce .mmb-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.mm-bounce .mmb-bg__img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.mm-bounce .mmb-bg__overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
}

/* Stapel-Anker: 0x0-Punkt in der Stage-Mitte, Karten haengen absolut daran
   (Proto: .bounce-cards bei left/top 50 % mit width/height 0). */
.mm-bounce .mmb-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mm-bounce .mmb-stack {
  position: relative;
  width: 0;
  height: 0;
}

/* ---- Karte ---- */
.mm-bounce .mmb-card {
  position: absolute;
  left: calc(var(--mmb-size, 200px) / -2);
  top: calc(var(--mmb-size, 200px) / -2);
  width: var(--mmb-size, 200px);
  aspect-ratio: 1;
  border: var(--mmb-frame, 5px) solid var(--mmb-frame-color, #ffffff);
  border-radius: var(--mmb-radius, 22px);
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  cursor: zoom-in;
  transform-origin: center center;
  will-change: transform;
  background: #18181b;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  font: inherit;
  color: inherit;
}

/* Karte ist ein <button>: Fokusring theme-fest (Theme-Outlines toeten). */
.mm-bounce .mmb-card:focus {
  outline: 0 !important;
}

.mm-bounce .mmb-card:focus-visible {
  outline: 2px solid #a78bfa !important;
  outline-offset: 3px !important;
}

.mm-bounce .mmb-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Theme-Ringe (BB/WP img-Styles) toeten — zusätzlich zum Inline-Style. */
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  outline: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ---- Lightbox (Standard der Galerien: fixed ueber den MONITOR, Karte
   min(96vw, 960px), Bild contained in der Viewport-Hoehe) ---- */
.mm-bounce .mmb-lb {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s;
}

.mm-bounce .mmb-lb.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mm-bounce .mmb-lb__scrim {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.62);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.mm-bounce .mmb-lb__card {
  position: relative;
  z-index: 1;
  width: min(96vw, 960px);
  max-height: min(92dvh, 900px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.75rem;
  background: var(--mmb-lb-bg, #0a0a10);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateY(18px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.mm-bounce .mmb-lb.is-open .mmb-lb__card { transform: none; }

.mm-bounce .mmb-lb__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2.2rem;
  height: 2.2rem;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(0, 0, 0, 0.55) !important;
  color: #fff !important;
  font-size: 1.25rem !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  text-transform: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  min-width: 0;
  min-height: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mm-bounce .mmb-lb__close:hover,
.mm-bounce .mmb-lb__close:focus {
  background: rgba(0, 0, 0, 0.55) !important;
  color: #fff !important;
  opacity: 1 !important;
}

/* Theme-img-Styles auch auf dem Lightbox-Foto toeten (Radius kommt inline). */
.mm-bounce .mmb-lb__media {
  border: 0 !important;
  box-shadow: none !important;
}

.mm-bounce .mmb-lb__media {
  display: block;
  /* Box haftet am Foto, nicht an der Kartenbreite — nur dann runden die
     Ecken (border-radius aus dem Card-radius-Setting) das sichtbare Bild. */
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(78dvh, 780px);
  min-height: min(42dvh, 320px);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.25);
}

.mm-bounce .mmb-lb__body {
  flex: 0 0 auto;
  align-self: stretch;
  padding: 0.85rem 1.1rem 1.05rem;
  overflow-y: auto;
}

.mm-bounce .mmb-lb__kicker {
  margin: 0 0 0.3rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mmb-lb-text, #c8c8d0);
  opacity: 0.75;
}

.mm-bounce .mmb-lb__title {
  margin: 0 0 0.45rem;
  font-size: var(--mmb-lb-title-size, 21px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--mmb-lb-title, #ffffff);
}

.mm-bounce .mmb-lb__title[hidden] { display: none; }

.mm-bounce .mmb-lb__desc {
  margin: 0;
  font-size: var(--mmb-lb-text-size, 14px);
  line-height: 1.5;
  color: var(--mmb-lb-text, #c8c8d0);
}

.mm-bounce .mmb-lb__desc[hidden] { display: none; }

.mm-bounce .mmb-lb__link {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: #fff;
  color: #0c0c12;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.mm-bounce .mmb-lb__link:hover { transform: translateY(-1px); }
.mm-bounce .mmb-lb__link,
.mm-bounce .mmb-lb__link:hover { text-decoration: none; }
.mm-bounce .mmb-lb__link[hidden] { display: none; }

/* ---- Close-Icon App-Dialog-Look (Runde 60j): Inline-SVG statt Text-Glyphe,
   theme-sicher zentriert, duenner Ring wie im App-Modal. ---- */
.mm-bounce .mmb-lb__close {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.32) !important;
}

.mm-bounce .mmb-lb__close svg {
  width: 45% !important;
  height: 45% !important;
  display: block !important;
  pointer-events: none;
}

/* ---- Scrim theme-sicher (Runde 60k): Der Scrim ist ein <button> —
   BB/WP-Themes stylen Buttons global (weisser Grund, Radius, farbiger
   Ring statt Abdunkelung). Haertung + Inline-Resets am Element. ---- */
.mm-bounce .mmb-lb__scrim {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: rgba(0, 0, 0, 0.62) !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer;
}

/* 1.2.79: lift the module ROOT above later BB rows while the lightbox is
   open. isolation:isolate on the root turns it into a stacking context,
   so the fixed lightbox only ranked inside it - later rows painted over
   it. A z-index on the root itself wins over the auto-level siblings. */
.mm-bounce.is-lightbox {
  z-index: 1000000;
}
