/* styles.css — Factorio Fidelity Replication Test */

/* ── Reset / Base ────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #111;
  color: #d0c8b0;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  user-select: none;
}

/* ── Layout ──────────────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ── Top bar ─────────────────────────────────────────────────── */
#toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  background: #1e1e1e;
  border-bottom: 2px solid #3a3a2a;
  flex-shrink: 0;
  flex-wrap: wrap;
}

#toolbar h1 {
  font-size: 14px;
  font-weight: bold;
  color: #f0c060;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.tool-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-group label {
  color: #888;
  font-size: 12px;
  white-space: nowrap;
}

/* Tile selector buttons */
.tile-btn {
  padding: 4px 10px;
  background: #2e2e2e;
  border: 1.5px solid #444;
  border-radius: 3px;
  color: #bbb;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
  white-space: nowrap;
}

.tile-btn:hover {
  background: #3a3a2a;
  border-color: #888;
  color: #f0f0e0;
}

.tile-btn.active {
  background: #4a4a1a;
  border-color: #c8a030;
  color: #f0d060;
}

/* Color blobs on tile buttons */
.tile-btn::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: middle;
}

.tile-btn[data-type="CONVEYOR"]::before { background: #5a8a3c; }
.tile-btn[data-type="MINER"]::before    { background: #8b6914; }
.tile-btn[data-type="FURNACE"]::before  { background: #b04020; }

/* Rotation display */
#rotation-display {
  padding: 4px 10px;
  background: #2e2e2e;
  border: 1.5px solid #555;
  border-radius: 3px;
  color: #c0e080;
  font-size: 13px;
  min-width: 60px;
  text-align: center;
}

/* Keyboard hint badges */
.kbd {
  display: inline-block;
  padding: 1px 5px;
  background: #333;
  border: 1px solid #555;
  border-radius: 3px;
  font-size: 11px;
  color: #aaa;
}

/* Status text */
#status-text {
  font-size: 12px;
  color: #666;
  margin-left: auto;
  white-space: nowrap;
}

/* ── Canvas wrapper ───────────────────────────────────────────── */
#canvas-wrap {
  flex: 1;
  overflow: auto;
  background: #0e0e0e;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  cursor: crosshair;
}

#game-canvas {
  display: block;
  /* canvas size set by JS */
}

/* ── Info bar (bottom) ───────────────────────────────────────── */
#infobar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 14px;
  background: #1a1a1a;
  border-top: 1.5px solid #2a2a2a;
  font-size: 12px;
  color: #666;
  flex-shrink: 0;
}

#infobar span { color: #999; }
#infobar strong { color: #c0b080; }

#coord-display {
  font-variant-numeric: tabular-nums;
}
