/* ticketscherm.css -- the tickets as a screen and the ticket editor (ticketscherm.js, #0000-2935). Tokens from core.css, no hex.
 * Wide: the list left, the ticket right. Up to 760 px (a phone, 390): the list and the ticket take turns. */

.tks-view { display: flex; flex-direction: row; overflow: hidden; background: var(--bg); color: var(--text); font: var(--ui-fs) var(--font-ui); }
.tks-listcol { flex: 0 0 var(--tks-list-w, min(36%, 28em)); max-width: calc(100% - 240px); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tks-detailcol { flex: 1 1 0; min-width: 0; min-height: 0; overflow: auto; }
.tks-detail { min-width: 0; max-width: 62em; padding: 12px 20px 28px; display: flex; flex-direction: column; gap: 10px; }

.tks-quick, .tks-search, .tks-title, .tks-ctext, .tks-view select {
  background: var(--bg); color: var(--text); border: 1px solid var(--rule); border-radius: 3px; font: inherit; padding: 4px 8px;
  -webkit-user-select: text; user-select: text;
}
.tks-quick, .tks-search { margin: 6px 8px 0; }
.tks-view input:focus-visible, .tks-view textarea:focus-visible, .tks-view select:focus-visible, .tks-view button:focus-visible { outline: 1px solid var(--focus); outline-offset: 1px; }
.tks-filters { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px 0; }
.tks-fbtn { padding: 3px 10px; min-height: 26px; border: 1px solid var(--rule); border-radius: 4px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.tks-fbtn.on { border-color: var(--accent); font-weight: 700; }
.tks-caption { padding: 4px 12px; font-size: calc(var(--ui-fs) * 11 / 13); color: var(--text-dim); }

.tks-list { list-style: none; margin: 0; padding: 0; flex: 1 1 0; min-height: 0; overflow-y: auto; }
.tks-row { display: flex; align-items: baseline; gap: 8px; padding: 6px 12px; cursor: pointer; border-bottom: 1px solid var(--rule); min-height: 32px; }
.tks-row:hover { background: var(--hover); }
.tks-row.sel { background: var(--hover); box-shadow: inset 3px 0 0 var(--accent); }
.tks-dot { flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--text-muted); align-self: center; }
.tks-row.status-doing .tks-dot { background: var(--accent); }
.tks-row.status-done .tks-dot { background: var(--ok); }
.tks-row.status-blocked .tks-dot, .tks-row.status-wacht_op_besluit .tks-dot { background: var(--attn); }
.tks-rid { color: var(--text-dim); font-family: var(--font-code); flex: 0 0 auto; }
.tks-rprio { flex: 0 0 2em; color: var(--text-dim); }
.tks-rtitle { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tks-rwho { flex: 0 0 auto; color: var(--text-muted); font-size: calc(var(--ui-fs) * 12 / 13); }
.tks-empty, .tks-hint { padding: 14px 12px; color: var(--text-muted); list-style: none; }

.tks-back { display: none; align-self: flex-start; padding: 4px 10px; min-height: 32px; border: 1px solid var(--rule); border-radius: 4px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.tks-head { display: flex; align-items: center; gap: 10px; }
.tks-id { color: var(--text-dim); font-family: var(--font-code); }
.tks-title { flex: 1 1 auto; min-width: 0; font-size: calc(var(--ui-fs) * 17 / 13); font-weight: 600; color: var(--text-strong); padding: 6px 8px; }
.tks-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; }
.tks-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; max-width: 100%; }
.tks-view select { max-width: 100%; min-width: 0; }
.tks-fl { font-size: calc(var(--ui-fs) * 11 / 13); letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.tks-prioset { display: flex; gap: 4px; align-items: center; min-width: 0; }
.tks-prioset select { flex: 1 1 auto; }
.tks-pup, .tks-pdown, .tks-cadd, .tks-clearwait, .tks-doc { padding: 4px 10px; min-height: 30px; border: 1px solid var(--rule); border-radius: 4px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.tks-pup:disabled, .tks-pdown:disabled { opacity: .4; cursor: default; }
.tks-cadd { background: var(--accent); color: var(--accent-tx); border-color: var(--accent); font-weight: 600; }
.tks-view select { min-height: 30px; }
.tks-wait { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 6px 10px; border: 1px solid var(--attn); border-radius: 4px; }

.tks-chips { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.tks-cl { color: var(--text-dim); font-size: calc(var(--ui-fs) * 12 / 13); }
.tks-tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 7px; border: 1px solid var(--rule); border-radius: 10px; font-size: calc(var(--ui-fs) * 12 / 13); color: var(--text-dim); }
.tks-file { color: var(--accent); }
.tks-ref { background: none; border: 0; padding: 0 2px; min-height: 24px; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }

.tks-comment { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.tks-ctext { width: 100%; box-sizing: border-box; resize: vertical; min-height: 4.5em; }
.tks-msg { min-height: 1.2em; color: var(--ok); font-size: calc(var(--ui-fs) * 12 / 13); }
.tks-msg.bad { color: var(--danger-tx); }
.tks-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; font-size: calc(var(--ui-fs) * 14 / 13); color: var(--text); }
.tks-none { color: var(--text-muted); }
.tks-h3 { margin: 12px 0 2px; font-size: calc(var(--ui-fs) * 11 / 13); letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.tks-log { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-bottom: 1px solid var(--rule); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.tks-at { color: var(--text-dim); font-size: calc(var(--ui-fs) * 12 / 13); }
.tks-new { background: var(--sel, rgba(127,127,127,.15)); border-left: 3px solid var(--ok); padding-left: 6px; }
.tks-doc { align-self: flex-start; margin-top: 10px; }

@media (max-width: 760px) {
  .tks-view { flex-direction: column; }
  .tks-listcol { flex: 1 1 auto; max-width: none; }
  .tks-detailcol { display: none; }
  .tks-view.tks-edit .tks-listcol { display: none; }
  .tks-view.tks-edit .tks-detailcol { display: block; flex: 1 1 auto; }
  .tks-back { display: inline-block; }
  .tks-detail { padding: 10px 12px 24px; }
  .tks-head { flex-wrap: wrap; }
  .tks-bar { flex-direction: column; align-items: stretch; }
  .tks-view select, .tks-pup, .tks-pdown { min-height: 40px; }
}
