/* The 3D print Vancouver page — everything print.js needs beyond site.css.
   Green is the box you are drawing. */

#map { position: absolute; inset: 0; background: var(--canvas); }

/* The selection box's handles: a dot on each corner, a pill on each edge.
   DOM markers rather than map features so they stay a comfortable target at
   any zoom, and each carries an invisible hit area well beyond what it draws
   — a thumb has to land somewhere near, not on. */
.sel-handle {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface);
  border: 2.5px solid var(--evergreen);
  box-shadow: 0 1px 4px rgba(27,38,32,.3);
  cursor: grab; touch-action: none;
}
.sel-handle::after { content: ""; position: absolute; inset: -14px; }
.sel-handle:active { cursor: grabbing; }
.sel-handle[data-handle="nw"], .sel-handle[data-handle="se"] { cursor: nwse-resize; }
.sel-handle[data-handle="ne"], .sel-handle[data-handle="sw"] { cursor: nesw-resize; }
.sel-handle[data-handle="n"], .sel-handle[data-handle="s"] { width: 26px; height: 11px; border-radius: 6px; cursor: ns-resize; }
.sel-handle[data-handle="e"], .sel-handle[data-handle="w"] { width: 11px; height: 26px; border-radius: 6px; cursor: ew-resize; }
@media (pointer: coarse) {
  .sel-handle { width: 20px; height: 20px; }
  .sel-handle[data-handle="n"], .sel-handle[data-handle="s"] { width: 34px; height: 14px; }
  .sel-handle[data-handle="e"], .sel-handle[data-handle="w"] { width: 14px; height: 34px; }
  .sel-handle::after { inset: -18px; }
}

.map-hint {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 5;
  background: var(--ink); color: #fff;
  padding: 9px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 550;
  box-shadow: var(--shadow-2);
  pointer-events: none;
}

/* ── The card ────────────────────────────────────────────────────────── */

.card {
  width: 340px;
  max-height: calc(100dvh - var(--topbar-h) - 32px);
  overflow-y: auto; overscroll-behavior: contain;
}

/* ── Search ──────────────────────────────────────────────────────────── */

.search { display: flex; gap: 6px; margin: 0 0 6px; }
.search input {
  flex: 1; min-width: 0; padding: 9px 12px;
  font: inherit; font-size: 14px; color: var(--ink);
  background: var(--canvas); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.search input:focus { outline: none; background: var(--surface); border-color: var(--evergreen); box-shadow: 0 0 0 3px var(--evergreen-tint); }
.search input::-webkit-search-decoration, .search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-note { margin: 0 0 10px; }
.search + .actions, .search-note + .actions { margin-top: 6px; }

/* The size and the credit. Always open on a desktop (the summary is hidden
   and print.js opens it); a tap away on a phone. */
.details { margin-top: 14px; }
.details summary {
  cursor: pointer; list-style: none; padding: 6px 0;
  font-size: 12.5px; font-weight: 650; color: var(--muted);
}
.details summary::-webkit-details-marker { display: none; }
.details summary::after {
  content: ""; display: inline-block; margin-left: 8px;
  width: 6px; height: 6px; color: var(--muted);
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
}
.details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.details .readout { margin: 8px 0 0; }
.details .attribution { margin-top: 12px; }
@media (min-width: 721px) {
  .details summary { display: none; }
  .details .readout { margin-top: 0; }
}

/* ── The selection ───────────────────────────────────────────────────── */

.actions { display: flex; align-items: center; gap: 8px; }
.status { margin: 12px 0 0; }
.actions .primary-btn { flex: 1; width: auto; }

.hint { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.error {
  margin: 10px 0 0; padding: 9px 12px;
  font-size: 13px; line-height: 1.45; font-weight: 500; color: var(--bad);
  background: #fbeeec; border-left: 3px solid var(--bad); border-radius: var(--r-sm);
}

.check {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 10px; cursor: pointer;
  font-size: 14px; line-height: 1.5; color: var(--ink-2);
}
.check input { width: 17px; height: 17px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--evergreen); cursor: pointer; }
.check:hover { color: var(--ink); }

.field { display: block; margin: 0 0 12px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.field input {
  display: block; width: 100%; margin-top: 6px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink);
  font-family: inherit; font-size: 15px; font-weight: 400; line-height: 1.5;
}
.field input:focus { outline: none; border-color: var(--evergreen); box-shadow: 0 0 0 3px var(--evergreen-tint); }
.field input[aria-invalid="true"] { border-color: var(--bad); }

/* Off-screen rather than display:none — a bot reading the DOM sees a normal
   field, while nobody using the page ever reaches it. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.turnstile-slot:not(:empty) { margin: 4px 0 12px; }

.order .actions { margin-top: 12px; }

.progress { display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 1.5; }
.progress b { display: block; color: var(--ink); }
.progress span { font-size: 12.5px; color: var(--muted); }
.spinner {
  width: 28px; height: 28px; flex-shrink: 0;
  border: 3px solid var(--line); border-top-color: var(--evergreen);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ready .primary-btn { display: block; margin-bottom: 12px; }
.ready .readout { margin-bottom: 10px; }
.ready .hint { margin: 0 0 10px; }

.failed { font-size: 14px; line-height: 1.5; }
.failed b { display: block; color: var(--ink); }
.failed span { display: block; margin: 4px 0 10px; font-size: 13px; color: var(--muted); }

@media (max-width: 720px) {
  .card { width: auto; max-height: 62dvh; }
}
