/* Map Builder. Uses the site palette from /assets/site.css. */

.builder-page #status { min-height: 22px; font-weight: 700; color: var(--yellow); margin: 0 0 12px; }

/* Toolbar */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: end; margin: 6px 0 16px;
  background: var(--navy-2); border: 3px solid var(--navy-dark); border-radius: 8px; padding: 14px 16px;
}
.toolbar label { display: grid; gap: 4px; font-weight: 700; color: var(--white); }
.toolbar input, .toolbar select {
  font: inherit; font-weight: 600; color: var(--text-dark);
  background: var(--white); border: 2px solid var(--navy-dark); border-radius: 6px; padding: 6px 10px;
}
.toolbar input[type="number"] { width: 110px; }
.toolbar select { min-width: 130px; }
.toolbar button {
  font-family: 'Arial Black', Impact, sans-serif; font-size: 14px; text-transform: uppercase;
  color: #222; background: var(--yellow); border: 2px solid var(--navy-dark); border-radius: 6px;
  padding: 8px 14px; cursor: pointer; box-shadow: 0 3px 0 var(--navy-dark);
}
.toolbar button:hover { filter: brightness(1.06); }
.toolbar button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--navy-dark); }
#new-map { background: #a6e7b0; }
#download-editor-file { background: var(--orange); color: #fff; }

.size-picker { display: grid; gap: 4px; align-self: end; }
.field-title { font-weight: 700; color: var(--white); }
.size-row { display: flex; align-items: center; gap: 8px; }
.custom-size { display: flex; align-items: center; gap: 6px; }
.custom-size input { width: 70px; text-align: center; }
.custom-size .times { font-weight: 700; color: var(--yellow); }
.custom-size .hint { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* Workspace: palette on the left, map on the right */
.workspace { display: flex; flex-direction: row; gap: 16px; align-items: flex-start; flex-wrap: wrap; }

#palette {
  width: 240px; flex-shrink: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  max-height: 560px; overflow-y: auto; padding: 10px;
  background: var(--navy-2); border: 3px solid var(--navy-dark); border-radius: 8px;
}
#palette::-webkit-scrollbar { width: 10px; }
#palette::-webkit-scrollbar-thumb { background: var(--orange); border: 2px solid var(--navy-dark); border-radius: 6px; }
#palette button {
  display: grid; justify-items: center; gap: 2px; padding: 4px 2px; font: inherit;
  font-weight: 700; font-size: 10px; line-height: 1.1; color: var(--text-dark);
  background: var(--white); border: 2px solid var(--navy-dark); border-radius: 6px;
}
#palette button:hover { background: #e9f1f8; }
#palette button canvas { width: 40px; height: 40px; image-rendering: pixelated; background: #1a0b2e; border-radius: 4px; }
#palette button.active { background: var(--yellow); outline: 3px solid var(--orange); }
#palette .palette-section {
  grid-column: 1 / -1; font-weight: 700; font-size: 13px; color: var(--white);
  margin: 8px 0 2px; border-bottom: 2px dashed rgba(255,255,255,.5);
}

#editor {
  width: 720px; height: auto; max-width: 100%; flex: none; image-rendering: pixelated;
  border: 4px solid var(--navy-dark); border-radius: 8px; background: #1a0b2e;
}

.help { margin-top: 14px; font-weight: 600; color: var(--muted); }
