/* ai-os-admin-design · agentcard/art.css — блок «Арт» на карточке агента.

   Шесть клеток спрайта: кадр на полу с тенью, подпись, форма загрузки.
   Цвет только токенами из tokens.css — хардкода #rrggbb здесь нет.

   Пол и тень свои, а не из office.css: цвет пола по кабинетам живёт там,
   а office.css — чужая зона (отклонение 6 плана среза 22). Клетке нужен
   нейтральный фон панели, а не кабинетный. */

.art-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.art-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

/* Сцена клетки: кадр стоит ногами на полу, поэтому выравнивание по низу. */
.art-stage {
  position: relative;
  width: 100%;
  height: 252px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  border-radius: var(--radius-sm);
  background: var(--ok-bg);
  border: 1px solid var(--border);
}

/* Пустая клетка — пунктир, чтобы её было видно как место под кадр. */
.art-stage.blank {
  background: var(--paper-mute);
  border-style: dashed;
  border-color: var(--border-strong);
  align-items: center;
  padding-bottom: 0;
}

/* Тень под ногами — овальный радиальный градиент, а не картинка. */
.art-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 92px;
  height: 16px;
  transform: translateX(-50%);
  border-radius: var(--radius-pill);
  background: radial-gradient(ellipse at center,
              color-mix(in srgb, var(--fg) 17%, transparent) 0%, transparent 72%);
  pointer-events: none;
}

.art-stage.blank::after { display: none; }

/* Кадр 66×118 ровно вдвое: целые пиксели без размытия. */
.art-shot {
  position: relative;
  z-index: 1;
  width: 132px;
  height: 236px;
  image-rendering: pixelated;
}

.art-none {
  font-size: var(--fs-xs);
  color: var(--fg-label);
}

/* Выбранный, ещё не загруженный файл — в той же клетке, с меткой «новый». */
.art-stage.picked {
  background: var(--info-bg);
  border-color: var(--info);
  border-style: dashed;
  align-items: flex-end;
  padding-bottom: 8px;
}
.art-stage.picked::after { display: block; }
.art-badge {
  position: absolute; top: 8px; right: 8px;
  font-size: var(--fs-label); font-weight: 600;
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--info);
}
.art-badge[hidden] { display: none; }

.art-name {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--fg);
}

.art-req {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--warn);
}

/* Строка держит высоту и у незагруженных кадров — иначе клетки в ряду
   разъезжаются по вертикали. */
.art-when {
  min-height: 15px;
  font-size: var(--fs-xs);
  color: var(--fg-muted);
  overflow-wrap: anywhere;
}
.art-when.ok  { color: var(--ok); }
.art-when.err { color: var(--err); }

.art-form { width: 100%; }
.art-acts { display: flex; gap: 6px; justify-content: center; margin-top: 2px; }
/* Кнопка-label с невидимым file-input внутри: клик открывает выбор файла. */
.art-pick { position: relative; overflow: hidden; cursor: pointer; }
.art-pick .art-file { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.art-pick.locked { opacity: 0.45; cursor: not-allowed; }
.art-pick.locked .art-file { cursor: not-allowed; }
/* «Загрузить» без JS видна всегда (иначе не отправить); с JS — только после
   выбора файла, вместе с «Отмена», а «Заменить» на это время прячется. */
.art-cancel { display: none; }
.art-grid.js .art-submit { display: none; }
.art-cell.picked .art-submit, .art-cell.picked .art-cancel { display: inline-flex; }
.art-cell.picked .art-pick { display: none; }

.art-hint { margin-top: 16px; }

/* Ссылка «кабинет» в шапке карточки на doc-meta — та же .lnk, что в
   departments.css и contacts.css (копия: своего SQL/каскада нет, а
   agentcard/art.css — единственный CSS-файл, который тянет agent.html). */
.lnk { border: none; background: transparent; padding: 0; font: inherit; color: var(--info); cursor: pointer; text-decoration: underline dotted; }

/* Генерация арта (PPO-302): форма внешности, статус, превью черновика. */
.artgen { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.artgen-sum { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; padding: 4px 0; }
.artgen-sum::-webkit-details-marker { display: none; }
.artgen[open] .artgen-sum .doc-caret { transform: rotate(180deg); }
.artgen-head { font-weight: 600; }
.artgen-form, .artgen-warn { margin-top: 12px; }
/* Своя заметка про ключ, а не .row-note: та зарезервирована за плашкой
   ?art= на этой же карточке — тест на «нет флеша — нет row-note» иначе
   ловил бы и это сообщение. */
.artgen-warn { margin-bottom: 10px; padding-left: 9px; border-left: 2px solid var(--err);
               font-size: var(--fs-xs); color: var(--fg-muted); line-height: 1.5; }
.artgen-set { border: 0; padding: 0; margin: 0; min-width: 0; }
.artgen-set[disabled] { opacity: .55; }
.artgen-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; margin-bottom: 10px; }
.artgen-label { display: block; font-size: var(--fs-xs); color: var(--fg-muted); margin-bottom: 2px; }
.artgen-colors, .artgen-extra { grid-column: 1 / -1; }
.artgen-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.artgen-swatch { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-size: var(--fs-xs); }
.artgen-swatch input { margin: 0; }
.artgen-swatch.taken { color: var(--fg-muted); }
.artgen-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--dot); flex: none; }
.artgen-extra textarea { width: 100%; resize: vertical; }
.artgen-status { min-height: 1.4em; margin-top: 8px; font-size: var(--fs-xs); color: var(--fg-muted); }
.artgen-status.err { color: var(--err); }
.artgen-preview { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 10px; }
.artgen-preview[hidden] { display: none; }
/* Набор кадров (PPO-303): шесть слотов ×2, как клетки арта выше; кадр,
   который не вышел, — пустой слот с именем, чтобы дырку в наборе было видно. */
.artgen-shots { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.artgen-shot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.artgen-shot img { display: block; width: 132px; height: 236px; image-rendering: pixelated; background: var(--bg-elev, transparent); border-radius: var(--radius-sm); }
.artgen-shot.blank img { visibility: hidden; }
.artgen-shot.blank { opacity: .45; }
.artgen-shot-name { font-size: var(--fs-xs); color: var(--fg-muted); font-family: var(--mono, monospace); }
.artgen-actions { display: flex; gap: 8px; }
@media (max-width: 720px) { .artgen-fields { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .art-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* /hire (PPO-302): «Внешность» во всю ширину сетки формы найма. */
.hire-look { grid-column: 1 / -1; }
.hire-look summary { cursor: pointer; color: var(--fg-muted); margin-bottom: 8px; }
