/* The apps' file windows and the label beside the floating button, as Swift Speak and Snap Translate
   draw them since November 2026 (ui/transcription/window.py, ui/documents/window.py, ui/progress_pill.py
   and the dark tokens in ui/styles.py). Loaded after v2.css / snap.css on the two product pages and
   only overrides; the shared rules stay as they are. */

.au {
  --au-stage: #131314;
  --au-surface: #1E1F20;
  --au-alt: #282A2C;
  --au-track: #3C4043;
  --au-line: #3C4043;
  --au-edge: #5F6368;
  --au-text: #E3E3E3;
  --au-muted: #C4C7C5;
  --au-dim: #8E918F;
  --au-accent: #A8C7FA;
  --au-sel: #004A77;
  --au-on-sel: #C2E7FF;
  --au-ok: #6DD58C;
}

/* ---------- the window ---------- */
.v2-film__stage.au { background: var(--au-stage); }
/* 44px more than before, for the title bar */
.v2-film__stage.au:not(.sn-docs) { height: 640px; }
.sn-docs.v2-film__stage.au { height: 644px; }
@media (max-width: 960px) { .sn-docs.v2-film__stage.au { height: 824px; } }
@media (max-width: 700px) { .sn-docs.v2-film__stage.au { height: 1024px; } }
.au-title { position: absolute; inset: 0 0 auto; height: 44px; display: flex; align-items: center; gap: 10px; padding-inline: 22px 18px; font-size: 14px; color: var(--au-text); }
.au-title img { width: 18px; height: 18px; }
[dir="rtl"] .au-title__ctl { margin-left: 0; margin-right: auto; }
.au-title__ctl { margin-left: auto; display: flex; gap: 22px; color: var(--au-muted); direction: ltr; }
.au-title__ctl svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.au .v2-tw { top: 44px; right: 12px; bottom: 12px; left: 12px; gap: 12px; padding: 14px 16px 0; border-radius: 16px; background: var(--au-surface); color: var(--au-text); }
.au svg.au-i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* toolbar: the language pair in one rounded group, then chips */
.au .v2-tw__opts { align-items: center; gap: 8px; }
.au-chip, .au-pair { display: inline-flex; align-items: center; height: 34px; border: 1px solid var(--au-edge); border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--au-text); white-space: nowrap; }
.au-chip { gap: 8px; padding-inline: 12px; }
.au-chip .au-i--chev, .au-pair .au-i--chev { width: 15px; height: 15px; color: var(--au-muted); }
.au-chip b { font-weight: 600; direction: ltr; }
.au-chip--on { background: var(--au-sel); border-color: transparent; color: var(--au-on-sel); }
.au-pair > span { display: inline-flex; align-items: center; gap: 8px; height: 100%; padding-inline: 12px; }
.au-pair > span + span { border-inline-start: 1px solid var(--au-edge); }
.au-pair small { font-size: 12.5px; font-weight: 400; color: var(--au-muted); }
.au-pair__arrow { padding-inline: 9px !important; color: var(--au-text); }
[dir="rtl"] .au-pair__arrow svg { transform: scaleX(-1); }
.au-pair__fixed { font-weight: 400; color: var(--au-muted); }
.au-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--au-accent); white-space: nowrap; }
.au-bar__end { margin-inline-start: auto; }

/* drop zone: dashed, filled, the icon before the words */
.au .v2-tw__drop { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border: 1.5px dashed var(--au-edge); border-radius: 12px; background: var(--au-alt); color: var(--au-muted); text-align: start; font-size: 14px; }
.au .v2-tw__drop .au-i { width: 18px; height: 18px; color: var(--au-accent); }
.au .v2-tw__drop.is-hot { border-color: var(--au-accent); background: color-mix(in srgb, var(--au-accent) 10%, var(--au-alt)); color: var(--au-text); }

/* the queue: a title, how many are done, and "clear completed" */
.au-qhead { display: flex; align-items: baseline; gap: 10px; padding-inline: 4px; font-size: 13.5px; color: var(--au-muted); transition: opacity .5s; }
.au-qhead b { font-size: 14.5px; font-weight: 500; color: var(--au-text); }
.au-qhead .au-link { margin-inline-start: auto; }

/* a file: no frame, a solid tag in its family's colour, its actions as icons at the far end */
.au .v2-tw__row { gap: 14px; padding: 10px 8px; border: none; border-radius: 12px; background: transparent; }
.au .v2-tw__row .v2-ext { width: 30px; height: 30px; border-radius: 7px; background: var(--k); color: #fff; font-size: 9.5px; font-weight: 700; letter-spacing: 0; }
.au .v2-tw__info { gap: 2px; }
.au .v2-tw__info b { font-size: 15px; font-weight: 500; color: var(--au-text); }
.au .v2-tw__status { font-size: 13px; color: var(--au-dim); }
.au .v2-tw__status.is-done { color: var(--au-ok); font-weight: 400; }
.au .v2-tw__bar { height: 3px; margin-top: 5px; background: var(--au-track); }
.au .v2-tw__bar i { background: var(--au-accent); }
.au .v2-tw__row.is-done .v2-tw__bar { opacity: 0; }
.au-acts { display: flex; gap: 22px; padding-inline: 8px 4px; color: var(--au-muted); }
.au-acts .au-i { width: 17px; height: 17px; }
.au-acts--done { display: none; }
.au .v2-tw__row.is-done .au-acts--run { display: none; }
.au .v2-tw__row.is-done .au-acts--done { display: flex; }
/* waiting: only Remove, and no bar yet */
.au-acts--wait { display: none; }
.au .v2-tw__row.is-wait .au-acts--run { display: none; }
.au .v2-tw__row.is-wait .au-acts--wait { display: flex; }
.au .v2-tw__row.is-wait .v2-tw__bar { opacity: 0; }
.au .v2-tw__empty, .au .sn-empty { color: var(--au-dim); }
.au .v2-tw__empty .i, .au .sn-empty .i { color: var(--au-edge); }

/* the queue's state in a pill above a line, Pause and Clear after it */
.au-foot { display: flex; align-items: center; gap: 10px; margin: auto -16px 0; padding: 9px 12px 11px; border-top: 1px solid var(--au-line); transition: opacity .5s; }
.au-status { display: inline-flex; align-items: center; gap: 10px; height: 30px; padding-inline: 12px; border-radius: 15px; background: var(--au-alt); font-size: 13px; color: var(--au-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.au-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--au-accent); }
.au-status .v2-tw__bar, .au-status .au-line { display: block; width: 110px; height: 3px; margin: 0; border-radius: 3px; background: var(--au-track); overflow: hidden; }
.au-status .v2-tw__bar i, .au-line i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--au-accent); transition: width .3s linear; }
.au-eta:empty { display: none; }
.au-ghost { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; font-size: 13.5px; font-weight: 500; color: var(--au-accent); white-space: nowrap; }
.au-ghost:first-of-type { margin-inline-start: auto; }
.au-ghost .au-i { width: 15px; height: 15px; }

/* ---------- Swift Speak: the button sits above the footer ---------- */
.au .v2-scribe__wave, .au .v2-scribe__lines li { background: var(--au-alt); border-color: transparent; }
.au .v2-scribe__lines li.is-now { border-color: rgba(167, 139, 250, .35); background: color-mix(in srgb, #8b5cf6 12%, var(--au-alt)); }
.au .v2-scribe__lines p span { color: var(--au-dim); }
.au .v2-scribe__lines p span.is-said { color: var(--au-text); }
.au:not(.sn-docs) .v2-film__orb { right: 30px; bottom: 74px; }
.au .v2-outs { inset: 120px 0 70px; }
.au[data-act="2"] .au-qhead, .au[data-act="3"] .au-qhead { opacity: .5; }

/* ---------- Snap Translate: the grid keeps its preview, the footer replaces the total line ---------- */
.au.sn-docs .v2-tw { grid-template-rows: auto auto auto 1fr auto; row-gap: 12px; }
.au .sn-qhead { padding-inline: 4px; font-size: 13.5px; color: var(--au-muted); }
.au .sn-qhead b { font-size: 14.5px; font-weight: 500; color: var(--au-text); }
.au .sn-qhead .au-link { margin-inline-start: auto; }
.au .sn-qsum { color: var(--au-muted); font-size: 13.5px; }
.au .sn-queue { gap: 2px; }
.au.sn-docs .v2-tw__row { padding: 10px 8px; gap: 14px; }
.au.sn-docs .v2-tw__row .v2-ext { width: 30px; height: 30px; font-size: 9.5px; }
.au.sn-docs .v2-tw__info b { font-size: 15px; }
.au .sn-total { grid-area: auto; display: flex; gap: 10px; color: var(--au-muted); }
.au .sn-total .v2-tw__bar { flex: none; }
.au .sn-total .v2-tw__bar i { background: var(--au-accent); }
.au.sn-docs .v2-film__orb { top: 50px; left: 26px; }
.au.sn-docs .v2-film__orb .v2-fb { transform: scale(.85); transform-origin: top left; }

/* ---------- the label beside the floating button (ui/progress_pill.py) ---------- */
.v2-pill { position: relative; height: 32px; gap: 8px; padding-inline: 12px 4px; border-radius: 10px; background: #2B2C2F; border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .35), 0 10px 22px -6px rgba(0, 0, 0, .7); color: #F2F2F2; margin-right: 12px; }
.v2-pill::before { content: ""; position: absolute; top: 50%; right: -5px; width: 9px; height: 9px; background: #2B2C2F; border-top: 1px solid rgba(255, 255, 255, .1); border-right: 1px solid rgba(255, 255, 255, .1); transform: translateY(-50%) rotate(45deg); border-radius: 0 2px 0 0; }
.v2-pill__title { font-size: 13px; font-weight: 500; }
.v2-pill__meta { font-size: 12px; color: #C4C7C5; }
.v2-pill__stop { height: 24px; padding-inline: 8px; gap: 5px; border-radius: 12px; background: none; font-size: 12.5px; font-weight: 500; color: #A8C7FA; }
.v2-pill__stop::before { width: 8px; height: 8px; border-radius: 2px; background: #A8C7FA; }
.v2-pill__fold { width: 24px; height: 24px; color: #C4C7C5; }
.v2-pill__fold svg { width: 14px; height: 14px; }
/* the chevron points at the button it folds into (on its right, in both languages) */
.v2-pill .v2-pill__fold svg, [lang="en"] .v2-pill .v2-pill__fold svg { transform: scaleX(-1); }

/* the footer stays at the window's bottom edge whatever wraps above it */
.au .v2-tw { padding-bottom: 54px; }
.au-foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; margin: 0; background: var(--au-surface); border-radius: 0 0 16px 16px; }
.au-chip { padding-inline: 11px; }
.au-pair > span { padding-inline: 11px; }

/* ---------- narrow screens: the pair alone in the toolbar, no row actions, the footer's pill alone ---------- */
@media (max-width: 600px) {
  .v2-film__stage.au:not(.sn-docs) { height: 660px; }
  .au-title { height: 40px; padding-inline: 16px 14px; font-size: 13px; }
  .au-title__ctl { gap: 16px; }
  .au .v2-tw { top: 40px; right: 8px; bottom: 8px; left: 8px; padding: 12px 12px 54px; }
  .au .v2-tw > * { min-width: 0; }
  .au .v2-tw__opts .au-chip, .au .v2-tw__opts .au-link, .au-pair small { display: none; }
  .au .v2-tw__drop { padding: 11px 12px; font-size: 13px; }
  .au-acts, .au-ghost, .au-eta { display: none !important; }
  .au .v2-tw__row { padding-inline: 4px; }
  .au-status { flex: 1; }
  .au-status .v2-tw__bar, .au-status .au-line { flex: 1; width: auto; }
  .au:not(.sn-docs) .v2-film__orb { right: 14px; bottom: 66px; }
  .au:not(.sn-docs) .v2-film__orb .v2-fb { transform: scale(.82); transform-origin: bottom right; }
  .au.sn-docs .v2-film__orb { top: 52px; left: 16px; }
}

/* step 3: the files that come out sit on the app's colours, their tags as in the queue */
.au .v2-out { background: var(--au-alt); border-color: rgba(255, 255, 255, .1); }
.au .v2-out__name { color: var(--au-text); }
.au .v2-out__name .sn-ext--pdf { background: #EA4335; color: #fff; }
.au .v2-out__name .sn-ext--pptx { background: #E37400; color: #fff; }
.au .v2-out__name .sn-ext--xlsx { background: #188038; color: #fff; }
