/* The battle editor's panels (js/battleedit.js): normal web page text around the board.
   Everything is scoped under .be; the sizes match MARGINS in battleedit.js. */

.be {
  --bg: #07081a; --panel: #10142c; --panel2: #161c3a; --line: #2c3658;
  --text: #e8ecff; --dim: #9aa4c8; --accent: #8fb0ff; --gold: #ffd27a; --green: #7aff9a; --red: #ff7080;
  position: fixed; inset: 0; pointer-events: none; z-index: 40;
  color: var(--text); font: 13px/1.35 system-ui, 'Segoe UI', sans-serif;
}
.be * { box-sizing: border-box; }
.be > div { position: absolute; pointer-events: auto; background: var(--panel); border-color: var(--line); border-style: solid; border-width: 0; }
.be .beTop { left: 0; right: 0; top: 0; height: 48px; border-bottom-width: 1px; display: flex; align-items: center; gap: 14px; padding: 0 14px; }
.be .beLeft { left: 0; top: 48px; bottom: 128px; width: 212px; border-right-width: 1px; overflow-y: auto; padding: 8px 10px; }
.be .beRight { right: 0; top: 48px; bottom: 128px; width: 318px; border-left-width: 1px; display: flex; flex-direction: column; padding: 8px 10px; }
.be .beBottom { left: 0; right: 0; bottom: 0; height: 128px; border-top-width: 1px; padding: 6px 12px; display: flex; flex-direction: column; }

.be h3 { margin: 2px 0 6px; font-size: 15px; font-weight: 600; color: var(--accent); }
.be button, .be input { font: inherit; color: var(--text); }
.be button { background: #1e2850; border: 1px solid var(--accent); border-radius: 6px; padding: 3px 10px; cursor: pointer; }
.be button:hover { background: #2a3a68; }
.be input[type=number] { width: 56px; background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; margin-left: 5px; }
.be label { color: var(--dim); display: inline-flex; align-items: center; }
.be em { font-style: normal; color: var(--dim); font-size: 11px; margin-left: 6px; }
.be .beDim { color: var(--dim); font-size: 12px; }
.be .beTitle { color: var(--gold); font-size: 17px; letter-spacing: 0.4px; }
.be .beGrow { flex: 1; }

/* enemies (left) */
.be .beShips { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.be .beShip { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 6px; padding: 4px; border-radius: 6px; background: var(--panel2); cursor: grab; border: 1px solid transparent; }
.be .beShip:hover { border-color: var(--accent); }
.be .beShip.boss { border-color: #6a2a3a; }
.be .beShip span { display: flex; flex-direction: column; }
.be .beShip em { margin-left: 0; }
.be canvas { image-rendering: pixelated; display: block; margin: 0 auto; }

/* waves (right) */
.be .beList { flex: 1; overflow-y: auto; min-height: 0; padding-right: 2px; }
.be .beWave { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: rgba(22, 28, 58, 0.6); }
.be .beWave.on { border-color: var(--gold); }
.be .beWave.drop { border-color: var(--green); background: rgba(40, 90, 58, 0.3); }
.be .beWaveHead { display: flex; align-items: center; gap: 6px; padding: 4px 6px; }
.be .beWaveName { font-weight: 600; cursor: pointer; }
.be .beWaveHead input { width: 44px; }
.be .beFold { padding: 0 6px; border-color: var(--line); }
.be .beStaged { color: var(--gold); font-size: 11px; }
.be .beWaveBody { padding: 0 6px 6px; display: flex; flex-direction: column; gap: 3px; }
.be .beRow { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 6px; padding: 2px 4px; border-radius: 5px; cursor: pointer; }
.be .beRow:hover { background: var(--panel2); }
.be .beRow.sel { background: rgba(255, 210, 122, 0.12); outline: 1px solid var(--gold); }
.be .beRow.placed { opacity: 0.6; }
.be .beRow[draggable] { cursor: grab; }
.be .beRow[draggable] em { color: #ffb347; }
.be .beX { padding: 0 6px; border-color: var(--line); color: var(--dim); }
.be .beAdd { width: 100%; margin: 2px 0 6px; }
.be .beInspect { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 6px; min-height: 96px; }
.be .beFields { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 6px 0; }
.be .beDanger { border-color: #a04a5a; color: #ffb0bc; }

/* turrets (bottom) */
.be .beBottomHead { display: flex; align-items: center; gap: 14px; }
.be .beBottomHead h3 { margin: 0; }
.be .beCheck { gap: 4px; margin-left: auto; }
.be .beBuilds { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0 2px; flex: 1; }
.be .beBuild { flex: 0 0 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px; border-radius: 6px; background: var(--panel2); cursor: grab; border: 1px solid transparent; text-align: center; font-size: 11px; }
.be .beBuild:hover { border-color: var(--accent); }
.be .beBuild em { margin: 0; }
.be .beWaveName, .be .beStaged, .be .beWaveHead em { white-space: nowrap; }
.be .beName { width: 150px; background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; margin-left: 5px; }
.be select { font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; padding: 2px 4px; max-width: 160px; }
.be .beSave { background: #1f4a2c; border-color: var(--green); color: #d8ffe2; }
.be .beNote { color: var(--green); }
.be .beTop { gap: 10px; }
