.videos-layout { display: flex; flex-direction: column; flex: 1; min-width: 0; }

.filters {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 14px 24px; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); background: var(--surface);
}
.filters select { width: auto; min-width: 140px; }
.filters .count { color: var(--muted); font-size: 14px; margin-left: auto; }

/* min() on the track size lets a card shrink below 260px on a narrow window
   instead of forcing the grid wider than the screen, which is what pushed the
   buttons out of view once a second row appeared. */
.video-grid {
  flex: 1; overflow-y: auto; overflow-x: hidden; padding: 20px 24px;
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  /* Rows take the height of their content. Left to stretch, six cards each got
     a sixth of the screen, the card was cut off at its thumbnail and the name
     and buttons vanished under overflow: hidden. */
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
  min-width: 0;
}

.video-card {
  background: var(--surface);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow 0.15s, background 0.15s;
  min-width: 0;
}
.video-card .body { min-width: 0; }
.video-card .name { overflow-wrap: anywhere; }

/* How far the review has got, on the card itself. */
.video-card .check-progress { height: 4px; background: var(--bg-deep); }
.video-card .check-progress .bar { height: 100%; background: #f0b232; transition: width 0.4s linear; }

/* Judged videos are readable across the room: green surround for good, red for
   not good. The tint is kept faint so the thumbnail still carries the card. */
.video-card.is-good {
  background: #23291f;
  box-shadow: inset 0 0 0 2px var(--success), 0 0 0 1px rgba(35, 165, 90, 0.35);
}
.video-card.is-not-good {
  background: #2e2124;
  box-shadow: inset 0 0 0 2px var(--danger), 0 0 0 1px rgba(242, 63, 67, 0.35);
}

/* The tint carries across the thumbnail too, so the verdict surrounds the whole
   card instead of colouring only the bottom half. */
.video-card.is-good .thumb { background: #2c3626; }
.video-card.is-not-good .thumb { background: #3b2830; }

.video-card .thumb {
  aspect-ratio: 16 / 9; flex: none; background: var(--surface-3);
  display: grid; place-items: center; cursor: pointer; position: relative;
  font-size: 34px; color: var(--muted);
}
.video-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-card .thumb .duration {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(0, 0, 0, 0.75); padding: 2px 6px; border-radius: 4px;
  font-size: 12px; color: #fff;
}
/* Sits on the thumbnail and only appears on hover: throwing a video away is
   not something you want one stray click away. */
.video-card .remove-btn {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; padding: 0;
  border-radius: 50%; line-height: 0;
  background: rgba(8, 9, 12, 0.75); color: #ff9093;
  display: grid; place-items: center;
  opacity: 0; transition: opacity 0.12s, background 0.12s;
}
.video-card:hover .remove-btn, .video-card .remove-btn:focus-visible { opacity: 1; }
.video-card .remove-btn:hover { background: var(--danger); color: #fff; }
.video-card .remove-btn svg {
  width: 16px; height: 16px; display: block;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.video-card .body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: none; }
.video-card .name { font-size: 14px; color: var(--text-strong); word-break: break-all; }
.video-card .sub { font-size: 12px; color: var(--muted); }

.badge.good { background: rgba(35, 165, 90, 0.2); color: #5fd894; font-weight: 600; }
.badge.not-good { background: rgba(242, 63, 67, 0.2); color: #ff9093; font-weight: 600; }
.badge.uploading { background: var(--accent-soft); color: #a5b0ff; font-weight: 600; }
/* The wait before an automatic check, which is a random while rather than a
   fixed one — so being shown it is the only way to know it is coming. */
.badge.counting { background: rgba(216, 172, 84, 0.2); color: #e5c37a; font-weight: 600; }

/* Still arriving: it is here to be categorised, not to be watched. */
.video-card.is-arriving { opacity: 0.85; }
.video-card.is-arriving .thumb { cursor: default; }
.judge-waiting { font-size: 12px; color: var(--muted); font-style: italic; }

.judge-bar {
  flex: none;
  border-top: 1px solid rgba(0, 0, 0, 0.25); padding: 10px 12px;
  display: flex; flex-direction: column; gap: 8px;
  background: rgba(0, 0, 0, 0.18);
}
.style-choices { display: flex; gap: 6px; flex-wrap: wrap; }
.style-choice {
  padding: 5px 10px; font-size: 13px; border-radius: 999px;
  background: transparent; color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--border);
}
.style-choice:hover { color: var(--text-strong); }
.style-choice.selected {
  background: var(--accent); color: #fff; box-shadow: none;
}

/* What approving would cost, so a per-minute rate is never a surprise. */
.judge-bar .price { font-size: 12px; color: var(--muted); }
.judge-bar .price strong { color: var(--text-strong); }
.judge-bar .price.unknown { color: #ffb26b; }

.judge-actions { display: flex; gap: 8px; }
.judge-actions button { flex: 1; font-size: 13px; padding: 7px; font-weight: 600; }
.good-btn { background: var(--success); color: #fff; }
.good-btn:hover:not(:disabled) { background: #1a8347; }
.not-good-btn { background: transparent; color: #ff9093; box-shadow: inset 0 0 0 1px var(--danger); }
.not-good-btn:hover:not(:disabled) { background: var(--danger); color: #fff; }

.player-overlay {
  position: fixed; inset: 0; background: rgba(8, 9, 12, 0.94);
  display: none; flex-direction: column; z-index: 100;
}
.player-overlay.open { display: flex; }
.player-overlay header {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: var(--text);
}
.player-overlay header .title { font-size: 15px; word-break: break-all; }
.player-overlay video { flex: 1; min-height: 0; width: 100%; background: #000; }
.player-error { padding: 40px; text-align: center; color: var(--muted); }

/* A video being checked is neither good nor not good yet, so it gets its own
   colour rather than borrowing one of the two verdicts. */
.video-card.is-checking {
  background: #2e2a1f;
  box-shadow: inset 0 0 0 2px #f0b232, 0 0 0 1px rgba(240, 178, 50, 0.35);
}
.video-card.is-checking .thumb { background: #3a3426; }
.badge.checking { background: rgba(240, 178, 50, 0.2); color: #ffcc4d; font-weight: 600; }
.badge.no-mistakes { background: rgba(35, 165, 90, 0.2); color: #5fd894; font-weight: 600; }
.badge.mistakes { background: rgba(242, 63, 67, 0.2); color: #ff9093; font-weight: 600; }

/* The title and hashtags the check wrote, where you actually look at the video. */
.player-meta { padding: 0 20px 10px; }
.player-title { font-size: 15px; color: var(--text-strong); }
.player-tags { font-size: 13px; color: #a5b0ff; margin-top: 2px; }

/* What the review asked for, next to the video it is about. */
.player-fixes { padding: 0 20px 12px; max-height: 30vh; overflow-y: auto; }
.player-fixes-head {
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: #ffcc4d; margin-bottom: 6px;
}
.player-fix {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 13px; color: var(--text); padding: 4px 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.player-fix.dropped { opacity: 0.4; text-decoration: line-through; }
.player-fix .fix-at {
  flex: none; font-size: 11px; color: #ffcc4d;
  background: rgba(240, 178, 50, 0.15); padding: 1px 6px; border-radius: 4px;
  font-variant-numeric: tabular-nums;
}

/* The check has the last word on quality, never on whether it goes out. */
.use-anyway {
  flex: 1; font-size: 13px; padding: 7px; font-weight: 600;
  background: transparent; color: #ffcc4d;
  box-shadow: inset 0 0 0 1px #f0b232; border-radius: var(--radius-sm);
}
.use-anyway:hover:not(:disabled) { background: #f0b232; color: #241a05; }

/* On a phone the filters stack and the cards go one per row. */
@media (max-width: 720px) {
  .filters { padding: 10px 12px; gap: 6px; }
  .filters select { flex: 1; min-width: 0; }
  .filters .count { width: 100%; margin-left: 0; }
  .video-grid { padding: 12px; gap: 12px; grid-template-columns: 1fr; }
  .video-card { min-height: 0; }
  .video-card .remove-btn { opacity: 1; }
}

/* Who gave the verdict, for whoever gives them. */
.judged-by { font-size: 11px; color: var(--muted); font-style: italic; }

/* How far the check has got, with a way to call it off. */
.check-strip-row { display: flex; align-items: center; gap: 8px; padding: 0 12px 6px; }
.check-strip-row .check-progress { flex: 1; border-radius: 999px; overflow: hidden; }
.check-strip-row .stop-check {
  flex: none; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: transparent; color: #ff9093; box-shadow: inset 0 0 0 1px var(--danger);
}
.check-strip-row .stop-check:hover:not(:disabled) { background: var(--danger); color: #fff; }

/* Sending a video to the reviewer, from the card it is on. */
.judge-actions .run-check {
  flex: none; font-size: 13px; font-weight: 600; padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: #d8ac54; color: #241a05;
}
.judge-actions .run-check:hover:not(:disabled) { background: #f0b232; }

/*
 * What the review asked for, on its own.
 *
 * These used to sit above the video in the watch overlay, where the player
 * pushed them off the bottom and the column left was two words wide. Pressing
 * the video plays it; pressing the line under it opens this.
 */
.video-card .body[data-open-fixes] { cursor: pointer; }
.video-card .body[data-open-fixes]:hover .name { color: var(--text-strong); }

.fix-sheet {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(8, 9, 12, 0.72);
  display: grid; place-items: center; padding: 20px;
}
.fix-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 20px; width: min(560px, 100%); max-height: 86vh;
  display: flex; flex-direction: column;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.fix-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fix-file { font-size: 15px; font-weight: 600; color: var(--text-strong); word-break: break-word; }
.fix-count { margin-top: 2px; font-size: 12px; color: var(--muted); }
.fix-empty { margin: 20px 0; color: var(--muted); font-size: 14px; }

.fix-list {
  margin: 16px 0 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto; min-height: 0;
}
/*
 * One fix, laid out to be read rather than to fit.
 *
 * Each is a card of its own with the moment across the top in full size — they
 * used to be rows of small grey text with a narrow time chip beside them, which
 * on a phone left the instruction in a column a few words wide. The
 * instruction is the thing you act on, so it is the thing set in the reading
 * size and the strong colour.
 */
.fix-row {
  display: block;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg-deep);
  border-left: 3px solid var(--accent);
}
.fix-row.dropped { opacity: 0.5; border-left-color: var(--muted); }
.fix-row.dropped .fix-label { text-decoration: line-through; }

.fix-at {
  display: inline-block; margin-bottom: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.fix-label {
  font-size: 13px; color: var(--muted); line-height: 1.4; margin-bottom: 4px;
}
.fix-body { font-size: 15px; color: var(--text-strong); line-height: 1.55; }

/* Set apart from the fixes above it, because it is not one of them. Both lists
   are numbered, and stacked under a heading that says "1 to fix" the titles
   read as nine more mistakes. A rule, a gap and a colour of its own. */
.fix-post {
  margin-top: 20px; padding: 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--surface-2);
}
.fix-post.folded { padding: 0; border: 0; background: none; }

/* Closed while there is something to fix: one line, not nine. */
.fix-title-toggle {
  width: 100%; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text-strong);
  border: 1px solid var(--line); cursor: pointer; font-size: 13px; font-weight: 600;
}
.fix-title-toggle:hover { background: var(--surface-3); }
.fix-title-count { color: var(--muted); font-weight: 400; font-size: 12px; }
.fix-post.folded .fix-title-toggle { margin-top: 4px; }
.fix-post-body { padding-top: 4px; }
.fix-post-head { font-size: 11px; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 6px; }
.fix-post-title { font-size: 14px; color: var(--text-strong); }
.fix-post-tags { margin-top: 4px; font-size: 13px; color: var(--accent); word-break: break-word; }

.fix-card footer { display: flex; justify-content: flex-end; margin-top: 18px; }

@media (max-width: 720px) {
  .fix-sheet { padding: 10px; }
  .fix-card { padding: 16px; max-height: 92vh; }
  .fix-body { font-size: 16px; }
}

/*
 * Five titles, ranked, one of them chosen.
 *
 * Which title to use is a judgement about the audience — one suggestion is a
 * decision taken for you. The number is the model's ranking, not an order you
 * have to follow.
 */
.title-options { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.title-option {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--bg-deep); border: 1px solid transparent;
  text-align: left; font: inherit; color: var(--text);
}
.title-option:hover { border-color: var(--accent); }
.title-option.chosen { border-color: var(--success); background: color-mix(in srgb, var(--success) 12%, var(--bg-deep)); }
.title-rank {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--surface-2); color: var(--muted);
}
.title-option.chosen .title-rank { background: var(--success); color: #fff; }
.title-text { flex: 1; min-width: 0; font-size: 14px; color: var(--text-strong); line-height: 1.4; }
.title-mark { flex: none; font-size: 11px; color: var(--muted); }
.title-option.chosen .title-mark { color: var(--success); }

/* The category, for someone who may see it but not set it. */
.judge-bar .style-readonly {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  font-size: 13px; color: var(--text-strong); background: var(--surface-3);
}

/*
 * Approved, still waiting on a title.
 *
 * The same card on three tabs — To-do, Check and Schedule — because it is the
 * same question on all three, and it is the one state a video can sit in
 * indefinitely with nothing anywhere saying so.
 */
.untitled-card {
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn, #e8b931);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--surface);
}
.untitled-head { display: flex; align-items: baseline; gap: 8px; }
.untitled-label { font-weight: 600; font-size: 13px; }
.untitled-count {
  background: var(--warn, #e8b931); color: #1a1a1a;
  border-radius: 999px; padding: 0 7px; font-size: 11px; font-weight: 700;
}
.untitled-list { list-style: none; margin: 8px 0 0; padding: 0; }
.untitled-item {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0; border-top: 1px solid var(--line);
}
.untitled-name {
  flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; font-size: 12px;
}
.untitled-style { color: var(--muted); font-size: 11px; white-space: nowrap; }
.untitled-hint { color: var(--muted); font-size: 11px; margin: 8px 0 0; }

/*
 * Wat de editor op zijn eigen kaart kan: de fouten lezen, opnieuw laten
 * kijken, en de titel kiezen. Geen oordeel — dat blijft bij Valentijn.
 */
.editor-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px 8px; }
.editor-tools .check-badge,
.editor-tools .do-check { font-size: 11px; padding: 3px 9px; }
