/* The song requests part (requests.js): only what app.css does not already
   have, scoped to .rq (the request tabs and their dialogs). */
.rq .grid thead th.actions-col { cursor: default; right: 0; z-index: 6; box-shadow: inset 1px 0 var(--line), inset 0 -1px var(--line); }
.rq .status-pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: var(--hover); border: 1px solid var(--line); }
.rq .status-pill.pending { color: var(--manual); }
.rq .status-pill.released { color: var(--accent); }
.rq .status-pill.approved { color: var(--s1); }
.rq .status-pill.rejected { color: var(--muted); }
.rq .status-pill.auto { border-style: dashed; }
.rq td.times { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.rq td.times.many { color: var(--text); font-weight: 600; }
.rq .toolbar input[type="date"] { padding: 4px 6px; }
.rq .bars { display: grid; grid-template-columns: minmax(90px, 220px) 1fr auto; gap: 4px 10px; align-items: center; font-size: 13px; }
.rq .bars .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq .bars .track { height: 10px; background: var(--hover); border-radius: 5px; overflow: hidden; }
.rq .bars .fill { height: 100%; background: var(--s1); border-radius: 5px; }
.rq .bars .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.rq .panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
/* At least the box's width; wider when the columns need it (the box then scrolls sideways). */
.rq table.top { width: max-content; min-width: 100%; }
.rq table.top td.num, .rq table.top th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rq table.top tbody tr { cursor: pointer; }
.rq table.top tbody tr:hover { background: var(--hover); }
.rq .toolbar select { max-width: 220px; text-overflow: ellipsis; }
@media (max-width: 700px) {
  .rq .toolbar label { min-width: 0; max-width: 100%; }
  .rq .toolbar select { max-width: calc(100vw - 110px); }
}
:root { --good: #1a7f4b; --warn: #d97706; --bad: #c2362b; }
@media (prefers-color-scheme: dark) {
  :root { --good: #3fb46e; --warn: #f0a52f; --bad: #ef6b5f; }
}
.rq .rate.good, #dash-rq-tiles .rate.good { color: var(--good); }
.rq .rate.warn, #dash-rq-tiles .rate.warn { color: var(--warn); }
.rq .rate.bad, #dash-rq-tiles .rate.bad { color: var(--bad); }
.rq .tile .value.rate, #dash-rq-tiles .tile .value.rate { font-weight: 600; }
.rq .card h4 { font-size: 14px; }
.rq .card .meta .rate { font-weight: 600; margin-left: 8px; }
.rq .card svg.spark { height: 64px; }
.rq .seg span.pending { background: var(--warn); }
.rq .seg span.released { background: var(--good); }
.rq .seg span.other { background: var(--bad); }
.rq .chart .layer { stroke: var(--panel); stroke-width: 1.5; }
.rq .chart .hover-line { stroke: var(--axis); stroke-width: 1; }
.rq .chart .hit { fill: transparent; cursor: crosshair; }
.rq .spark .area { fill: var(--s1); fill-opacity: 0.22; }
.rq .spark .line { fill: none; stroke: var(--s1); stroke-width: 2; }
.rq .spark .base { stroke: var(--grid); stroke-width: 1; }
.rq .panels.two { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
@media (max-width: 900px) {
  .rq .panels.two { grid-template-columns: minmax(0, 1fr); }
}
.rq .dash .panel h3 + p.muted { margin-bottom: 10px; }
.rq .key.seg-pending { background: var(--warn); }
.rq .key.seg-released { background: var(--good); }
.rq .key.seg-other { background: var(--bad); }
.rq .card.editable { cursor: pointer; }
.rq .card.editable:hover { border-color: var(--axis); }
.rq .legend > span { gap: 6px; }
#rq-outlet-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
@media (max-width: 700px) {
  #rq-dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rq .tile .value { font-size: 22px; }
}
.rq .bars .fill { display: block; }
.rq .bars.lang .track { height: 12px; background: var(--hover); border-radius: 6px; overflow: visible; display: flex; }
.rq .bars.lang .seg { height: 100%; }
.rq .bars.lang .n b { color: var(--text); font-weight: 600; }
.rq .lang-head { display: grid; grid-template-columns: minmax(90px, 220px) 1fr auto; gap: 10px; font-size: 12px; color: var(--muted); margin: 8px 0 4px; }
.rq .lang-head span:last-child { text-align: right; }
.rq td .entered { display: block; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) {
  .rq .bars.lang, .rq .lang-head { grid-template-columns: minmax(70px, 30%) 1fr auto; }
}
.rq td .waiting { color: var(--muted); font-size: 12px; white-space: nowrap; }
.rq table.top td:nth-child(2), .rq table.top td:nth-child(3) { max-width: 200px; }
.rq table.wanted td { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq table.top thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.rq .timeline { --name: 230px; --outlet: 150px; --who: 120px; --took: 104px; max-height: 560px; overflow: auto; border-top: 1px solid var(--line); margin-top: 8px; }
.rq .tl-row { display: grid; grid-template-columns: var(--name) var(--outlet) var(--who) 1fr var(--took); align-items: center; min-height: 34px; border-bottom: 1px solid var(--line); }
.rq .tl-rows .tl-row:hover { background: var(--hover); }
.rq .tl-rows { position: relative; }
.rq .tl-axis { position: sticky; top: 0; z-index: 3; background: var(--panel); min-height: 26px; cursor: default; font-size: 12px; color: var(--muted); }
.rq .tl-name { padding: 2px 10px 2px 0; overflow: hidden; display: flex; flex-direction: column; line-height: 1.25; }
.rq .tl-name b, .rq .tl-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq .tl-name b { font-weight: 600; font-size: 13px; }
.rq .tl-name span { font-size: 11px; color: var(--muted); }
.rq .tl-track { position: relative; height: 100%; min-height: 26px; margin: 0 8px; }
.rq .tl-took { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; padding-right: 4px; white-space: nowrap; }
.rq .tl-tick { position: absolute; top: 50%; transform: translate(-50%, -50%); white-space: nowrap; font-size: 11px; color: var(--axis); }
.rq .tl-cell { padding: 2px 8px 2px 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq .tl-grid { position: absolute; top: 0; bottom: 0; left: calc(var(--name) + var(--outlet) + var(--who) + 8px); right: calc(var(--took) + 8px); pointer-events: none; }
.rq .tl-grid span { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grid); }
.rq .tl-grid span.today { background: var(--axis); }
.rq .tl-bar { position: absolute; top: 50%; height: 16px; transform: translateY(-50%); border-radius: 4px; min-width: 4px; }
.rq .tl-bar.released { background: var(--good); }
.rq .tl-bar.closed { background: var(--bad); }
.rq .tl-bar.open { background: color-mix(in srgb, var(--warn) 30%, transparent); box-shadow: inset 0 0 0 1.5px var(--warn); }
.rq .tl-bar.undated { background: repeating-linear-gradient(135deg, var(--c) 0 5px, color-mix(in srgb, var(--c) 35%, transparent) 5px 9px); }
.rq .tl-bar.released.undated { --c: var(--good); }
.rq .tl-bar.closed.undated { --c: var(--bad); }
.rq .tl-legend { margin: 4px 0; font-size: 12px; }
.rq .tl-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.rq .tl-key { position: relative; display: inline-block; width: 22px; height: 12px; vertical-align: middle; }
.rq .tl-key .tl-bar { left: 0; width: 22px; height: 12px; }
.rq .tl-controls { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 700px) {
  .rq .timeline { --name: 120px; --outlet: 70px; --who: 60px; --took: 84px; }
  .rq .tl-took { font-size: 11px; }
}
.rq .tl-controls { margin: 0; }
/* Title and choices on one row, figures and legend on the next: the chart gets the rest. */
.rq .tl-head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 8px; }
.rq .tl-head h3 { margin: 0; flex: 1; min-width: 160px; }
.rq .tl-summary { display: flex; align-items: center; gap: 6px 20px; flex-wrap: wrap; font-size: 13px; }
.rq .tl-summary .tl-stats { display: flex; gap: 4px 16px; flex-wrap: wrap; margin: 0; color: var(--muted); }
.rq .tl-stat b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.rq .tl-summary .tl-legend { margin: 0 0 0 auto; }
#rq-timeline-view .tl-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.rq .tl-panel #rq-tl-sub { margin: 4px 0 0; }
.rq .tl-controls label { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.rq .tl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
@media (max-width: 700px) {
  .rq .tl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.rq .small-note { font-size: 12px; margin: 4px 0 0; }
.rq .tl-panel .timeline { flex: 1; min-height: 280px; max-height: none; }
@media (max-width: 700px) {
  /* The page scrolls on a phone, so the chart keeps a height of its own. */
  .rq .tl-panel .timeline { max-height: 75vh; }
}
.rq .status-pill.duplicate { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); font-weight: 600; }
.rq .dialog.wide { width: min(760px, 92vw); }
.rq .check-list { max-height: 60vh; display: grid; gap: 12px; }
.rq .check-group { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 6px; }
.rq .check-artist { font-size: 12px; color: var(--muted); text-transform: none; }
.rq .dialog label.check-option { display: flex; flex-direction: row; align-items: baseline; gap: 8px; cursor: pointer; }
.rq .check-group input[type=text] { width: 100%; }
.rq .check-group .actions { display: flex; justify-content: flex-end; gap: 8px; margin: 0; }
.rq .tl-name a.tl-song { font-weight: 600; font-size: 13px; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Also on the main Dashboard, which shows the request tiles outside .rq. */
.rq .with-dups, #dash-rq-tiles .with-dups { color: var(--bad); font-weight: 500; font-size: 0.9em; white-space: nowrap; }
.rq .tile .value .with-dups, #dash-rq-tiles .tile .value .with-dups { font-size: 0.55em; vertical-align: middle; }
.rq td.yt-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Requests for the same song, together in the default order: a band down
   the left of the group and a line above it. */
.rq .grid tr.rq-group > td.num-col { box-shadow: inset 4px 0 0 color-mix(in srgb, var(--s7) 70%, var(--panel)), inset -1px 0 var(--line); }
.rq tr.rq-group-first > td { border-top: 2px solid color-mix(in srgb, var(--s7) 45%, var(--line)); }
