visualize.css 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222
  1. :root {
  2. color-scheme: light dark;
  3. background-color: var(
  4. --background,
  5. var(--color-background-primary, light-dark(rgb(255 255 255), rgb(24 24 24)))
  6. ) !important;
  7. /* Agent-facing contract; keep in sync with SKILL.md. */
  8. --background: var(
  9. --color-background-primary,
  10. light-dark(rgb(255 255 255), rgb(24 24 24))
  11. );
  12. --foreground: var(
  13. --color-text-primary,
  14. light-dark(rgb(26 28 31), rgb(255 255 255))
  15. );
  16. --card: color-mix(in oklab, var(--foreground) 5%, var(--background));
  17. --card-foreground: var(
  18. --color-text-primary,
  19. light-dark(rgb(26 28 31), rgb(255 255 255))
  20. );
  21. --popover: var(
  22. --color-background-secondary,
  23. light-dark(rgb(255 255 255), rgb(45 45 45))
  24. );
  25. --popover-foreground: var(
  26. --color-text-primary,
  27. light-dark(rgb(26 28 31), rgb(255 255 255))
  28. );
  29. --primary: var(
  30. --color-text-info,
  31. light-dark(rgb(51 156 255), rgb(131 195 255))
  32. );
  33. --primary-foreground: var(
  34. --color-text-inverse,
  35. light-dark(rgb(255 255 255), rgb(13 13 13))
  36. );
  37. --secondary: var(
  38. --color-background-secondary,
  39. light-dark(rgb(255 255 255 / 96%), rgb(54 54 54 / 96%))
  40. );
  41. --secondary-foreground: var(
  42. --color-text-primary,
  43. light-dark(rgb(26 28 31), rgb(255 255 255))
  44. );
  45. --muted: color-mix(in srgb, var(--foreground) 10%, transparent);
  46. --muted-foreground: var(
  47. --color-text-secondary,
  48. light-dark(rgb(26 28 31 / 49.4%), rgb(255 255 255 / 49.8%))
  49. );
  50. --accent: var(
  51. --color-background-info,
  52. light-dark(rgb(229 242 255), rgb(13 39 63))
  53. );
  54. --accent-foreground: var(
  55. --color-text-info,
  56. light-dark(rgb(51 156 255), rgb(131 195 255))
  57. );
  58. --destructive: var(
  59. --color-text-warning,
  60. light-dark(rgb(226 85 7), rgb(255 133 73))
  61. );
  62. --border: var(
  63. --color-border-secondary,
  64. light-dark(rgb(26 28 31 / 8%), rgb(255 255 255 / 8.2%))
  65. );
  66. --input: var(
  67. --color-border-primary,
  68. light-dark(
  69. rgb(26 28 31 / 11.8%),
  70. color-mix(in oklab, rgb(0 0 0) 10%, transparent)
  71. )
  72. );
  73. --ring: var(
  74. --color-ring-primary,
  75. light-dark(rgb(51 156 255), rgb(131 195 255 / 76%))
  76. );
  77. --font-size-base: var(--font-text-md-size, 14px);
  78. --blue: light-dark(rgb(51 156 255), rgb(51 156 255));
  79. --orange: light-dark(rgb(226 85 7), rgb(251 106 34));
  80. --green: light-dark(rgb(0 162 64), rgb(64 201 119));
  81. --red: light-dark(rgb(224 46 42), rgb(255 103 100));
  82. --purple: light-dark(rgb(146 79 247), rgb(173 123 249));
  83. --yellow: light-dark(rgb(255 195 0), rgb(255 210 64));
  84. --viz-series-1: var(--primary);
  85. --viz-series-2: light-dark(rgb(243 136 59), rgb(245 154 86));
  86. --viz-series-3: light-dark(rgb(93 201 119), rgb(116 213 139));
  87. --viz-series-4: light-dark(rgb(235 119 177), rgb(240 143 192));
  88. --viz-series-5: light-dark(rgb(155 121 236), rgb(170 145 239));
  89. --viz-series-6: light-dark(rgb(58 185 177), rgb(90 203 194));
  90. /* Internal implementation variables; not part of the agent contract. */
  91. --font-sans: -apple-system, system-ui, "Segoe UI", sans-serif;
  92. --font-mono:
  93. ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono",
  94. monospace;
  95. --font-size-normal: max(11px, var(--font-size-base));
  96. --font-size-tooltip: calc(var(--font-size-base) - 1px);
  97. --font-size-small: max(11px, calc(var(--font-size-base) - 2px));
  98. --font-size-h1: calc(var(--font-size-normal) * 1.7142857143);
  99. --font-size-h2: calc(var(--font-size-normal) * 1.4285714286);
  100. --font-size-h3: calc(var(--font-size-normal) * 1.2857142857);
  101. --font-weight-normal: 430;
  102. --font-weight-medium: 500;
  103. --icon-size: 16px;
  104. --line-height-normal: calc(var(--font-size-normal) * 1.5);
  105. --line-height-tooltip: calc(var(--font-size-tooltip) * 1.4285714286);
  106. --line-height-small: calc(var(--font-size-small) + 4px);
  107. --corner-shape: round;
  108. --radius: var(--border-radius-lg, 10px);
  109. --radius-sm: calc(var(--radius) * 0.6);
  110. --radius-md: calc(var(--radius) * 0.8);
  111. --radius-lg: var(--radius);
  112. --radius-2xl: calc(var(--radius) * 1.6);
  113. --radius-full: 9999px;
  114. --shadow-sm: 0 1px 2px -1px rgb(0 0 0 / 8%);
  115. --checkmark-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 17'%3E%3Cpath d='M12.8961 3.64101C13.1297 3.41418 13.4984 3.37523 13.7779 3.56581C14.0571 3.75635 14.1554 4.11331 14.0299 4.41347L13.9615 4.53847L7.71151 13.7045C7.59411 13.8767 7.4063 13.9877 7.19881 14.0072C6.99136 14.0267 6.78564 13.9533 6.63826 13.806L2.88826 10.056L2.79842 9.9457C2.6192 9.67407 2.64927 9.30496 2.88826 9.06581C3.12738 8.82669 3.49647 8.79676 3.76815 8.97597L3.8785 9.06581L7.03084 12.2182L12.8053 3.74941L12.8961 3.64101Z'/%3E%3C/svg%3E");
  116. /* Legacy aliases; not part of the current agent contract. */
  117. --viz-bg: transparent;
  118. --viz-panel: var(--card);
  119. --viz-border: var(--border);
  120. --viz-text: var(--foreground);
  121. --viz-muted: var(--muted-foreground);
  122. --viz-accent: var(--primary);
  123. --viz-accent-text: var(--primary-foreground);
  124. --viz-accent-bg: var(--accent);
  125. --viz-font-size: var(--font-size-base);
  126. --viz-warning: var(--destructive);
  127. }
  128. :root[data-theme="light"] {
  129. color-scheme: light;
  130. }
  131. :root[data-theme="dark"] {
  132. color-scheme: dark;
  133. }
  134. * {
  135. box-sizing: border-box;
  136. }
  137. html > body {
  138. /* Preserve MCP aliases for older inline renderers without creating :root cycles. */
  139. --color-background-primary: var(
  140. --background,
  141. light-dark(rgb(255 255 255), rgb(24 24 24))
  142. );
  143. --color-text-primary: var(
  144. --foreground,
  145. light-dark(rgb(26 28 31), rgb(255 255 255))
  146. );
  147. --color-border-secondary: var(
  148. --border,
  149. light-dark(rgb(26 28 31 / 8%), rgb(255 255 255 / 8.2%))
  150. );
  151. margin: 0;
  152. padding: var(--visualize-paint-gutter, 0px);
  153. color: var(--foreground);
  154. background: transparent !important;
  155. font-family: var(--font-sans) !important;
  156. font-size: var(--font-size-normal);
  157. font-weight: var(--font-weight-normal);
  158. line-height: var(--line-height-normal);
  159. }
  160. .cursor-interaction {
  161. cursor: var(--cursor-interaction, pointer);
  162. }
  163. a {
  164. color: color-mix(in srgb, var(--viz-accent) 80%, var(--viz-text) 20%);
  165. cursor: var(--cursor-interaction, pointer);
  166. font-weight: var(--font-weight-medium, 500);
  167. text-decoration: none;
  168. text-underline-offset: 2px;
  169. }
  170. a:is(:hover, :focus-visible) {
  171. text-decoration-line: underline;
  172. text-decoration-style: dashed;
  173. text-decoration-thickness: 0.5px;
  174. }
  175. h1,
  176. h2,
  177. h3,
  178. h4,
  179. h5,
  180. h6,
  181. p {
  182. margin-block: 0;
  183. }
  184. h1 {
  185. font-size: var(--font-size-h1);
  186. font-weight: var(--font-weight-medium);
  187. line-height: 1.25;
  188. }
  189. h2 {
  190. font-size: var(--font-size-h2);
  191. font-weight: var(--font-weight-medium);
  192. line-height: 1.25;
  193. }
  194. h3,
  195. h4,
  196. h5,
  197. h6 {
  198. font-size: var(--font-size-h3);
  199. font-weight: var(--font-weight-medium);
  200. line-height: 1.3;
  201. }
  202. b,
  203. strong,
  204. th {
  205. font-weight: var(--font-weight-medium);
  206. }
  207. code:not(pre code) {
  208. display: inline;
  209. padding: 1px 6px;
  210. border-radius: var(--radius-sm);
  211. corner-shape: var(--corner-shape);
  212. background: var(--muted);
  213. font-family: var(--font-mono);
  214. font-size: 0.92em;
  215. overflow-wrap: anywhere;
  216. -webkit-box-decoration-break: clone;
  217. box-decoration-break: clone;
  218. word-break: break-word;
  219. }
  220. .table-responsive {
  221. width: 100%;
  222. overflow-x: auto;
  223. scrollbar-width: thin;
  224. }
  225. .table {
  226. width: 100%;
  227. border-collapse: collapse;
  228. color: var(--foreground);
  229. font: inherit;
  230. text-align: start;
  231. }
  232. .table :is(th, td) {
  233. padding-block: 10px;
  234. padding-inline: 0 24px;
  235. overflow-wrap: anywhere;
  236. border-bottom: 1px solid var(--border);
  237. text-align: start;
  238. vertical-align: top;
  239. }
  240. .table-responsive > .table :is(th, td) {
  241. overflow-wrap: break-word;
  242. }
  243. .table :is(th, td):last-child {
  244. padding-inline-end: 0;
  245. }
  246. .table :is(caption, thead th) {
  247. font-weight: 600;
  248. }
  249. .table thead th {
  250. padding-block: 8px;
  251. border-bottom-color: color-mix(in srgb, var(--foreground) 16%, transparent);
  252. }
  253. .table tbody tr:last-child :is(th, td) {
  254. border-bottom: 0;
  255. }
  256. .table.table-sm :is(th, td) {
  257. padding-block: 6px;
  258. }
  259. .table.table-sm :is(th, td):not(:last-child) {
  260. padding-inline-end: 16px;
  261. }
  262. .table :is(.text-end, [align="right"]) {
  263. text-align: end;
  264. font-variant-numeric: tabular-nums;
  265. }
  266. .table :is(.text-center, [align="center"]) {
  267. text-align: center;
  268. }
  269. .table .text-nowrap {
  270. white-space: nowrap;
  271. }
  272. #widget {
  273. display: flex;
  274. flex-direction: column;
  275. gap: 12px;
  276. width: 100%;
  277. padding: 0;
  278. background: transparent !important;
  279. }
  280. .card {
  281. min-width: 0;
  282. padding: 12px;
  283. overflow: hidden;
  284. overflow-wrap: break-word;
  285. border-radius: var(--radius-2xl);
  286. corner-shape: var(--corner-shape);
  287. color: var(--card-foreground);
  288. background: var(--card);
  289. }
  290. .widget {
  291. min-width: 0;
  292. overflow: hidden;
  293. border: 0;
  294. border-radius: var(--radius-lg);
  295. corner-shape: var(--corner-shape);
  296. box-shadow: 0 0 0 0.5px var(--border-strong, var(--border));
  297. color: var(--foreground);
  298. background: var(--background);
  299. }
  300. #widget > :not(.card, .widget, .progress) {
  301. width: 100% !important;
  302. max-width: none !important;
  303. margin: 0 !important;
  304. padding: 0 !important;
  305. border: 0 !important;
  306. border-radius: 0 !important;
  307. background: transparent !important;
  308. box-shadow: none !important;
  309. }
  310. .tooltip {
  311. position: fixed;
  312. z-index: 50;
  313. top: 0;
  314. left: 0;
  315. width: max-content;
  316. max-width: min(
  317. 20rem,
  318. var(--tooltip-available-width, calc(100vw - 10px)),
  319. calc(100vw - 10px)
  320. );
  321. max-height: min(
  322. var(--tooltip-available-height, calc(100vh - 10px)),
  323. calc(100vh - 10px)
  324. );
  325. padding: 4px 8px;
  326. border: 1px solid var(--border);
  327. border-radius: var(--radius-lg);
  328. corner-shape: var(--corner-shape);
  329. color: var(--popover-foreground);
  330. background: var(--popover);
  331. box-shadow: none;
  332. font-size: var(--font-size-tooltip);
  333. line-height: var(--line-height-tooltip);
  334. overflow-wrap: break-word;
  335. white-space: normal;
  336. pointer-events: none;
  337. user-select: none;
  338. }
  339. .viz-grid {
  340. display: grid;
  341. grid-template-columns: repeat(auto-fit, minmax(max(180px, 24%), 1fr));
  342. gap: 10px;
  343. }
  344. .viz-stat {
  345. display: flex;
  346. flex-direction: column;
  347. gap: 2px;
  348. }
  349. .viz-stat-value {
  350. font-size: var(--font-size-h2);
  351. font-weight: var(--font-weight-medium);
  352. line-height: 1.25;
  353. }
  354. .viz-row {
  355. display: flex;
  356. flex-wrap: wrap;
  357. align-items: center;
  358. gap: 10px;
  359. }
  360. hr {
  361. width: 100%;
  362. height: 1px;
  363. margin-block: 6px;
  364. border: 0;
  365. background: var(--border);
  366. }
  367. .nav {
  368. display: flex;
  369. min-width: 0;
  370. align-items: center;
  371. gap: 4px;
  372. }
  373. .progress {
  374. display: flex;
  375. height: 8px;
  376. margin-block: calc((var(--line-height-normal, 1.5em) - 8px) / 2);
  377. overflow: hidden;
  378. border: 0;
  379. border-radius: var(--radius-full);
  380. background: var(--muted);
  381. }
  382. .progress-bar:only-child {
  383. border-radius: var(--radius-full);
  384. }
  385. .progress-bar {
  386. height: 100%;
  387. flex-shrink: 0;
  388. border: 0;
  389. background: var(--viz-series-1);
  390. }
  391. .viz-badge {
  392. padding: 3px 8px;
  393. border-radius: var(--radius-full);
  394. color: var(--accent-foreground);
  395. background: var(--accent);
  396. font-weight: var(--font-weight-medium);
  397. }
  398. small,
  399. .text-small,
  400. .viz-badge {
  401. font-size: var(--font-size-small);
  402. line-height: var(--line-height-small);
  403. }
  404. .text-muted {
  405. color: var(--muted-foreground);
  406. }
  407. .tabular-nums {
  408. font-variant-numeric: tabular-nums;
  409. }
  410. .sr-only {
  411. position: absolute;
  412. width: 1px;
  413. height: 1px;
  414. padding: 0;
  415. overflow: hidden;
  416. clip: rect(0, 0, 0, 0);
  417. white-space: nowrap;
  418. border: 0;
  419. }
  420. .viz-controls {
  421. display: flex;
  422. flex-wrap: wrap;
  423. align-items: center;
  424. gap: 8px;
  425. }
  426. .viz-controls > .form-label {
  427. display: grid;
  428. min-width: min(100%, 260px);
  429. flex: 1 1 280px;
  430. grid-template-columns: minmax(0, 1fr) auto;
  431. align-items: baseline;
  432. gap: 2px 12px;
  433. margin-bottom: 0;
  434. }
  435. .viz-controls > .form-label > :is(.form-control, .form-range, .form-select) {
  436. grid-column: 1 / -1;
  437. }
  438. .btn,
  439. .nav-link,
  440. .form-check-input,
  441. .form-control,
  442. .form-range,
  443. .form-select {
  444. font: inherit;
  445. }
  446. .btn,
  447. .nav-link {
  448. appearance: button;
  449. display: inline-flex;
  450. inline-size: fit-content;
  451. max-inline-size: 100%;
  452. min-height: 28px;
  453. align-items: center;
  454. justify-content: center;
  455. gap: 4px;
  456. margin: 0;
  457. padding: 0 8px;
  458. -webkit-app-region: no-drag;
  459. border: 1px solid var(--input);
  460. border-radius: var(--radius-lg);
  461. corner-shape: var(--corner-shape);
  462. color: var(--secondary-foreground);
  463. background: var(--secondary);
  464. cursor: var(--cursor-interaction, pointer);
  465. text-align: center;
  466. text-decoration: none;
  467. white-space: nowrap;
  468. user-select: none;
  469. -webkit-font-smoothing: antialiased;
  470. }
  471. .btn:is(.btn-block, .viz-tile) {
  472. inline-size: 100%;
  473. }
  474. .btn.viz-tile {
  475. min-width: 0;
  476. overflow-wrap: anywhere;
  477. white-space: normal;
  478. }
  479. a.btn {
  480. cursor: var(--cursor-interaction, pointer);
  481. text-decoration: none;
  482. }
  483. .btn:not(:disabled):hover,
  484. .nav-link:not(:disabled):not([aria-disabled="true"]):hover {
  485. background: color-mix(in srgb, var(--foreground) 6%, var(--secondary));
  486. }
  487. .btn-primary {
  488. border-color: transparent;
  489. color: var(--primary-foreground);
  490. background: var(--foreground);
  491. background-clip: padding-box;
  492. }
  493. .btn-primary .text-muted {
  494. color: color-mix(in srgb, var(--primary-foreground) 50%, transparent);
  495. }
  496. .btn-primary:not(:disabled):hover {
  497. background: color-mix(in srgb, var(--foreground) 80%, transparent);
  498. background-clip: padding-box;
  499. }
  500. .btn-ghost {
  501. border-color: transparent;
  502. color: var(--muted-foreground);
  503. background: transparent;
  504. }
  505. .btn-ghost:not(:disabled):hover {
  506. color: var(--foreground);
  507. background: color-mix(in srgb, var(--foreground) 6%, var(--secondary));
  508. }
  509. .nav-pills .nav-link {
  510. min-width: 0;
  511. border-color: transparent;
  512. color: var(--muted-foreground);
  513. background: transparent;
  514. }
  515. .nav-justified .nav-link {
  516. flex: 1 1 0;
  517. overflow-wrap: anywhere;
  518. white-space: normal;
  519. }
  520. .nav-pills .nav-link.active {
  521. color: var(--foreground);
  522. background: var(--muted);
  523. }
  524. /* Shared preview chrome; product styles stay inside each variant. */
  525. .viz-dotted-background {
  526. background-image: radial-gradient(
  527. circle,
  528. color-mix(in srgb, var(--foreground) 14%, transparent) 0.8px,
  529. transparent 0.8px
  530. );
  531. background-position: center;
  532. background-size: 16px 16px;
  533. }
  534. .viz-carousel {
  535. position: relative;
  536. min-width: 0;
  537. }
  538. .viz-carousel:has(> .viz-carousel-controls) {
  539. min-height: calc(60px + var(--viz-carousel-picker-height, 0px));
  540. padding-bottom: 60px;
  541. }
  542. .viz-carousel > [data-variant][hidden] {
  543. display: none !important;
  544. }
  545. .viz-carousel > [data-variant] {
  546. isolation: isolate;
  547. }
  548. .viz-carousel-controls {
  549. --viz-carousel-hover: light-dark(
  550. color-mix(in srgb, var(--foreground) 5.4%, transparent),
  551. color-mix(in srgb, var(--foreground) 7.8%, transparent)
  552. );
  553. position: absolute;
  554. z-index: 2;
  555. bottom: 8px;
  556. left: 50%;
  557. display: flex;
  558. width: max-content;
  559. /* Leave room for the host's design-controls launcher at the trailing edge. */
  560. max-width: calc(100% - 96px);
  561. align-items: center;
  562. gap: 0;
  563. padding: 0;
  564. border: 1px solid var(--border);
  565. border-radius: 16px;
  566. color: var(--foreground);
  567. background: var(--background);
  568. font-family: var(--font-sans);
  569. /* Match the settings dropdown chrome independently of the content font size. */
  570. font-size: 13px;
  571. font-weight: var(--font-weight-normal);
  572. line-height: 18px;
  573. transform: translateX(-50%);
  574. user-select: none;
  575. }
  576. .viz-carousel-controls button,
  577. .viz-carousel-picker > summary {
  578. display: flex;
  579. min-height: 30px;
  580. align-items: center;
  581. justify-content: center;
  582. gap: 4px;
  583. padding: 0 6px;
  584. -webkit-app-region: no-drag;
  585. border: 0;
  586. border-radius: 14px;
  587. color: inherit;
  588. background: transparent;
  589. font: inherit;
  590. -webkit-tap-highlight-color: transparent;
  591. }
  592. .viz-carousel-controls > button,
  593. .viz-carousel-picker > summary {
  594. position: relative;
  595. isolation: isolate;
  596. }
  597. .viz-carousel-controls > button {
  598. --icon-size: 16px;
  599. width: 30px;
  600. padding: 0;
  601. }
  602. .viz-carousel-picker > summary {
  603. padding-inline: 12px;
  604. }
  605. .viz-carousel-controls .viz-carousel-caret {
  606. width: 14px;
  607. height: 14px;
  608. flex: none;
  609. margin: 0;
  610. color: inherit;
  611. transform: rotate(180deg);
  612. }
  613. .viz-carousel-controls > button > svg,
  614. .viz-carousel-controls .viz-carousel-caret,
  615. .viz-carousel-count {
  616. opacity: 0.5;
  617. }
  618. .viz-carousel-controls > button::before,
  619. .viz-carousel-picker > summary::before {
  620. position: absolute;
  621. z-index: -1;
  622. inset: 3px;
  623. border-radius: 12px;
  624. content: "";
  625. pointer-events: none;
  626. }
  627. .viz-carousel-controls > button:hover::before,
  628. .viz-carousel-picker > summary:hover::before {
  629. background: var(--viz-carousel-hover);
  630. }
  631. .viz-carousel-controls > button,
  632. .viz-carousel-controls [data-lucide],
  633. .viz-carousel-controls .lucide {
  634. flex-shrink: 0;
  635. }
  636. .viz-carousel-picker {
  637. min-width: 0;
  638. }
  639. .viz-carousel-picker > summary {
  640. min-width: 0;
  641. list-style: none;
  642. }
  643. .viz-carousel-picker > summary::-webkit-details-marker {
  644. display: none;
  645. }
  646. .viz-carousel-count {
  647. flex-shrink: 0;
  648. white-space: nowrap;
  649. }
  650. .viz-carousel-name {
  651. min-width: 0;
  652. overflow: hidden;
  653. text-overflow: ellipsis;
  654. white-space: nowrap;
  655. }
  656. .viz-carousel-options {
  657. position: absolute;
  658. right: 0;
  659. bottom: calc(100% + 4px);
  660. left: 0;
  661. display: flex;
  662. max-height: 240px;
  663. flex-direction: column;
  664. gap: 2px;
  665. overflow: auto;
  666. padding: 4px;
  667. border: 1px solid var(--border);
  668. border-radius: var(--radius-lg);
  669. background: var(--background);
  670. box-shadow: 0 4px 12px light-dark(rgb(0 0 0 / 6%), rgb(0 0 0 / 25%));
  671. }
  672. .viz-carousel-options > button {
  673. width: 100%;
  674. min-height: 28px;
  675. justify-content: flex-start;
  676. padding: 4px 8px;
  677. font-size: var(--font-size-small);
  678. text-align: start;
  679. white-space: normal;
  680. overflow-wrap: anywhere;
  681. }
  682. .viz-carousel-options > [aria-current="true"],
  683. .viz-carousel-options > button:hover {
  684. background: var(--viz-carousel-hover);
  685. }
  686. .btn:disabled,
  687. .nav-link:disabled,
  688. .nav-link[aria-disabled="true"] {
  689. cursor: not-allowed;
  690. opacity: 0.4;
  691. }
  692. [data-lucide] {
  693. stroke-width: 1.6;
  694. }
  695. .form-label {
  696. display: block;
  697. margin-bottom: 6px;
  698. color: var(--foreground);
  699. }
  700. .form-control {
  701. display: block;
  702. width: 100%;
  703. min-height: 28px;
  704. padding: 0 8px;
  705. outline: none;
  706. border: 1px solid var(--input);
  707. border-radius: var(--radius-lg);
  708. corner-shape: var(--corner-shape);
  709. color: var(--foreground);
  710. background: var(--secondary);
  711. }
  712. .form-control::placeholder {
  713. color: var(--muted-foreground);
  714. }
  715. .form-control[type="file"] {
  716. padding: 0;
  717. overflow: hidden;
  718. cursor: var(--cursor-interaction, pointer);
  719. }
  720. .form-control[type="file"]::file-selector-button {
  721. min-height: 26px;
  722. margin-right: 8px;
  723. padding: 0 8px;
  724. border: 0;
  725. border-right: 1px solid var(--input);
  726. color: var(--secondary-foreground);
  727. background: var(--secondary);
  728. cursor: inherit;
  729. font: inherit;
  730. }
  731. .form-control[type="file"]:not(:disabled):hover::file-selector-button {
  732. background: color-mix(in srgb, var(--foreground) 6%, var(--secondary));
  733. }
  734. .form-control-color[type="color"] {
  735. width: 40px;
  736. height: 28px;
  737. padding: 3px;
  738. cursor: var(--cursor-interaction, pointer);
  739. }
  740. .form-control-color[type="color"]::-webkit-color-swatch-wrapper {
  741. padding: 0;
  742. }
  743. .form-control-color[type="color"]::-webkit-color-swatch {
  744. border: 0;
  745. border-radius: calc(var(--radius-lg) - 4px);
  746. corner-shape: var(--corner-shape);
  747. }
  748. textarea.form-control {
  749. height: auto;
  750. min-height: 72px;
  751. padding: 8px 10px;
  752. resize: vertical;
  753. }
  754. .form-control:focus-visible {
  755. border-color: var(--ring);
  756. box-shadow: inset 0 0 0 1px var(--ring);
  757. }
  758. .form-control:disabled,
  759. .form-select:disabled {
  760. cursor: not-allowed;
  761. opacity: 0.4;
  762. }
  763. .form-select {
  764. appearance: none;
  765. display: block;
  766. width: 100%;
  767. min-height: 28px;
  768. margin: 0;
  769. padding: 0 32px 0 8px;
  770. outline: none;
  771. border: 1px solid var(--input);
  772. border-radius: var(--radius-lg);
  773. corner-shape: var(--corner-shape);
  774. color: var(--foreground);
  775. background-color: var(--secondary);
  776. background-image:
  777. linear-gradient(45deg, transparent 50%, var(--muted-foreground) 50%),
  778. linear-gradient(135deg, var(--muted-foreground) 50%, transparent 50%);
  779. background-position:
  780. calc(100% - 14px) 50%,
  781. calc(100% - 10px) 50%;
  782. background-repeat: no-repeat;
  783. background-size: 4px 4px;
  784. cursor: var(--cursor-interaction, default);
  785. }
  786. .form-select:not(:disabled):hover {
  787. background-color: color-mix(in srgb, var(--foreground) 6%, var(--secondary));
  788. }
  789. .form-select:focus-visible {
  790. border-color: var(--ring);
  791. box-shadow: inset 0 0 0 1px var(--ring);
  792. }
  793. .form-check {
  794. display: flex;
  795. min-height: 20px;
  796. align-items: center;
  797. gap: 6px;
  798. }
  799. .form-check-input {
  800. appearance: none;
  801. width: 14px;
  802. height: 14px;
  803. flex: 0 0 auto;
  804. margin: 0;
  805. border: 1px solid var(--input);
  806. color: var(--primary-foreground);
  807. background-color: transparent;
  808. cursor: var(--cursor-interaction, default);
  809. transition:
  810. background-color 150ms,
  811. border-color 150ms,
  812. box-shadow 150ms;
  813. }
  814. .form-check:not(.form-switch) .form-check-input[type="checkbox"] {
  815. border-color: var(--input);
  816. border-radius: var(--radius-sm);
  817. corner-shape: var(--corner-shape);
  818. background-color: var(--secondary);
  819. box-shadow: var(--shadow-sm);
  820. }
  821. .form-check:not(.form-switch)
  822. .form-check-input:not(:disabled):not(:checked):hover {
  823. background-color: var(--card);
  824. }
  825. .form-check:not(.form-switch) .form-check-input[type="checkbox"]:checked {
  826. border-color: var(--primary);
  827. background-color: var(--primary);
  828. }
  829. .form-check:not(.form-switch)
  830. .form-check-input[type="checkbox"]:checked::before {
  831. display: block;
  832. width: 100%;
  833. height: 100%;
  834. background: var(--primary-foreground);
  835. content: "";
  836. mask: var(--checkmark-image) center / 12px 12px no-repeat;
  837. }
  838. .form-check-input[type="radio"] {
  839. width: 14px;
  840. height: 14px;
  841. border-radius: var(--radius-full);
  842. }
  843. .form-check-input[type="radio"]:checked {
  844. border: 2px solid var(--primary);
  845. background:
  846. radial-gradient(circle, var(--primary-foreground) 0 2.5px, transparent 3px),
  847. var(--primary);
  848. }
  849. .form-check:not(.form-switch) .form-check-input:focus-visible {
  850. outline: 2px solid var(--ring);
  851. outline-offset: 2px;
  852. }
  853. .form-check:not(.form-switch) .form-check-input:disabled {
  854. cursor: not-allowed;
  855. pointer-events: none;
  856. }
  857. .form-check:not(.form-switch) .form-check-input:disabled + .form-check-label {
  858. cursor: not-allowed;
  859. }
  860. .form-switch .form-check-input:disabled,
  861. .form-switch .form-check-input:disabled + .form-check-label {
  862. cursor: not-allowed;
  863. opacity: 0.6;
  864. }
  865. .form-check-label {
  866. color: var(--foreground);
  867. cursor: var(--cursor-interaction, default);
  868. }
  869. .form-switch .form-check-input {
  870. position: relative;
  871. width: 32px;
  872. height: 20px;
  873. border: 0;
  874. border-radius: var(--radius-full);
  875. background: var(--muted);
  876. box-shadow: none;
  877. transition: background-color 200ms cubic-bezier(0, 0, 0.2, 1);
  878. }
  879. .form-switch .form-check-input::before {
  880. position: absolute;
  881. top: 50%;
  882. left: 0;
  883. width: 16px;
  884. height: 16px;
  885. box-sizing: border-box;
  886. border: 1px solid light-dark(var(--primary-foreground), var(--foreground));
  887. border-radius: var(--radius-full);
  888. background: light-dark(var(--primary-foreground), var(--foreground));
  889. box-shadow: var(--shadow-sm);
  890. content: "";
  891. transform: translate(2px, -50%);
  892. transition: transform 200ms cubic-bezier(0, 0, 0.2, 1);
  893. }
  894. .form-switch .form-check-input:checked {
  895. background: var(--primary);
  896. }
  897. .form-switch .form-check-input:checked::before {
  898. transform: translate(14px, -50%);
  899. }
  900. .form-switch .form-check-input:focus-visible {
  901. box-shadow: 0 0 0 2px var(--ring);
  902. }
  903. .form-range {
  904. appearance: none;
  905. display: block;
  906. width: 100%;
  907. height: 28px;
  908. flex: 1;
  909. margin: 0;
  910. padding: 0;
  911. outline: none;
  912. border: 0;
  913. accent-color: var(--primary);
  914. background: linear-gradient(
  915. color-mix(in srgb, var(--foreground) 7%, transparent),
  916. color-mix(in srgb, var(--foreground) 7%, transparent)
  917. )
  918. center / 100% 2px no-repeat;
  919. }
  920. .form-range::-webkit-slider-runnable-track {
  921. height: 28px;
  922. background: transparent;
  923. }
  924. .form-range::-webkit-slider-thumb {
  925. appearance: none;
  926. width: 20px;
  927. height: 20px;
  928. margin-top: 4px;
  929. border: 1px solid var(--border);
  930. border-radius: var(--radius-full);
  931. background: light-dark(var(--primary-foreground), var(--foreground));
  932. }
  933. .form-range:focus-visible::-webkit-slider-thumb {
  934. border-color: var(--ring);
  935. box-shadow: inset 0 0 0 1px var(--ring);
  936. }
  937. .form-range::-moz-range-track {
  938. height: 28px;
  939. background: transparent;
  940. }
  941. .form-range::-moz-range-thumb {
  942. width: 20px;
  943. height: 20px;
  944. border: 1px solid var(--border);
  945. border-radius: var(--radius-full);
  946. background: light-dark(var(--primary-foreground), var(--foreground));
  947. }
  948. .form-range:focus-visible::-moz-range-thumb {
  949. border-color: var(--ring);
  950. box-shadow: inset 0 0 0 1px var(--ring);
  951. }
  952. .form-range:disabled {
  953. cursor: not-allowed;
  954. opacity: 0.4;
  955. }
  956. .btn:not(.btn-primary, .viz-tile):is(
  957. [aria-pressed="true"],
  958. [aria-selected="true"],
  959. .is-selected
  960. ) {
  961. border-color: var(--primary);
  962. color: var(--primary-foreground);
  963. background: var(--primary);
  964. }
  965. .btn.viz-tile:is([aria-pressed="true"], [aria-selected="true"], .is-selected) {
  966. border-color: var(--primary);
  967. box-shadow: inset 0 0 0 1px var(--primary);
  968. }
  969. .btn:focus-visible,
  970. .nav-link:focus-visible,
  971. .viz-carousel-controls :is(button, summary):focus-visible {
  972. outline: 2px solid var(--ring);
  973. outline-offset: 2px;
  974. }
  975. @media (pointer: coarse) {
  976. .viz-carousel:has(> .viz-carousel-controls) {
  977. min-height: calc(76px + var(--viz-carousel-picker-height, 0px));
  978. padding-bottom: 76px;
  979. }
  980. .btn,
  981. .nav-link,
  982. .viz-carousel-controls button,
  983. .viz-carousel-picker > summary,
  984. .form-control,
  985. .form-select {
  986. min-width: 44px;
  987. min-height: 44px;
  988. }
  989. /* Keep small-screen WebKit from zooming when a text field receives focus. */
  990. .form-control,
  991. .form-select {
  992. font-size: max(16px, var(--font-size-normal));
  993. }
  994. .form-control[type="file"]::file-selector-button {
  995. min-width: 44px;
  996. min-height: 44px;
  997. }
  998. .form-control-color[type="color"] {
  999. width: 44px;
  1000. height: 44px;
  1001. }
  1002. .form-control:is(
  1003. [type="date"],
  1004. [type="datetime-local"],
  1005. [type="month"],
  1006. [type="time"],
  1007. [type="week"]
  1008. ) {
  1009. min-width: 0;
  1010. max-width: 100%;
  1011. padding-block: 8px;
  1012. }
  1013. .form-check {
  1014. min-height: 44px;
  1015. padding-inline: 15px;
  1016. }
  1017. .form-check-input {
  1018. position: relative;
  1019. }
  1020. .form-check-input::after {
  1021. position: absolute;
  1022. top: 50%;
  1023. left: 50%;
  1024. width: 44px;
  1025. height: 44px;
  1026. content: "";
  1027. transform: translate(-50%, -50%);
  1028. }
  1029. .form-check-label {
  1030. display: inline-flex;
  1031. min-width: 44px;
  1032. min-height: 44px;
  1033. align-items: center;
  1034. }
  1035. .form-range {
  1036. height: 44px;
  1037. touch-action: pan-y;
  1038. }
  1039. .form-range::-webkit-slider-runnable-track {
  1040. height: 44px;
  1041. }
  1042. .form-range::-moz-range-track {
  1043. height: 44px;
  1044. }
  1045. .form-range::-webkit-slider-thumb {
  1046. margin-top: 12px;
  1047. }
  1048. }
  1049. svg {
  1050. display: block;
  1051. max-width: 100%;
  1052. height: auto;
  1053. }
  1054. #widget > svg {
  1055. width: 100%;
  1056. }
  1057. /* Model-authored chart rules can otherwise stretch icons after these styles load. */
  1058. svg.lucide {
  1059. display: block;
  1060. width: var(--icon-size) !important;
  1061. height: var(--icon-size) !important;
  1062. flex: none;
  1063. margin: 0 !important;
  1064. stroke-width: 1.6;
  1065. }
  1066. .text-warning,
  1067. .text-destructive {
  1068. color: var(--destructive);
  1069. }