/* Daily Life Doc, round 45 (zone B): the expert's call view, as the page "Smart Calls" (version 3, "In call") draws it:
   dark in both themes (the app's own dark tokens, set on the view), the head, the client's video large with the
   control row Mute ▴ · Camera · Screenshot · End under it, the side panel with the tabs Agenda · Notes · Ask AI · Chat
   (js/calls/call-panel.js, call-agenda.js, call-ask.js, call-chat-tab.js), the Mute and Camera menus
   (js/calls/call-controls.js), the warning line, and under 700 px the phone layout (the video on top with the
   controls over it, the tabs in a sheet; .typing: the video as a strip; .sheetfull: the sheet over everything).
   The frame's place (#callbar over the main area, the folded bar) is css/calls.css; the round buttons are css/call.css. */

/* The app's dark tokens on the call view (base.css, :root[data-theme="dark"]). */
.callbar.xcd, .xmenu {
  color-scheme: dark;
  --bg: #131815; --surface: #232B26; --ink: #EFF2EE; --ink2: #B9C1BB; --ink3: #959E98; --line: #36403A; --soft: #2F3833;
  --on-ink: #131815; --glass: rgba(255, 255, 255, .08); --care: #44222D; --care-d: #F1BFCB; --red: #E5544B;
  --app: #161C18; --app2: #1A201C; --card: #212824; --cardline: #2E3732; --sage: #8AB894; --sage-d: #BFE0C8; --fab: #3E7A5E;
  --bubble: #2B322E; --mine: #3E7A5E; --on-mine: #FFFFFF; --field: #2F3934; --seg-on: #4A5750;
  --atlas-bg: #17403A; --atlas-d: #B5E8DF; --good: #5CC487; --try-bg: #40350F; --try-d: #F0D58A;
  color: var(--ink);
}
.callbar.full.xcd { background: #111613; padding: 0; overflow: hidden; } /* shell.css .full pads a full page */
.callbar.mini .xc-full, .callbar.full .xc-minirow { display: none; }
.xc-minirow { display: contents; }
.xc-full { flex: 1; display: flex; min-width: 0; min-height: 0; }
.xc-main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 0 16px 14px; }
.xc-side { width: 360px; flex: none; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--cardline); background: var(--app2); }
.xc-handle { display: none; }
.xc-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* The head: the recording dot, the name, the kind of call, the timer, fold. */
.xcd .xc-head { display: flex; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--cardline); margin: 0 -16px 14px; padding: 0 12px 0 20px; }
.xcd .xc-head b { font-size: var(--t-m); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xc-k { font-size: var(--t-s); color: var(--ink3); white-space: nowrap; }
.xcd .xc-head .xc-t { margin-left: auto; font-size: var(--t-s); color: var(--ink2); font-variant-numeric: tabular-nums; }
.xc-rec { width: 9px; height: 9px; border-radius: 50%; background: #E0707C; flex: none; animation: dd-live 1.6s ease-in-out infinite; }
.xcd .xc-fold { color: var(--ink2); }

/* The stage: the client's video large, this side small in its corner; the ring for audio; the waiting words. */
.xc-stage { flex: 1; position: relative; display: flex; flex-direction: column; min-height: 0; border-radius: 16px; background: #1A221E; overflow: hidden; }
.xc-stage .cvid { margin: 0; }
.xc-stage .cvid .vtile:first-child { min-height: 0; border-radius: 16px; }
.xc-stage .cvid .vtile.me { width: 24%; min-width: 110px; max-width: 220px; }
.xc-stage .incall { color: var(--ink); }
.xc-stage .ring span { background: #26302B; color: var(--sage-d); }
.xc-stage .incall b { font-size: var(--t-l); font-weight: 600; }
/* The warning line is quiet on purpose (the owner, 2 November 2026: the text was distracting on a phone): a dim glass
   pill, soft text, faded in; readable at a glance without pulling the eye from the video. */
.xc-warn { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 3; white-space: nowrap; font-size: var(--t-2xs); font-weight: 400;
  color: rgba(255, 255, 255, .72); background: rgba(0, 0, 0, .38); border-radius: 999px; padding: 3px 10px; animation: dd-fade .4s ease both; }
.xc-stage .xwait { top: 46px; background: var(--surface); color: var(--ink2); }
.xc-stage .xwait:only-of-type { top: 12px; }
/* Video off: a small word on the client's tile, which keeps the client's name (walk 1 fault 16). */
.xc-voff { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1; font-size: var(--t-xs); font-weight: 500; color: var(--ink);
  background: rgba(0, 0, 0, .45); border-radius: 999px; padding: 5px 12px; white-space: nowrap; }

/* The control row: Mute with its arrow, Camera, Screenshot, End. */
.xc-ctl { display: flex; justify-content: center; align-items: flex-start; gap: 22px; padding: 12px 0 0; }
.xc-ctl .cb { color: var(--ink2); }
.xc-ctl .cb i { background: #26302B; color: var(--ink); }
.xc-ctl .cb.on i { background: var(--ink); color: #131815; }
.xc-ctl .cb.end i { background: #E0606C; color: #fff; }
.xc-ctl .cb[disabled] { opacity: .45; cursor: default; }
.cbw { position: relative; display: inline-flex; }
.cb-car { position: absolute; left: 32px; top: 30px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #3A453F; color: var(--ink); border: 2px solid #111613; }
.cb-car svg { width: 12px; height: 12px; }

/* The menus over Mute and Camera (a sheet at the foot on a phone). */
.xmenu { position: absolute; z-index: 70; min-width: 250px; max-width: 320px; background: #1D2420; border: 1px solid var(--cardline); border-radius: 14px; padding: 8px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5); animation: dd-pop .2s var(--ease-out) both; }
.xmenu h4 { margin: 6px 8px 4px; font-size: var(--t-2xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); }
.xm-r { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; padding: 6px 8px; border-radius: 9px; font: 500 var(--t-s) var(--font); color: var(--ink); text-align: left; }
.xm-r:hover { background: var(--glass); }
.xm-r i { width: 16px; flex: none; color: var(--sage); display: grid; place-items: center; font-style: normal; }
.xm-r i svg { width: 15px; height: 15px; }
.xm-r span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xm-lv { width: 34px; height: 6px; border-radius: 3px; background: #3A453F; overflow: hidden; flex: none; }
.xm-lv s { display: block; height: 100%; width: 0; background: var(--sage); border-radius: 3px; transition: width .1s linear; }
.xm-none { margin: 6px 8px; font-size: var(--t-s); color: var(--ink3); }

/* The switch (Agenda, Show to Kabir). */
.xsw { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-xs); color: var(--ink2); cursor: pointer; }
.xsw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.xsw i { width: 32px; height: 18px; border-radius: 999px; background: #3A453F; position: relative; transition: background var(--m-step); flex: none; }
.xsw i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #C9D0CB; transition: transform var(--m-step) var(--ease-out); }
.xsw input:checked + i { background: var(--fab); }
.xsw input:checked + i::after { transform: translateX(14px); background: #fff; }
.xsw input:focus-visible + i { outline: 2px solid var(--focus); outline-offset: 2px; }
.xc-agsw { margin-top: 14px; padding: 7px 12px; border-radius: 999px; background: #222B26; font-size: var(--t-s); color: var(--ink); }

/* The tabs. */
.xp-tabs { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--cardline); min-height: 52px; align-items: stretch; }
.xp-tab { position: relative; padding: 0 9px; font: 500 var(--t-s) var(--font); color: var(--ink3); display: inline-flex; align-items: center; gap: 6px; border-bottom: 2px solid transparent; }
.xp-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--sage); }
.xp-n { font-size: var(--t-2xs); padding: 1px 6px; border-radius: 999px; background: #2E3833; color: var(--ink2); font-variant-numeric: tabular-nums; }
.xp-tab[aria-selected="true"] .xp-n { background: var(--fab); color: #fff; }
.xp-dot { position: absolute; top: 14px; right: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }
.xp-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.xp-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
.xp-pane[hidden] { display: none; }
/* Notes: one tinted box filling the tab, borderless (walk 1 fault 6: a bare dark pane did not say where to type). */
.xp-notes { flex: 1; width: auto; margin: 12px; resize: none; border: 0; border-radius: 12px; background: var(--field); color: var(--ink); font: 400 var(--t-s)/1.55 var(--font); padding: 12px 14px; outline: none;
  transition: background var(--m-step); }
.xp-notes::placeholder { color: var(--ink3); }
.xp-notes:focus { background: #34403A; }
.xp-ai { display: inline-flex; align-items: center; gap: 5px; font: 500 var(--t-xs) var(--font); color: var(--sage); padding: 4px 2px; }
.xp-ai svg { width: 13px; height: 13px; }
.xp-go { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--fab); color: #fff; font: 600 var(--t-s) var(--font); flex: none; }
.xp-go svg { width: 14px; height: 14px; }
.xp-b { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 12px; border-radius: 999px; background: #2B3530; color: var(--ink); font: 500 var(--t-xs) var(--font); }
.xp-b.on { background: var(--fab); color: #fff; }
.xp-b svg { width: 13px; height: 13px; }
.xp-b[disabled]:not(.on) { opacity: .5; }

/* Agenda. */
.ag-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 4px; }
.ag-list { display: flex; flex-direction: column; gap: 2px; padding: 4px 8px 12px; }
.ag-row { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 2px 6px; border-radius: 8px; }
.ag-row:hover { background: var(--glass); }
.ag-m { display: grid; place-items: center; padding: 2px; }
.ag-c { width: 16px; height: 16px; border-radius: 50%; border: 1.6px solid var(--sage); display: grid; place-items: center; flex: none; color: #111613; font-style: normal; }
.ag-c.ag-half { background: linear-gradient(90deg, var(--sage) 50%, transparent 50%); }
.ag-c.ag-full { background: var(--sage); }
.ag-c svg { width: 11px; height: 11px; stroke-width: 3; }
.ag-t { flex: 1; min-width: 0; font-size: var(--t-s); color: var(--ink); cursor: text; }
.ag-row.dn .ag-t { color: var(--ink3); }
.ag-x { color: var(--ink3); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; opacity: .7; }
.ag-x svg { width: 14px; height: 14px; }
.ag-x:hover { opacity: 1; background: var(--glass); }
.ag-in { flex: 1; min-width: 0; border: 0; border-radius: 6px; background: var(--field); color: var(--ink); font: 400 var(--t-s) var(--font); padding: 6px 8px; outline: none; }
.ag-fold { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 2px 10px 2px 6px; border-radius: 8px; background: #222B26; color: var(--ink2); font: 500 var(--t-s) var(--font); margin: 2px 0; }
.ag-fold span { flex: 1; text-align: left; }
.ag-fold svg { width: 14px; height: 14px; }
.ag-v { display: inline-grid; transition: transform var(--m-step); }
.ag-v.up { transform: rotate(180deg); }
.ag-add { align-self: flex-start; width: 30px; height: 30px; margin: 4px 0 0 2px; display: grid; place-items: center; color: var(--ink3); border-radius: 8px; }
.ag-add svg { width: 16px; height: 16px; }

/* Ask AI: the items, then the chips and the Ask box. */
.xp-ask { overflow: hidden; }
.xa-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.xa-item { background: var(--card); border: 1px solid var(--cardline); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; animation: dd-rise .3s var(--ease-out) both; }
/* A change row wraps to as many lines as it needs (the shared chip class .ch of calls.css sets nowrap). */
.xa-item.ch { flex-direction: row; align-items: flex-start; gap: 8px; color: var(--sage-d); font-size: var(--t-s); line-height: 1.45; background: transparent; white-space: normal; }
.xa-item.ch svg { width: 14px; height: 14px; flex: none; margin-top: 3px; }
.xa-item.ch span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.xa-item.ch time { flex: none; margin-top: 2px; }
.xa-h { display: flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: var(--ink2); }
.xa-h svg { width: 13px; height: 13px; color: var(--sage); flex: none; }
.xa-h span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xa-item time { font-size: var(--t-2xs); color: var(--ink3); font-variant-numeric: tabular-nums; }
.xa-t { margin: 0; font-size: var(--t-s); line-height: 1.5; color: var(--ink); }
.xa-t.muted { color: var(--ink3); }
.xa-wait { margin: 0; padding-left: 18px; font-size: var(--t-s); color: var(--ink2); }
.xa-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.xa-shot { display: flex; gap: 10px; align-items: center; }
.xa-shot img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; display: block; }
.xa-read { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--cardline); padding-top: 8px; }
.xa-read .xp-b { align-self: flex-start; }
.xchart { width: 100%; height: auto; display: block; }
.xchart text { font: 9px var(--font); fill: var(--ink3); }
.xchart .g { stroke: rgba(255, 255, 255, .08); }
.xchart .a { fill: rgba(138, 184, 148, .18); }
.xchart .l { fill: none; stroke: var(--sage); stroke-width: 1.6; }
.xchart .d { fill: var(--sage-d); }
.xa-foot { border-top: 1px solid var(--cardline); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.xa-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.xa-chip { flex: none; height: 30px; padding: 0 12px; border-radius: 999px; background: #222B26; color: var(--ink2); font: 500 var(--t-xs) var(--font); }
.xa-chip:active { transform: scale(.96); }
.xa-ask, .xch-form { display: flex; gap: 8px; align-items: flex-end; }
.xa-in, .xch-in { flex: 1; min-width: 0; height: 40px; border: 0; border-radius: 999px; background: var(--field); color: var(--ink); font: 400 var(--t-s) var(--font); padding: 0 14px; outline: none; }
.xch-in { resize: none; padding: 10px 14px; line-height: 1.4; border-radius: 20px; }

/* Chat: the client's Chat, drawn by DD.chatMsg, and the box. */
.xp-chat { overflow: hidden; }
.xch-list { flex: 1; min-height: 0; overflow: auto; padding: 8px 12px; }
.xch-list .cm-list { display: flex; flex-direction: column; gap: 2px; }
.xch-form { border-top: 1px solid var(--cardline); padding: 10px 12px 12px; }

/* The expert on a phone (the page's "Phone"): the video on top, the tabs in a sheet below. */
@media (max-width: 700px) {
  .callbar.full.xcd { z-index: 90; }
  .xc-full { flex-direction: column; }
  .xc-main { flex: 0 0 auto; height: 58%; padding: 0; position: relative; transition: height var(--m-sheet) var(--ease-drawer); }
  .xcd .xc-head { position: absolute; top: 0; left: 0; right: 0; z-index: 4; margin: 0; border: 0; padding: 8px 8px 8px 16px; background: linear-gradient(rgba(0, 0, 0, .45), transparent); }
  .xc-stage { border-radius: 0; }
  .xc-stage .cvid .vtile:first-child { border-radius: 0; }
  .xc-stage .cvid .vtile.me { width: 26%; min-width: 80px; top: 56px; bottom: auto; }
  .xc-warn { top: 56px; }
  /* The sheet rises 14 px over the video: the labels sit 14 px above its edge (walk 1 fault 13). */
  .xc-ctl { position: absolute; left: 0; right: 0; bottom: 28px; z-index: 4; padding: 0; gap: 18px; }
  .xc-ctl .cb { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
  .xc-ctl .cb i { background: rgba(20, 26, 23, .78); }
  .xc-side { width: auto; flex: 1; border: 0; border-radius: 18px 18px 0 0; margin-top: -14px; z-index: 5; position: relative; box-shadow: 0 -8px 24px rgba(0, 0, 0, .35); }
  .xc-handle { display: grid; place-items: center; height: 18px; }
  .xc-handle i { width: 38px; height: 4px; border-radius: 2px; background: #4A5750; }
  .xp-tabs { min-height: 42px; }
  .callbar.sheetfull .xc-main { height: 0; overflow: hidden; }
  .callbar.sheetfull .xc-side { margin-top: 0; border-radius: 0; }
  /* Typing: the video becomes a strip with the client's tile on its right; a tap on the tile brings it back. */
  .callbar.typing .xc-main { height: 86px; overflow: hidden; }
  .xc-stage .cvid .vtile:first-child > .tn { display: none; } /* the head names the client */
  .callbar.typing .xc-head { background: none; flex-wrap: wrap; align-content: center; column-gap: 7px; row-gap: 2px; right: 128px; height: 86px; }
  .callbar.typing .xc-head b { flex: 0 0 100%; order: -1; }
  .callbar.typing .xc-stage .vtile:first-child > .tn { display: block; }
  .callbar.typing .xc-head .xc-k, .callbar.typing .xc-fold, .callbar.typing .xc-ctl, .callbar.typing .xc-warn, .callbar.typing .xwait, .callbar.typing .vtile.me { display: none; }
  .callbar.typing .xc-head .xc-t { margin-left: 0; }
  .callbar.typing .xc-stage { position: absolute; right: 10px; top: 8px; width: 112px; height: 70px; border-radius: 10px; }
  .callbar.typing .xc-stage .vtile, .callbar.typing .xc-stage .incall { border-radius: 10px; padding: 0; }
  .callbar.typing .xc-stage .incall b, .callbar.typing .xc-stage .incall .xsw { display: none; }
  .callbar.typing .xc-stage .ring, .callbar.typing .xc-stage .ring span { width: 40px; height: 40px; margin: 0; font-size: var(--t-m); }
  .callbar.typing .xc-side { margin-top: 0; }
  .xm-back { position: fixed; inset: 0; z-index: 69; background: rgba(0, 0, 0, .5); animation: dd-fade .2s ease both; }
  /* Ask AI: the chips one row (sideways), the box lower, so at least two items show (walk 1 fault 14). */
  .xa-foot { padding: 8px 10px 10px; gap: 6px; }
  .xa-chip { height: 28px; padding: 0 11px; }
  .xa-in { height: 36px; }
  .xa-ask .xp-go { height: 36px; padding: 0 14px; }
  .xa-list { padding: 10px; gap: 8px; }
  .xa-item { padding: 8px 10px; gap: 6px; }
  .xa-shot img { width: 52px; height: 40px; }
  .xa-item .xp-b { height: 28px; padding: 0 11px; }
  .xmenu { position: fixed; left: 8px !important; right: 8px; bottom: 8px !important; max-width: none; border-radius: 18px; padding: 12px 10px calc(12px + env(safe-area-inset-bottom, 0px)); }
}
