/*
 * The client lock, the knock, Sending at and Pull back, who and what (lane t22-lock3, 15 Oct 2026; js/v3_lock3.js
 * 1.0.0). Only the desk's own tokens, so every theme follows (light, dark, Eucalypt, Harbour, High contrast). Nothing
 * here draws while the server switch desk.lock3 is off: every rule hangs off .l3-*, which only that file adds.
 * A person's own colour comes in as --l3c (their avatar colour, set through the CSSOM).
 */

.l3-top { display: grid; gap: 6px; padding-left: 54px; min-width: 0; }
.l3-k {
  flex: none; margin-right: 8px; font-size: .6875rem; line-height: 1.125rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-3);
}
.l3-who, .l3-fyi, .l3-press { display: flex; align-items: baseline; flex-wrap: wrap; margin: 0; min-width: 0; font-size: .875rem; line-height: 1.25rem; overflow-wrap: anywhere; }
.l3-who { font-weight: 700; color: var(--ink); }
.l3-who.is-leaders { color: var(--warn); }
.l3-who.is-cm { color: var(--ink); }
.l3-who.is-cm::before { content: ""; flex: none; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--l3c, var(--accent)); align-self: center; }
.l3-fyi { color: var(--ink-2); }
.l3-press { color: var(--ink-2); }

/* who is in it */
.l3-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  font-size: .75rem; line-height: 1.125rem; font-weight: 700; color: var(--ink); white-space: nowrap;
  border: 1px solid var(--l3c); background: color-mix(in srgb, var(--l3c) 16%, var(--solid));
}
.l3-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--l3c); }
.l3-chip.is-mine { border-style: dashed; }
.l3-chip.is-client { background: transparent; }
.l3-lock {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 8px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--warn) var(--tint-alpha), transparent);
}
.l3-lock.is-mine { padding: 0; background: transparent; }
.l3-lock-t { min-width: 0; font-size: .875rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.l3-lock .btn { margin-left: auto; min-height: 36px; }
.l3-knocking { margin-left: auto; font-size: .8125rem; font-weight: 700; color: var(--ink-2); }
.cc-send.l3-waits { opacity: .55; }

/* Sending at, and done today */
.l3-done { display: grid; gap: 4px; }
.l3-done > .l3-k { margin: 0; }
.l3-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.l3-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-width: 0; font-size: .875rem; line-height: 1.25rem; }
.l3-row-t { min-width: 0; overflow-wrap: anywhere; }
.l3-row.is-going {
  padding: 6px 10px; border-radius: 10px; color: var(--ink);
  background: color-mix(in srgb, var(--info) var(--tint-alpha), transparent);
}
.l3-row.is-going .btn { margin-left: auto; min-height: 34px; }
.l3-left { flex: none; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--info); }
.l3-row.is-sent, .l3-row.is-done { color: var(--ink-2); }
.l3-row.is-sent::before, .l3-row.is-done::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.l3-row.is-own::before { background: var(--accent); }
.l3-row.is-pulled { color: var(--ink-2); font-style: italic; }
.l3-row.is-failed { color: var(--danger); }

/* one job inside the card */
.l3-part { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
.l3-part-who { font-size: .75rem; font-weight: 700; color: var(--ink-3); }

/* the board's own sending card: one plain line, never a to do (sharp, above the card's blur) */
.l3-going {
  grid-column: 1 / -1; position: relative; z-index: 2; margin: 2px 0 4px; font-size: .8125rem; line-height: 1.125rem;
  font-weight: 700; color: var(--ink); overflow-wrap: anywhere;
}

/* the read only job's Knock */
.l3-jobknock { margin-left: 8px; }

/* compact (one line per client): the lock chip only, the lines stay in the open card */
.cc-card.cc-one > .l3-top { order: 3; padding-left: 0; flex: 1 1 100%; }
.cc-card.cc-one > .l3-top > :not(.l3-lock) { display: none; }

@media (max-width: 600px) {
  .l3-top { padding-left: 0; }
  .l3-lock .btn, .l3-row.is-going .btn { margin-left: 0; }
}

/* "I need help with this" on a job card: the whole width of the card, never cut off in the card's glyph column */
:root[data-lock3="on"] .card > .v3-help-card { grid-column: 1 / -1; }

/* t22-donelines (desk.cards.doneLinesAll): the same Done lines on a job card, a help request's card and the open job */
.l3-done-card { margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ok) var(--tint-alpha), transparent); }
.l3-done-job { margin-top: 6px; }
.l3-done-job .l3-row { font-size: .8125rem; }
