panel.css 24 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301
  1. /*
  2. * Document viewer panel. Colours come from the host's style variables (ZCode passes its theme
  3. * tokens); the fallbacks are ZCode's own zai-light / zai-dark values. Popover, menu and input
  4. * fills have no host variable, so they are set per theme here.
  5. */
  6. :root {
  7. --bg: var(--color-background-primary, #f8f8f8);
  8. --panel: var(--color-background-secondary, #ffffff);
  9. --surface: var(--color-background-tertiary, rgba(13, 13, 13, 0.03));
  10. --hover: var(--color-background-ghost, rgba(13, 13, 13, 0.05));
  11. --selected: rgba(13, 13, 13, 0.05);
  12. --border: var(--color-border-primary, rgba(13, 13, 13, 0.1));
  13. --border-hover: var(--color-border-secondary, rgba(13, 13, 13, 0.15));
  14. --fg: var(--color-text-primary, #262626);
  15. --fg-subtle: var(--color-text-secondary, rgba(38, 38, 38, 0.6));
  16. --fg-subtlest: var(--color-text-tertiary, rgba(38, 38, 38, 0.4));
  17. --primary: var(--color-background-inverse, #000000);
  18. --primary-fg: var(--color-text-inverse, #ffffff);
  19. --accent: var(--color-background-info, #ebf4ff);
  20. --success: var(--color-text-success, #1e8a3e);
  21. --danger: var(--color-text-danger, #e03131);
  22. --popover: #ffffff;
  23. --menu-hover: #f0f0f0;
  24. --input: #ffffff;
  25. --skeleton: rgba(13, 13, 13, 0.06);
  26. --shadow-md: 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;
  27. --shadow-float: var(--shadow-md);
  28. --page-shadow: var(--shadow-md);
  29. --font: var(--font-sans, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji");
  30. --text-md: var(--font-text-md-size, 14px);
  31. --text-sm: var(--font-text-sm-size, 12px);
  32. /* Highlight meanings; they sit on white paper in both themes. */
  33. --hl-user: rgba(0, 106, 255, 0.2);
  34. --hl-agent: rgba(255, 179, 0, 0.38);
  35. --hl-agent-edge: #e59a00;
  36. --hl-find: rgba(255, 213, 0, 0.45);
  37. --hl-find-current: rgba(255, 140, 0, 0.6);
  38. color-scheme: light;
  39. }
  40. :root[data-theme="dark"] {
  41. --bg: var(--color-background-primary, #161616);
  42. --panel: var(--color-background-secondary, #202020);
  43. --surface: var(--color-background-tertiary, rgba(255, 255, 255, 0.05));
  44. --hover: var(--color-background-ghost, rgba(255, 255, 255, 0.05));
  45. --selected: rgba(255, 255, 255, 0.1);
  46. --border: var(--color-border-primary, rgba(255, 255, 255, 0.1));
  47. --border-hover: var(--color-border-secondary, rgba(255, 255, 255, 0.15));
  48. --fg: var(--color-text-primary, #d4d4d4);
  49. --fg-subtle: var(--color-text-secondary, rgba(212, 212, 212, 0.6));
  50. --fg-subtlest: var(--color-text-tertiary, rgba(212, 212, 212, 0.3));
  51. --primary: var(--color-background-inverse, #ffffff);
  52. --primary-fg: var(--color-text-inverse, #000000);
  53. --accent: var(--color-background-info, #001d3d);
  54. --success: var(--color-text-success, #46bf72);
  55. --danger: var(--color-text-danger, #ff5c5c);
  56. --popover: #2b2b2b;
  57. --menu-hover: #363636;
  58. --input: #2b2b2b;
  59. --skeleton: rgba(255, 255, 255, 0.06);
  60. --shadow-float: 0 10px 30px -8px rgba(0, 0, 0, 0.75);
  61. --page-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 6px 18px -6px rgba(0, 0, 0, 0.7);
  62. color-scheme: dark;
  63. }
  64. * {
  65. box-sizing: border-box;
  66. }
  67. html,
  68. body,
  69. #root {
  70. margin: 0;
  71. height: 100%;
  72. background: var(--bg);
  73. color: var(--fg);
  74. font: var(--text-md) / 1.5 var(--font);
  75. }
  76. /* The loader centres its spinner in #root; the app fills it. */
  77. #root {
  78. display: block;
  79. }
  80. /*
  81. * Only the document and the side lists scroll. `clip` (unlike `hidden`) makes these boxes
  82. * non-scrollable, so focus or selection scrolling can never push the bar out of view.
  83. */
  84. html,
  85. body,
  86. #root,
  87. .app,
  88. .stage,
  89. .canvas {
  90. overflow: clip;
  91. }
  92. button,
  93. input,
  94. textarea {
  95. font: inherit;
  96. color: inherit;
  97. }
  98. button {
  99. cursor: pointer;
  100. }
  101. [hidden] {
  102. display: none !important;
  103. }
  104. :focus {
  105. outline: none;
  106. }
  107. :focus-visible {
  108. outline: 2px solid var(--border-hover);
  109. outline-offset: 1px;
  110. }
  111. /* Like ZCode, fields show focus by their border only. */
  112. input:focus-visible,
  113. textarea:focus-visible {
  114. outline: none;
  115. }
  116. .muted {
  117. color: var(--fg-subtle);
  118. }
  119. .subtlest {
  120. color: var(--fg-subtlest);
  121. }
  122. .spacer {
  123. flex: 1;
  124. min-width: 8px;
  125. }
  126. .icon {
  127. flex: none;
  128. }
  129. .dimmed,
  130. .btn.dim .icon {
  131. filter: opacity(0.6);
  132. }
  133. /* ZCode Button: ghost by default, 28 px, radius 6. */
  134. .btn {
  135. height: 28px;
  136. display: inline-flex;
  137. align-items: center;
  138. justify-content: center;
  139. gap: 6px;
  140. padding: 0 10px;
  141. border: 0;
  142. border-radius: 6px;
  143. background: transparent;
  144. color: var(--fg);
  145. font-size: var(--text-md);
  146. white-space: nowrap;
  147. transition: background-color 0.12s;
  148. flex: none;
  149. }
  150. .btn:hover:not(:disabled),
  151. .btn.active {
  152. background: var(--hover);
  153. }
  154. .btn:disabled {
  155. opacity: 0.5;
  156. cursor: default;
  157. }
  158. .btn.icon {
  159. width: 28px;
  160. padding: 0;
  161. }
  162. .btn.sm {
  163. height: 24px;
  164. padding: 0 8px;
  165. font-size: var(--text-sm);
  166. }
  167. .btn.icon.sm {
  168. width: 24px;
  169. padding: 0;
  170. }
  171. .btn.lg {
  172. height: 32px;
  173. padding: 0 8px;
  174. border-radius: 8px;
  175. }
  176. .btn.icon.lg {
  177. width: 32px;
  178. }
  179. .btn.primary {
  180. background: var(--primary);
  181. color: var(--primary-fg);
  182. }
  183. .btn.primary:hover:not(:disabled) {
  184. background: var(--primary);
  185. opacity: 0.88;
  186. }
  187. .btn.secondary,
  188. .btn.secondary:hover:not(:disabled) {
  189. background: var(--selected);
  190. }
  191. .vsep {
  192. width: 1px;
  193. height: 16px;
  194. margin: 0 4px;
  195. background: var(--border);
  196. flex: none;
  197. }
  198. kbd {
  199. font:
  200. 11px ui-monospace,
  201. SFMono-Regular,
  202. Menlo,
  203. monospace;
  204. border: 1px solid var(--border);
  205. border-radius: 4px;
  206. padding: 0 4px;
  207. color: var(--fg-subtle);
  208. }
  209. .app {
  210. height: 100%;
  211. min-height: 0;
  212. display: flex;
  213. flex-direction: column;
  214. position: relative;
  215. }
  216. /* Document bar: ZCode PreviewPane header (h-10, surface/30, bottom border). */
  217. .docbar {
  218. height: 40px;
  219. flex: none;
  220. display: flex;
  221. align-items: center;
  222. gap: 2px;
  223. padding: 0 6px 0 8px;
  224. min-width: 0;
  225. background: color-mix(in oklab, var(--surface) 30%, transparent);
  226. border-bottom: 1px solid var(--border);
  227. position: relative;
  228. z-index: 3;
  229. }
  230. .doctitle {
  231. display: flex;
  232. align-items: center;
  233. gap: 8px;
  234. min-width: 0;
  235. height: 28px;
  236. padding: 0 8px 0 6px;
  237. border: 0;
  238. border-radius: 6px;
  239. background: transparent;
  240. font-size: var(--text-md);
  241. }
  242. button.doctitle:hover,
  243. .doctitle.open {
  244. background: var(--hover);
  245. }
  246. .doctitle .name {
  247. overflow: hidden;
  248. text-overflow: ellipsis;
  249. white-space: nowrap;
  250. }
  251. .doctitle .meta {
  252. color: var(--fg-subtle);
  253. white-space: nowrap;
  254. }
  255. .doctitle .chev {
  256. color: var(--fg-subtle);
  257. }
  258. .findbar {
  259. gap: 4px;
  260. padding: 0 6px;
  261. }
  262. .findfield {
  263. flex: 1;
  264. min-width: 0;
  265. height: 28px;
  266. display: flex;
  267. align-items: center;
  268. gap: 6px;
  269. padding: 0 8px;
  270. border-radius: 6px;
  271. background: var(--input);
  272. border: 1px solid var(--border-hover);
  273. cursor: text;
  274. }
  275. .find-input {
  276. flex: 1;
  277. min-width: 0;
  278. border: 0;
  279. padding: 0;
  280. background: transparent;
  281. font-size: var(--text-md);
  282. }
  283. .find-input::placeholder {
  284. color: var(--fg-subtlest);
  285. }
  286. .find-input:focus-visible {
  287. outline: none;
  288. }
  289. .findfield .count {
  290. font-size: var(--text-sm);
  291. color: var(--fg-subtle);
  292. font-variant-numeric: tabular-nums;
  293. white-space: nowrap;
  294. }
  295. /* Changed on disk: accent tint under the bar. */
  296. .banner {
  297. flex: none;
  298. display: flex;
  299. align-items: center;
  300. gap: 8px;
  301. height: 36px;
  302. padding: 0 6px 0 12px;
  303. background: var(--accent);
  304. border-bottom: 1px solid var(--border);
  305. font-size: 13px;
  306. }
  307. .banner span {
  308. flex: 1;
  309. min-width: 0;
  310. overflow: hidden;
  311. text-overflow: ellipsis;
  312. white-space: nowrap;
  313. }
  314. .stage {
  315. flex: 1;
  316. min-height: 0;
  317. display: flex;
  318. position: relative;
  319. }
  320. .canvas {
  321. flex: 1;
  322. min-width: 0;
  323. position: relative;
  324. background: var(--bg);
  325. }
  326. .viewer-scroll {
  327. position: absolute;
  328. inset: 0;
  329. overflow: auto;
  330. }
  331. /* Floating page / zoom control. */
  332. .pill {
  333. position: absolute;
  334. left: 50%;
  335. bottom: 14px;
  336. transform: translateX(-50%);
  337. z-index: 4;
  338. display: flex;
  339. align-items: center;
  340. gap: 2px;
  341. padding: 3px;
  342. background: var(--popover);
  343. border: 1px solid var(--border);
  344. border-radius: 10px;
  345. box-shadow: var(--shadow-float);
  346. font-size: var(--text-sm);
  347. transition: opacity 0.15s;
  348. }
  349. .pill.faded {
  350. opacity: 0;
  351. pointer-events: none;
  352. }
  353. .pill .pg {
  354. display: flex;
  355. align-items: center;
  356. gap: 4px;
  357. padding: 0 4px;
  358. white-space: nowrap;
  359. font-variant-numeric: tabular-nums;
  360. color: var(--fg-subtle);
  361. }
  362. .pill .pgin {
  363. height: 22px;
  364. padding: 0 4px;
  365. border-radius: 5px;
  366. border: 1px solid var(--border);
  367. background: var(--input);
  368. color: var(--fg);
  369. text-align: center;
  370. font-size: var(--text-sm);
  371. font-variant-numeric: tabular-nums;
  372. }
  373. .pill .pgin:focus {
  374. border-color: var(--border-hover);
  375. }
  376. .pill .zoom {
  377. min-width: 40px;
  378. height: 24px;
  379. padding: 0 2px;
  380. border: 0;
  381. border-radius: 6px;
  382. background: transparent;
  383. color: var(--fg-subtle);
  384. font-size: var(--text-sm);
  385. font-variant-numeric: tabular-nums;
  386. }
  387. .pill .zoom:hover {
  388. background: var(--hover);
  389. }
  390. /* Popover (selection bar, ask): ZCode popover with an arrow toward the anchor. */
  391. .pop,
  392. .callout {
  393. position: absolute;
  394. left: 0;
  395. top: 0;
  396. z-index: 6;
  397. background: var(--popover);
  398. border: 1px solid var(--border);
  399. box-shadow: var(--shadow-float);
  400. }
  401. .pop {
  402. border-radius: 12px;
  403. padding: 4px;
  404. display: flex;
  405. align-items: center;
  406. gap: 2px;
  407. }
  408. .pop::after {
  409. content: "";
  410. position: absolute;
  411. left: var(--tip, 50%);
  412. width: 8px;
  413. height: 8px;
  414. background: var(--popover);
  415. border-right: 1px solid var(--border);
  416. border-bottom: 1px solid var(--border);
  417. z-index: -1;
  418. }
  419. .pop[data-side="top"]::after {
  420. bottom: -5px;
  421. transform: translateX(-50%) rotate(45deg);
  422. }
  423. .pop[data-side="bottom"]::after {
  424. top: -5px;
  425. transform: translateX(-50%) rotate(225deg);
  426. }
  427. .pop[data-side="none"]::after {
  428. display: none;
  429. }
  430. .pop .where {
  431. font-size: var(--text-sm);
  432. color: var(--fg-subtle);
  433. padding: 0 4px 0 8px;
  434. white-space: nowrap;
  435. max-width: 180px;
  436. overflow: hidden;
  437. text-overflow: ellipsis;
  438. }
  439. .pop .icon.ok {
  440. color: var(--success);
  441. }
  442. .pop.ask {
  443. width: min(320px, calc(100% - 16px));
  444. flex-direction: column;
  445. align-items: stretch;
  446. gap: 8px;
  447. padding: 12px;
  448. border-radius: 12px;
  449. box-shadow: var(--shadow-md);
  450. }
  451. .ask .ctx {
  452. display: flex;
  453. gap: 6px;
  454. align-items: baseline;
  455. min-width: 0;
  456. font-size: var(--text-sm);
  457. color: var(--fg-subtle);
  458. white-space: nowrap;
  459. }
  460. .ask .ctx .where {
  461. padding: 0;
  462. flex: none;
  463. }
  464. .ask .ctx .q {
  465. overflow: hidden;
  466. text-overflow: ellipsis;
  467. font-style: normal;
  468. color: var(--fg-subtlest);
  469. }
  470. .textarea {
  471. min-height: 64px;
  472. resize: none;
  473. border-radius: 6px;
  474. border: 1px solid var(--border);
  475. background: var(--input);
  476. padding: 6px 8px;
  477. font-size: var(--text-md);
  478. line-height: 1.5;
  479. }
  480. .textarea:hover,
  481. .textarea:focus {
  482. border-color: var(--border-hover);
  483. }
  484. .textarea::placeholder {
  485. color: var(--fg-subtlest);
  486. }
  487. .ask .textarea {
  488. min-height: 56px;
  489. max-height: 160px;
  490. border-radius: 8px;
  491. padding: 8px;
  492. background: var(--bg);
  493. }
  494. .ask .textarea:focus-visible {
  495. outline: 2px solid var(--border-hover);
  496. outline-offset: 1px;
  497. }
  498. .ask .row {
  499. display: flex;
  500. align-items: center;
  501. gap: 6px;
  502. }
  503. .ask .hint {
  504. flex: 1;
  505. min-width: 0;
  506. font-size: var(--text-sm);
  507. color: var(--fg-subtlest);
  508. white-space: nowrap;
  509. overflow: hidden;
  510. }
  511. /* Agent callout and chips. */
  512. .callout {
  513. max-width: min(300px, calc(100% - 16px));
  514. border-radius: 10px;
  515. padding: 8px 8px 8px 10px;
  516. display: flex;
  517. gap: 8px;
  518. align-items: flex-start;
  519. font-size: 13px;
  520. line-height: 1.45;
  521. }
  522. .callout .body {
  523. flex: 1;
  524. min-width: 0;
  525. }
  526. .callout .who {
  527. display: flex;
  528. align-items: center;
  529. gap: 6px;
  530. font-size: var(--text-sm);
  531. font-weight: 500;
  532. color: var(--fg-subtle);
  533. margin-bottom: 2px;
  534. }
  535. .callout .text {
  536. overflow-wrap: anywhere;
  537. }
  538. .dot {
  539. width: 7px;
  540. height: 7px;
  541. border-radius: 50%;
  542. background: var(--hl-agent-edge);
  543. flex: none;
  544. }
  545. .chip {
  546. position: absolute;
  547. left: 50%;
  548. bottom: 14px;
  549. transform: translateX(-50%);
  550. z-index: 5;
  551. display: flex;
  552. align-items: center;
  553. gap: 6px;
  554. height: 28px;
  555. padding: 0 10px 0 8px;
  556. border-radius: 999px;
  557. background: var(--popover);
  558. border: 1px solid var(--border);
  559. box-shadow: var(--shadow-float);
  560. font-size: var(--text-sm);
  561. white-space: nowrap;
  562. }
  563. .chip.raised {
  564. bottom: 58px;
  565. }
  566. .chip.notice {
  567. bottom: 58px;
  568. padding: 0 12px;
  569. color: var(--danger);
  570. pointer-events: none;
  571. }
  572. /* Menus: ZCode dropdown. */
  573. .menu {
  574. position: absolute;
  575. z-index: 8;
  576. top: 38px;
  577. min-width: 128px;
  578. max-width: calc(100% - 16px);
  579. display: flex;
  580. flex-direction: column;
  581. gap: 2px;
  582. padding: 4px;
  583. background: var(--popover);
  584. border: 1px solid var(--border);
  585. border-radius: 8px;
  586. box-shadow: var(--shadow-float);
  587. }
  588. .menu.switcher {
  589. left: 40px;
  590. width: 300px;
  591. }
  592. .menu.more {
  593. right: 6px;
  594. width: 220px;
  595. }
  596. .mi {
  597. min-height: 28px;
  598. display: flex;
  599. align-items: center;
  600. gap: 8px;
  601. padding: 4px 8px;
  602. border: 0;
  603. border-radius: 6px;
  604. background: transparent;
  605. font-size: var(--text-md);
  606. text-align: left;
  607. white-space: nowrap;
  608. }
  609. .mi:hover,
  610. .mi:focus-visible {
  611. background: var(--menu-hover);
  612. outline: none;
  613. }
  614. .mi-icon {
  615. width: 16px;
  616. display: flex;
  617. justify-content: center;
  618. flex: none;
  619. }
  620. .mi-label {
  621. flex: 1;
  622. min-width: 0;
  623. overflow: hidden;
  624. text-overflow: ellipsis;
  625. }
  626. .mi-hint {
  627. margin-left: auto;
  628. padding-left: 16px;
  629. color: var(--fg-subtle);
  630. font-size: var(--text-sm);
  631. display: flex;
  632. }
  633. .mlabel {
  634. padding: 6px 8px 4px;
  635. font-size: var(--text-sm);
  636. font-weight: 500;
  637. color: var(--fg-subtlest);
  638. }
  639. .msep {
  640. height: 1px;
  641. margin: 4px -4px;
  642. background: var(--border);
  643. }
  644. .filetype {
  645. width: 16px;
  646. height: 16px;
  647. flex: none;
  648. border-radius: 4px;
  649. display: grid;
  650. place-items: center;
  651. font-size: 7.5px;
  652. font-weight: 800;
  653. letter-spacing: 0.02em;
  654. color: #fff;
  655. background: #c4382f;
  656. }
  657. .filetype.docx {
  658. background: #2f5fb3;
  659. }
  660. .filetype.xlsx {
  661. background: #217346;
  662. }
  663. .filetype.pptx {
  664. background: #c35a28;
  665. }
  666. /* Pages and outline drawer. */
  667. .scrim {
  668. position: absolute;
  669. inset: 0;
  670. z-index: 4;
  671. background: rgba(0, 0, 0, 0.12);
  672. }
  673. :root[data-theme="dark"] .scrim {
  674. background: rgba(0, 0, 0, 0.35);
  675. }
  676. .drawer {
  677. position: absolute;
  678. top: 0;
  679. bottom: 0;
  680. left: 0;
  681. z-index: 5;
  682. width: 184px;
  683. display: flex;
  684. flex-direction: column;
  685. background: var(--panel);
  686. border-right: 1px solid var(--border);
  687. box-shadow: var(--shadow-float);
  688. }
  689. .drawer.docked {
  690. position: relative;
  691. z-index: 1;
  692. flex: none;
  693. box-shadow: none;
  694. }
  695. .seg {
  696. margin: 8px;
  697. display: flex;
  698. gap: 2px;
  699. padding: 2px;
  700. border-radius: 8px;
  701. background: var(--surface);
  702. flex: none;
  703. }
  704. .seg button {
  705. flex: 1;
  706. height: 24px;
  707. border: 0;
  708. border-radius: 6px;
  709. background: transparent;
  710. color: var(--fg-subtle);
  711. font-size: var(--text-sm);
  712. }
  713. .seg button.on {
  714. background: var(--panel);
  715. color: var(--fg);
  716. box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  717. }
  718. :root[data-theme="dark"] .seg button.on {
  719. background: #363636;
  720. }
  721. .thumbs,
  722. .outline {
  723. flex: 1;
  724. min-height: 0;
  725. overflow: auto;
  726. }
  727. .thumbs {
  728. padding: 8px 12px 12px;
  729. display: flex;
  730. flex-direction: column;
  731. gap: 10px;
  732. }
  733. .seg + .thumbs {
  734. padding-top: 2px;
  735. }
  736. .thumb {
  737. display: flex;
  738. flex-direction: column;
  739. align-items: center;
  740. gap: 4px;
  741. padding: 6px 6px 4px;
  742. border: 1px solid transparent;
  743. border-radius: 8px;
  744. background: transparent;
  745. color: var(--fg-subtle);
  746. font-size: 10px;
  747. font-variant-numeric: tabular-nums;
  748. }
  749. .thumb:hover {
  750. border-color: var(--border);
  751. background: var(--surface-hover, var(--hover));
  752. }
  753. .thumb.on {
  754. border-color: var(--border-hover);
  755. background: var(--selected);
  756. color: var(--fg);
  757. }
  758. .thumb .mini {
  759. background: #fff;
  760. box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  761. overflow: hidden;
  762. }
  763. .thumb .mini canvas,
  764. .slide-thumb {
  765. display: block;
  766. }
  767. .slide-thumb {
  768. position: relative;
  769. overflow: hidden;
  770. }
  771. .outline {
  772. padding: 8px;
  773. display: flex;
  774. flex-direction: column;
  775. gap: 2px;
  776. }
  777. .seg + .outline {
  778. padding-top: 0;
  779. }
  780. .oi {
  781. min-height: 28px;
  782. display: flex;
  783. align-items: center;
  784. gap: 8px;
  785. padding: 0 8px;
  786. border: 0;
  787. border-radius: 6px;
  788. background: transparent;
  789. font-size: 13px;
  790. text-align: left;
  791. }
  792. .oi:hover {
  793. background: var(--hover);
  794. }
  795. .oi.on {
  796. background: var(--selected);
  797. }
  798. .oi .label {
  799. flex: 1;
  800. min-width: 0;
  801. overflow: hidden;
  802. text-overflow: ellipsis;
  803. white-space: nowrap;
  804. }
  805. .oi .n {
  806. color: var(--fg-subtlest);
  807. font-size: var(--text-sm);
  808. font-variant-numeric: tabular-nums;
  809. }
  810. .oi.level-2 {
  811. padding-left: 22px;
  812. color: var(--fg-subtle);
  813. }
  814. .oi.level-3 {
  815. padding-left: 34px;
  816. color: var(--fg-subtle);
  817. }
  818. /* Empty state and file lists. */
  819. .empty {
  820. flex: 1;
  821. min-height: 0;
  822. display: flex;
  823. align-items: center;
  824. justify-content: center;
  825. padding: 24px;
  826. }
  827. .empty-content {
  828. width: 100%;
  829. max-width: 400px;
  830. text-align: center;
  831. }
  832. .empty-content h3 {
  833. font-size: var(--font-heading-md-size, var(--font-text-lg-size, var(--text-md)));
  834. font-weight: 600;
  835. line-height: 1.4;
  836. }
  837. .empty-content .empty-description {
  838. margin: 12px 0 28px;
  839. line-height: 1.7;
  840. }
  841. .btn.empty-open {
  842. min-height: 48px;
  843. height: auto;
  844. max-width: 100%;
  845. gap: 10px;
  846. padding: 12px 24px;
  847. border: 1px solid var(--border-hover);
  848. border-radius: 8px;
  849. background: var(--surface);
  850. font-weight: 500;
  851. }
  852. .btn.empty-open:hover {
  853. background: var(--selected);
  854. }
  855. .empty-content .empty-caption {
  856. margin: 14px 0 0;
  857. font-size: var(--text-sm);
  858. color: var(--fg-subtlest);
  859. line-height: 1.6;
  860. }
  861. .failed h3 {
  862. margin: 0;
  863. font-size: var(--font-text-lg-size, 16px);
  864. font-weight: 500;
  865. }
  866. .empty p,
  867. .failed p {
  868. margin: 4px 0 0;
  869. color: var(--fg-subtle);
  870. text-wrap: pretty;
  871. }
  872. .empty .error,
  873. .picker .error {
  874. color: var(--danger);
  875. }
  876. .flabel {
  877. margin-bottom: 4px;
  878. font-size: var(--text-sm);
  879. font-weight: 500;
  880. color: var(--fg-subtlest);
  881. }
  882. .filelist {
  883. display: flex;
  884. flex-direction: column;
  885. gap: 2px;
  886. margin: 0 -8px;
  887. }
  888. .fr {
  889. height: 34px;
  890. display: flex;
  891. align-items: center;
  892. gap: 10px;
  893. min-width: 0;
  894. padding: 0 8px;
  895. border: 0;
  896. border-radius: 6px;
  897. background: transparent;
  898. font-size: var(--text-md);
  899. text-align: left;
  900. }
  901. .fr:hover,
  902. .fr:focus-visible {
  903. background: var(--hover);
  904. outline: none;
  905. }
  906. .fr .nm {
  907. min-width: 0;
  908. overflow: hidden;
  909. text-overflow: ellipsis;
  910. white-space: nowrap;
  911. }
  912. .fr .dir {
  913. margin-left: auto;
  914. padding-left: 12px;
  915. color: var(--fg-subtlest);
  916. font-size: var(--text-sm);
  917. white-space: nowrap;
  918. overflow: hidden;
  919. text-overflow: ellipsis;
  920. max-width: 50%;
  921. }
  922. .btn.browse {
  923. margin-left: -10px;
  924. }
  925. .footnote {
  926. margin-top: auto;
  927. font-size: 13px;
  928. color: var(--fg-subtle);
  929. text-wrap: pretty;
  930. }
  931. .picker {
  932. position: absolute;
  933. inset: 0;
  934. z-index: 9;
  935. display: flex;
  936. flex-direction: column;
  937. background: var(--bg);
  938. }
  939. .picker-list {
  940. flex: 1;
  941. min-height: 0;
  942. overflow: auto;
  943. padding: 8px 16px 16px;
  944. }
  945. .picker-list > p {
  946. margin: 8px 0;
  947. }
  948. /* Loading and errors. */
  949. .skeleton {
  950. position: absolute;
  951. inset: 0;
  952. z-index: 2;
  953. overflow: hidden;
  954. display: flex;
  955. flex-direction: column;
  956. align-items: center;
  957. gap: 16px;
  958. padding: 16px;
  959. background: var(--bg);
  960. }
  961. .skelpage {
  962. width: 100%;
  963. max-width: 900px;
  964. aspect-ratio: 1 / 1.294;
  965. flex: none;
  966. display: flex;
  967. flex-direction: column;
  968. gap: 8px;
  969. padding: 9%;
  970. background: #fff;
  971. border: 1px solid var(--border);
  972. }
  973. :root[data-theme="dark"] .skelpage {
  974. background: color-mix(in oklab, #fff 6%, transparent);
  975. }
  976. .skelpage.slide {
  977. aspect-ratio: 16 / 9;
  978. padding: 6%;
  979. }
  980. .skel {
  981. height: 7px;
  982. border-radius: 3px;
  983. background: var(--skeleton);
  984. animation: pulse 1.6s ease-in-out infinite;
  985. }
  986. :root:not([data-theme="dark"]) .skel {
  987. background: rgba(13, 13, 13, 0.07);
  988. }
  989. .skel.title {
  990. width: 64%;
  991. height: 11px;
  992. margin: 4px auto 8px;
  993. }
  994. .skel.title.left {
  995. margin: 0 0 8px;
  996. width: 50%;
  997. }
  998. .skel.subtitle {
  999. width: 40%;
  1000. margin: 0 auto 14px;
  1001. }
  1002. .skel.short {
  1003. width: 84%;
  1004. }
  1005. .skel.heading {
  1006. width: 30%;
  1007. height: 9px;
  1008. margin-top: 12px;
  1009. }
  1010. .skel.mid {
  1011. width: 62%;
  1012. }
  1013. .skel.figure {
  1014. height: 80px;
  1015. margin: 10px 18%;
  1016. }
  1017. .skeleton.sheet {
  1018. gap: 0;
  1019. padding: 0;
  1020. align-items: stretch;
  1021. }
  1022. .skel-row {
  1023. height: 24px;
  1024. flex: none;
  1025. border-bottom: 1px solid var(--border);
  1026. }
  1027. @keyframes pulse {
  1028. 50% {
  1029. opacity: 0.55;
  1030. }
  1031. }
  1032. @media (prefers-reduced-motion: reduce) {
  1033. .skel {
  1034. animation: none;
  1035. }
  1036. }
  1037. .failed {
  1038. position: absolute;
  1039. inset: 0;
  1040. z-index: 2;
  1041. display: flex;
  1042. flex-direction: column;
  1043. align-items: center;
  1044. gap: 14px;
  1045. padding: 120px 28px 24px;
  1046. text-align: center;
  1047. background: var(--bg);
  1048. }
  1049. /* Highlights (CSS Custom Highlight API): yours blue, the agent's amber, find yellow/orange. */
  1050. ::highlight(office-reveal) {
  1051. background-color: var(--hl-agent);
  1052. text-decoration: underline 1.5px var(--hl-agent-edge);
  1053. text-underline-offset: 2px;
  1054. }
  1055. ::highlight(office-find) {
  1056. background-color: var(--hl-find);
  1057. }
  1058. ::highlight(office-find-current) {
  1059. background-color: var(--hl-find-current);
  1060. }
  1061. ::selection {
  1062. background: var(--hl-user);
  1063. }
  1064. .office-revealed {
  1065. background-color: var(--hl-agent);
  1066. box-shadow: inset 0 -2px 0 var(--hl-agent-edge);
  1067. border-radius: 1px;
  1068. }
  1069. .office-selected {
  1070. outline: 2px solid var(--primary);
  1071. outline-offset: 2px;
  1072. border-radius: 1px;
  1073. }
  1074. /* PDF */
  1075. .pdf-scroll {
  1076. padding: 16px;
  1077. }
  1078. .pdf-page {
  1079. position: relative;
  1080. margin: 0 auto 16px;
  1081. background: #fff;
  1082. box-shadow: var(--page-shadow);
  1083. }
  1084. .pdf-page:last-child {
  1085. margin-bottom: 0;
  1086. }
  1087. .pdf-page canvas {
  1088. display: block;
  1089. }
  1090. .pdf-page.selected {
  1091. outline: 2px solid var(--primary);
  1092. }
  1093. .pdf-page.revealed {
  1094. outline: 2px solid var(--hl-agent-edge);
  1095. }
  1096. .pdf-links {
  1097. position: absolute;
  1098. inset: 0;
  1099. pointer-events: none;
  1100. }
  1101. .pdf-link {
  1102. position: absolute;
  1103. pointer-events: auto;
  1104. cursor: pointer;
  1105. }
  1106. .pdf-link:hover {
  1107. background: rgba(0, 106, 255, 0.1);
  1108. }
  1109. .textLayer {
  1110. position: absolute;
  1111. text-align: initial;
  1112. inset: 0;
  1113. overflow: clip;
  1114. opacity: 1;
  1115. line-height: 1;
  1116. text-size-adjust: none;
  1117. forced-color-adjust: none;
  1118. transform-origin: 0 0;
  1119. caret-color: CanvasText;
  1120. z-index: 0;
  1121. }
  1122. .textLayer :is(span, br) {
  1123. color: transparent;
  1124. position: absolute;
  1125. white-space: pre;
  1126. cursor: text;
  1127. transform-origin: 0% 0%;
  1128. }
  1129. .textLayer > :not(.markedContent),
  1130. .textLayer .markedContent span:not(.markedContent) {
  1131. z-index: 1;
  1132. }
  1133. .textLayer span.markedContent {
  1134. top: 0;
  1135. height: 0;
  1136. }
  1137. .textLayer ::selection {
  1138. background: var(--hl-user);
  1139. }
  1140. .textLayer br::selection {
  1141. background: transparent;
  1142. }
  1143. .textLayer .endOfContent {
  1144. display: block;
  1145. position: absolute;
  1146. inset: 100% 0 0;
  1147. z-index: 0;
  1148. cursor: default;
  1149. user-select: none;
  1150. }
  1151. /* DOCX */
  1152. .docx-scroll {
  1153. padding: 16px;
  1154. }
  1155. .docx-scroll section.office-docx {
  1156. margin: 0 auto 16px !important;
  1157. box-shadow: var(--page-shadow) !important;
  1158. }
  1159. .docx-scroll .office-docx-wrapper {
  1160. background: transparent !important;
  1161. padding: 0 !important;
  1162. }
  1163. .docx-scroll [data-at] {
  1164. cursor: text;
  1165. }
  1166. /* PPTX */
  1167. .pptx-scroll {
  1168. padding: 16px;
  1169. }
  1170. .slide-list {
  1171. display: flex;
  1172. flex-direction: column;
  1173. align-items: center;
  1174. gap: 16px;
  1175. }
  1176. .slide-frame {
  1177. position: relative;
  1178. flex: none;
  1179. background: #fff;
  1180. box-shadow: var(--page-shadow);
  1181. overflow: hidden;
  1182. }
  1183. .slide-frame.revealed {
  1184. outline: 2px solid var(--hl-agent-edge);
  1185. }
  1186. .slide-host {
  1187. position: absolute;
  1188. left: 0;
  1189. top: 0;
  1190. transform-origin: 0 0;
  1191. }
  1192. .slide-overlay {
  1193. position: absolute;
  1194. inset: 0;
  1195. pointer-events: none;
  1196. z-index: 1000;
  1197. }
  1198. .shape-selected,
  1199. .shape-revealed {
  1200. position: absolute;
  1201. border-radius: 1px;
  1202. }
  1203. .shape-selected {
  1204. outline: calc(2px / var(--slide-scale, 1)) solid var(--primary);
  1205. outline-offset: calc(3px / var(--slide-scale, 1));
  1206. }
  1207. .shape-revealed {
  1208. outline: calc(2px / var(--slide-scale, 1)) solid var(--hl-agent-edge);
  1209. background: rgba(255, 179, 0, 0.15);
  1210. }
  1211. /* XLSX */
  1212. .xlsx-root {
  1213. position: absolute;
  1214. inset: 0;
  1215. display: flex;
  1216. flex-direction: column;
  1217. background: var(--bg);
  1218. }
  1219. .xlsx-grid {
  1220. flex: 1;
  1221. min-height: 0;
  1222. }
  1223. .sheet-tabs {
  1224. flex: none;
  1225. height: 36px;
  1226. display: flex;
  1227. align-items: center;
  1228. gap: 2px;
  1229. padding: 0 6px;
  1230. overflow-x: auto;
  1231. border-top: 1px solid var(--border);
  1232. background: var(--bg);
  1233. }
  1234. .sheet-tabs button {
  1235. height: 26px;
  1236. max-width: 180px;
  1237. padding: 0 8px;
  1238. border: 0;
  1239. border-radius: 8px;
  1240. background: transparent;
  1241. color: var(--fg-subtle);
  1242. font-size: 13px;
  1243. white-space: nowrap;
  1244. overflow: hidden;
  1245. text-overflow: ellipsis;
  1246. flex: none;
  1247. }
  1248. .sheet-tabs button:hover {
  1249. background: var(--hover);
  1250. color: var(--fg);
  1251. }
  1252. .sheet-tabs button.active {
  1253. background: var(--selected);
  1254. color: var(--fg);
  1255. }
  1256. .viewer-pending {
  1257. height: 100%;
  1258. }
  1259. /* Inline card: a non-interactive glance that opens the side panel. */
  1260. .app.inline .glance {
  1261. overflow: hidden;
  1262. }
  1263. .pdf-scroll.glance {
  1264. display: flex;
  1265. flex-wrap: wrap;
  1266. justify-content: center;
  1267. align-content: flex-start;
  1268. gap: 16px;
  1269. }
  1270. .pdf-scroll.glance .pdf-page {
  1271. margin: 0;
  1272. }
  1273. .glance-cover {
  1274. position: absolute;
  1275. inset: 0;
  1276. z-index: 3;
  1277. border: 0;
  1278. padding: 0;
  1279. cursor: pointer;
  1280. background: linear-gradient(to bottom, transparent calc(100% - 64px), var(--bg));
  1281. }