/* Knitting on needles: the «Петля» row of the brush panel, its block in
   «Новая схема» and the legend under the chart (docs/features/knit-symbols.md). */
.knit-symbols-quick,
.knit-symbols-group-body {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.knit-symbols-group-body {
  flex-wrap: wrap;
  overflow: visible;
}
.knit-symbols-tile {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 52px;
  min-height: 44px;
  padding: 5px 4px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
}
.knit-symbols-tile[aria-pressed='true'] {
  background: #e8f1e6;
  border-color: var(--green);
}
.knit-symbols-icon {
  width: 38px;
  height: auto;
  border: 1px solid var(--line);
}
.knit-symbols-more,
.knit-symbols-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: #f0efe8;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-align: start;
}
.knit-symbols-group small {
  color: var(--muted);
  font-weight: 400;
}
.knit-symbols-group[aria-expanded='true'] {
  background: #e8f1e6;
}
.knit-symbols-more::after,
.knit-symbols-group::after {
  content: '›';
  transition: transform 0.15s;
}
.knit-symbols-more[aria-expanded='true']::after,
.knit-symbols-group[aria-expanded='true']::after {
  transform: rotate(90deg);
}
.knit-symbols-group small {
  margin-inline-start: auto;
  margin-inline-end: 10px;
}
.knit-symbols-new-gauge {
  display: flex;
  align-items: center;
  gap: 10px;
}
.knit-symbols-new-gauge label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.knit-symbols-new-gauge input {
  width: 90px;
}
.knit-symbols-new-mode {
  margin-top: 8px;
}
.knit-symbols-legend {
  align-self: stretch;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fffefa;
  box-shadow: 0 4px 18px #303d340f;
  color: var(--ink);
}
.knit-symbols-legend h3 {
  margin: 0 0 8px;
  font-size: 14px;
}
.knit-symbols-legend ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.knit-symbols-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.knit-symbols-legend canvas {
  flex: none;
  width: 36px;
  height: auto;
}

.knit-symbols-legend-empty {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.knit-symbols-gauge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  width: 100%;
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink);
}
.knit-symbols-gauge input {
  width: 64px;
  min-height: 36px;
  text-align: center;
}
.knit-symbols-gauge small {
  color: var(--muted);
}
