/* Konfigurator /upload/ – Ergänzung zu design.css + theme.css */

/* ---------- Upload-Dropzone ---------- */
.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 3rem 1rem;
  text-align: center;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone.dragover, .dropzone.busy { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:hover { border-color: var(--line-input, #8f8778); }
.dropzone svg { width: 2.5rem; height: 2.5rem; color: var(--accent-ink); }
.dropzone .hint { margin-top: .3rem; }
.uploadmsg {
  margin-top: 1rem; padding: .8em 1em; border-radius: var(--radius-sm);
  background: #fdecea; color: var(--danger); font-size: .95rem;
}

/* ---------- Editor-Layout ---------- */
.editor-grid { display: grid; gap: 2rem; }
@media (min-width: 900px) { .editor-grid { grid-template-columns: 1.35fr 1fr; align-items: start; } }

.cropwrap {
  position: relative; overflow: hidden;
  border-radius: var(--radius); background: #222;
  touch-action: none; user-select: none;
}
#cropimg { width: 100%; display: block; }
/* Overrides gegen theme.css .cropbox (pointer-events:none / transition:all),
   sonst sind Eckgriffe nicht bedienbar und das Ziehen hinkt */
#cropbox { pointer-events: auto; transition: none; cursor: move; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgb(0 0 0 / .45); }
.crop-handle { position: absolute; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgb(0 0 0 / .4); pointer-events: auto; }
.crop-handle[data-h=nw] { top: -8px; left: -8px; cursor: nwse-resize; }
.crop-handle[data-h=ne] { top: -8px; right: -8px; cursor: nesw-resize; }
.crop-handle[data-h=sw] { bottom: -8px; left: -8px; cursor: nesw-resize; }
.crop-handle[data-h=se] { bottom: -8px; right: -8px; cursor: nwse-resize; }

.editor-tools {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem;
  margin-top: .7rem;
}
.editor-tools .hint { flex-basis: 100%; }
.editor-tools svg { width: 1em; height: 1em; vertical-align: -.15em; margin-right: .3em; }

.wandcanvas { width: 100%; border-radius: var(--radius-sm); margin-top: .4rem; }
.fieldlabel { font-weight: 600; font-size: .95rem; }

/* ---------- Schritt 1: Ausrichtung + Form ---------- */
.orient-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; margin-bottom: .8rem; }
.orient-toggle button {
  border: 0; background: transparent; border-radius: 999px;
  padding: .35em 1.1em; font: inherit; font-size: .9rem; cursor: pointer; color: var(--ink-2);
}
.orient-toggle button.is-on { background: var(--ink); color: #fff; }

.form-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.form-chip {
  display: block; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  padding: .6rem .7rem; cursor: pointer; font: inherit;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.form-chip svg { display: block; width: 48px; height: 24px; margin-bottom: .45rem; }
.form-chip svg rect { fill: var(--accent-soft); stroke: var(--accent-ink); stroke-width: 1.5; }
.form-chip strong { display: block; font-size: .95rem; }
.form-chip span { display: block; font-size: .8rem; color: var(--ink-3); margin-top: .15em; }
.form-chip:hover { border-color: var(--accent); }
.form-chip.is-on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); background: var(--accent-soft); }
.form-chip.is-on svg rect { fill: var(--accent); stroke: var(--accent-ink); }
#formhint { margin-top: .6rem; }

/* ---------- Schritt 2: Größen ---------- */
#sizechips { margin-bottom: .2rem; }
.size-chip em.q-ok { color: var(--ok); }
.size-chip em.q-warn { color: #8a5e10; }
.size-chip em.q-bad { color: var(--danger); }

/* ---------- Sonstiges ---------- */
@media (prefers-reduced-motion: reduce) {
  .dropzone, .form-chip, .size-chip, .rand-card, .check-card { transition: none; }
}
