/* Concierge chat: the business entrance before and after registration. */
.business-funnel { width: 100%; min-width: 0; text-align: left; }
.bf-conversation { display: flex; flex-direction: column; height: calc(var(--viewport-height, 100dvh) - var(--header) - 120px); min-height: 420px; max-width: 980px; margin: 0 auto; border: 1px solid var(--line-2); border-radius: var(--r-xl); background: var(--bg-raised); box-shadow: var(--shadow-2); overflow: hidden; }
.bf-chat-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex: none; }
.bf-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bf-identity .monogram { width: 36px; height: 36px; font-size: 16px; }
.bf-heading h1 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; margin: 0; line-height: 1.2; }
.bf-heading p { color: var(--ink-2); font-size: 13px; margin: 2px 0 0; white-space: nowrap; }
.bf-status { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; line-height: 1.3; white-space: nowrap; }
.bf-status::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
/* The dot follows data-tone from CONCIERGE_STATUSES in business.js. */
.bf-status[data-tone="busy"]::before { background: var(--red); animation: pulse-ring 1.6s ease-out infinite; }
.bf-status[data-tone="idle"]::before { background: var(--ink-3); }
.bf-transcript { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 20px 16px; display: flex; flex-direction: column; gap: 18px; mask-image: linear-gradient(to bottom, transparent, #000 20px); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20px); }
.bf-turn { max-width: 96%; min-width: 0; align-self: flex-start; animation: rise var(--t-med) var(--ease) both; }
.bf-turn.is-user { align-self: flex-end; max-width: 88%; }
.bf-speaker { display: block; margin-bottom: 4px; color: var(--ink-3); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.is-user .bf-speaker { text-align: right; }
.bf-bubble { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font-size: 16px; padding: 12px 16px; border-radius: var(--r-lg); }
.is-assistant .bf-bubble { background: var(--bg); border: 1px solid var(--line); border-top-left-radius: 6px; }
.is-user .bf-bubble { background: var(--ink); color: #fff; border-top-right-radius: 6px; }
.is-partial .bf-bubble::after { content: ''; display: inline-block; width: .5em; height: 1em; margin-left: 2px; vertical-align: -.15em; background: currentColor; animation: caret 1s steps(2, jump-none) infinite; }
.is-partial.is-waiting .bf-bubble::after { display: none; }
.bf-chat-footer { padding: 8px 12px 12px; flex: none; border-top: 1px solid var(--line); }
.bf-actions { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; margin-bottom: 8px; scrollbar-width: none; }
.bf-actions::-webkit-scrollbar { display: none; }
.bf-actions button { flex-shrink: 0; min-height: 36px; padding: 0 12px; font-size: 14px; font-weight: 500; border-radius: var(--pill); }
.bf-composer { display: flex; align-items: flex-end; gap: 6px; border: 1px solid var(--line-2); border-radius: var(--r-xl); padding: 4px; background: var(--bg-raised); box-shadow: var(--shadow-1); }
.bf-composer textarea { width: 100%; min-width: 0; min-height: 44px; max-height: 160px; padding: 10px 12px; border: 0; background: transparent; resize: none; line-height: 1.5; font-size: 16px; }
.bf-composer textarea:focus-visible { outline: none; box-shadow: none; }
.bf-send { width: 44px; min-height: 44px; height: 44px; padding: 0; flex: none; border-radius: var(--r-lg); background: var(--red); border-color: transparent; color: #fff; }
.bf-send:hover:not(:disabled) { background: var(--red-dark); color: #fff; border-color: transparent; }
.bf-send:disabled { background: var(--bg-2); color: var(--ink-3); }
.bf-send svg { width: 20px; height: 20px; stroke-width: 2.4; }
.bf-composer-hint { display: none; margin: 8px 8px 0; color: var(--ink-3); font-size: 12px; }
.bf-error { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--red-tint); border-radius: var(--r); color: var(--red-dark); font-size: 14px; animation: rise var(--t-med) var(--ease) both; }
.bf-error button { flex: none; min-height: 36px; padding: 0 12px; font-size: 14px; }
.bf-completion { border-top: 1px solid var(--line); padding: 18px 0 0; animation: rise var(--t-slow) var(--ease) both; }
.bf-completion > p, .bf-account-step > p { color: var(--ink-2); font-size: 15px; }
.bf-completion-actions { display: grid; gap: 8px; }
.bf-completion-actions button, .bf-account-step .primary { width: 100%; }
.bf-account-step { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); animation: rise var(--t-med) var(--ease) both; }
.bf-access-form { display: grid; gap: 10px; max-width: 360px; }
.bf-access-form label { display: grid; gap: 6px; }
.bf-access-error { margin: 0; font-size: 13px; color: var(--red-dark); }
.mvp-surface > .business-funnel.bf-conversation { height: calc(var(--viewport-height, 100dvh) - var(--header) - var(--bar) - 56px); }
@media (min-width: 900px) {
  /* The chat fills the screen it has: capped at 820px, a tall tablet showed the desktop layout with 450px empty below. */
  .bf-conversation { height: calc(100dvh - 150px); }
  .bf-chat-header { padding: 16px 22px; }
  .bf-completion-actions button, .bf-account-step .primary { width: auto; }
  .bf-transcript { padding: 26px max(22px, calc((100% - 720px) / 2)); gap: 22px; }
  .bf-chat-footer { padding: 12px max(22px, calc((100% - 720px) / 2)) 16px; }
  .bf-actions { flex-wrap: wrap; overflow: visible; }
  .bf-composer-hint { display: block; }
  .bf-completion-actions { grid-template-columns: repeat(auto-fit, minmax(200px, max-content)); }
  .mvp-surface > .business-funnel.bf-conversation { height: calc(var(--viewport-height, 100dvh) - 170px); }
}

/* Concierge replies drawn from light Markdown: styled together with White Mirror's in styles.css. */

/* Header token chip of a company: the reserved tokens beside the available ones ("999 · 1 reserved"). */
.token-chip-reserved { font-weight: 400; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.token-chip-reserved::before { content: '· '; }
/* On the narrowest phones the reserve would push the menu button off the screen; the chip's title and the tokens page keep it. */
@media (max-width: 399px) { .token-chip-reserved { display: none; } }

/* Round 4 (BUSINESS): on a phone the chat keeps the room — a one-line header (no subtitle, the status beside the name), a
   placeholder that stays on one line, and no idle input under a finished conversation (its buttons sit under the summary). */
.bf-composer textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 899px) {
  .bf-chat-header { flex-wrap: nowrap; padding: 8px 12px; }
  .bf-identity { gap: 8px; }
  .bf-identity .monogram { width: 30px; height: 30px; font-size: 14px; }
  .bf-heading p { display: none; }
  .bf-status { flex: none; }
  .bf-transcript { padding: 14px 12px; gap: 14px; }
  .bf-conversation[data-completed="true"] .bf-composer { display: none; }
  .bf-conversation[data-completed="true"] .bf-chat-footer { padding: 0 12px; border-top: 0; }
}
