/* Passport / ID photo maker (/tools/passport-photo). Loaded only on that page, after tool.css and cropper.css. */

.passport-editor {
  display: grid;
  gap: var(--space-4);
  align-items: start;
}

@media (min-width: 40rem) {
  .passport-editor {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* The crop box for an ID photo: a clear frame, no rule-of-thirds grid; the outside is dimmed. */
.passport-box {
  position: absolute;
  border: 2px solid #ffffff;
  outline: 1px solid rgb(0 0 0 / 0.6);
  box-shadow: 0 0 0 100vmax rgb(0 0 0 / 0.55);
  cursor: move;
  touch-action: none;
}

.passport-box:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.passport-preview {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  margin: 0;
}

.passport-preview__canvas {
  width: 9rem;
  height: auto;
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-sm, 0 1px 3px rgb(0 0 0 / 0.12));
}

.passport-preview figcaption {
  max-width: 11rem;
  text-align: center;
}

/* Background choices show their color. Keep in sync with BACKGROUNDS in public/js/core/passport.js. */
.swatch {
  width: 0.875rem;
  height: 0.875rem;
  margin-inline-end: var(--space-2);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.25);
}

.swatch--red { background: #d6111e; }
.swatch--blue { background: #1c5bb8; }
.swatch--white { background: #ffffff; }

.passport-sheet {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius);
}

.passport-sheet__text {
  margin: 0;
}
