/* Moderation pages: what Bootstrap and the shared chrome do not cover. */

/* Product price: amount and currency are greyed out while the model is
   "not known" or "free", date and link while it is "not known" (no
   script; the server drops an amount of a free product anyway). */
.price:has(#price_model option:is([value=""], [value="free"]):checked) .price-amount,
.price:has(#price_model option[value=""]:checked) .price-detail {
  opacity: 0.45;
}

/* Product kind: plugin formats and identifiers belong to plugins --
   hidden for a DAW, app, library or firmware, identifiers also for a bundle (its
   plugins carry them). Hidden fields are still sent, so nothing already
   entered is lost when the kind changes. */
form:has(#kind option:is([value="daw"], [value="app"], [value="library"], [value="firmware"]):checked) :is(.plugin-formats, .plugin-ids),
form:has(#kind option[value="bundle"]:checked) .plugin-ids {
  display: none;
}

/* Audit diff: what an entry's change removed and added. */
.audit-diff { width: auto; }
.audit-diff th, .audit-diff td { padding: 0 .5rem 0 0; white-space: pre-wrap; word-break: break-word; vertical-align: top; }
.audit-diff del { color: var(--bs-danger-text-emphasis, #842029); background: var(--bs-danger-bg-subtle, #f8d7da); text-decoration: line-through; }
.audit-diff ins { color: var(--bs-success-text-emphasis, #0f5132); background: var(--bs-success-bg-subtle, #d1e7dd); text-decoration: none; }

/* Scout: a decision returns to the list at the row to look at next
   (#obs-<id>); clear of the fixed navbar, and marked. */
tr[id^="obs-"] { scroll-margin-top: 5rem; }
tr[id^="obs-"]:target > td { --bs-table-bg: var(--bs-warning-bg-subtle, #fff3cd); }

/* Review queue: one column per field. A description is one line cut
   off with "…" until opened (click), then wraps in full; a product's
   is a row of its own below it (the product table is wide already). */
.queue-table { font-size: .875rem; }
.queue-table th { white-space: nowrap; }
.queue-table .queue-text { max-width: 16rem; }
.queue-desc { display: inline-block; max-width: 100%; vertical-align: top; }
.queue-desc summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.queue-desc[open] summary { white-space: pre-wrap; word-break: break-word; }
.queue-table .queue-text:has(.queue-desc[open]) { min-width: 20rem; max-width: 28rem; }
.queue-table tr:has(+ .queue-sub) > td { border-bottom-width: 0; }
.queue-sub > td { border-top-width: 0; }
.queue-sub .queue-full { max-width: 0; } /* never widens the table */
.queue-sub .queue-full > div { display: flex; gap: .5rem; }
.queue-label { color: var(--bs-secondary-color); font-weight: 600; flex: none; }
.queue-sub .queue-desc { flex: 1; min-width: 0; }
