/* Albert in Rozmowa (ADR 0435): the two tabs that head the list of conversations where Albert
   is on for the person (in the column's heading, in place of its name: "Rozmowy" is the first
   of them), and the start of a thread with Albert in the conversation's own pane.
   Linked after the chat's sheets and before the phone's. */
.chat-tabs { flex: none; gap: 18px; margin: 0; border-bottom: 0; overflow: visible; }
.chat-tabs .tab { padding: 0 0 5px; font: 550 15.5px/1.3 var(--sans); }
.chat-tabs .tab.active { color: var(--ink); }
.chat-tabs .tab:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; border-radius: 3px; }
/* How many of Albert's remarks wait to be seen (ADR 0441), beside its name. */
.chat-tabs .tab-count { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--olive); color: var(--surface); font: 600 11px/18px var(--sans); text-align: center; vertical-align: 2px; }
.chat-tabs .tab-count[hidden] { display: none; }

/* While the tab is on, the pane's start is its own: Albert's name and what it is. The starters
   are questions for Quartio's main chat, and the note about conversations that start shared is
   not this one's (nobody shares a thread with Albert). */
.chat-view.albert .welcome:not(.albert-welcome), .chat-view:not(.albert) .albert-welcome { display: none; }
.chat-view.albert.empty .chat-starters, .chat-view.albert.empty .chat-shared-note:not([hidden]) { display: none; }
.albert-lead { max-width: 520px; margin: 16px auto 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

@media (max-width: 760px) {
  /* On a phone the list's heading is not drawn, but its tabs are: they head the list, each a
     thumb's size, with no button to close a list that is the screen. */
  .history-heading:has(> .chat-tabs) { display: flex; padding: 0 4px 6px; }
  .history-heading:has(> .chat-tabs) > .icon-button { display: none; }
  .chat-tabs { gap: 10px; }
  .chat-tabs .tab { min-width: 44px; min-height: 44px; padding: 10px 8px 9px; font-size: 16px; }
}

/* The briefing (ADR 0439): a block at the top of the pane while the tab is on, as wide as the
   thread under it, with its own scroll so the thread and the message box keep their room: under
   half the pane over a thread, and whatever the start leaves free before anything was said. The
   header's own cards are drawn in it (`app/decisions.js: showIn`), without the header's band. */
.albert-briefing { order: -1; flex: 0 1 auto; min-height: 88px; width: 100%; max-width: 1160px; margin: 0 auto; padding: 16px 5px 6px; max-height: min(46vh, 430px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border-bottom: 1px solid var(--line); }
/* (At the start the room kept under the home gives way to the briefing first: flex shrinks the
   tallest box most, and that would be the briefing.) */
.chat-view.albert.empty { --home-foot: 16px; }
.chat-view.empty .albert-briefing { max-height: none; }
.albert-hello { margin: 0; font: 400 22px/1.25 var(--serif); color: var(--ink); }
.decisions--hosted { margin-top: 12px; border: 0; background: none; animation: none; }
.decisions--hosted .decisions-bar { padding: 0 0 8px; }
.decisions--hosted .decisions-toggle { margin-left: 0; }
.decisions--hosted .decisions-list { padding: 0 0 10px; max-height: none; overflow: visible; }
.decisions--hosted .decisions-put-off { padding: 0 0 8px; }
.albert-lists { display: flex; flex-wrap: wrap; gap: 8px 40px; padding: 10px 0 8px; }
.albert-lists:empty { display: none; }
.albert-list { min-width: 0; }
.albert-list h3 { margin: 0 0 2px; font: 600 12px/1.4 var(--sans); letter-spacing: .02em; color: var(--muted); }
.albert-list ul { list-style: none; margin: 0; padding: 0; }
.albert-link { min-height: 28px; text-align: left; font-size: 13.5px; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
/* "Nothing waits" is said only once the cards' place knows that nothing does (`data-waits`, from
   `app/decisions.js`): a card in the thread below and what was put off wait too. */
.albert-calm { margin: 0; font-size: 13px; color: var(--muted); }
.albert-waits:not([data-waits="0"]) ~ .albert-lists .albert-calm { display: none; }
/* "Później", "Zmień" and what came back (shown where Albert is on for the person). */
.decision-back { margin: 0; font-size: 12.5px; color: var(--q-olive-ink); }
.decisions-put-off { grid-column: 1 / -1; margin: 0; font-size: 12.5px; color: var(--muted); }
.decision-change summary { width: fit-content; cursor: pointer; font-size: 12.5px; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.decision-change[open] summary { margin-bottom: 6px; }
.decision-change-words { display: block; width: 100%; margin-bottom: 6px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--q-field); color: var(--ink); font: inherit; font-size: 13px; resize: vertical; }

@media (max-width: 760px) {
  .albert-briefing { max-height: 44vh; padding: 12px 4px 2px; }
  .albert-link { min-height: 44px; font-size: 15px; }
  .decision-change summary { padding: 12px 0; font-size: 15px; }
  /* (16px: a smaller field makes a phone zoom the page in.) */
  .decision-change-words { font-size: 16px; }
}
/* The person's own switches under the briefing: quiet, one line that wraps. */
.albert-own { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 4px 0 8px; font-size: 13px; }
.albert-own .text-button { font-size: 13px; }
