/* Tools → Backlog. Built from the board filter, card, chip and meta styles;
   only the row layout lives here. */
.backlog-controls {
  display: grid;
  gap: 0.35rem;
}

.backlog-filter {
  flex-wrap: wrap;
}

.backlog-order {
  margin-left: 0.25rem;
}

.backlog-count {
  margin: 0;
}

.backlog-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.backlog-row {
  display: grid;
  gap: 0.15rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
}

.backlog-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.backlog-row:last-child {
  padding-bottom: 0;
}

.backlog-row__title {
  overflow-wrap: anywhere;
}

.backlog-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.6rem;
}

.backlog-row__id {
  font-family: var(--code-font, monospace);
  font-size: 0.85em;
}

.backlog-row__numbers {
  margin-left: auto;
  white-space: nowrap;
}

/* A row with a checkbox: the box sits left of the title and the details. */
.backlog-form .backlog-row {
  grid-template-columns: auto 1fr;
  column-gap: 0.6rem;
}

/* The Claim button under the picked items on the start page, and Release beside a holder line. */
.backlog-claim-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin-top: 0.6rem;
}

/* The forms need a signing script: without scripting they would post a reply with no name.
   site.css hides .requires-script too; this repeats it because the display above comes later. */
@media (scripting: none) {
  .backlog-claim-form {
    display: none;
  }
}

.backlog-claim-form > button {
  width: auto;
  margin: 0;
}

.backlog-release {
  width: auto;
  margin: 0 0 0 0.35rem;
  padding: 0.1rem 0.6rem;
  font-size: inherit;
}

/* Who holds the item: a third line under the details, beside the checkbox column. */
.backlog-row__claim {
  overflow-wrap: anywhere;
}

.backlog-form .backlog-row__claim {
  grid-column: 2;
}

.backlog-row__pick {
  grid-row: 1 / span 2;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.15rem 0 0;
}

.backlog-start-bar {
  position: sticky;
  bottom: var(--app-tabbar-offset, 0px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
  /* Opaque even where --panel is see-through (Arena, Console, LCD, Vapor,
     Vaporgeist), as the private message composer does. */
  background: linear-gradient(var(--panel), var(--panel)), var(--page-bg, Canvas);
}

.backlog-start-bar > .meta {
  white-space: nowrap;
}

.backlog-start-bar > button {
  flex: none;
  width: auto;
  min-width: 7rem;
}

label.backlog-row__title {
  font-weight: inherit;
}
