/* The phone beside the window on wide screens, drawn after the mobile app's
   dark conversation screen. The mobile app keeps its own dark values in
   mobile/src/theme/tokens.ts, and these are copied from there. */

.ac-phone {
  --m-surface: #0c0c0c; --m-inset: #141414; --m-primary: #f4f4f4; --m-default: #d0d0d0; --m-muted: #949494;
  --m-subtle: #848484; --m-disabled: #686868; --m-border-subtle: rgba(255, 255, 255, 0.11);
  --m-border: rgba(255, 255, 255, 0.14); --m-border-strong: rgba(255, 255, 255, 0.18); --m-accent: #3f9468;
  position: absolute; left: 0; top: 0; width: 390px; height: 844px; transform-origin: top left; box-sizing: border-box;
  padding: 12px; border-radius: 62px; background: linear-gradient(145deg, #3a3a3c, #1c1c1e 40%, #2c2c2e);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.14), 0 50px 90px -30px rgba(0, 0, 0, 0.85), 0 16px 36px -14px rgba(0, 0, 0, 0.6);
}
.ap-screen { position: relative; height: 100%; border-radius: 50px; overflow: hidden; background: var(--m-surface); color: var(--m-primary); }
.ap-status { position: absolute; inset: 0 0 auto; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px 0 44px; z-index: 3; font-size: 16px; }
.ap-island { position: absolute; left: 50%; top: 11px; width: 122px; height: 35px; margin-left: -61px; border-radius: 20px; background: #000; }
.ap-bars { display: flex; align-items: flex-end; gap: 2px; }
.ap-bars i { width: 3px; border-radius: 1px; background: var(--m-primary); }
.ap-bars i:nth-child(1) { height: 4px; } .ap-bars i:nth-child(2) { height: 6px; } .ap-bars i:nth-child(3) { height: 8px; } .ap-bars i:nth-child(4) { height: 10px; }
.ap-bars u { width: 24px; height: 11px; margin-left: 6px; border-radius: 3px; background: var(--m-primary); }

.ap-scene { position: absolute; inset: 54px 0 0; display: flex; flex-direction: column; transition: opacity 0.6s ease; }
.ac[data-scene='chat'] .ap-scene-term, .ac[data-scene='term'] .ap-scene-chat { opacity: 0; }

/* The header floats over the feed: a back button, the title and a menu. */
.ap-head { position: absolute; top: 6px; left: 12px; right: 12px; z-index: 2; display: flex; align-items: flex-start; gap: 8px; }
.ap-circle { width: 40px; height: 40px; flex: none; box-sizing: border-box; border-radius: 50%; display: grid; place-items: center; background: var(--m-inset); border: 1px solid var(--m-border-strong); color: var(--m-primary); }
.ap-circle svg { width: 18px; height: 18px; }
.ap-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-left: 4px; }
.ap-title b { font-size: 17px; line-height: 22px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-sub { display: flex; align-items: center; gap: 5px; overflow: hidden; font-size: 13px; color: var(--m-muted); white-space: nowrap; }
.ap-sub i { width: 14px; height: 14px; flex: none; margin-left: 8px; }
.ap-sub i:first-child { margin-left: 0; }
.ap-term { color: #2dd4bf; }

/* The feed: the person's bubble, the agent's steps and its text. */
.ap-feed { position: relative; flex: 1; min-height: 0; overflow: hidden; padding: 72px 20px 12px; display: flex; flex-direction: column; gap: 12px; }
.ap-bubble { align-self: flex-end; max-width: 84%; padding: 10px 12px; border-radius: 16px; background: var(--m-inset); font-size: 15px; line-height: 22px; color: var(--m-primary); }
.ap-text { font-size: 15px; line-height: 21px; color: var(--m-primary); }
.ap-step { min-height: 32px; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--m-default); white-space: nowrap; }
.ap-step > svg { width: 15px; height: 15px; flex: none; color: var(--m-muted); }
.ap-step code { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: var(--m-subtle); overflow: hidden; text-overflow: ellipsis; }
.ap-step em { margin-left: auto; font-style: normal; font-size: 13px; color: var(--m-disabled); }
.ap-step em.bad { color: #fc787c; }
.ap-visual { border: 1px solid var(--m-border-subtle); border-radius: 12px; background: rgba(252, 252, 252, 0.06); padding: 10px; }
.ap-visual .ac-chart-head { gap: 12px; }
.ap-visual .ac-chart-head > div:first-child span { display: none; }
.ap-visual .ac-chart-stat:last-child { display: none; }
.ap-cmd { border-radius: 6px; border: 1px solid var(--m-border); background: var(--m-inset); font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; line-height: 19px; }
.ap-cmd-head { padding: 6px 12px; color: var(--m-subtle); border-bottom: 1px solid var(--m-border-subtle); }
.ap-cmd-body { padding: 8px 12px; color: var(--m-default); white-space: pre-wrap; }
.ap-cmd-body .t-green { color: #72ba88; }
.ap-cmd-body .t-red { color: #fc787c; }

/* The composer floats at the foot, with the chat's branch under it. */
.ap-dock { position: relative; flex: none; padding: 0 16px 26px; }
.ap-feed { padding-bottom: 52px; -webkit-mask: linear-gradient(transparent 84px, #000 100px); mask: linear-gradient(transparent 84px, #000 100px); }
.ap-pills { position: relative; z-index: 2; display: flex; gap: 8px; margin: -42px 0 8px; height: 32px; }
.ap-pills:empty { display: none; }
.ap-pill { height: 32px; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px 0 8px; border-radius: 999px; border: 1px solid var(--m-border); background: var(--m-inset); font-size: 13px; color: var(--m-primary); white-space: nowrap; }
.ap-pill > i { width: 16px; height: 16px; flex: none; color: var(--pill); }
.ap-pill b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--m-muted); }
.ap-pill code { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.ap-composer { border-radius: 22px; border: 1px solid var(--m-border); background: linear-gradient(#141414, #101010); padding: 12px 0 8px; }
.ap-input { padding: 0 16px; font-size: 16px; line-height: 22px; color: var(--m-subtle); }
.ap-controls { display: flex; align-items: center; gap: 4px; padding: 8px 8px 0; }
.ap-round { width: 36px; height: 36px; box-sizing: border-box; border-radius: 50%; display: grid; place-items: center; color: var(--m-default); }
.ap-round.ring { border: 1px solid var(--m-border-strong); }
.ap-round svg { width: 18px; height: 18px; }
.ap-model { height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 13px; font-weight: 500; color: var(--m-default); }
.ap-model i { width: 15px; height: 15px; }
.ap-model i.ap-caret { width: 12px; height: 12px; color: var(--m-subtle); }
.ap-send { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--m-accent); color: #040404; }
.ap-send svg { width: 17px; height: 17px; }
.ap-strip { margin: 0 12px; padding: 10px 16px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--m-border-subtle); border-top: 0; border-radius: 0 0 14px 14px; font-size: 13px; color: var(--m-muted); }
.ap-strip i { width: 15px; height: 15px; }
.ap-strip code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--m-default); }
