/* Редактор расстановок. Опирается на viewer.css: topbar, brand, connection,
   scene-tools и кнопки берутся оттуда — тут только то, чего там нет. */

.editor-body { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

.editor-main { display: grid; grid-template-columns: 320px 1fr; flex: 1; min-height: 0; }

.editor-panel {
  display: flex; flex-direction: column; gap: 18px;
  padding: 16px; overflow-y: auto;
  background: #0e141b; border-right: 1px solid rgba(255, 255, 255, .08);
}
.editor-panel section { display: flex; flex-direction: column; gap: 8px; }
.editor-panel h2 {
  margin: 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #7c8899;
}
.editor-panel select,
.editor-panel input[type="search"],
.editor-panel input[type="number"] {
  width: 100%; padding: 7px 9px; font: inherit; font-size: 13px;
  color: #eef1f5; background: #131a23;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 3px;
}
.counter { color: #eef1f5; }
.hint { margin: 0; font-size: 11px; line-height: 1.45; color: #7c8899; }
.hint.error { color: #ff7a72; }

/* Списки схематик и размещённых объектов: скроллятся сами, чтобы панель не росла. */
.schematic-list, .placed-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.schematic-list { max-height: 30vh; overflow-y: auto; }
.placed-list { max-height: 24vh; overflow-y: auto; }
.schematic-list button, .placed-list button {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  width: 100%; padding: 7px 9px; text-align: left; cursor: pointer;
  color: #eef1f5; background: #131a23;
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 3px;
}
.schematic-list button:hover, .placed-list button:hover { border-color: rgba(226, 27, 37, .5); }
.schematic-list small, .placed-list small { color: #7c8899; font-size: 11px; }
.placed-list li.active button { border-color: #e21b25; background: rgba(226, 27, 37, .12); }

.coord-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.coord-grid label {
  display: grid; gap: 3px; font-size: 10px; letter-spacing: .1em; color: #7c8899; text-transform: uppercase;
}

.editor-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.editor-panel button {
  padding: 8px 10px; font: inherit; font-size: 12px; cursor: pointer;
  color: #eef1f5; background: #1a222d;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 3px;
}
.editor-panel button:hover { border-color: rgba(255, 255, 255, .28); }
.editor-panel button.danger:hover { border-color: #ff5a52; color: #ff8b84; }
.editor-panel button.primary { background: #e21b25; border-color: #e21b25; font-weight: 600; }
/* Несохранённые изменения видно по кнопке — иначе легко уйти со страницы зря. */
.editor-panel button.primary.unsaved { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { background: #ff3040; } }

.editor-scene { position: relative; min-width: 0; }
.editor-scene canvas { display: block; width: 100%; height: 100%; }
.editor-help {
  position: absolute; left: 12px; bottom: 10px; margin: 0;
  font-size: 11px; color: #7c8899; pointer-events: none;
}

.button-link {
  padding: 6px 10px; font-size: 12px; color: #eef1f5; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 3px;
}
.button-link:hover { border-color: rgba(255, 255, 255, .28); }

@media (max-width: 900px) {
  .editor-main { grid-template-columns: 1fr; grid-template-rows: minmax(0, 45vh) 1fr; }
  .editor-panel { border-right: none; border-bottom: 1px solid rgba(255, 255, 255, .08); }
}
