/* Formatting toolbar: button groups, icons, colour palette. */

.toolbar .tgroup {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px;
  border-left: 1px solid var(--tline);
}

.toolbar .tgroup:first-child { padding-left: 0; border-left: none; }

@media (max-width: 700px) {
  .toolbar { column-gap: 8px; }
  .toolbar .tgroup { flex-wrap: wrap; padding: 0; border-left: none; }
}

.tool svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

/* the bullets keep the stroke too, so they're as big as The System's */
.tool svg .fill { fill: currentColor; }
.tool svg .hl-bar { stroke: var(--hl-yellow); stroke-width: 2.4; }
.tool .serif { font-family: Georgia, serif; }
.tool .tc-face { display: grid; justify-items: center; }

.tool .tc-bar {
  width: 14px;
  height: 3px;
  margin-top: 1px;
  border-radius: 2px;
  background: var(--tc-red);
}

.palette {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--tline);
  color: var(--muted);
  font-size: 12px;
  line-height: normal;
}

.palette[hidden] { display: none; }
.palette-label { margin-right: 4px; }

.swatch {
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--sheet);
  color: var(--fg);
  font: 600 13px/1 var(--font-ui);
  cursor: pointer;
}

.swatch:hover { border-color: var(--fg); }

.swatch[data-tc="red"] { color: var(--tc-red); }
.swatch[data-tc="orange"] { color: var(--tc-orange); }
.swatch[data-tc="green"] { color: var(--tc-green); }
.swatch[data-tc="blue"] { color: var(--tc-blue); }
.swatch[data-tc="purple"] { color: var(--tc-purple); }
.swatch[data-tc="gray"] { color: var(--tc-gray); }
.swatch[data-hl="yellow"] { background: var(--hl-yellow); }
.swatch[data-hl="green"] { background: var(--hl-green); }
.swatch[data-hl="blue"] { background: var(--hl-blue); }
.swatch[data-hl="pink"] { background: var(--hl-pink); }
.swatch[data-hl="orange"] { background: var(--hl-orange); }
