/* styles-dict-editor.css — общий вид окон справочников (dict-editor.js).
 *
 * Зеркалит «Редактор бригад» (styles-brigade.css, блок .brigade-edit-*): те же
 * размеры, отступы, кнопки-инструменты и раскрывающиеся панели. Один источник
 * вида для «Единицы учёта», «Участков», «графика»/«типа перерыва» и полей
 * сотрудника — правка здесь меняет все окна сразу. Заведён 2026-07-30.
 */

.dict-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 450;
  background: rgba(8, 18, 35, 0.42);
  padding: 14px;
}

.dict-editor-dialog {
  position: absolute;
  width: min(520px, 96vw);
  max-height: min(72vh, 560px);
  display: flex;
  flex-direction: column;
  border: 1px solid #224973;
  border-radius: 12px;
  background: linear-gradient(180deg, #132f52 0%, #0e2642 100%);
  box-shadow: 0 20px 48px rgba(5, 16, 33, 0.5);
  padding: 12px;
  resize: both;
  overflow: hidden;
}

.dict-editor-dialog.is-wide {
  width: min(680px, 97vw);
}

.dict-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  cursor: move;
}

.dict-editor-head h3 {
  margin: 0;
  color: #f3f7ff;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* Значок «!» у заголовка: длинное пояснение спрятано под него, по наведению
   разворачивается структурной справкой (dict-editor-hint-pop). */
.dict-editor-hint {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1px solid rgba(140, 170, 205, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #dbe8ff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 0;
  cursor: help;
}

.dict-editor-hint:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* Всплывашка живёт в body (position: fixed) — окно справочника режет
   содержимое по overflow: hidden, абсолютная подсказка обрезалась бы. */
.dict-editor-hint-pop {
  position: fixed;
  z-index: 460;
  width: 288px;
  max-width: calc(100vw - 16px);
  border: 1px solid rgba(124, 164, 220, 0.4);
  border-radius: 10px;
  background: #0c2143;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  padding: 10px 12px;
  color: #e7f1ff;
  font-size: 11px;
  line-height: 1.45;
  pointer-events: none;
}

.dict-editor-hint-group + .dict-editor-hint-group {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed rgba(140, 170, 205, 0.35);
}

.dict-editor-hint-title {
  color: #ffffff;
  font-weight: 800;
  margin-bottom: 3px;
}

.dict-editor-hint-list {
  margin: 0;
  padding-left: 16px;
}

.dict-editor-hint-list li + li {
  margin-top: 2px;
}

.dict-editor-hint-foot {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed rgba(140, 170, 205, 0.35);
  color: #b9cdea;
}

.dict-editor-close {
  border: 0;
  background: transparent;
  color: #d6e5fb;
  font-size: 20px;
  cursor: pointer;
}

.dict-editor-note {
  color: #d7e6ff;
  font-size: 12px;
  margin: 0 0 8px;
}

.dict-editor-add {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.dict-editor-add-input {
  flex: 1;
  min-width: 0;
  min-height: 32px;
  border: 1px solid #3d5f86;
  border-radius: 8px;
  background: #f7f9fd;
  color: #1f3556;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
}

.dict-editor-cols {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 0;
}

.dict-editor-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dict-editor-caption {
  color: #d7e6ff;
  font-size: 12px;
  margin: 0 0 6px;
}

.dict-editor-list-wrap {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 46vh;
  overflow: auto;
  padding-right: 2px;
}

.dict-editor-list {
  display: grid;
  gap: 8px;
}

.dict-editor-empty {
  color: #d7e6ff;
  font-size: 12px;
  padding: 10px;
  border: 1px dashed #3d5f86;
  border-radius: 8px;
}

.dict-editor-item {
  border: 1px solid rgba(120, 150, 195, 0.25);
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.04);
}

.dict-editor-item.is-open {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(120, 150, 195, 0.55);
}

/* Перетаскивание строк справочника (dict-editor-reorder.js): ручка слева,
   схваченная строка приглушается и подсвечивает рамку. */
.dict-editor-drag {
  color: #7d93b4;
  cursor: grab;
  font-size: 13px;
  line-height: 1;
  padding: 0 2px;
  user-select: none;
}

.dict-editor-item.is-dragging {
  opacity: 0.5;
  cursor: grabbing;
  user-select: none;
  border-color: rgba(120, 150, 195, 0.75);
}

.dict-editor-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dict-editor-num {
  color: #8aa4c4;
  font-size: 11px;
  min-width: 14px;
  text-align: right;
}

.dict-editor-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dict-editor-actions {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
}

.dict-editor-tool-btn {
  min-width: 26px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid rgba(140, 170, 205, 0.45);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #e8efff;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.dict-editor-tool-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.dict-editor-tool-btn.is-danger {
  color: #ffc7c7;
  border-color: rgba(200, 130, 130, 0.55);
}

.dict-editor-panel {
  display: none;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(140, 170, 205, 0.35);
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dict-editor-panel.is-open {
  display: flex;
}

.dict-editor-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dict-editor-color-btn {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}

.dict-editor-color-btn.is-active {
  border-color: #ffffff;
  box-shadow: 0 0 0 1px #274a73;
}

.dict-editor-color-none {
  background: #ffffff;
  border-color: #91abd0;
}

.dict-editor-remove-note {
  color: #ffd6d6;
  font-size: 12px;
  flex: 1 1 auto;
}

.dict-editor-panel-cancel {
  border: 0;
  background: transparent;
  color: #a9bddb;
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
}

.dict-editor-panel-cancel:hover {
  color: #e9f1ff;
}

.dict-editor-footer {
  margin-top: 10px;
  color: #d7e6ff;
  font-size: 12px;
}

.dict-editor-footer input {
  margin-right: 6px;
}
