/* The field strip under a ticket's title (GitHub issue 597, the owner's U1; docs/adr/0352-the-field-strip.md;
   public/js/app/ticket-strip.js). One row of the ticket's fields, each its label over its value, as wide as the ticket's
   bar; the row wraps to a second line when narrow, and a value wraps rather than being cut. Each value is the field's own
   picker (the compact rows' looks, ticket-page.css), shown with its arrow, or its lock when read only. Not drawn on a
   phone (700 px and narrower), where the chips above the conversation are the strip's fields. Colors are the palette's
   tokens, so the dark theme follows. */

.tf-strip[hidden] { display:none !important; }
.ticket-detail.tw.ts-compact .tf-strip {
  display:flex; flex-wrap:wrap; align-items:stretch; max-width:var(--tp-width); margin:0 auto var(--space-150); padding:0;
  border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface);
}
/* Each field: a cell, its label over its value; 8 fit one row at 1440, fewer wrap to a second. */
.ticket-detail.tw.ts-compact .tf-strip > .ts-row {
  display:flex; flex:1 1 9.5rem; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:0; width:auto; min-width:0; min-height:0;
  margin:0; padding:var(--space-75) var(--space-75) var(--space-75); border-left:1px solid var(--line); box-sizing:border-box;
}
.ticket-detail.tw.ts-compact .tf-strip > .ts-row:first-child { border-left:0; }
.ticket-detail.tw.ts-compact .tf-strip > .ts-row > :not(.ts-label):not(.ts-notes):not(.ts-pencil):not(.ts-lock) { width:100%; }
.ticket-detail.tw.ts-compact .tf-strip .ts-label { padding:0 var(--space-100); color:var(--ink-2); font-size:var(--text-xs); line-height:16px; white-space:normal; overflow-wrap:break-word; }
/* The value: the field's own picker, its words on as many lines as they need. */
.ticket-detail.tw.ts-compact .tf-strip .ts-row .custom-select-trigger, .ticket-detail.tw.ts-compact .tf-strip .ts-row .state-dropdown-trigger { font-weight:var(--weight-semibold) !important; white-space:normal; overflow:visible; overflow-wrap:anywhere; }
.ticket-detail.tw.ts-compact .tf-strip .ts-row .state-dropdown-trigger > span { overflow:visible; overflow-wrap:anywhere; }
.ticket-detail.tw.ts-compact .tf-strip .custom-field.ts-row input:not([type="checkbox"]) { font-weight:var(--weight-semibold); }
/* The lock (read only) and the pencil sit beside the value, not across the label. */
.ticket-detail.tw.ts-compact .tf-strip .ts-lock { top:auto; bottom:calc(var(--space-75) + 7px); transform:none; }
.ticket-detail.tw.ts-compact .tf-strip .ts-pencil { top:auto; bottom:calc(var(--space-75) + 4px); }
/* A list opens under its own field, kept on the screen: to the right from the first fields, to the left from the last. */
.ticket-detail.tw.ts-compact .tf-strip .ts-row .custom-select-menu, .ticket-detail.tw.ts-compact .tf-strip .ts-row .state-dropdown-menu { left:0; right:auto; }
.ticket-detail.tw.ts-compact .tf-strip > .ts-row:nth-last-child(-n+2) .custom-select-menu, .ticket-detail.tw.ts-compact .tf-strip > .ts-row:nth-last-child(-n+2) .state-dropdown-menu { left:auto; right:0; }
/* A custom field's checkbox: its words over the box. */
.ticket-detail.tw.ts-compact .tf-strip .custom-field-check.ts-row > label { display:flex; flex-direction:column; align-items:flex-start; gap:var(--space-25); min-height:0; }
.ticket-detail.tw.ts-compact .tf-strip .custom-field-check.ts-row > label > input { margin:var(--space-50) 0 var(--space-25) var(--space-100); }
.ticket-detail.tw.ts-compact .tf-strip .custom-field.ts-row .custom-field-help { margin:var(--space-25) 0 0; }
/* Due: the SLA's next target, as words (nothing to pick). */
.ticket-detail.tw.ts-compact .tf-strip .tf-due-value { display:block; padding:var(--space-25) var(--space-100); color:var(--ink); font-size:var(--text-sm); font-weight:var(--weight-semibold); line-height:18px; overflow-wrap:anywhere; }
.ticket-detail.tw.ts-compact .tf-strip .tf-due-value[data-tone="bad"] { color:var(--bad); }
/* What a state rule needs for the move being tried: marked here as in the sidebar (ticket-page.css .ts-needed). */
.ticket-detail.tw.ts-compact .tf-strip > .ts-row.ts-needed { background:var(--bad-soft); }

/* Help for this ticket's Details: a card whose rows all went to the strip says nothing, nor does its heading. */
.ticket-detail.tw.ts-compact .tw-props.tf-empty { display:none !important; }
.ticket-detail.tw.ts-compact .tw-classify.tf-no-rows > h2 { display:none; }

/* The phone's chips: Due only says when. */
.ticket-detail.tw.ts-compact .ts-phone-chip.is-still { cursor:default; }
.ticket-detail.tw.ts-compact .ts-phone-chip.is-still:hover { background:var(--surface); }
.ticket-detail.tw.ts-compact .ts-phone-chip.is-still[data-tone="bad"] b { color:var(--bad); }

/* A phone: the chips above the conversation are the strip's fields (ticket-sidebar-moves.js). */
@media (max-width:700px) {
  .ticket-detail.tw.ts-compact .tf-strip { display:none !important; }
}

/* Admin settings › Tickets › Ticket page: the strip's fields in order, and a preview of the row with sample values. */
.ts-strip-item .ts-strip-name { min-width:8rem; color:var(--ink); }
.ts-strip-preview { margin:var(--space-150) 0; }
.ts-strip-preview-title { margin:0 0 var(--space-50); color:var(--ink-2); font-size:var(--text-sm); font-weight:var(--weight-semibold); }
.ts-strip-cells { display:flex; flex-wrap:wrap; border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface); }
.ts-strip-cell { display:flex; flex:1 1 8rem; flex-direction:column; gap:var(--space-25); min-width:0; padding:var(--space-75) var(--space-150); border-left:1px solid var(--line); }
.ts-strip-cell:first-child { border-left:0; }
.ts-strip-cell span { color:var(--ink-2); font-size:var(--text-xs); }
.ts-strip-cell b { color:var(--ink); font-size:var(--text-sm); font-weight:var(--weight-semibold); overflow-wrap:anywhere; }

/* Between a phone and 900 px the conversation's chips bar (ticket-sidebar-moves.js) would say the strip again: the strip
   is in view, so the bar steps aside. */
.ticket-detail.tw.ts-compact .tf-strip:not([hidden]) ~ * .ts-phone-bar { display:none !important; }
