/* Zoom into one PROVED */

:where(.scene-zoom) .zoom-layout {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 20px;
}

:where(.scene-zoom) .zoom-gauge {
  position: relative;
  display: grid;
  align-content: start;
  align-self: start;
  gap: 2px;
  margin: 0;
  padding: 0 0 0 18px;
  list-style: none;
}

:where(.scene-zoom) .zoom-gauge::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 5px;
  width: 3px;
  background: linear-gradient(var(--primary-soft), var(--primary));
  border-radius: 3px;
}

:where(.scene-zoom) .zoom-gauge button {
  position: relative;
  width: 100%;
  padding: 4px 8px;
  color: var(--text-muted);
  background: none;
  border: 0;
  border-radius: 6px;
  font: 600 0.8rem var(--mono);
  text-align: left;
  cursor: pointer;
}

:where(.scene-zoom) .zoom-gauge button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -18px;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  border-radius: 50%;
}

:where(.scene-zoom) .zoom-gauge button.is-passed::before {
  background: var(--primary);
  border-color: var(--primary);
}

:where(.scene-zoom) .zoom-gauge button[aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-soft);
}

:where(.scene-zoom) .zoom-gauge button[aria-pressed="true"]::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

:where(.scene-zoom) .zoom-lens {
  position: relative;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgb(255 255 255 / 0.9), transparent 70%), var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow:
    inset 0 0 0 6px rgb(255 255 255 / 0.6),
    inset 0 0 40px rgb(23 75 87 / 0.08);
  overflow: hidden;
}

:where(.scene-zoom) .zoom-levels {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

:where(.scene-zoom) .zoom-level {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

:where(.scene-zoom) .zoom-level p {
  margin: 8px 0 0;
}

:where(.scene-zoom) .zoom-kicker {
  margin: 0 !important;
  color: var(--accent);
  font: 700 0.72rem var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

:where(.scene-zoom) .zoom-kicker code {
  text-transform: none;
}

:where(.scene-zoom) .zoom-formal,
:where(.scene-zoom) .zoom-code {
  margin: 10px 0 0;
  padding: 10px 14px;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  overflow-x: auto;
}

:where(.scene-zoom) .zoom-formal {
  color: var(--primary);
  font-weight: 700;
}

:where(.scene-zoom) .zoom-badge {
  padding: 1px 8px;
  color: var(--success);
  background: var(--success-soft);
  border-radius: 999px;
  font-weight: 800;
}

:where(.scene-zoom) .zoom-level .isa-link {
  display: inline-block;
  margin-top: 8px;
  font: 600 0.82rem var(--mono);
}

/* With script, the lens shows the current level large and the level above as context. */
.scene-zoom.is-interactive .zoom-levels {
  display: block;
  min-height: 21rem;
}

.scene-zoom.is-interactive .zoom-level {
  transition:
    transform 450ms cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 350ms ease;
}

.scene-zoom.is-interactive .zoom-level.is-past,
.scene-zoom.is-interactive .zoom-level.is-below {
  display: none;
}

.scene-zoom.is-interactive .zoom-level.is-above {
  margin-bottom: -6px;
  opacity: 0.5;
  transform: scale(0.9);
  transform-origin: 50% 100%;
  pointer-events: none;
}

.scene-zoom.is-interactive
  .zoom-level.is-above
  > :not(.zoom-kicker):not(.zoom-formal):not(.zoom-code) {
  display: none;
}

.scene-zoom.is-interactive .zoom-level.is-current {
  position: relative;
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgb(23 75 87 / 0.12);
  animation: zoom-in 450ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes zoom-in {
  from {
    opacity: 0.3;
    transform: scale(1.08);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

:where(.scene-zoom) .zoom-controls {
  justify-content: center;
}

:where(.scene-zoom) .zoom-controls button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #ffffff;
  background: var(--primary);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

:where(.scene-zoom) .zoom-range {
  width: min(360px, 60%);
  accent-color: var(--accent);
}

@media (max-width: 900px) {
  :where(.scene-zoom) .zoom-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  :where(.scene-zoom) .zoom-gauge {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-left: 0;
  }

  :where(.scene-zoom) .zoom-gauge::before,
  :where(.scene-zoom) .zoom-gauge button::before {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene-zoom .zoom-level {
    animation: none !important;
    transition: none !important;
  }
}
