/* Replies, the design's Inbox (replies/replies.js; Brandon's Figma Make design, /inbox; the exact rebuild, Oct 23, 2026).
   Loaded after styles.css. The design's own pieces (.ds-inbox-page, .ds-inbox-list, .ds-conversation-row,
   .ds-conversation, .ds-messages, .ds-message, .ds-suggestion and the shared .ds-* parts) are in styles.css, ported
   from the design's index.css; this file adds only what the Hub has and the design doesn't, and quiets the older Replies
   rules that would still match. Colours only from the tokens in styles.css. */

/* The older Replies layout (styles.css .rp, kept on the card because app.js looks for .rp.is-reading) must not move the
   design's card: no gap, its own columns, stretched panes. */
.ds-inbox-page.rp { gap: 0; align-items: stretch; min-width: 0; }
@media screen and (min-width: 900px) {
  .has-side .screen[data-screen="replies"] { margin: 0; padding: 4px 0 28px; }
  .ds-inbox-page.rp, .ds-inbox-page.rp.is-empty { grid-template-columns: 42% 58%; height: calc(100 * var(--vh) - 176px); min-height: 420px; }
  /* The card keeps the screen's height: the list scrolls on its own (its header stays), and the open conversation scrolls
     as one piece under its head: the messages, then the reply box. (Until Oct 28, 2026 only the messages scrolled, in
     whatever was left over the reply box: a four-line draft left them a 120 px slot, one bubble at a time, and Greg
     "can't read them, just the auto reply".) */
  .ds-inbox-page.rp > .ds-inbox-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .ds-inbox-page.rp .ds-inbox-list__header { position: sticky; top: 0; z-index: 1; background: var(--surface); }
  .ds-inbox-page.rp > .ds-conversation { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .ds-inbox-page.rp > .ds-conversation > header { position: sticky; top: 0; z-index: 1; background: var(--ds-pane-bg); }
  .ds-inbox-page.rp .ds-conversation .ds-messages, .ds-inbox-page.rp .ds-conversation .ds-suggestion { flex: none; }
  /* The X closed the conversation (or there is none): the list fills the card. */
  .ds-inbox-page.rp.is-closed, .ds-inbox-page.rp.is-empty { grid-template-columns: minmax(0, 1fr); }
  .ds-inbox-page.is-closed .ds-inbox-list { border-right: 0; }
}
@media screen and (min-width: 900px) and (max-width: 1050px) {
  .ds-inbox-page.rp:not(.is-closed):not(.is-empty) { grid-template-columns: 46% 54%; }
}
@media (max-width: 899px) { .ds-inbox-page.rp { display: block; } }

/* Every conversation is drawn; only the open one shows (on a phone, only while one is being read). */
.ds-inbox-page.rp > .ds-conversation:not(.is-open) { display: none; }
.ds-conversation:focus { outline: none; }
.ds-conversation:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }

/* The list's header: the tools beside the title (Search, From, Paste a message, "?"), and the search box under it. */
.ds-inbox-list__header .ds-page-header { align-items: flex-start; }
.ds-inbox-list__header .ds-page-header__actions { gap: 2px; margin-top: 4px; }
.ds-inbox-list__header .ds-icon-button .ic { width: 20px; height: 20px; }
.ds-inbox-list__header .help-q { width: 40px; height: 40px; min-width: 0; min-height: 0; border-radius: 12px; }
.inbox-search { margin: -6px 0 14px; }
.inbox-search-box .ic { flex: none; width: 18px; height: 18px; }
.inbox-search-box input { min-height: 42px; padding: 0; font: inherit; box-shadow: none; }
.inbox-search-box input::-webkit-search-cancel-button { cursor: pointer; }
.inbox-dd { position: relative; }
.inbox-dd-menu { right: 0; left: auto; min-width: 210px; }
.inbox-dd-item[aria-pressed="true"] { background: var(--pick); color: var(--on-pick); font-weight: 650; }
.ds-icon-button.is-on { background: var(--pick); color: var(--on-pick); }
/* Paste a message with a written reply waiting in it: a small blue dot on its icon. */
.ds-icon-button.rp-paste-open { position: relative; }
.ds-icon-button.rp-paste-open.is-ready::after { content: ""; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.ds-segmented button { font-family: inherit; }
/* A small phone: "6 messages need a reply" takes the whole width under the title and its tools. */
@media (max-width: 520px) {
  .ds-inbox-list__header .ds-page-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; row-gap: 0; }
  .ds-inbox-list__header .ds-page-header > div:first-child { display: contents; }
  .ds-inbox-list__header .ds-page-header h1 { grid-column: 1; grid-row: 1; align-self: center; }
  .ds-inbox-list__header .ds-page-header__actions { grid-column: 2; grid-row: 1; margin-top: 0; }
  .ds-inbox-list__header .ds-page-description { grid-column: 1 / -1; grid-row: 2; }
  .ds-inbox-list__header .ds-icon-button { width: 36px; height: 36px; }
}

/* The rows: a list with no bullets; the dot only when they wait for an answer; a long name or line ends in "…". */
.inbox-rows { margin: 0; padding: 0; list-style: none; }
.ds-conversation-row { color: var(--text); font: inherit; }
.ds-conversation-row:not(.is-unread) > i { visibility: hidden; }
.ds-conversation-row strong { min-width: 0; font-weight: 700; }
.ds-conversation-row .inbox-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-conversation-row .ds-badge { flex: none; }
.ds-conversation-row img.ds-avatar { object-fit: cover; }
.ds-conversation-row.is-static { cursor: default; }
.ds-conversation-row.is-static:hover { background: transparent; }
.ds-conversation-row small.is-ok { display: flex; align-items: center; gap: 5px; color: var(--rt-ok); }
.ds-conversation-row small .ic { flex: none; width: 14px; height: 14px; }
.ds-conversation-row:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.ds-conversation-row[aria-current="true"] { background: var(--ds-row-pick-bg); }
/* An empty list, a search's count, Clear all under Responded. */
.inbox-none { margin: 0; padding: 11px 18px 18px; color: var(--text-3); font-size: .82rem; }
.inbox-clearrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 18px; border-top: 1px solid var(--ds-line); color: var(--text-3); font-size: .78rem; }
.inbox-sec > .msg-err, .ds-inbox-list > .rp-under { margin: 0; padding: 10px 18px; }
.ds-inbox-list > .rp-foot { padding: 14px 18px 18px; }
.ds-inbox-list > .rp-foot .fresh { font-size: .75rem; }

/* The conversation's head: the name is their customer page; "…" (Other choices) and Archive stay on a small phone too. */
.ds-conversation > header h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-conversation > header h2 a, .ds-conversation > header h2 .rep-name { color: inherit; font: inherit; text-decoration: none; }
.ds-conversation > header h2 a:hover { text-decoration: underline; }
.ds-conversation > header .ds-icon-button .ic { width: 20px; height: 20px; }
.ds-conversation > header img.ds-avatar { object-fit: cover; }
/* A small phone: the name needs the room, so the head's badges step aside (the row shows the channel and Urgent). */
@media (max-width: 520px) {
  .ds-conversation > header { gap: 8px; }
  .ds-conversation > header .ds-icon-button.rp-more-b, .ds-conversation > header .ds-icon-button.rp-arch { display: inline-grid; }
  /* The back arrow too: with only back and X in the head (done, Didn't need a reply), it is the one styles.css hides. */
  .ds-conversation > header .ds-icon-button.inbox-back { display: inline-grid; }
  .ds-conversation > header .ds-badge { display: none; }
}

/* The messages: words keep their line breaks; a photo strip, a website form's answers and "Seen" fit in the bubbles. */
.ds-message .message__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.ds-message--incoming.is-form { max-width: 92%; }
.ds-message p .rp-form { padding: 0; background: none; }
.ds-message p .fb-photos { margin-top: 8px; }
.ds-message--sent .fb-seen { font-size: .68rem; }
.ds-message--sent.is-call p { background: var(--surface-2); color: var(--text); }
/* The Hub's small lines in a conversation: the ad, how many earlier messages, Facebook's note, a follow-up lined up,
   what was done; Reply by and a note from Claude. */
.ds-messages .inbox-line, .ds-messages .rp-info { display: flex; align-items: flex-start; gap: 7px; margin: 0; color: var(--text-3); font-size: .78rem; line-height: 1.45; }
.ds-messages .rp-info .ic { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.ds-messages .done-line { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--rt-ok); font-size: .82rem; }
.ds-messages .done-line .ic { width: 15px; height: 15px; }
.ds-messages .rep-note { margin: 0; padding: 12px 14px; border-radius: 13px; background: var(--rt-attn-bg); color: var(--text); font-size: .84rem; }
.ds-messages .rp-reach { margin-top: auto; }

/* The suggested reply's box: what's in it (the text box, or the draft with its highlighted parts), then its two buttons. */
.ds-suggestion__label .ic { flex: none; width: 18px; height: 18px; }
.ds-suggestion .stack { gap: 8px; }
/* The draft is the design's text box: full width, its 13 px padding, 11 px corners, the field colour, the design's type. */
.ds-suggestion .rp-ed > .rp-bubble { align-self: stretch; }
.ds-suggestion .reply-box.rp-bubble, .ds-suggestion textarea.reply-edit.rp-bubble, .ds-suggestion textarea { display: block; width: 100%; max-width: none;
  min-height: 90px; margin: 0; padding: 13px; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--field); color: var(--text);
  font-family: inherit; font-size: 1rem; font-weight: 400; line-height: 1.5; resize: vertical; }
.ds-suggestion .reply-box.rp-bubble { min-height: 0; }
.ds-suggestion textarea:focus { border-color: var(--accent); border-style: solid; }
.ds-suggestion .rp-ed > .blank-hint { margin: 0; text-align: left; font-size: .75rem; color: var(--text-3); }
.ds-suggestion .blank-field { gap: 4px; }
.ds-suggestion .blank-field label { font-size: .75rem; font-weight: 600; color: var(--text); }
.ds-suggestion .blank-field input { min-height: 44px; padding: 0 12px; border-width: 1px; border-radius: 12px; font-size: .95rem; }
.ds-suggestion > div:last-child { gap: 10px; }
.ds-suggestion .ds-button .ic { width: 16px; height: 16px; }
.ds-suggestion .msg-err { margin: 8px 0 0; }
.ds-suggestion .inbox-line, .ds-suggestion .inbox-fail { margin: 0; color: var(--text-3); font-size: .84rem; }
.ds-suggestion .working { margin: 0; }
.ds-suggestion .rp-call { display: flex; flex-direction: column; gap: 8px; }
.ds-suggestion .rp-call-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ds-suggestion .rp-call-num { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text); font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .ds-suggestion > div:last-child { flex-wrap: wrap; } }

/* No data yet (the Inbox rollout, Oct 21, 2026; js/replies/replies-skel.js): the design's card with soft bars in it, each
   the height of what comes, so nothing moves when the conversations swap in. */
.skel.rp-skp-screen { gap: 0; }
@media (min-width: 900px) { .has-side .skel.rp-skp-screen { margin: 0; padding: 4px 0 28px; } }
.rp-skp .ds-segmented { gap: 5px; }
.sk.rp-skp-tab { flex: 1; height: 34px; border-radius: 999px; }
.sk.rp-skp-l { display: block; width: 11rem; height: .9rem; margin-top: 6px; }
.sk.rp-skp-sub { display: block; width: 6rem; height: .7rem; }
.sk.rp-skp-av { width: 42px; height: 42px; border-radius: 50%; }
.rp-skp .ds-conversation-row > span { display: flex; flex-direction: column; gap: 9px; }
.sk.rp-skp-who { height: .95rem; }
.sk.rp-skp-l3 { height: .7rem; }
.sk.rp-skp-at { align-self: start; width: 52px; height: .65rem; margin-top: 9px; }
.sk.rp-skp-hav { flex: none; width: 44px; height: 44px; border-radius: 50%; }
.sk.rp-skp-name { height: 1.1rem; }
.sk.rp-skp-them { height: 48px; border-radius: 13px; }
.sk.rp-skp-them.rp-skp-short { height: 66px; }
.sk.rp-skp-lab { display: block; width: 190px; height: .75rem; margin-bottom: 12px; }
.sk.rp-skp-box { display: block; height: 90px; border-radius: 11px; }
.sk.rp-skp-edit { width: 84px; height: 42px; border-radius: 999px; }
.sk.rp-skp-send { width: 128px; height: 42px; border-radius: 999px; }
@media (max-width: 899px) { .rp-skp:not(.is-reading) .rp-skp-pane { display: none; } .rp-skp.is-reading .ds-inbox-list { display: none; } }
/* The open conversation fades in as the rows rise. */
[data-revealed] .ds-conversation.rt-enter { animation-name: cr-fade; }
/* From's choices: the design's quieter sizes. */
.inbox-dd-menu button.inbox-dd-item { min-height: 44px; font-size: .9rem; }
