/* The Properties, Problems, Commit and Toolbox tool windows. */

/* properties; the Toolbox has the same head, and the same header over a group */
.pg-head,
.tx-for {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 12px 8px;
  flex: none;
  min-width: 0;
}
.pg-head b,
.tx-for b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pg-head small,
.tx-for small {
  color: var(--muted);
  white-space: nowrap;
}
.pgrid {
  flex: 1;
  overflow: auto;
  border-top: 1px solid var(--line);
}
.pc,
.tx-g {
  height: 24px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  background: var(--editor);
  border-bottom: 1px solid var(--line);
}
.pr {
  display: grid;
  grid-template-columns: 42% 58%;
  min-height: 26px;
  border-bottom: 1px solid var(--line);
}
.pr > * {
  padding: 0 10px;
  display: flex;
  align-items: center;
  min-width: 0;
}
.pr > span:first-child {
  color: var(--muted);
  border-right: 1px solid var(--line);
}
.pr .v {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  line-height: 26px;
}
.pr .in {
  width: 100%;
  height: 22px;
  border-color: transparent;
  background: transparent;
  padding: 0 4px;
  margin-left: -4px;
}
.pr .in:hover {
  border-color: var(--ctl);
}
.pr select.in {
  padding: 0;
}
/* an item id is 25 characters, so it may take a second line */
.pr .v.wrap {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 16px;
  padding: 5px 0;
}
.pr .red {
  color: var(--red);
}
/* the fields a part of a tool is changed with: a text of several lines, several things with one to add, a button */
.pr textarea.in {
  height: auto;
  min-height: 58px;
  margin: 3px 0 3px -4px;
  padding: 3px 4px;
  resize: vertical;
  line-height: 1.35;
}
.pr .pmany {
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 3px;
  padding-bottom: 3px;
}
.pr .pmany .chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 0 2px 0 7px;
  height: 20px;
  border: 1px solid var(--ctl);
  border-radius: 10px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}
.pr .pmany .ib {
  width: 16px;
  height: 16px;
}
.pr .pmany .ib .i {
  width: 10px;
  height: 10px;
}
.pr .pmany select.in {
  width: auto;
  max-width: 100%;
  color: var(--muted);
}
/* a palette: each colour a small square in that colour, the one that is picked with a ring around it */
.pr .pswatch {
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 4px;
  padding-bottom: 4px;
}
.pr .pswatch .sw {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--sw);
  border: 1px solid color-mix(in srgb, var(--fg) 25%, transparent);
}
.pr .pswatch .sw.on {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.pr .pswatch .sw:disabled {
  opacity: 0.5;
}
.pr .btn {
  height: 22px;
  padding: 0 9px;
  margin: 3px 0;
  color: var(--red);
}
.pr .btn .i {
  width: 12px;
  height: 12px;
}

/* problems */
.prb-bar {
  display: flex;
  gap: 6px;
  padding: 0 10px 8px;
  flex: none;
  flex-wrap: wrap;
}
.prb-bar button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 7px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.prb-bar button.on {
  background: var(--hover);
  color: var(--fg);
}
.prb {
  flex: 1;
  overflow: auto;
  border-top: 1px solid var(--line);
}
.prb button {
  display: flex;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}
/* the files a problem touches, and what repairs it */
.prb .files {
  display: block;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.prb .act {
  flex: none;
  height: 22px;
  padding: 0 9px;
  margin-left: auto;
}

/* commit */
/* the tabs "Commit" and "Shelf", which are there once something is shelved */
.cm-tabs {
  flex: none;
  display: flex;
  gap: 2px;
  padding: 0 6px 4px;
}
.cm-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  padding: 3px 8px;
  cursor: pointer;
}
.cm-tabs button:hover {
  color: var(--fg);
}
.cm-tabs button.on {
  color: var(--fg);
  border-bottom-color: var(--accent);
}
/* the toolbar over the changes, and what the repository is in the middle of */
.cm-h {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 4px;
  min-width: 0;
}
.cm-tools {
  display: flex;
  flex: none;
}
.cm-op {
  margin-left: auto;
  padding-right: 4px;
  color: var(--muted);
  white-space: nowrap;
}
/* over the changes, while files are in conflict: how many, and what resolves them */
.cm-cf {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 10px 6px;
  color: var(--red);
}
.cm-list {
  flex: 1;
  overflow: auto;
  border-top: 1px solid var(--line);
  padding: 4px 0;
  outline: none;
}
/* a changelist, an item with changes in it, and a file of that item, spaced as the rows of the Explorer are: a level
   further in by 16px, and 4px between the arrow, the tick, the icon and the name */
.cm-l,
.cm-g {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 10px 0 6px;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}
/* a shelved change, "Recently Deleted", and a file of a shelved change, each further in under "Recently Deleted" */
.sf-s,
.sf-d,
.sf-f {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px 0 6px;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}
.sf-d {
  color: var(--muted);
}
.sf-f {
  padding-left: 30px;
}
.sf-s.sf-u {
  padding-left: 22px;
}
.sf-f.sf-u {
  padding-left: 46px;
}
/* the name stays whole; what is said of it in grey gives way where the part is narrow */
.sf-s > span,
.sf-f > span {
  flex: none;
}
.sf-s small,
.sf-f small {
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sf-s:hover,
.sf-d:hover,
.sf-f:hover {
  background: var(--hover);
}
/* the active changelist is the bold one */
.cm-l.on > span {
  font-weight: 600;
}
.cm-g {
  padding-left: 22px;
  font-weight: 500;
}
.cm-l small,
.cm-g small,
.cm-f small {
  color: var(--muted);
  font-weight: 400;
}
.cm-f {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 10px 0 58px;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}
.cm-f:hover,
.cm-g:hover,
.cm-l:hover {
  background: var(--hover);
}
.cm-list input[type='checkbox'] {
  flex: none;
  margin: 0 2px 0 0;
}
.cm-list .sel {
  background: var(--sel);
}
.cm-list .hint {
  margin: 0 auto;
}
/* over the message: whether the commit replaces the last one, and the messages committed with before */
.cm-opts {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cm-opts label,
.dlg .cm-opt {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
}
/* the changes a rollback can take back, and how many of them are ticked */
.cm-rb {
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 0;
}
.dlg .cm-rb label {
  margin: 0;
  color: var(--fg);
  font-size: inherit;
}
.dlg .cm-rb .cm-l {
  padding-left: 10px;
}
.dlg .cm-rb .cm-g {
  padding-left: 30px;
}
.dlg .cm-rb .cm-f {
  padding-left: 50px;
}
.dlg .cm-count {
  display: flex;
  gap: 12px;
  margin: 0;
  color: var(--muted);
}
.cm-f span {
  overflow: hidden;
  text-overflow: ellipsis;
}
/* the box a commit message is typed in; a question to the agent is typed in the same */
.cm-box,
.ag-ask {
  flex: none;
  border-top: 1px solid var(--line);
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* how high the message is follows the bar over the box, which is dragged */
.cm-box textarea {
  width: 100%;
  height: var(--cm-msg, 64px);
  min-height: 64px;
  resize: none;
}
.cm-box .acts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* "Don't show again" stands apart from what "Update Project" lets choose between */
.dlg .up-dont {
  margin-top: 10px;
  color: var(--muted);
}

/* the head of a group of the Toolbox folds and opens it, with its arrow turned down while it is open */
button.tx-g {
  width: 100%;
  gap: 4px;
  padding-left: 6px;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}
button.tx-g:hover {
  color: var(--fg);
}
.tx-g .i {
  width: 12px;
  height: 12px;
  transition: transform 0.1s;
  transform: rotate(90deg);
}
.tx-g.shut .i {
  transform: none;
}

/* the Toolbox: what can be added to what the document area shows, group by group. It is here, with the other tool
   windows, and not with the notes, so that every page with a Toolbox has it: the administration portal has no notes. */
.tx {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border-top: 1px solid var(--line);
  padding-bottom: 8px;
}
.tx-e {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 28px;
  padding: 0 12px;
  text-align: left;
  cursor: grab;
  touch-action: none;
  user-select: none;
  white-space: nowrap;
}
.tx-e span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-e:hover {
  background: var(--hover);
}
.tx-e:disabled {
  opacity: 0.5;
  cursor: default;
  background: none;
}
.tx-e.drag {
  background: var(--sel);
}
/* an entry with a drawing of its own, in the colour of its name */
.tx-d {
  display: flex;
  flex: none;
  color: var(--muted);
}
.tx-e:hover .tx-d {
  color: var(--fg);
}
/* the field that searches what can be added */
.tx-q {
  padding: 0 8px 6px 12px;
  flex: none;
  display: flex;
}
.tx-q .in {
  flex: 1;
  height: 26px;
}
/* A way to work: it is clicked and stays pressed, and is not dragged. Two are beside each other, so that the ways of
   every group are in sight together in a Toolbox that shares its side with another tool window; in a Toolbox that
   is narrow each has a row of its own. */
.tx-w,
.tx-2 {
  display: inline-flex;
  width: 50%;
  vertical-align: top;
  padding-right: 6px;
}
.tx-w {
  cursor: pointer;
}
@container (max-width: 239px) {
  .tx-w,
  .tx-2 {
    display: flex;
    width: 100%;
  }
}
.tx-w.on,
.tx-w.on:hover {
  background: var(--sel);
}
.tx-w:disabled {
  cursor: default;
}
.tx-e .sq {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  margin: 0 2px;
}
.tx-note {
  color: var(--muted);
  font-size: 12px;
  padding: 10px 12px;
  line-height: 1.45;
}
.tx-lock {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  padding: 8px 12px 0;
}
/* what is dragged from the Toolbox follows the pointer, and the document area shows that it takes it */
.tx-ghost {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--pop);
  border: 1px solid var(--popb);
  box-shadow: var(--shadow);
  white-space: nowrap;
  transform: translate(10px, 8px);
  opacity: 0.95;
}
.tx-ghost.no {
  opacity: 0.55;
}
.doc.tx-over::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent);
  border-radius: 2px;
  pointer-events: none;
  z-index: 5;
}
