/* Tag Atelier UX — desk layout (load after styles.css) */

.tag-atelier {
  grid-template-columns: 260px minmax(0, 1fr) 300px;
  gap: 0;
}

/* ── Side: families hierarchy ── */
.ta-family-head {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--text);
  padding: 8px 8px 6px;
}
.ta-family.active > .ta-family-head {
  color: var(--cyan);
}
.ta-types {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 0 8px 6px;
  padding: 0 0 4px 8px;
  border-left: 1px solid var(--line);
}
.ta-type {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 450;
  border-radius: 6px;
  color: var(--muted);
}
.ta-type .ta-count,
.ta-family-head .ta-count {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  text-align: right;
  min-width: 2.5ch;
  margin-left: 0;
  color: var(--faint);
  font-size: 11px;
}
.ta-type.active .ta-count,
.ta-family.active > .ta-family-head .ta-count {
  color: var(--cyan);
}

/* Inbox reasons = chips, not family clone */
.ta-reason-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0 8px;
}
.ta-reason-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  width: auto !important;
  text-align: left;
}
.ta-reason-chip:hover {
  color: var(--text);
  border-color: var(--line-2);
  background: var(--bg-4);
}
.ta-reason-chip.active {
  color: var(--text);
  border-color: rgba(62, 198, 255, 0.45);
  background: var(--cyan-dim);
  box-shadow: none;
}
.ta-reason-chip .ta-count {
  font-variant-numeric: tabular-nums;
  color: var(--cyan);
  font-size: 10px;
}

.ta-modes button[data-wb="inbox"].active {
  color: var(--cyan);
}

/* ── List: filter + 3-col rows ── */
.ta-list-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: baseline;
  padding: 10px 14px 6px;
}
.ta-list-head b {
  font-size: 12px;
  font-weight: 650;
  color: var(--text);
  font-family: var(--mono);
}
.ta-list-head .ta-list-total {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--muted);
}
.ta-list-filter {
  flex: none;
  padding: 0 12px 8px;
}
.ta-list-filter input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--text);
  font-size: 12px;
}
.ta-list-filter input:focus {
  outline: none;
  border-color: var(--cyan-2);
}
.ta-list-filter input::placeholder {
  color: var(--faint);
}

.ta-list-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 48px;
  gap: 10px;
  padding: 0 14px 4px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.ta-list-cols span:last-child {
  text-align: right;
}

.ta-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
  width: 100%;
  height: 40px !important;
  margin: 0;
  padding: 0 12px 0 14px !important;
  border: 0;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left;
  color: var(--text);
  position: relative;
  border-left: 2px solid transparent !important;
}
.ta-row:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}
.ta-row.active {
  background: rgba(62, 198, 255, 0.04) !important;
  border-left-color: var(--cyan) !important;
}
.ta-row:focus-visible {
  outline: none;
  background: rgba(62, 198, 255, 0.06) !important;
}

.ta-row-pair {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}
.ta-row-pair .ta-ru {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}
.ta-row-pair .ta-sep {
  color: var(--faint);
  font-weight: 400;
  flex: none;
}
.ta-row-pair .ta-en {
  color: var(--muted);
  font-weight: 450;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ta-row-slug {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.ta-row-usage {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--mono);
}
.ta-row-usage.is-zero {
  color: var(--faint);
  font-weight: 500;
}

/* ── Inspector compact ── */
.ta-insp-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.ta-insp-kicker {
  display: none; /* was duplicate «ТИП» */
}
.ta-slug {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 650;
  color: var(--cyan);
  word-break: break-all;
  line-height: 1.3;
}
.ta-slug b {
  font-weight: inherit;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
}
.ta-insp-meta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ta-insp-meta strong {
  color: var(--text);
  font-weight: 650;
}

.ta-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.ta-actions .ta-save-wide {
  width: 100%;
  height: 36px;
  font-weight: 650;
}
.ta-actions-sec {
  display: flex;
  gap: 8px;
}
.ta-actions-sec .btn-ghost {
  flex: 1;
  color: var(--muted);
  border-color: var(--line);
  font-weight: 450;
}
.ta-actions .ta-danger {
  width: 100%;
  margin-top: 4px;
  color: var(--nsfw);
  border-color: rgba(240, 113, 120, 0.35);
}
.ta-actions .ta-danger:hover {
  background: rgba(240, 113, 120, 0.1);
  color: var(--nsfw);
}

/* Override dense list chrome from styles.css */
.tag-atelier .ta-reasons { display: none; }
.tag-atelier .ta-list-body { padding-top: 0; }
.tag-atelier .ta-pair { display: none; }
.tag-atelier .ta-row-main { display: none; }
.tag-atelier .ta-badges { display: none; }

.ta-type-combo { width: 100%; }
.ta-type-combo .combo-q {
  background: var(--bg-4);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
}
.ta-type-combo .combo-list {
  z-index: 50;
  max-height: 260px;
}
.modal .ta-type-combo .combo-list { z-index: 95; }
