/* Who the ticket is for (GitHub issue 598, the owner's U2; docs/adr/0353-the-requester-line.md;
   public/js/app/ticket-requester-line.js), as the Record workspace has it (docs/adr/0387-record-workspace-ticket-page.md):
   one 28 px subline under the title (the avatar, the name, whose pencil changes the requester, job title and
   department, VIP, "N other open requests" and, muted, when it was opened), then the side panel's Requester and Timing
   cards. Everything wraps as words do, never cut off; on a phone the line's buttons are 44 px targets. Change requester
   opens the requester card's own field in the line's place. Colors are the palette's tokens, so the dark theme follows. */

.rq-line { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-50) var(--space-150); max-width:var(--tp-width); min-height:28px; margin:0 auto var(--space-100); min-width:0; color:var(--ink-2); font-size:var(--text-sm); line-height:var(--leading-normal); overflow-wrap:anywhere; }
/* Each line of words is 28 px, and the avatar sits beside the first. */
.rq-body { display:flex; flex:1 1 auto; align-items:flex-start; gap:var(--space-100); min-width:0; min-height:28px; }
.rq-body[hidden] { display:none !important; }
.rq-avatar { display:grid; flex:none; place-items:center; width:24px; height:24px; border-radius:var(--radius-round); background:var(--spruce-pale); color:var(--spruce); font-size:var(--text-2xs); font-weight:var(--weight-semibold); line-height:1; }
.rq-body > .rq-avatar { margin-top:var(--space-25); }
.rq-words { flex:1 1 0; min-width:0; line-height:28px; }
.rq-who { display:inline-flex; align-items:center; gap:var(--space-25); vertical-align:middle; }
.rq-name { padding:0; border:0; border-radius:var(--radius-xs); background:none; color:var(--ink); font:inherit; font-size:var(--text-md); font-weight:var(--weight-semibold); line-height:var(--leading-normal); text-align:left; cursor:pointer; overflow-wrap:anywhere; }
.rq-name:hover { color:var(--spruce); text-decoration:underline; }
.rq-name:focus-visible { outline:2px solid var(--spruce); outline-offset:2px; }
/* Change requester: a pencil that shows on hover or keyboard focus of the name, and is always there for the keyboard and
   screen readers (and always in sight on a touch screen, which has no hover). */
.rq-change { display:inline-grid; flex:none; place-items:center; width:20px; height:20px; padding:0; border:0; border-radius:var(--radius-sm); background:none; color:var(--muted); cursor:pointer; opacity:0; }
.rq-who:hover .rq-change, .rq-who:focus-within .rq-change, .rq-change.is-shown { opacity:1; }
.rq-change:hover { background:var(--hover-bg); color:var(--ink); }
.rq-change:focus-visible { outline:2px solid var(--spruce); outline-offset:1px; }
.rq-pencil { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
@media (hover:none) { .rq-change { opacity:1; } }
.rq-vip { display:inline-flex; align-items:center; padding:var(--space-25) var(--space-75); line-height:var(--leading-normal); border-radius:var(--radius-pill); background:var(--saffron-pale); color:var(--warn-ink); font-size:var(--text-2xs); font-weight:800; letter-spacing:.03em; vertical-align:middle; }
[data-theme="dark"] .rq-vip { background:#3c331d; color:#e8c164; }
.rq-facts { color:var(--ink-2); }
.rq-dot { margin:0 var(--space-25); color:var(--muted); }
.rq-missing { color:var(--muted); font-style:italic; }
/* "N other open requests": a quiet chip, drawn only when there are some. The button holds the chip, so on a phone it
   can be a 44 px target while the chip keeps its size. */
.rq-chip { display:inline-flex; align-items:center; padding:0; border:0; background:none; color:var(--ink-2); font:inherit; font-size:var(--text-xs); line-height:var(--leading-normal); text-align:left; white-space:normal; cursor:pointer; vertical-align:middle; }
.rq-chip > span { padding:0 var(--space-100); border:1px solid var(--line); border-radius:var(--radius-pill); background:var(--surface); }
.rq-chip:hover > span { background:var(--hover-bg); color:var(--ink); }
.rq-chip:focus-visible { outline:none; }
.rq-chip:focus-visible > span { outline:2px solid var(--spruce); outline-offset:2px; }
.rq-when { color:var(--muted); }
/* "Opened Nov 19", "Updated 2h ago" and each fact move to the next line whole, the dot before them included, so a line
   never ends in a dot. */
.rq-when time, .rq-updated, .rq-fact, .rq-stamp { display:inline-block; }
.rq-none { color:var(--muted); }
/* The requester card comes along for its Change requester field only; its own drawing isn't shown. */
.rq-line > .rq-card { flex:1 1 100%; margin:0; padding:0; border:0; background:none; box-shadow:none; }
.rq-line > .rq-card > h2, .rq-line #twRequesterInfo { display:none !important; }
.rq-line > .rq-card > div { display:block; padding:0; border:0; }
.rq-line:not(.is-changing) > .rq-card { display:none; }
.rq-line.is-changing #twRequesterField { max-width:28rem; }

/* The side panel's Overview cards (the side panel makes the sections; this file draws the Requester and Timing ones):
   a line border, 10 px corners, a small muted kicker, then label and value rows. They fit a 320 to 480 px panel and a
   390 px phone. On the ticket page only: the Overview page has cards of its own by that name (styles.css). */
#ticketDetailModal .ov-card { display:grid; gap:var(--space-100); min-width:0; margin:0; padding:calc(var(--space-100) + var(--space-25)) var(--space-150); border:1px solid var(--line); border-radius:calc(var(--radius-lg) + var(--radius-xs)); background:var(--surface); box-shadow:none; color:var(--ink); font-size:var(--text-sm); line-height:var(--leading-normal); overflow-wrap:anywhere; }
#ticketDetailModal .ov-card[hidden], :is(#ovRequester, #ovTiming):empty { display:none; }
.ov-kicker { margin:0; color:var(--muted); font-size:var(--text-2xs); font-weight:var(--weight-bold); line-height:var(--leading-tight); letter-spacing:.06em; text-transform:uppercase; }
.ov-person { display:flex; align-items:flex-start; gap:var(--space-100); min-width:0; }
.ov-person-words { display:grid; gap:var(--space-25); min-width:0; }
.ov-person-name { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-50); }
.ov-sub { color:var(--muted); }
.ov-rows { display:grid; gap:var(--space-75); margin:0; }
.ov-row { display:grid; grid-template-columns:96px minmax(0,1fr); gap:var(--space-100); align-items:baseline; }
.ov-row dt { margin:0; color:var(--muted); font-size:var(--text-xs); font-weight:var(--weight-regular); }
.ov-row dd { display:grid; gap:var(--space-25); justify-items:start; margin:0; min-width:0; color:var(--ink); }
.ov-value { color:var(--ink); }
/* A target that isn't met yet reads bold, never red: the header's SLA value is the only red thing on the page. */
.ov-strong { color:var(--ink); font-weight:var(--weight-semibold); }
.ov-note { color:var(--muted); font-size:var(--text-xs); }
.ov-email { overflow-wrap:anywhere; }
.ov-requests { display:grid; gap:var(--space-25); width:100%; margin:0; padding:0; list-style:none; }
/* A request's words line up with the other values; its hover reaches a little to the left of them. */
.ov-request { display:grid; width:calc(100% + var(--space-50)); margin-left:calc(-1 * var(--space-50)); padding:var(--space-25) var(--space-50); border:0; border-radius:var(--radius-md); background:none; color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
.ov-request:hover { background:var(--hover-bg); }
.ov-request:focus-visible { outline:2px solid var(--spruce); outline-offset:-2px; }
.ov-request small { color:var(--muted); font-size:var(--text-xs); }
.ov-line, .ov-none { margin:0; color:var(--muted); font-size:var(--text-xs); }
.ov-none { font-size:var(--text-sm); }
/* A date moves to the next line whole ("Updated Nov 20, 9:52 AM"), and breaks inside only when it can't fit at all. */
.ov-date { display:inline-block; }
.ov-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-25) var(--space-50); margin:0; }
#ticketDetailModal .ov-card .nt-link { font-size:inherit; white-space:normal; text-align:left; }
/* Links (Phone, Email, Call) read as the card's buttons do: underlined on hover. */
#ticketDetailModal .ov-card a.nt-link { text-decoration:none; }
#ticketDetailModal .ov-card a.nt-link:hover { text-decoration:underline; text-underline-offset:2px; }
#ticketDetailModal .ov-card .nt-link:focus-visible { outline:2px solid var(--spruce); outline-offset:2px; border-radius:var(--radius-xs); }

/* The peek's lists (a requester's requests and devices; ticket-peek-rules.js peekHtml). */
.pk-items { display:flex; flex-direction:column; gap:var(--space-25); margin:0; padding:0; list-style:none; }
.pk-item { display:flex; flex-direction:column; align-items:flex-start; gap:var(--space-25); width:100%; padding:var(--space-75) var(--space-100); border:0; border-radius:var(--radius-md); background:none; color:var(--ink); font:inherit; font-size:var(--text-sm); text-align:left; }
button.pk-item { cursor:pointer; }
button.pk-item:hover { background:var(--hover-bg); }
button.pk-item:focus-visible { outline:2px solid var(--spruce); outline-offset:-2px; }
.pk-item-title { font-weight:var(--weight-medium); }
.pk-item small { color:var(--muted); font-size:var(--text-xs); }
.pk-empty, .pk-note { margin:0; color:var(--muted); font-size:var(--text-sm); }
.pk-note { margin-top:var(--space-50); }

@media (max-width:700px) {
  .rq-line { margin:var(--space-100) 0 var(--space-150); }
  /* Who the person is, then where things stand, each a row of items spaced apart with no dots, so no line starts or
     ends in one. The two share a row when they fit (a phone held sideways); the status wraps under the name when not.
     VIP sits beside the name; job title and department follow it, joined by a comma. */
  .rq-words { display:flex; flex-wrap:wrap; align-items:center; gap:0 var(--space-150); line-height:var(--leading-normal); }
  .rq-id, .rq-status { display:flex; flex-wrap:wrap; align-items:center; gap:0 var(--space-100); min-width:0; }
  .rq-status { gap:0 var(--space-150); }
  .rq-id > .rq-vip { order:1; }
  .rq-id > .rq-facts { order:2; min-width:0; }
  .rq-status .rq-when { display:contents; }
  .rq-id .rq-dot, .rq-status .rq-dot { display:none; }
  .rq-id .rq-fact:not(:last-child)::after { content:","; }
  /* The name, the pencil, the chip and the cards' buttons and links are 44 px targets; the avatar sits beside the first. */
  .rq-name, .rq-chip { display:inline-flex; align-items:center; min-height:44px; }
  .rq-change { width:44px; height:44px; }
  .rq-body > .rq-avatar { margin-top:calc(var(--space-100) + var(--space-25)); }
  #ticketDetailModal .ov-card .nt-link, #ticketDetailModal .ov-card .rq-name { display:inline-flex; align-items:center; min-height:44px; }
  .ov-request { align-content:center; min-height:44px; }
  .pk-item { min-height:44px; }
}
@media print { .rq-name, .rq-chip { color:var(--ink); } .rq-change, .ov-actions, [data-rq-zone] { display:none; } }
