/* The chat's reelchat part (round 3, package R1): the reel's own items in the one chat, the one
   chat's header in the chats (5.1), and its safe area. No new colour and no new font. */

/* the one chat's header (5.1): Back, the name and one line, the bell, the menu; 44 px targets */
.ch-head.rc-head { min-height: 52px; gap: 6px; }
.ch-head.rc-head .ch-ht { min-width: 0; }
.ch-head.rc-head .ch-ht b { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-head.rc-head .ch-ht small { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-head .ch-bell { position: relative; flex: none; width: 44px; min-width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: 10px; }
.ch-head .ch-bell svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.ch-head .ch-bellcount { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  font: 600 12px/18px var(--font, inherit); background: var(--primary, #3167ed); color: #fff; font-variant-numeric: tabular-nums; }
.ch-head .ch-bellcount[hidden] { display: none; }
.ch-head .rc-playreel { flex: none; width: 44px; min-width: 44px; height: 44px; padding: 0; justify-content: center; }
.ch-head .rc-playreel[hidden] { display: none; }

/* on a phone, inside an open chat of the one chat, the chat's header is the one bar (5.1, 9 q14);
   it carries the notch padding the app's bar carried */
@media (max-width: 899px) {
  /* BB: only an open chat ON HOME hides the app's bar; Notifications opened from the chat's bell
     (the chat still open behind it) and every other view keep the top bar and its way back */
  html.ch-in-chat.ch-say body[data-view="home"] header.top { display: none !important; }
  html.ch-in-chat.ch-say .ch-head { padding-top: calc(8px + env(safe-area-inset-top)); }
  /* one bell on a phone (Z17): while the app's own bar shows (New chat's first open, the list),
     its bell is the only one; once the chat's header is the one bar, that header holds it */
  html:not(.ch-in-chat) .ch-head .ch-bell, html:not(.ch-say) .ch-head.rc-head .ch-bell { display: none; }
}
/* W8: one bell at every width: on a desk the app's own top bar always shows with its bell, so the
   chat header's bell is hidden there (in the Professional layout the app's bell is hidden and the
   chat keeps its own) */
@media (min-width: 900px) {
  html:not([data-layout="pro"]) .ch-head .ch-bell { display: none; }
}

/* the strip drawn here when the board part is not (the board part draws it otherwise) */
#deskBoard > #chReel { margin: 0; }

/* a block being made (5.2, work): its label, its step and the time left, a 4 px bar under it */
#deskItems .rc-work { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 56px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm, 12px); max-width: 420px; box-sizing: border-box; }
#deskItems .rc-wl { display: flex; flex-direction: column; min-width: 0; }
#deskItems .rc-wname { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#deskItems .rc-step { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
#deskItems .rc-bar { display: block; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
#deskItems .rc-bar > i { display: block; height: 100%; background: var(--primary, #3167ed); border-radius: 2px; transition: width .9s linear; }
#deskItems .rc-work.still .rc-bar > i { background: var(--muted); }

/* a clip or a picture (5.2, a thing): at most 300 px, in its own shape, one line under it */
#deskItems .rc-thing { margin: 0; max-width: 300px; }
#deskItems .rc-clip { position: relative; display: block; width: 100%; max-width: 300px; max-height: 300px; padding: 0; border: 0;
  border-radius: var(--r-sm, 12px); overflow: hidden; background: var(--surface-2, rgba(127, 127, 127, .15)); aspect-ratio: var(--ar, 1.7778); cursor: pointer; }
#deskItems .rc-clip img { width: 100%; height: 100%; object-fit: cover; display: block; }
#deskItems .rc-play { position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); color: #fff; }
#deskItems .rc-play svg { width: 22px; height: 22px; }
#deskItems .rc-cap { display: flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; color: var(--muted); }
#deskItems .rc-line { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#deskItems .rc-dots { flex: none; width: 44px; min-width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: 10px; }
#deskItems .rc-dots svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }

/* the reason a block was not made, in the error tone */
#deskItems .rc-error .desk-text { color: var(--bad, #c0392b); }

/* a test's rows (chats.js's own markup) inside the one chat */
#deskItems .rc-test .ch-msg { max-width: 100%; margin: 0; }

/* the typed block priced first in today's chat (4.14 step 1) */
.ch-msg.rc-priced .ch-acts button { white-space: nowrap; font-variant-numeric: tabular-nums; min-height: 44px; }

@media (prefers-reduced-motion: reduce) {
  #deskItems .rc-bar > i { transition: none; }
}

/* on a reel the studio's own strip (the whole studio's pill, its films and recent work) is not
   this chat's; the reel's scope pill and its strip stand in for it */
#chDesk.rc-reel #deskStrip { display: none !important; }
