/* Блок ig-ins - раздел «Инструкции» «Управления» (SPEC §29, очередь 6). Холста нет (решение
   Никиты 28.09.2026): папки - плитки «Управления» (ig-adm-tile), файлы - таблица ig-grid,
   окна - ig-modal. */

.ig-ins {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-4);
  overflow: auto;
}

.ig-ins__folder {
  display: flex;
}

.ig-ins__folder .ig-adm-tile {
  flex: 1 1 auto;
}

.ig-ins__how {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 880px;
  padding: var(--space-4);
  border: 1px solid var(--border-200);
  border-radius: var(--radius-lg);
  background: var(--surface-50);
}

.ig-ins__howtitle {
  font-size: 15px;
  font-weight: 600;
}

.ig-ins__steps {
  padding-left: var(--space-5);
  list-style: decimal;
  font-size: 13.5px;
  line-height: 22px;
}

.ig-ins__howtext {
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-600);
}

/* Таблица файлов папки и навыков */

.ig-grid--ins {
  min-width: 960px;
}

.ig-ins__col--name {
  width: auto;
}

.ig-ins__col--scope {
  width: 220px;
}

.ig-ins__col--version {
  width: 110px;
}

.ig-ins__col--changed {
  width: 280px;
}

.ig-ins__col--icons {
  width: 200px;
}

.ig-ins__col--buttons {
  width: 580px;
}

.ig-ins__col--restore {
  width: 150px;
}

.ig-ins__file {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  color: var(--brand-600);
}

.ig-ins__name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ig-ins__title {
  font-weight: 500;
  color: var(--ink-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ig-ins__sub {
  font-size: 12px;
  color: var(--ink-600);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ig-ins__actions {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-2);
  justify-content: flex-end;
}

/* Текст инструкции под строкой файла */

.ig-ins__preview {
  margin: var(--space-4);
  padding: var(--space-4);
  max-height: 60vh;
  overflow: auto;
  border: 1px solid var(--border-200);
  border-radius: var(--radius-md);
  background: var(--surface-50);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Пустая папка */

.ig-ins__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-12) var(--space-4);
  text-align: center;
}

.ig-ins__emptyicon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ig-ins__emptytext {
  max-width: 480px;
  font-size: 14px;
  color: var(--ink-600);
}

.ig-ins__empty .ig-ins__actions {
  flex-wrap: wrap;
  justify-content: center;
}

/* Окна: правка текста, навык, версии */

.ig-ins__dialog {
  width: 960px;
}

.ig-textarea.ig-ins__text {
  height: 44vh;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 13px;
}

.ig-ins__upload {
  font-size: 13.5px;
}

.ig-ins__versions td {
  vertical-align: top;
  padding-top: 10px;
  padding-bottom: 10px;
}

.ig-ins__versiontext summary {
  cursor: pointer;
  color: var(--brand-600);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ig-ins__pre {
  max-height: 240px;
  margin-top: var(--space-2);
  padding: var(--space-2) var(--space-3);
  overflow: auto;
  border-radius: var(--radius-sm);
  background: var(--surface-50);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
