/* /sign-maker/: make your own sign. The sign itself is drawn on a <canvas>
   by js/sign-maker.js; this file lays out the page around it. */

body.sm { background: var(--wheat); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sm :focus-visible {
  outline: 3px solid var(--field);
  outline-offset: 2px;
}

.sm-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 16px 4rem;
}

.sm-intro { max-width: 42rem; margin-bottom: 1.5rem; }
.sm-intro h1 {
  font-size: clamp(1.9rem, 4.6vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.sm-lede { font-size: 1.1rem; margin-bottom: 0.5rem; }
.sm-private { color: var(--ink-soft); font-size: 0.95rem; }

.sm-nocanvas {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-weight: 600;
}

/* Preview above the controls on phones; side by side, preview held in view, on wide screens. */
.sm-workbench { display: grid; gap: 1.5rem; }
@media (min-width: 56em) {
  .sm-workbench { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
  .sm-preview { position: sticky; top: calc(var(--nav-h) + 1rem); }
}

.sm-preview { margin: 0; }
.sm-canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: var(--shadow);
  background: #152534;
  touch-action: none;
}
.sm-canvas.has-photo { cursor: grab; }
.sm-canvas.is-dragging { cursor: grabbing; }
.sm-hint { margin-top: 0.5rem; font-size: 0.9rem; color: var(--ink-soft); text-align: center; }

.sm-controls { display: grid; gap: 1rem; }

.sm-group {
  background: var(--cream);
  border: 0;
  border-radius: var(--radius);
  padding: 1rem 1.25rem 1.1rem;
  margin: 0;
  min-width: 0;
}
.sm-group legend,
.sm-out-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 0.6rem;
  padding: 0;
}
/* Floated so the legend sits inside the rounded box instead of on its border. */
.sm-group legend { float: left; width: 100%; }
.sm-group legend + * { clear: both; }
.sm-opt { font-weight: 500; color: var(--ink-soft); font-size: 0.9rem; }
.sm-sub { color: var(--ink-soft); font-size: 0.85rem; }

.sm-choices { display: grid; gap: 0.35rem; }
.sm-choices label { display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; cursor: pointer; }
.sm-inline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1.25rem; }

.sm-file { position: relative; overflow: hidden; }
.sm-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.sm-file:focus-within { outline: 3px solid var(--field); outline-offset: 2px; }

.sm-status { min-height: 1.2em; margin: 0.4rem 0 0; font-size: 0.95rem; }
.sm-status:empty { min-height: 0; }

.sm-photo-tools { display: grid; gap: 0.6rem; margin-top: 0.75rem; }
.sm-zoom { display: flex; gap: 0.75rem; align-items: center; font-weight: 600; }
.sm-zoom input { flex: 1; accent-color: var(--navy); }

.sm-row { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; }
.sm-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.sm-note { margin: 0.75rem 0 0; font-size: 0.88rem; color: var(--ink-soft); }

.sm-line {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  padding: 0.65rem 0.8rem;
  border: 2px solid var(--wheat-deep);
  border-radius: 10px;
  background: var(--white);
}
.sm-line:focus { border-color: var(--navy); outline: none; }

.sm-presets { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.sm-chip {
  font: inherit;
  font-size: 0.88rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--wheat-deep);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}
.sm-chip:hover { border-color: var(--navy); }

.sm-order-lede { margin: 0 0 0.75rem; }
.sm-order-fields { margin-top: 1rem; }
.sm-consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.95rem; margin: 0.25rem 0 0.75rem; cursor: pointer; }
.sm-consent input { margin-top: 0.25rem; }
.sm-order .sm-note { margin: 0 0 0.9rem; }
.sm-status.ok { color: var(--field-deep); font-weight: 600; }
.sm-status.err { color: #a33a2c; font-weight: 600; }

.sm-real { max-width: 42rem; margin-top: 2.5rem; }
.sm-real h2 { font-size: 1.4rem; margin-bottom: 0.4rem; }

/* Only ever shown on paper. */
.sm-print-img { display: none; }

@media print {
  body.sm { background: #fff; }
  body.sm > *:not(main),
  .sm-main > *:not(.sm-print-img) { display: none !important; }
  .sm-main { padding: 0; max-width: none; }
  .sm-print-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 100vh;
    object-fit: contain;
  }
}
