/**
 * The lightbox (spec 4.4): one crop, big, over a dimmed page. The only modal in the app
 * and never holds an input. Controls are small and sit at the edges.
 */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(18, 20, 26, 0.86);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-stage {
  position: relative;
  width: 92vw;
  height: 80vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  cursor: grab;
}

.lightbox-stage--dragging {
  cursor: grabbing;
}

.lightbox-canvas {
  max-width: 100%;
  max-height: 100%;
  transform-origin: 50% 50%;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
  background: var(--color-surface);
}

.lightbox-caption {
  margin: calc(var(--spacing-unit) * 1.5) 0 0;
  color: var(--color-on-dark-muted);
  font-size: 0.9rem;
}

.lightbox-controls {
  display: flex;
  gap: var(--spacing-unit);
  margin-top: var(--spacing-unit);
}

.lightbox-button,
.lightbox-close {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-toast-text);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}

.lightbox-button:hover,
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-close {
  position: absolute;
  top: calc(var(--spacing-unit) * 2);
  right: calc(var(--spacing-unit) * 2);
  font-size: 1.4rem;
  line-height: 1;
  padding: 6px 12px;
}

.lightbox-hint {
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
}
