/* Editor drawers (prototype only): Wheel editor (js/editor/wheel-editor.js) and Scratch Editor
   (js/editor/scratch-editor.js) share .editor-drawer. Docked left, above the modal backdrop like
   the dev panel, so the open game modal stays visible while editing. One drawer is open at a
   time. Same monospace dev-tool look as .dev-panel (styles/base.css). */
.editor-drawer {
  position: fixed;
  left: 12px;
  top: 12px;
  bottom: 12px;
  z-index: 1000;
  width: 340px;
  overflow-y: auto;
  padding: 10px 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(20, 22, 32, 0.96);
  font: 400 12px/18px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #c4c4c4;
}
.editor-drawer[hidden] { display: none; }
body.is-modal-only .editor-drawer { display: none; }
.editor-drawer__head { display: flex; align-items: center; justify-content: space-between; }
.editor-drawer__head h2 { margin: 0; font: inherit; font-weight: 700; color: #fff; }
.editor-drawer select,
.editor-drawer input {
  min-width: 0;
  padding: 2px 4px;
  border: 1px solid #333849;
  border-radius: 4px;
  background: #0b0d14;
  color: #fff;
  font: inherit;
}
.editor-drawer input:disabled { opacity: 0.35; }
.editor-drawer button {
  padding: 4px 8px;
  border: 1px solid #333849;
  border-radius: 4px;
  background: #252730;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.editor-drawer button:disabled { opacity: 0.5; cursor: progress; }
.editor-drawer__close { padding: 0 6px; font-size: 16px; line-height: 20px; }
.editor-drawer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; margin-top: 8px; }
.editor-drawer__grid label { display: flex; align-items: center; gap: 6px; }
.editor-drawer__grid label > :is(input, select) { flex: 1; width: 0; }
.editor-drawer__wide { grid-column: 1 / -1; }
.editor-drawer__buttons { grid-column: 1 / -1; display: flex; gap: 6px; }
.editor-drawer__buttons button { flex: 1; }
.editor-drawer__hint { margin: 8px 0 4px; font-size: 11px; line-height: 15px; color: #8a8fa3; }
.editor-drawer__cols,
.editor-drawer__row {
  display: grid;
  grid-template-columns: 28px 96px 58px 1fr;
  gap: 4px;
  align-items: center;
}
.editor-drawer__cols { font-size: 10px; color: #8a8fa3; }
.editor-drawer__rows { margin: 2px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.editor-drawer__row > :is(input, select) { width: 100%; }
.editor-drawer__num { color: #fff; }
.editor-drawer > button { display: block; width: 100%; margin-top: 8px; }
.editor-drawer .editor-drawer__primary { background: #1f7a3d; border-color: #2fa356; }
.editor-drawer__status { margin: 6px 0 0; min-height: 18px; font-size: 11px; line-height: 15px; overflow-wrap: anywhere; }
.editor-drawer__warn { margin: 6px 0 0; padding: 4px 6px; border-radius: 4px; background: rgba(214, 140, 30, 0.18); color: #f0c070; font-size: 11px; line-height: 15px; }
.editor-drawer__warn:empty { display: none; }

/* Scratch Editor rows: two lines per prize (kind / value / label, then ack type / tile icon /
   move and remove buttons). */
.scratch-editor .editor-drawer__cols,
.scratch-editor .editor-drawer__row { grid-template-columns: 22px 92px 54px 1fr; }
.scratch-editor .editor-drawer__row { padding: 4px 0; border-top: 1px solid #262a38; }
.scratch-editor .editor-drawer__sub {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  gap: 4px;
}
.scratch-editor .editor-drawer__sub select { flex: 1; width: 0; }
.scratch-editor .editor-drawer__sub button { padding: 1px 6px; }
.scratch-editor .editor-drawer__icon { width: 22px; height: 22px; object-fit: contain; }
.scratch-editor .editor-drawer__icon[hidden] { visibility: hidden; display: block; }
