/* The clone of the BuildDog window on the homepage, in the app's light theme.
   This file draws the card it sits on, the window frame, the rail and the
   chat list. app-clone-chat.css draws the conversation, app-clone-term.css
   the terminals and app-clone-phone.css the phone. Values come from the
   app's components and the tokens in app-clone-tokens.css. */

.shot { overflow: hidden; padding: 0; }

.ac { position: absolute; inset: 0; font-family: var(--sem-font-family-ui); color: var(--sem-color-text-default); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
.ac svg { display: block; width: 100%; height: 100%; }

/* The window is drawn at the app's own size and is far wider than the card.
   The card crops it at its right edge, so the window looks as if it carries
   on past the card. What matters sits at its left: the rail, the chat list
   and the chat. The browser pane on the right is fine to lose. The window's
   height follows the card, and app-clone-play.js sets it. */
.ac-win {
  position: absolute; left: 0; top: 0; width: 1680px; height: 640px; transform-origin: top left;
  display: grid; grid-template-columns: 56px 188px 440px 1fr; grid-template-rows: minmax(0, 1fr); background: var(--sem-color-bg-surface);
  border-radius: 12px; overflow: hidden; font-size: var(--sem-font-size-meta);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 40px 90px -30px rgba(0, 0, 0, 0.8), 0 12px 30px -12px rgba(0, 0, 0, 0.6);
}

/* The rail: a column of 40px glyph buttons on the side ground. */
.ac-rail { position: relative; background: var(--sem-color-bg-surface); display: flex; flex-direction: column; align-items: center; padding-top: 36px; }
.ac-rail::after { content: ''; position: absolute; right: 0; top: 40px; bottom: 0; width: 1px; background: var(--sem-color-border-subtle); }
.ac-lights { position: absolute; left: 12px; top: 12px; display: flex; gap: 8px; z-index: 2; }
.ac-lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.3); }
.ac-lights i:nth-child(2) { background: #febc2e; }
.ac-lights i:nth-child(3) { background: #28c840; }
.ac-rail-stack, .ac-rail-foot { display: flex; flex-direction: column; align-items: center; gap: var(--sem-space-xs); padding: var(--sem-space-2xs) var(--sem-space-sm) 0; }
.ac-rail-foot { margin-top: auto; padding: var(--sem-space-sm); }
.ac-rail-btn { position: relative; width: 40px; height: 40px; border-radius: var(--sem-radius-control); display: grid; place-items: center; color: var(--sem-color-text-muted); }
.ac-rail-btn > svg { width: 22px; height: 22px; }
.ac-rail-btn.sel { background: var(--sem-color-bg-selected); color: var(--sem-color-text-primary); }
.ac-badge { position: absolute; top: -4px; right: -4px; height: 16px; min-width: 16px; padding: 0 4px; border-radius: var(--sem-radius-pill); display: grid; place-items: center; font-size: var(--sem-font-size-micro); font-weight: 600; font-style: normal; font-variant-numeric: tabular-nums; line-height: 1; color: var(--sem-color-text-on-accent); border: 1px solid var(--sem-color-bg-surface); box-sizing: content-box; }
.ac-badge.warn { background: var(--sem-color-status-warn); }
.ac-badge.good { background: var(--sem-color-status-good); }
.ac-avatar { width: 30px; height: 30px; border-radius: 50%; box-sizing: border-box; display: grid; place-items: center; border: 1px solid var(--sem-color-status-good); background: var(--sem-color-status-good-soft); color: var(--sem-color-status-good); font-size: var(--sem-font-size-body); font-weight: 600; }

/* The chat list: a card on the side ground with a 4px gap of window black
   between it and the workspace. */
.ac-side { display: flex; flex-direction: column; background: var(--sem-color-bg-surface); padding-right: 4px; min-width: 0; }
.ac-side-chrome { height: 36px; flex: none; display: flex; justify-content: flex-end; align-items: center; gap: var(--sem-space-3xs); padding-right: var(--sem-space-sm); color: var(--sem-color-text-subtle); }
.ac-side-chrome span { width: 26px; height: 26px; display: grid; place-items: center; }
.ac-side-chrome svg { width: 16px; height: 16px; }
.ac-side-card { flex: 1; min-height: 0; overflow: hidden; }
.ac-new { display: flex; align-items: center; gap: var(--sem-space-2xs); margin: var(--sem-space-2xs) var(--sem-space-sm) var(--sem-space-sm); }
.ac-new-row { flex: 1; display: flex; align-items: center; gap: var(--sem-space-sm); min-height: 30px; padding: var(--sem-space-2xs) var(--sem-space-sm); font-size: var(--sem-font-size-heading); font-weight: 500; color: var(--sem-color-text-muted); }
.ac-new-row svg, .ac-quiet svg { width: 16px; height: 16px; }
.ac-quiet { width: 30px; height: 30px; display: grid; place-items: center; color: var(--sem-color-text-subtle); }

/* A chat row: its project, its title, then a line for its agent with the
   branch and the diff stat. */
.ac-row { position: relative; margin: var(--sem-space-3xs) var(--sem-space-xs); padding: var(--sem-space-2xs) var(--sem-space-xs) var(--sem-space-2xs) var(--sem-space-xs); border-left: 4px solid transparent; border-radius: var(--sem-radius-overlay); display: flex; flex-direction: column; gap: var(--sem-space-3xs); font-size: var(--sem-font-size-heading); color: var(--sem-color-text-default); transition: background-color 0.4s, box-shadow 0.4s; }
.ac-row.sel { background: var(--sem-color-bg-selected); color: var(--sem-color-text-primary); box-shadow: inset 0 0 0 2px var(--sem-color-border-subtle); }
.ac-row.unread { background: color-mix(in oklab, var(--sem-color-status-good) 10%, transparent); color: color-mix(in oklab, var(--sem-color-status-good) 58%, var(--sem-color-text-primary)); }
.ac-row-project, .ac-row-meta { height: 20px; display: flex; align-items: center; font-size: var(--sem-font-size-meta); color: var(--sem-color-text-muted); }
.ac-row-project { gap: var(--sem-space-xs); }
.ac-row-meta { gap: var(--sem-space-sm); }
.ac-row-project > svg { width: 13px; height: 13px; flex: none; color: var(--project); }
.ac-row-project > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-row-title { display: flex; align-items: center; gap: var(--sem-space-xs); min-width: 0; font-weight: 600; }
.ac-machine { width: 13px; height: 13px; flex: none; color: var(--sem-color-text-muted); }
.ac-row-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-agent { width: 16px; height: 16px; flex: none; border-radius: 50%; box-sizing: border-box; border: 1px solid var(--sem-color-border-subtle); background: var(--sem-color-bg-surface-raised); display: grid; place-items: center; color: var(--sem-color-text-muted); }
.ac-agent svg { width: 10px; height: 10px; }
.ac-pr { width: 13px; height: 13px; flex: none; color: var(--sem-color-accent-primary); }
.ac-branch { display: flex; align-items: center; gap: var(--sem-space-2xs); min-width: 0; font-family: var(--sem-font-family-mono); font-size: var(--sem-font-size-micro); white-space: nowrap; overflow: hidden; }
.ac-branch svg { width: 13px; height: 13px; flex: none; }
.ac-branch span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ac-diff { display: flex; gap: var(--sem-space-2xs); font-family: var(--sem-font-family-mono); font-size: var(--sem-font-size-micro); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ac-diff em { font-style: normal; }
.ac-diff .add { color: var(--sem-color-status-good); }
.ac-diff .del { color: var(--sem-color-status-danger); }
.ac-seat { flex: none; display: flex; align-items: center; gap: var(--sem-space-2xs); height: 20px; font-size: var(--sem-font-size-meta); font-variant-numeric: tabular-nums; color: var(--sem-color-text-muted); }
.ac-seat.working { color: var(--sem-color-status-good); }

/* The working mark: three dots that hop in turn. */
.ac-working { display: inline-flex; align-items: center; gap: 2px; width: 14px; height: 14px; }
.ac-working i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; animation: ac-hop 1.5s infinite ease-in-out; }
.ac-working i:nth-child(2) { animation-delay: 0.2s; }
.ac-working i:nth-child(3) { animation-delay: 0.4s; }
@keyframes ac-hop { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-3px); } }

/* The workspace is one card on the chat's black, rounded against the
   sidebar's grey: the chat at the left, and a pane beside it behind one
   hairline. The band on top holds the chat's tab, and one scene at a time
   plays below it. */
.ac-work { position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--sem-color-bg-app); border-radius: 12px 0 0 12px; margin-bottom: 4px; }
.ac-band { position: relative; z-index: 3; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; }
.ac-band-end { position: absolute; right: 6px; top: 5px; width: 26px; height: 26px; display: grid; place-items: center; color: var(--sem-color-text-subtle); }
.ac-band-end svg { width: 16px; height: 16px; }
.ac-tab { position: relative; height: 26px; max-width: 430px; margin-right: 8px; padding: 0 12px 0 8px; display: flex; align-items: center; gap: var(--sem-space-xs); border-radius: var(--sem-radius-pill); border: 1px solid var(--sem-color-border-default); background: var(--sem-color-bg-hover); box-shadow: var(--sem-shadow-popover); color: var(--sem-color-text-primary); font-weight: 600; white-space: nowrap; }
.ac-tab-glyph { width: 13px; height: 13px; flex: none; color: var(--sem-color-text-muted); }
.ac-notch { position: absolute; right: -8px; top: 3px; bottom: 3px; width: 6px; border-radius: 0 999px 999px 0; border: 1px solid var(--sem-color-border-default); border-left: 0; background: var(--sem-color-bg-hover); }
.ac-scene { position: absolute; inset: 0; transition: opacity 0.6s ease, filter 0.6s ease; }
.ac[data-scene='chat'] .ac-scene-term, .ac[data-scene='term'] .ac-scene-chat { opacity: 0; filter: blur(6px); pointer-events: none; }

/* The browser pane beside the chat, on the same black behind a hairline. */
.ac-aside { position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--sem-color-bg-app); border-left: 1px solid var(--sem-color-border-subtle); border-radius: 0 12px 12px 0; margin: 0 4px 4px 0; overflow: hidden; }
.ac-aside-strip { height: 36px; flex: none; display: flex; align-items: center; justify-content: center; }
.ac-aside .ac-tab { font-weight: 500; }
.ac-address { display: flex; align-items: center; gap: var(--sem-space-sm); margin: 0 var(--sem-space-lg) var(--sem-space-lg); height: 30px; padding: 0 var(--sem-space-md); border-radius: var(--sem-radius-overlay); background: var(--sem-color-bg-hover); color: var(--sem-color-text-subtle); }
.ac-address span { width: 14px; height: 14px; }
.ac-address code { font-family: var(--sem-font-family-mono); font-size: var(--sem-font-size-micro); color: var(--sem-color-text-muted); }
.ac-page { flex: 1; margin: 0 var(--sem-space-lg) var(--sem-space-lg); padding: var(--sem-space-3xl); border-radius: var(--sem-radius-overlay); border: 1px solid var(--sem-color-border-subtle); background: var(--sem-color-bg-surface); }
.ac-page h3 { font-size: var(--sem-font-size-title); font-weight: 600; color: var(--sem-color-text-primary); margin-bottom: var(--sem-space-xl); }
.ac-page .ac-chart { max-width: 720px; }
.ac-page .ac-line { stroke-dashoffset: 0; transition: none; }
.ac-page .ac-area, .ac-page .ac-peak { opacity: 1; }

/* In the light theme the chat and the pane are white like the frame, so a
   hairline draws the workspace card's edge. */
.ac[data-mode='light'] .ac-work { box-shadow: inset 1px 0 0 var(--sem-color-border-subtle), inset 0 1px 0 var(--sem-color-border-subtle), inset 0 -1px 0 var(--sem-color-border-subtle); }
.ac[data-mode='light'] .ac-aside { border-top: 1px solid var(--sem-color-border-subtle); border-bottom: 1px solid var(--sem-color-border-subtle); }
