/* ================================================
   LERNPFAD REST / VORSCHAU
   Nur noch Test- und Preview-Regeln, aktive UI liegt
   in `gestaltung/bereiche/lernpfad/css/`.
   ================================================ */

.map-lock-preview {
  position: fixed;
  inset: 0;
  z-index: 10030;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 4, 2, 0.74);
  backdrop-filter: blur(10px);
}

.map-lock-preview-card {
  width: min(100%, 420px);
  border-radius: 28px;
  padding: 26px 24px 22px;
  background:
    radial-gradient(circle at top left, rgba(244, 207, 99, 0.18), transparent 52%),
    linear-gradient(160deg, #24160a 0%, #2f1d0f 56%, #171008 100%);
  border: 1px solid rgba(244, 207, 99, 0.22);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.48);
  text-align: center;
}

.map-lock-preview-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #f4cf63;
}

.map-lock-preview-title {
  margin: 10px 0 0;
  font-size: 1.45rem;
  line-height: 1.15;
  color: #fff6dc;
}

.map-lock-preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 8px 0 8px;
  overflow: hidden;
}

.map-lock-preview-node {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.map-lock-preview-node .map-node-circle {
  width: 108px;
  height: 108px;
  font-size: 34px;
  overflow: visible;
  margin-top: 0;
  transition:
    background 0.42s ease,
    border-color 0.42s ease,
    box-shadow 0.42s ease,
    color 0.42s ease;
}

.map-lock-preview-node .map-node-circle-number {
  z-index: 3;
  color: rgba(255, 248, 226, 0.96);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.38);
  transition: color 0.42s ease, text-shadow 0.42s ease;
}

.map-lock-shell {
  position: absolute;
  inset: 10px;
  display: block;
  pointer-events: none;
}

.map-lock-shackle {
  position: absolute;
  left: 50%;
  top: -8px;
  width: 46px;
  height: 42px;
  margin-left: -23px;
  border: 7px solid rgba(255, 239, 210, 0.9);
  border-bottom: none;
  border-radius: 40px 40px 0 0;
  box-shadow:
    0 0 0 2px rgba(61, 34, 14, 0.8),
    0 10px 24px rgba(0, 0, 0, 0.36);
  transform-origin: 80% 82%;
}

.map-lock-body {
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 64px;
  height: 50px;
  margin-left: -32px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, #fff1c7 0%, #f2cf73 36%, #b88826 100%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 16px 26px rgba(0, 0, 0, 0.38);
  opacity: 0.88;
  transition:
    opacity 0.42s ease,
    background 0.42s ease,
    box-shadow 0.42s ease;
}

.map-lock-body::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 16px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 999px;
  background: rgba(76, 44, 13, 0.82);
  box-shadow: 0 13px 0 -4px rgba(76, 44, 13, 0.82);
}

.map-lock-preview--unlocking .map-lock-shackle {
  animation: map-lock-shackle-open 1.08s cubic-bezier(0.2, 0.85, 0.2, 1) forwards;
}

.map-lock-preview--unlocking .map-lock-body {
  animation: map-lock-body-drop 0.92s cubic-bezier(0.18, 0.88, 0.24, 1) forwards;
}

.map-lock-preview--opened .map-node-circle {
  border-color: #f4cf63;
  background: rgba(244, 207, 99, 0.18);
  box-shadow:
    0 0 0 4px rgba(232, 189, 79, 0.38),
    0 18px 36px rgba(0, 0, 0, 0.82);
}

.map-lock-preview--opened .map-node-circle-number {
  color: #fff7d6;
  text-shadow:
    0 0 14px rgba(244, 207, 99, 0.28),
    0 2px 10px rgba(0, 0, 0, 0.32);
}

.map-lock-preview--opened .map-lock-body {
  background:
    linear-gradient(180deg, #fff5d8 0%, #f5d987 36%, #d7a73a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 18px 30px rgba(232, 189, 79, 0.18);
}

.map-lock-preview-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.map-lock-preview-primary,
.map-lock-preview-secondary {
  min-height: 52px;
  border-radius: 16px;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
}

.map-lock-preview-primary {
  border: 1px solid rgba(244, 207, 99, 0.34);
  color: #fff6dc;
  background: rgba(38, 18, 7, 0.96);
}

.map-lock-preview-secondary {
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 247, 232, 0.78);
  background: rgba(24, 12, 5, 0.68);
}

.map-video-overlay {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 138, 61, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(244, 207, 99, 0.16), transparent 24%),
    linear-gradient(180deg, #150c07 0%, #090609 54%, #040406 100%);
}

.map-video-dialog {
  width: min(100%, 520px);
  min-height: 100dvh;
  border-radius: 0;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at top, rgba(244, 207, 99, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(22, 12, 8, 0.98) 0%, rgba(10, 7, 9, 0.98) 100%);
  border: 1px solid rgba(244, 207, 99, 0.18);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.44);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.map-video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.map-video-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f4cf63;
}

.map-video-close {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(10, 8, 8, 0.76);
  color: rgba(255, 245, 231, 0.92);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.map-video-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
  color: rgba(255, 245, 231, 0.96);
}

.map-video-frame {
  --map-video-aspect-ratio: 9 / 16;
  position: relative;
  flex: none;
  width: 100%;
  aspect-ratio: var(--map-video-aspect-ratio);
  max-height: min(70dvh, 920px);
  overflow: hidden;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(17, 9, 5, 0.9), rgba(11, 6, 4, 0.96));
  border: 1px solid rgba(244, 207, 99, 0.18);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.44);
}

.map-video-player {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  background: #000;
}

.map-video-dialog--landscape .map-video-frame {
  max-height: min(56dvh, 640px);
}

.map-video-dialog--portrait .map-video-frame {
  max-height: min(74dvh, 980px);
}

.map-video-actions {
  display: flex;
  justify-content: stretch;
}

.map-video-complete {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: none;
  border-radius: 22px;
  background: linear-gradient(135deg, #ff9d4f, #f4cf63);
  color: #2b1604;
  font: inherit;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.24);
}

@media (max-width: 768px) {
  .map-video-overlay {
    padding: 0;
  }

  .map-video-dialog {
    width: 100%;
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .map-video-title {
    font-size: 1rem;
  }

  .map-video-actions {
    margin-top: 12px;
  }

  .map-video-complete {
    width: 100%;
  }

  .map-video-frame {
    max-height: min(66dvh, 74svh);
  }

  .map-video-dialog--portrait .map-video-frame {
    max-height: min(72dvh, 80svh);
  }
}

@media (min-width: 900px) {
  .map-video-dialog {
    margin: 0 auto;
    border-left: 1px solid rgba(244, 207, 99, 0.1);
    border-right: 1px solid rgba(244, 207, 99, 0.1);
  }
}

@keyframes map-lock-shackle-open {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  52% {
    transform: translateY(-6px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-20px) rotate(-34deg);
    opacity: 0.96;
  }
}

@keyframes map-lock-body-drop {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(30px) scale(0.9);
    opacity: 0;
  }
}
