asta-ui 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,965 @@
1
+ /* Data: data table, tree view, timeline, kanban, event calendar, file card, image compare, carousel, notification
2
+ * center, comments, motion button. Class lists mirror the React kit.
3
+ * Where the runtime CSS already owns .asta-<name> (carousel, comments, kanban, timeline), the semantic root is
4
+ * .asta-<name>-root and the runtime class stays next to it in the markup. Avatars use .asta-avatar, checkboxes
5
+ * .asta-checkbox and tables .asta-table*, from their own groups. */
6
+
7
+ /* ---- Data table ----
8
+ * <div id="people" class="asta-data-table" data-asta-dt hx-boost="true" hx-target="#people" hx-select="#people">
9
+ * <div class="asta-data-table-toolbar"><form role="search" class="asta-data-table-search">…</form></div>
10
+ * <form class="asta-data-table-rows"><div class="asta-table-wrap"><table class="asta-table">…</table></div></form>
11
+ * <div class="asta-data-table-footer">…</div></div>
12
+ * Rows: <tr class="asta-tr asta-data-table-row"><td class="asta-data-table-check"><input type="checkbox" data-asta-dt-row …> */
13
+ .asta-data-table {
14
+ @apply flex w-full min-w-0 flex-col gap-3;
15
+ }
16
+ .asta-data-table-toolbar {
17
+ @apply flex flex-wrap items-center gap-2;
18
+ }
19
+ .asta-data-table-search {
20
+ @apply flex h-9 min-w-0 flex-1 items-center gap-2 rounded-lg bg-paper px-3 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)];
21
+ @apply transition-shadow duration-200 focus-within:shadow-[inset_0_0_0_1px_var(--brand),0_0_0_4px_color-mix(in_srgb,var(--brand)_16%,transparent)] sm:max-w-[280px];
22
+ & > svg {
23
+ @apply h-3.5 w-3.5 shrink-0 text-mute;
24
+ }
25
+ }
26
+ .asta-data-table-search-input {
27
+ @apply h-full min-w-0 flex-1 bg-transparent text-[13.5px] text-ink outline-none placeholder:text-mute [&::-webkit-search-cancel-button]:hidden;
28
+ }
29
+ .asta-data-table-actions {
30
+ @apply ml-auto flex items-center gap-2;
31
+ }
32
+ .asta-data-table-rows {
33
+ @apply contents;
34
+ }
35
+ .asta-data-table-th-check {
36
+ @apply sticky top-0 z-10 w-11 bg-paper-2 py-2.5 pl-4 pr-1 text-left;
37
+ }
38
+ .asta-data-table-check {
39
+ @apply py-3 pl-4 pr-1 align-middle;
40
+ }
41
+ .asta-data-table-row {
42
+ @apply has-[[data-asta-dt-row]:checked]:!bg-[color-mix(in_srgb,var(--brand)_7%,transparent)];
43
+ }
44
+ .asta-data-table-id {
45
+ @apply font-mono text-[12.5px] text-mute;
46
+ }
47
+ .asta-data-table-empty {
48
+ @apply px-4 py-14 text-center;
49
+ }
50
+ .asta-data-table-footer {
51
+ @apply flex flex-wrap items-center justify-between gap-3 px-1 text-[12.5px] text-mute;
52
+ }
53
+ .asta-data-table-range {
54
+ @apply tabular-nums;
55
+ }
56
+ .asta-data-table-count {
57
+ @apply font-medium text-ink;
58
+ }
59
+ .asta-data-table-clear {
60
+ @apply ml-2 rounded px-1 text-ink-2 underline-offset-2 outline-none hover:text-ink hover:underline focus-visible:ring-2 focus-visible:ring-brand/50;
61
+ }
62
+ .asta-data-table-pager {
63
+ @apply flex items-center gap-1;
64
+ }
65
+ .asta-data-table-page {
66
+ @apply min-w-[70px] text-center tabular-nums;
67
+ & b,
68
+ & strong {
69
+ @apply font-normal text-ink;
70
+ }
71
+ }
72
+ .asta-data-table-step {
73
+ @apply grid h-7 w-7 place-items-center rounded-md text-ink-2 outline-none transition-[background-color,transform,opacity] hover:bg-paper-2 hover:text-ink;
74
+ @apply focus-visible:ring-2 focus-visible:ring-brand/50 active:scale-90 aria-disabled:pointer-events-none aria-disabled:opacity-30 [&>svg]:h-3.5 [&>svg]:w-3.5;
75
+ }
76
+
77
+ /* ---- Tree view ----
78
+ * <ul role="tree" class="asta-tree-view" data-asta-tree data-tab="src">
79
+ * <li role="treeitem" class="asta-tree-item" data-id="src" aria-level="1" aria-expanded="true" aria-selected="false" tabindex="0">
80
+ * <div class="asta-tree-row" data-asta-tree-row data-open><span class="asta-tree-chevron" data-asta-tree-chevron>…</span>
81
+ * <span class="asta-tree-icon">…</span><span class="asta-tree-label">src</span></div>
82
+ * <ul role="group" class="asta-tree-group">…</ul></li></ul>
83
+ * Indent comes from aria-level (1–8). Folder icons: .asta-tree-closed / .asta-tree-opened swap on data-open. */
84
+ .asta-tree-view {
85
+ @apply flex flex-col gap-px;
86
+ }
87
+ .asta-tree-item {
88
+ @apply outline-none [&:focus-visible>div:first-child]:ring-2 [&:focus-visible>div:first-child]:ring-inset [&:focus-visible>div:first-child]:ring-brand/50;
89
+ }
90
+ .asta-tree-row {
91
+ @apply flex h-8 select-none items-center gap-2 rounded-lg pl-2 pr-2.5 text-[13px] transition-colors duration-150;
92
+ @apply cursor-pointer text-ink-2 hover:bg-[color-mix(in_srgb,var(--paper-2)_60%,transparent)] hover:text-ink;
93
+ @apply data-[selected]:bg-paper-2 data-[selected]:text-ink;
94
+ [aria-disabled="true"] > & {
95
+ @apply cursor-not-allowed text-mute opacity-50 hover:bg-transparent hover:text-mute;
96
+ }
97
+ }
98
+ [aria-level="2"] > .asta-tree-row,
99
+ .asta-tree-loading[aria-level="2"] {
100
+ padding-left: 26px;
101
+ }
102
+ [aria-level="3"] > .asta-tree-row,
103
+ .asta-tree-loading[aria-level="3"] {
104
+ padding-left: 44px;
105
+ }
106
+ [aria-level="4"] > .asta-tree-row,
107
+ .asta-tree-loading[aria-level="4"] {
108
+ padding-left: 62px;
109
+ }
110
+ [aria-level="5"] > .asta-tree-row,
111
+ .asta-tree-loading[aria-level="5"] {
112
+ padding-left: 80px;
113
+ }
114
+ [aria-level="6"] > .asta-tree-row,
115
+ .asta-tree-loading[aria-level="6"] {
116
+ padding-left: 98px;
117
+ }
118
+ [aria-level="7"] > .asta-tree-row,
119
+ .asta-tree-loading[aria-level="7"] {
120
+ padding-left: 116px;
121
+ }
122
+ [aria-level="8"] > .asta-tree-row,
123
+ .asta-tree-loading[aria-level="8"] {
124
+ padding-left: 134px;
125
+ }
126
+ .asta-tree-chevron {
127
+ @apply grid h-4 w-4 shrink-0 place-items-center text-mute;
128
+ & > svg {
129
+ @apply h-3 w-3 transition-transform duration-300 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none;
130
+ }
131
+ [data-open] > & > svg {
132
+ @apply rotate-90;
133
+ }
134
+ }
135
+ .asta-tree-icon {
136
+ @apply inline-flex h-4 w-4 shrink-0 text-mute transition-colors [&_svg]:h-4 [&_svg]:w-4;
137
+ .asta-tree-row:hover > & {
138
+ @apply text-ink-2;
139
+ }
140
+ [data-selected] > & {
141
+ @apply !text-brand;
142
+ }
143
+ }
144
+ .asta-tree-opened {
145
+ @apply hidden;
146
+ [data-open] > .asta-tree-icon > & {
147
+ @apply block;
148
+ }
149
+ }
150
+ .asta-tree-closed {
151
+ [data-open] > .asta-tree-icon > & {
152
+ @apply hidden;
153
+ }
154
+ }
155
+ .asta-tree-label {
156
+ @apply flex-1 truncate;
157
+ }
158
+ .asta-tree-meta {
159
+ @apply shrink-0 text-[11.5px] tabular-nums text-mute;
160
+ }
161
+ .asta-tree-group {
162
+ @apply flex flex-col gap-px pt-px empty:hidden;
163
+ }
164
+ .asta-tree-loading {
165
+ @apply flex h-8 items-center gap-2 pl-2 text-[12.5px] text-mute [&>svg]:h-3.5 [&>svg]:w-3.5 [&>svg]:animate-spin;
166
+ }
167
+
168
+ /* ---- Timeline ----
169
+ * <ol class="asta-timeline asta-timeline-root" data-asta-timeline data-inview="false" aria-label="Order history">
170
+ * <li class="asta-timeline-item asta-timeline-a asta-timeline-enter" style="animation-delay:0ms">
171
+ * <div class="asta-timeline-rail"><span class="asta-timeline-marker"><span class="asta-timeline-dot"></span></span>
172
+ * <span class="asta-timeline-track"><span class="asta-timeline-progress asta-timeline-a asta-timeline-draw"></span></span></div>
173
+ * <div class="asta-timeline-body"><div class="asta-timeline-head"><p class="asta-timeline-title">Order placed</p>
174
+ * <span class="asta-timeline-time">09:41</span></div><div class="asta-timeline-desc">…</div></div></li></ol>
175
+ * States: done (default), .asta-timeline-active (with aria-current="step"), .asta-timeline-pending.
176
+ * Drop asta-timeline-a/-enter/-draw and set data-inview="true" for a static list. */
177
+ .asta-timeline-root {
178
+ @apply flex flex-col;
179
+ }
180
+ .asta-timeline-item {
181
+ @apply relative flex gap-3.5;
182
+ }
183
+ .asta-timeline-enter {
184
+ @apply animate-[asta-timeline-in_.6s_cubic-bezier(.16,1,.3,1)_both];
185
+ }
186
+ .asta-timeline-rail {
187
+ @apply relative flex w-5 shrink-0 flex-col items-center;
188
+ }
189
+ .asta-timeline-marker {
190
+ @apply relative flex h-5 w-5 items-center justify-center;
191
+ }
192
+ .asta-timeline-pulse {
193
+ @apply absolute h-2.5 w-2.5 animate-[asta-timeline-ping_2.4s_cubic-bezier(.16,1,.3,1)_infinite] rounded-full bg-brand;
194
+ }
195
+ .asta-timeline-dot {
196
+ @apply relative h-2.5 w-2.5 rounded-full bg-ink;
197
+ .asta-timeline-active & {
198
+ @apply bg-brand shadow-[0_0_0_4px_color-mix(in_srgb,var(--brand)_16%,transparent)];
199
+ }
200
+ .asta-timeline-pending & {
201
+ @apply bg-paper shadow-[inset_0_0_0_1.5px_color-mix(in_srgb,var(--ink)_22%,transparent)];
202
+ }
203
+ }
204
+ .asta-timeline-track {
205
+ @apply relative -mb-0.5 mt-0.5 w-px flex-1 overflow-hidden bg-[color-mix(in_srgb,var(--ink)_12%,transparent)];
206
+ }
207
+ .asta-timeline-progress {
208
+ @apply absolute inset-0 origin-top bg-ink;
209
+ }
210
+ .asta-timeline-draw {
211
+ @apply animate-[asta-timeline-line_.7s_cubic-bezier(.16,1,.3,1)_both];
212
+ }
213
+ .asta-timeline-body {
214
+ @apply min-w-0 flex-1 pb-6;
215
+ .asta-timeline-item:last-child > & {
216
+ @apply pb-0;
217
+ }
218
+ }
219
+ .asta-timeline-head {
220
+ @apply flex items-baseline justify-between gap-4;
221
+ }
222
+ .asta-timeline-title {
223
+ @apply text-[14px] font-medium leading-5 tracking-[-0.01em] text-ink;
224
+ .asta-timeline-pending & {
225
+ @apply text-mute;
226
+ }
227
+ }
228
+ .asta-timeline-time {
229
+ @apply shrink-0 text-[12px] tabular-nums text-mute;
230
+ .asta-timeline-active & {
231
+ @apply text-brand;
232
+ }
233
+ }
234
+ .asta-timeline-desc {
235
+ @apply mt-0.5 text-[13px] leading-relaxed text-mute;
236
+ }
237
+
238
+ /* ---- Kanban ----
239
+ * <form class="asta-kanban asta-kanban-root" data-asta-kanban hx-post="/move" hx-trigger="asta:move" hx-swap="none">
240
+ * <input type="hidden" name="card" data-asta-kanban-field="card">…
241
+ * <div class="asta-kanban-grid" style="--cols:3"><section class="asta-kanban-col" data-asta-kanban-col="todo">
242
+ * <header class="asta-kanban-head"><h4 class="asta-kanban-title">To do</h4><span class="asta-kanban-count" data-asta-kanban-count>3</span></header>
243
+ * <ul class="asta-kanban-list" data-asta-kanban-list><li class="asta-kanban-card" data-asta-kanban-card="k1" draggable="true" tabindex="0">…</li></ul>
244
+ * </section></div></form>
245
+ * asta.js sets data-dragging and data-picked on cards. */
246
+ .asta-kanban-root {
247
+ @apply w-full overflow-x-auto;
248
+ }
249
+ .asta-kanban-grid {
250
+ @apply relative grid min-w-[620px] gap-3 pb-1;
251
+ grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
252
+ }
253
+ .asta-kanban-col {
254
+ @apply flex min-h-[340px] flex-col rounded-xl bg-paper-2 p-2;
255
+ }
256
+ .asta-kanban-head {
257
+ @apply flex items-center gap-2 px-1.5 pb-2.5 pt-1;
258
+ }
259
+ .asta-kanban-title {
260
+ @apply text-[13px] font-medium text-ink;
261
+ }
262
+ .asta-kanban-count {
263
+ @apply text-[12px] tabular-nums text-mute;
264
+ }
265
+ .asta-kanban-list {
266
+ @apply relative flex flex-1 flex-col gap-2;
267
+ }
268
+ .asta-kanban-card {
269
+ @apply rounded-[10px] bg-paper p-3 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_9%,transparent),0_1px_2px_rgb(0_0_0/0.04)];
270
+ @apply relative cursor-grab select-none outline-none focus-visible:ring-2 focus-visible:ring-brand/50;
271
+ @apply data-[dragging]:opacity-40;
272
+ @apply data-[picked]:z-10 data-[picked]:scale-[1.02] data-[picked]:!shadow-[inset_0_0_0_1.5px_var(--brand),0_14px_30px_-14px_rgb(0_0_0/0.3)];
273
+ @apply transition-[scale,box-shadow,opacity] duration-300 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none;
274
+ }
275
+ .asta-kanban-card-title {
276
+ @apply text-[13.5px] leading-snug text-ink;
277
+ }
278
+ .asta-kanban-meta {
279
+ @apply mt-3 flex items-center gap-2 text-[11.5px] text-mute;
280
+ }
281
+ .asta-kanban-tag {
282
+ @apply rounded-md bg-paper-2 px-1.5 leading-5;
283
+ }
284
+ .asta-kanban-due {
285
+ @apply tabular-nums;
286
+ }
287
+ .asta-kanban-assignee {
288
+ @apply ml-auto;
289
+ }
290
+
291
+ /* ---- Event calendar ----
292
+ * <div id="cal" class="asta-cal asta-event-calendar" data-asta-cal data-month="2026-11" data-today="2026-11-19" data-week="1"
293
+ * data-tpl="/calendar?month=__M__&day=__D__" hx-boost="true" hx-target="#cal" hx-select="#cal" hx-swap="outerHTML show:none">
294
+ * <div class="asta-event-calendar-main"><header class="asta-event-calendar-head">…</header>
295
+ * <div class="asta-event-calendar-viewport"><div role="grid" data-asta-cal-grid>
296
+ * <div role="row" class="asta-event-calendar-weekdays"><span role="columnheader" class="asta-event-calendar-weekday">Mon</span>…</div>
297
+ * <div role="row" class="asta-event-calendar-week"><button role="gridcell" class="asta-event-calendar-day" data-day="2026-11-19" aria-selected="true" aria-current="date">
298
+ * <span class="asta-event-calendar-num">19</span><span class="asta-event-calendar-events"><span class="asta-event-calendar-event">Standup</span></span></button>…</div>
299
+ * </div></div></div>
300
+ * <aside class="asta-event-calendar-side"><div data-asta-cal-panel="2026-11-19">…</div></aside></div>
301
+ * Days outside the month carry data-out; today carries aria-current="date". Accents: .asta-event-calendar-event-accent, -dot-accent. */
302
+ .asta-event-calendar {
303
+ @apply grid w-full gap-6 md:grid-cols-[minmax(0,1fr)_240px];
304
+ }
305
+ .asta-event-calendar-main {
306
+ @apply min-w-0;
307
+ }
308
+ .asta-event-calendar-head {
309
+ @apply mb-4 flex items-center gap-2;
310
+ }
311
+ .asta-event-calendar-month {
312
+ @apply mr-auto text-[17px] font-medium tracking-[-0.02em] text-ink;
313
+ }
314
+ .asta-event-calendar-today {
315
+ @apply inline-flex h-8 items-center rounded-md px-3 text-[13px] text-ink-2 outline-none transition-colors duration-200 hover:bg-paper-2 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50;
316
+ }
317
+ .asta-event-calendar-nav {
318
+ @apply grid h-8 w-8 place-items-center rounded-md text-ink-2 outline-none transition-colors duration-200 hover:bg-paper-2 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50 [&>svg]:h-4 [&>svg]:w-4;
319
+ }
320
+ .asta-event-calendar-viewport {
321
+ @apply -m-1 overflow-hidden p-1;
322
+ }
323
+ .asta-event-calendar-weekdays {
324
+ @apply grid grid-cols-7 pb-2;
325
+ }
326
+ .asta-event-calendar-weekday {
327
+ @apply px-2 text-[11.5px] font-medium text-mute;
328
+ }
329
+ .asta-event-calendar-week {
330
+ @apply grid grid-cols-7 gap-1 pb-1;
331
+ }
332
+ .asta-event-calendar-day {
333
+ @apply relative flex h-[76px] min-w-0 flex-col items-stretch gap-1 rounded-[10px] p-1.5 text-left outline-none transition-colors duration-200;
334
+ @apply hover:bg-[color-mix(in_srgb,var(--paper-2)_60%,transparent)] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-brand/50 aria-selected:!bg-paper-2 sm:h-[88px];
335
+ }
336
+ .asta-event-calendar-num {
337
+ @apply grid h-6 w-6 place-items-center rounded-full text-[12.5px] tabular-nums text-ink transition-colors duration-200;
338
+ [data-out] > & {
339
+ @apply text-mute/60;
340
+ }
341
+ [aria-current="date"] > & {
342
+ @apply bg-brand font-medium text-white;
343
+ }
344
+ }
345
+ .asta-event-calendar-events {
346
+ @apply hidden min-w-0 flex-col gap-0.5 sm:flex;
347
+ }
348
+ .asta-event-calendar-event {
349
+ @apply truncate rounded-[5px] bg-[color-mix(in_srgb,var(--ink)_6%,transparent)] px-1.5 text-[11px] leading-[18px] text-ink-2;
350
+ [data-out] & {
351
+ @apply opacity-50;
352
+ }
353
+ }
354
+ .asta-event-calendar-event-accent {
355
+ @apply bg-[color-mix(in_srgb,var(--brand)_12%,transparent)] text-brand;
356
+ }
357
+ .asta-event-calendar-more {
358
+ @apply px-1.5 text-[11px] leading-4 text-mute;
359
+ }
360
+ .asta-event-calendar-dots {
361
+ @apply flex gap-0.5 px-1 sm:hidden;
362
+ }
363
+ .asta-event-calendar-dot {
364
+ @apply h-1.5 w-1.5 rounded-full bg-mute;
365
+ }
366
+ .asta-event-calendar-dot-accent {
367
+ @apply bg-brand;
368
+ }
369
+ .asta-event-calendar-side {
370
+ @apply min-w-0 md:pt-12;
371
+ }
372
+ .asta-event-calendar-label {
373
+ @apply text-[12px] font-medium text-mute;
374
+ }
375
+ .asta-event-calendar-date {
376
+ @apply mt-1 text-[15px] font-medium tracking-[-0.01em] text-ink;
377
+ }
378
+ .asta-event-calendar-items {
379
+ @apply mt-4 flex flex-col gap-1;
380
+ }
381
+ .asta-event-calendar-item {
382
+ @apply flex w-full gap-3 rounded-lg px-2 py-2 text-left;
383
+ &:is(a, button) {
384
+ @apply outline-none transition-colors duration-200 hover:bg-paper-2 focus-visible:ring-2 focus-visible:ring-brand/50;
385
+ }
386
+ }
387
+ .asta-event-calendar-item-dot {
388
+ @apply mt-1.5 h-2 w-2 shrink-0 rounded-full bg-[color-mix(in_srgb,var(--ink)_22%,transparent)];
389
+ }
390
+ .asta-event-calendar-item-dot-accent {
391
+ @apply bg-brand;
392
+ }
393
+ .asta-event-calendar-item-text {
394
+ @apply min-w-0;
395
+ }
396
+ .asta-event-calendar-item-title {
397
+ @apply block truncate text-[13.5px] text-ink;
398
+ }
399
+ .asta-event-calendar-item-meta {
400
+ @apply block text-[12px] tabular-nums text-mute;
401
+ }
402
+ .asta-event-calendar-empty {
403
+ @apply mt-4 rounded-[10px] bg-paper-2 px-3 py-4 text-[13px] text-mute;
404
+ }
405
+
406
+ /* ---- File card ----
407
+ * <div class="asta-file-card"><a href="/files/1" class="asta-file-card-open" aria-label="Open Q4 plan"></a>
408
+ * <div class="asta-file-card-media"><img class="asta-file-card-thumb" src="…" alt="">
409
+ * <span class="asta-file-card-corner"><button class="asta-file-card-star" data-asta-file-star aria-pressed="false">
410
+ * <svg class="asta-file-star">…</svg></button></span></div>
411
+ * <div class="asta-file-card-body"><span class="asta-file-card-text"><span class="asta-file-card-title">Q4 plan</span>
412
+ * <span class="asta-file-card-meta">Edited 2h ago</span></span></div></div>
413
+ * List view: .asta-file-row (+ .asta-file-row-thumb, -title, -meta, -actions). Selected: .asta-file-card-selected, .asta-file-row-selected.
414
+ * No picture: <span class="asta-file-card-initial">Q</span> in place of the img. */
415
+ .asta-file-card {
416
+ @apply relative overflow-hidden rounded-[12px] bg-paper;
417
+ @apply after:pointer-events-none after:absolute after:inset-0 after:z-[3] after:rounded-[inherit] after:transition-shadow after:duration-150;
418
+ @apply after:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent)] hover:after:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_22%,transparent)] has-[:focus-visible]:after:shadow-[inset_0_0_0_2px_var(--brand)];
419
+ }
420
+ .asta-file-card-selected {
421
+ @apply after:shadow-[inset_0_0_0_2px_var(--brand)] hover:after:shadow-[inset_0_0_0_2px_var(--brand)];
422
+ }
423
+ .asta-file-row {
424
+ @apply relative flex h-14 items-center gap-3 rounded-[10px] px-2 transition-[box-shadow,background-color] duration-150 hover:bg-[color-mix(in_srgb,var(--ink)_4%,transparent)];
425
+ }
426
+ .asta-file-row-selected {
427
+ @apply bg-[color-mix(in_srgb,var(--brand)_8%,transparent)];
428
+ }
429
+ .asta-file-card-open {
430
+ @apply absolute inset-0 z-[1] cursor-pointer rounded-[inherit] outline-none;
431
+ }
432
+ .asta-file-card-media {
433
+ @apply relative aspect-[16/10] overflow-hidden bg-paper-2;
434
+ }
435
+ .asta-file-row-thumb {
436
+ @apply relative h-10 w-16 shrink-0 overflow-hidden rounded-[6px] bg-paper-2 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_8%,transparent)];
437
+ }
438
+ .asta-file-card-thumb {
439
+ @apply absolute inset-0 h-full w-full object-cover transition-transform duration-500 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none;
440
+ :is(.asta-file-card, .asta-file-row):hover & {
441
+ @apply scale-[1.03];
442
+ }
443
+ }
444
+ .asta-file-card-initial {
445
+ @apply absolute inset-0 grid place-items-center text-[28px] font-semibold tracking-[-0.04em] text-mute;
446
+ }
447
+ .asta-file-card-corner {
448
+ @apply absolute right-2.5 top-2.5 z-[2];
449
+ }
450
+ .asta-file-card-star {
451
+ @apply relative z-[2] grid h-7 w-7 cursor-pointer place-items-center rounded-[7px] outline-none transition-[opacity,color,background-color] duration-150;
452
+ @apply focus-visible:opacity-100 focus-visible:shadow-[0_0_0_2px_var(--brand)];
453
+ @apply text-ink-2 opacity-0 hover:text-ink aria-pressed:text-brand aria-pressed:opacity-100;
454
+ @apply bg-paper shadow-[0_1px_3px_rgb(0_0_0/0.12)];
455
+ .asta-file-row & {
456
+ @apply bg-transparent shadow-none;
457
+ }
458
+ :is(.asta-file-card, .asta-file-row):hover & {
459
+ @apply opacity-100;
460
+ }
461
+ & > svg {
462
+ @apply h-4 w-4 fill-none;
463
+ }
464
+ &[aria-pressed="true"] > svg {
465
+ @apply fill-current;
466
+ }
467
+ }
468
+ .asta-file-card-body {
469
+ @apply flex items-center gap-2.5 px-3.5 py-3;
470
+ }
471
+ .asta-file-card-icon {
472
+ @apply h-4 w-4 shrink-0 text-mute [&>svg]:h-full [&>svg]:w-full;
473
+ }
474
+ .asta-file-card-text {
475
+ @apply min-w-0 flex-1;
476
+ }
477
+ .asta-file-card-title {
478
+ @apply block truncate text-[13.5px] font-medium text-ink;
479
+ }
480
+ .asta-file-card-meta {
481
+ @apply mt-0.5 block truncate text-[12px] text-mute;
482
+ }
483
+ .asta-file-card-actions {
484
+ @apply relative z-[2] shrink-0;
485
+ }
486
+ .asta-file-row-title {
487
+ @apply min-w-0 flex-1 truncate text-[13.5px] font-medium text-ink;
488
+ }
489
+ .asta-file-row-meta {
490
+ @apply hidden shrink-0 text-[12.5px] text-mute sm:block;
491
+ }
492
+ .asta-file-row-actions {
493
+ @apply relative z-[2] flex shrink-0 items-center gap-1;
494
+ }
495
+
496
+ /* ---- Image compare ----
497
+ * <div class="asta-compare asta-image-compare" data-asta-compare data-step="2" style="--pos:50">
498
+ * <div class="asta-image-compare-layer"><img class="asta-image-compare-img" src="after.webp" alt=""></div>
499
+ * <div class="asta-compare-win asta-image-compare-clip"><div class="asta-compare-pic asta-image-compare-layer"><img class="asta-image-compare-img" src="before.webp" alt=""></div></div>
500
+ * <span class="asta-image-compare-tag asta-image-compare-before">Before</span><span class="asta-image-compare-tag asta-image-compare-after">After</span>
501
+ * <div class="asta-compare-track asta-image-compare-guide"><div class="asta-image-compare-line"></div>
502
+ * <div class="asta-image-compare-handle" data-asta-compare-handle role="slider" tabindex="0" aria-valuemin="0" aria-valuemax="100" aria-valuenow="50"><svg>…</svg></div></div></div> */
503
+ .asta-image-compare {
504
+ @apply relative aspect-[4/3] w-full cursor-ew-resize touch-pan-y select-none overflow-hidden rounded-xl bg-paper-2;
505
+ }
506
+ .asta-image-compare-layer {
507
+ @apply absolute inset-0;
508
+ }
509
+ .asta-image-compare-clip {
510
+ @apply absolute inset-0 overflow-hidden;
511
+ }
512
+ .asta-image-compare-img {
513
+ @apply pointer-events-none h-full w-full select-none object-cover;
514
+ }
515
+ .asta-image-compare-tag {
516
+ @apply pointer-events-none absolute top-3 rounded-md bg-paper/80 px-2 py-1 text-[11.5px] font-medium text-ink backdrop-blur transition-opacity duration-300;
517
+ }
518
+ .asta-image-compare-before {
519
+ @apply left-3;
520
+ [data-hide-before] > & {
521
+ @apply opacity-0;
522
+ }
523
+ }
524
+ .asta-image-compare-after {
525
+ @apply right-3;
526
+ [data-hide-after] > & {
527
+ @apply opacity-0;
528
+ }
529
+ }
530
+ .asta-image-compare-guide {
531
+ @apply pointer-events-none absolute inset-0;
532
+ }
533
+ .asta-image-compare-line {
534
+ @apply absolute inset-y-0 left-0 w-0.5 -translate-x-1/2 bg-paper shadow-[0_0_0_0.5px_rgb(0_0_0/0.12)];
535
+ }
536
+ .asta-image-compare-handle {
537
+ @apply pointer-events-auto absolute left-0 top-1/2 grid h-9 w-9 -translate-x-1/2 -translate-y-1/2 place-items-center rounded-full bg-paper text-ink outline-none;
538
+ @apply shadow-[0_6px_18px_-6px_rgb(0_0_0/0.4),0_0_0_1px_rgb(0_0_0/0.06)] focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2 focus-visible:ring-offset-paper;
539
+ & > svg {
540
+ @apply h-4 w-4 transition-transform duration-300 ease-[cubic-bezier(.16,1,.3,1)];
541
+ }
542
+ .asta-image-compare:hover & > svg {
543
+ @apply scale-110;
544
+ }
545
+ .asta-image-compare[data-dragging] & > svg {
546
+ @apply !scale-90;
547
+ }
548
+ }
549
+
550
+ /* ---- Carousel ----
551
+ * <div class="asta-carousel asta-carousel-root" data-asta-carousel data-index="0" data-autoplay="5000" role="region" aria-roledescription="carousel" tabindex="0">
552
+ * <div class="asta-carousel-track asta-carousel-slides" data-asta-carousel-track aria-live="polite">
553
+ * <div id="c-slide-0" class="asta-carousel-slide" data-asta-carousel-slide role="group" aria-roledescription="slide">…</div>…</div>
554
+ * <div class="asta-carousel-bar"><div class="asta-carousel-dots" style="width:58px">
555
+ * <button class="asta-carousel-dot" data-asta-carousel-dot="0" aria-current="true" style="width:30px;transform:translateX(0)">
556
+ * <span class="asta-carousel-pip"></span><span class="asta-carousel-pill"><span class="asta-carousel-fill asta-carousel-progress" data-asta-carousel-fill></span></span></button>…</div>
557
+ * <div class="asta-carousel-arrows"><button class="asta-carousel-arrow" data-asta-carousel-step="-1">…</button>…</div></div></div>
558
+ * Dots: 14px apart, the current one 30px wide. Width = (n-1)*14+30. asta.js moves them after the first slide change. */
559
+ .asta-carousel-root {
560
+ @apply flex w-full min-w-0 flex-col gap-4 rounded-[14px] outline-none focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-4 focus-visible:ring-offset-paper;
561
+ }
562
+ .asta-carousel-slides {
563
+ @apply flex snap-x snap-mandatory gap-3 overflow-x-auto overscroll-x-contain rounded-[14px];
564
+ }
565
+ .asta-carousel-slide {
566
+ @apply w-full shrink-0 snap-start snap-always;
567
+ }
568
+ .asta-carousel-bar {
569
+ @apply flex items-center justify-between gap-4;
570
+ }
571
+ .asta-carousel-dots {
572
+ @apply relative h-6;
573
+ }
574
+ .asta-carousel-dot {
575
+ @apply absolute left-0 top-0 h-6 rounded-md outline-none transition-transform duration-500 ease-[cubic-bezier(.16,1,.3,1)] focus-visible:ring-2 focus-visible:ring-brand/50 motion-reduce:transition-none;
576
+ }
577
+ .asta-carousel-pip {
578
+ @apply absolute left-1 top-[9px] h-1.5 w-1.5 rounded-full bg-[color-mix(in_srgb,var(--ink)_22%,transparent)] transition-[opacity,background-color] duration-300;
579
+ .asta-carousel-dot:hover > & {
580
+ @apply bg-[color-mix(in_srgb,var(--ink)_40%,transparent)];
581
+ }
582
+ [aria-current] > & {
583
+ @apply opacity-0;
584
+ }
585
+ }
586
+ .asta-carousel-pill {
587
+ @apply absolute left-1 top-[9px] h-1.5 w-[22px] origin-left scale-x-[0.2727] overflow-hidden rounded-full bg-[color-mix(in_srgb,var(--ink)_14%,transparent)] opacity-0;
588
+ @apply transition-[opacity,transform] duration-500 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none;
589
+ [aria-current] > & {
590
+ @apply scale-x-100 opacity-100;
591
+ }
592
+ }
593
+ .asta-carousel-progress {
594
+ @apply absolute inset-0 origin-left rounded-full bg-brand;
595
+ }
596
+ .asta-carousel-arrows {
597
+ @apply flex items-center gap-1;
598
+ }
599
+ .asta-carousel-arrow {
600
+ @apply flex h-8 w-8 items-center justify-center rounded-lg text-ink outline-none transition-[background-color,opacity,transform] duration-200 hover:bg-paper-2;
601
+ @apply focus-visible:ring-2 focus-visible:ring-brand/50 active:scale-95 disabled:pointer-events-none disabled:opacity-30 [&>svg]:h-4 [&>svg]:w-4;
602
+ }
603
+
604
+ /* ---- Notification center ----
605
+ * <span class="asta-nc asta-notification-center" data-asta-nc data-label="Notifications" data-url="/notifications/read">
606
+ * <button class="asta-notification-center-bell" data-asta-nc-trigger aria-haspopup="dialog" aria-expanded="false" aria-controls="nc">
607
+ * <span class="asta-notification-center-bell-icon">…</span><span class="asta-notification-center-badge" data-asta-nc-badge><span data-asta-nc-count>2</span></span></button>
608
+ * <div id="nc" role="dialog" class="asta-notification-center-panel" data-asta-nc-panel data-tab="all" hidden>…</div></span>
609
+ * Entries: <li class="asta-notification-center-entry" data-asta-nc-entry="n1" [data-read]>, with a .asta-notification-center-item and a
610
+ * .asta-notification-center-dot. Add .asta-nc-ring on the bell icon to ring it once. data-align="start" opens to the right. */
611
+ .asta-notification-center {
612
+ @apply relative inline-flex;
613
+ }
614
+ .asta-notification-center-bell {
615
+ @apply relative grid h-9 w-9 place-items-center rounded-lg text-ink-2 outline-none transition-colors duration-200 hover:bg-paper-2 hover:text-ink;
616
+ @apply focus-visible:ring-2 focus-visible:ring-brand/50 aria-expanded:bg-paper-2 aria-expanded:text-ink;
617
+ }
618
+ .asta-notification-center-bell-icon {
619
+ @apply grid origin-[50%_15%] place-items-center [&>svg]:h-[18px] [&>svg]:w-[18px];
620
+ }
621
+ .asta-notification-center-badge {
622
+ @apply absolute -right-0.5 -top-0.5 flex h-[18px] min-w-[18px] items-center justify-center overflow-hidden rounded-full bg-brand px-1 text-[10.5px] font-medium tabular-nums text-white shadow-[0_0_0_2px_var(--paper)];
623
+ & > span {
624
+ @apply block;
625
+ }
626
+ }
627
+ .asta-notification-center-panel {
628
+ @apply absolute right-0 top-full z-50 mt-2 w-[380px] max-w-[calc(100vw-32px)] overflow-hidden rounded-xl bg-paper text-left;
629
+ @apply shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_16px_40px_-14px_rgb(0_0_0/0.3),0_4px_10px_-6px_rgb(0_0_0/0.12)];
630
+ [data-align="start"] > & {
631
+ @apply left-0 right-auto;
632
+ }
633
+ }
634
+ .asta-notification-center-inner {
635
+ @apply flex max-h-[min(520px,calc(100vh-96px))] flex-col;
636
+ }
637
+ .asta-notification-center-header {
638
+ @apply flex items-center justify-between gap-3 px-4 pb-2 pt-3.5;
639
+ }
640
+ .asta-notification-center-title {
641
+ @apply text-[14px] font-medium tracking-[-0.01em] text-ink;
642
+ }
643
+ .asta-notification-center-all {
644
+ @apply rounded-md px-2 py-1 text-[12.5px] text-brand outline-none transition-[color,opacity] duration-200 hover:bg-[color-mix(in_srgb,var(--brand)_8%,transparent)];
645
+ @apply focus-visible:ring-2 focus-visible:ring-brand/50 aria-disabled:pointer-events-none aria-disabled:text-mute aria-disabled:opacity-50;
646
+ }
647
+ .asta-notification-center-tabs {
648
+ @apply relative mx-4 grid grid-cols-2 rounded-lg bg-paper-2 p-0.5;
649
+ }
650
+ .asta-notification-center-thumb {
651
+ @apply absolute bottom-0.5 left-0.5 top-0.5 w-[calc(50%-2px)] rounded-[7px] bg-paper shadow-[0_1px_2px_rgb(0_0_0/0.08),inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_7%,transparent)];
652
+ @apply transition-transform duration-500 ease-[cubic-bezier(.16,1,.3,1)];
653
+ }
654
+ .asta-notification-center-tab {
655
+ @apply relative z-10 flex h-7 items-center justify-center gap-1.5 rounded-[7px] text-[12.5px] text-mute outline-none transition-colors duration-300;
656
+ @apply hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50 aria-selected:text-ink;
657
+ }
658
+ .asta-notification-center-tabcount {
659
+ @apply text-[11.5px] tabular-nums text-mute;
660
+ }
661
+ .asta-notification-center-body {
662
+ @apply mt-2 min-h-0 flex-1 overflow-y-auto pb-2 [scrollbar-width:thin];
663
+ }
664
+ .asta-notification-center-day {
665
+ @apply px-4 pb-1 pt-3 text-[11.5px] font-medium text-mute;
666
+ }
667
+ .asta-notification-center-entry {
668
+ @apply relative px-1.5;
669
+ }
670
+ .asta-notification-center-item {
671
+ @apply flex w-full gap-3 rounded-[10px] py-2.5 pl-2.5 pr-9 text-left outline-none transition-colors duration-200 hover:bg-paper-2 focus-visible:bg-paper-2 focus-visible:ring-2 focus-visible:ring-brand/50;
672
+ }
673
+ .asta-notification-center-icon {
674
+ @apply grid h-8 w-8 shrink-0 place-items-center rounded-full bg-paper-2 text-mute [&>svg]:h-4 [&>svg]:w-4;
675
+ }
676
+ .asta-notification-center-text {
677
+ @apply min-w-0 flex-1;
678
+ }
679
+ .asta-notification-center-item-title {
680
+ @apply block text-[13px] leading-snug text-ink transition-colors duration-300;
681
+ [data-read] & {
682
+ @apply text-ink-2;
683
+ }
684
+ }
685
+ .asta-notification-center-unread {
686
+ @apply sr-only;
687
+ [data-read] & {
688
+ @apply hidden;
689
+ }
690
+ }
691
+ .asta-notification-center-item-body {
692
+ @apply mt-0.5 line-clamp-2 block text-[12.5px] leading-snug text-mute;
693
+ }
694
+ .asta-notification-center-time {
695
+ @apply mt-1 block text-[11.5px] tabular-nums text-mute;
696
+ }
697
+ .asta-notification-center-dot {
698
+ @apply absolute right-3 top-3.5 grid h-6 w-6 place-items-center rounded-full outline-none transition-[opacity,transform] duration-500 ease-[cubic-bezier(.16,1,.3,1)];
699
+ @apply hover:scale-110 focus-visible:ring-2 focus-visible:ring-brand/50;
700
+ & > span {
701
+ @apply h-2 w-2 rounded-full bg-brand;
702
+ }
703
+ [data-read] > & {
704
+ @apply pointer-events-none scale-50 opacity-0;
705
+ }
706
+ }
707
+ .asta-notification-center-empty {
708
+ @apply flex flex-col items-center px-6 py-12 text-center;
709
+ }
710
+ .asta-notification-center-empty-icon {
711
+ @apply grid h-11 w-11 place-items-center rounded-full bg-paper-2 text-mute [&>svg]:h-5 [&>svg]:w-5;
712
+ }
713
+ .asta-notification-center-empty-title {
714
+ @apply mt-4 text-[14px] font-medium text-ink;
715
+ }
716
+ .asta-notification-center-empty-text {
717
+ @apply mt-1 text-[12.5px] text-mute;
718
+ }
719
+
720
+ /* ---- Comments ----
721
+ * <section id="talk" class="asta-comments asta-comments-root" data-asta-comments>
722
+ * <h3 class="asta-comments-title">Discussion <span class="asta-comments-total" data-asta-comments-total>3</span></h3>
723
+ * <div id="talk-list" class="asta-comments-list"><div data-asta-comment-thread="c1">
724
+ * <article class="asta-comments-item" data-asta-comment="c1"><span class="asta-avatar asta-avatar-sm">…</span><div class="asta-comments-main">
725
+ * <header class="asta-comments-meta"><span class="asta-comments-author">Maya</span><span class="asta-comments-time">2h</span></header>
726
+ * <p class="asta-comments-text">…</p><div class="asta-comments-actions"><button class="asta-comments-like" data-asta-comment-like aria-pressed="false">…</button>
727
+ * <button class="asta-comments-reply" data-asta-comment-reply="c1" data-name="Maya">Reply</button></div></div></article>
728
+ * <div class="asta-comments-replies" data-asta-comment-replies><span class="asta-comments-line"></span><div class="asta-comments-reply-list" data-asta-comment-list>…</div></div>
729
+ * </div></div>
730
+ * <div class="asta-comments-footer"><form class="asta-comments-form" data-asta-comment-form>…</form></div>
731
+ * <template data-asta-comments-replybox><div data-asta-comment-replybox class="asta-comment-new"><form class="asta-comments-form" data-asta-comment-form data-reply>…</form></div></template></section> */
732
+ .asta-comments-root {
733
+ @apply w-full max-w-[560px];
734
+ }
735
+ .asta-comments-title {
736
+ @apply mb-5 flex items-baseline gap-2 text-[15px] font-medium tracking-[-0.01em] text-ink;
737
+ }
738
+ .asta-comments-total {
739
+ @apply text-[12.5px] font-normal tabular-nums text-mute;
740
+ }
741
+ .asta-comments-list {
742
+ @apply flex flex-col gap-6;
743
+ }
744
+ .asta-comments-replies {
745
+ @apply relative mt-4 hidden flex-col gap-4 pl-11 has-[article,form]:flex;
746
+ }
747
+ .asta-comments-line {
748
+ @apply absolute bottom-1 left-4 top-0 w-px bg-[color-mix(in_srgb,var(--ink)_9%,transparent)];
749
+ }
750
+ .asta-comments-reply-list {
751
+ @apply flex flex-col gap-4;
752
+ }
753
+ .asta-comments-item {
754
+ @apply flex gap-3;
755
+ }
756
+ .asta-comments-main {
757
+ @apply min-w-0 flex-1;
758
+ }
759
+ .asta-comments-meta {
760
+ @apply flex items-baseline gap-2;
761
+ }
762
+ .asta-comments-author {
763
+ @apply text-[13.5px] font-medium text-ink;
764
+ }
765
+ .asta-comments-time {
766
+ @apply text-[12px] text-mute;
767
+ }
768
+ .asta-comments-text {
769
+ @apply mt-0.5 whitespace-pre-wrap break-words text-[14px] leading-relaxed text-ink-2;
770
+ }
771
+ .asta-comments-actions {
772
+ @apply -ml-2.5 mt-1.5 flex items-center gap-0.5;
773
+ }
774
+ .asta-comments-like {
775
+ @apply inline-flex h-7 items-center gap-1.5 rounded-full px-2.5 text-[12px] tabular-nums text-mute outline-none transition-colors duration-200 hover:bg-paper-2 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50;
776
+ @apply aria-pressed:bg-[color-mix(in_srgb,var(--brand)_10%,transparent)] aria-pressed:text-brand aria-pressed:hover:bg-[color-mix(in_srgb,var(--brand)_14%,transparent)] aria-pressed:hover:text-brand;
777
+ & > svg {
778
+ @apply h-3.5 w-3.5 fill-none;
779
+ }
780
+ &[aria-pressed="true"] > svg {
781
+ @apply fill-current;
782
+ }
783
+ }
784
+ .asta-comments-likes {
785
+ @apply relative inline-flex overflow-hidden;
786
+ & > span {
787
+ @apply block;
788
+ }
789
+ }
790
+ .asta-comments-reply {
791
+ @apply inline-flex h-7 items-center rounded-full px-2.5 text-[12px] text-mute outline-none transition-colors hover:bg-paper-2 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50;
792
+ }
793
+ .asta-comments-footer {
794
+ @apply mt-8;
795
+ }
796
+ .asta-comments-form {
797
+ @apply flex gap-3;
798
+ }
799
+ .asta-comments-box {
800
+ @apply min-w-0 flex-1 rounded-[10px] bg-paper shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_12%,transparent)] transition-shadow duration-200;
801
+ @apply focus-within:shadow-[inset_0_0_0_1px_var(--brand),0_0_0_3px_color-mix(in_srgb,var(--brand)_14%,transparent)];
802
+ }
803
+ .asta-comments-input {
804
+ @apply block max-h-40 min-h-[44px] w-full resize-none bg-transparent px-3 pt-2.5 text-[14px] leading-relaxed text-ink outline-none [field-sizing:content] placeholder:text-mute;
805
+ }
806
+ .asta-comments-submit {
807
+ @apply flex items-center justify-end gap-1.5 px-2 pb-2;
808
+ }
809
+
810
+ /* ---- Motion button ----
811
+ * <button class="asta-motion asta-motion-button asta-motion-button-fill" data-asta-mb="fill">
812
+ * <span class="asta-mb-fill asta-motion-button-wipe" aria-hidden="true"></span><span class="asta-motion-button-label">Get started</span></button>
813
+ * Variants (set the same name in data-asta-mb): roll (default) fill arrow shine beam press copy confirm.
814
+ * roll: <span class="asta-motion-button-roll" aria-hidden="true"><span class="asta-motion-button-letters">
815
+ * <span class="asta-motion-button-letter" data-l="S" style="transition-delay:0ms">S</span>…</span></span> (+ aria-label on the button)
816
+ * arrow: asta-mb-grow.asta-motion-button-pad, .asta-motion-button-label, .asta-motion-button-arrows > svg.asta-motion-button-arrow-out + svg.asta-motion-button-arrow-in
817
+ * shine: asta-mb-shine.asta-motion-button-gleam, .asta-motion-button-label
818
+ * beam: .asta-motion-button-orbit > .asta-mb-beam.asta-motion-button-ray, then .asta-motion-button-face
819
+ * copy: data-value="…"; .asta-motion-button-icons > svg.asta-motion-button-icon-copy + svg.asta-mb-pop.asta-motion-button-icon-done,
820
+ * .asta-motion-button-swap > .asta-motion-button-swap-col > span + span, <span role="status" class="sr-only" data-asta-mb-status>
821
+ * confirm: data-stage="idle" data-timeout="3000"; asta-mb-drain.asta-motion-button-timer, then three
822
+ * .asta-mb-pop.asta-motion-button-stage spans with -stage-idle, -stage-ask, -stage-done. */
823
+ .asta-motion-button {
824
+ @apply relative inline-flex h-11 shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-[10px] px-5 text-[14px] font-medium tracking-[-0.01em] outline-none;
825
+ @apply transition-[transform,background-color,color,box-shadow] duration-300 active:scale-[0.97] focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-2 focus-visible:ring-offset-paper;
826
+ @apply disabled:pointer-events-none disabled:opacity-45;
827
+ @apply bg-ink text-paper shadow-[inset_0_1px_0_rgb(255_255_255/0.18),0_1px_2px_rgb(0_0_0/0.16),0_6px_14px_-8px_rgb(0_0_0/0.45)];
828
+ }
829
+ .asta-motion-button-fill {
830
+ @apply overflow-hidden bg-paper text-ink shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)];
831
+ }
832
+ .asta-motion-button-arrow {
833
+ @apply overflow-hidden bg-paper-2 !pl-5 !pr-1.5 text-ink shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)];
834
+ }
835
+ .asta-motion-button-shine {
836
+ @apply overflow-hidden bg-brand text-white;
837
+ }
838
+ .asta-motion-button-beam {
839
+ @apply overflow-hidden bg-[color-mix(in_srgb,var(--ink)_10%,transparent)] !p-[1.5px] shadow-none;
840
+ }
841
+ .asta-motion-button-press {
842
+ @apply !rounded-[9px] bg-ink text-paper !duration-100 active:!scale-100;
843
+ @apply shadow-[0_5px_0_color-mix(in_srgb,var(--ink)_55%,black),0_8px_16px_-6px_rgb(0_0_0/0.45)];
844
+ @apply -translate-y-[2px] hover:-translate-y-[3px] hover:shadow-[0_6px_0_color-mix(in_srgb,var(--ink)_55%,black),0_10px_18px_-6px_rgb(0_0_0/0.45)];
845
+ @apply active:translate-y-[3px] active:shadow-[0_0_0_color-mix(in_srgb,var(--ink)_55%,black),0_2px_4px_-2px_rgb(0_0_0/0.45)];
846
+ }
847
+ .asta-motion-button-copy {
848
+ @apply bg-paper text-ink shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)];
849
+ }
850
+ .asta-motion-button-confirm {
851
+ @apply overflow-hidden bg-paper text-[#e5484d] shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)];
852
+ @apply data-[stage=ask]:bg-[#e5484d] data-[stage=ask]:text-white data-[stage=ask]:shadow-[inset_0_1px_0_rgb(255_255_255/0.18),0_1px_2px_rgb(0_0_0/0.16),0_6px_14px_-8px_rgb(0_0_0/0.45)];
853
+ @apply data-[stage=done]:bg-paper-2 data-[stage=done]:text-ink-2 data-[stage=done]:shadow-none;
854
+ }
855
+ /* roll */
856
+ .asta-motion-button-roll {
857
+ @apply relative block overflow-hidden leading-[1.25];
858
+ }
859
+ .asta-motion-button-letters {
860
+ @apply flex;
861
+ }
862
+ .asta-motion-button-letter {
863
+ @apply relative inline-block whitespace-pre transition-transform duration-500 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none;
864
+ @apply after:absolute after:left-0 after:top-full after:content-[attr(data-l)];
865
+ .asta-motion-button:is(:hover, :focus-visible) & {
866
+ @apply -translate-y-full;
867
+ }
868
+ }
869
+ /* fill, arrow, shine, beam */
870
+ .asta-motion-button-label {
871
+ @apply relative inline-flex items-center gap-2;
872
+ .asta-motion-button-fill > & {
873
+ @apply transition-colors duration-300;
874
+ }
875
+ .asta-motion-button-fill:is(:hover, :focus-visible) > & {
876
+ @apply text-paper;
877
+ }
878
+ .asta-motion-button-arrow > & {
879
+ @apply block transition-[transform,color] duration-500 ease-[cubic-bezier(.16,1,.3,1)];
880
+ }
881
+ .asta-motion-button-arrow:hover > & {
882
+ @apply translate-x-1 text-white;
883
+ }
884
+ .asta-motion-button-arrow:focus-visible > & {
885
+ @apply text-white;
886
+ }
887
+ }
888
+ .asta-motion-button-wipe {
889
+ @apply absolute inset-0 bg-ink;
890
+ }
891
+ .asta-motion-button-pad {
892
+ @apply absolute inset-1.5 rounded-[7px] bg-brand;
893
+ }
894
+ .asta-motion-button-arrows {
895
+ @apply relative ml-2 grid h-8 w-8 place-items-center overflow-hidden text-white;
896
+ & > svg {
897
+ @apply col-start-1 row-start-1 h-4 w-4 transition-transform duration-500 ease-[cubic-bezier(.16,1,.3,1)];
898
+ }
899
+ }
900
+ .asta-motion-button-arrow-in {
901
+ @apply -translate-x-6;
902
+ .asta-motion-button:hover & {
903
+ @apply translate-x-0;
904
+ }
905
+ }
906
+ .asta-motion-button-arrow-out {
907
+ .asta-motion-button:hover & {
908
+ @apply translate-x-6;
909
+ }
910
+ }
911
+ .asta-motion-button-gleam {
912
+ @apply pointer-events-none absolute inset-y-0 left-0 w-1/3 bg-gradient-to-r from-transparent via-white/45 to-transparent;
913
+ }
914
+ .asta-motion-button-orbit {
915
+ @apply absolute left-1/2 top-1/2 aspect-square w-[300%] -translate-x-1/2 -translate-y-1/2;
916
+ }
917
+ .asta-motion-button-ray {
918
+ @apply absolute inset-0;
919
+ }
920
+ .asta-motion-button-face {
921
+ @apply relative inline-flex h-full w-full items-center justify-center gap-2 rounded-md bg-paper px-5 text-ink;
922
+ }
923
+ /* copy */
924
+ .asta-motion-button-icons {
925
+ @apply relative grid h-4 w-4 place-items-center;
926
+ & > svg {
927
+ @apply col-start-1 row-start-1 h-4 w-4;
928
+ }
929
+ }
930
+ .asta-motion-button-icon-copy {
931
+ @apply transition-[transform,opacity] duration-300 ease-[cubic-bezier(.16,1,.3,1)];
932
+ [data-done] & {
933
+ @apply scale-50 opacity-0;
934
+ }
935
+ }
936
+ .asta-motion-button-icon-done {
937
+ @apply hidden text-[#30a46c];
938
+ [data-done] & {
939
+ @apply block;
940
+ }
941
+ }
942
+ .asta-motion-button-swap {
943
+ @apply relative block h-[1.25em] overflow-hidden leading-[1.25];
944
+ }
945
+ .asta-motion-button-swap-col {
946
+ @apply flex flex-col transition-transform duration-500 ease-[cubic-bezier(.16,1,.3,1)];
947
+ [data-done] & {
948
+ @apply -translate-y-1/2;
949
+ }
950
+ }
951
+ /* confirm */
952
+ .asta-motion-button-timer {
953
+ @apply absolute inset-x-0 bottom-0 hidden h-[3px] origin-left bg-white/60;
954
+ [data-stage="ask"] > & {
955
+ @apply block;
956
+ }
957
+ }
958
+ .asta-motion-button-stage {
959
+ @apply relative hidden items-center gap-2 [&>svg]:h-4 [&>svg]:w-4;
960
+ }
961
+ [data-stage="idle"] > .asta-motion-button-stage-idle,
962
+ [data-stage="ask"] > .asta-motion-button-stage-ask,
963
+ [data-stage="done"] > .asta-motion-button-stage-done {
964
+ @apply inline-flex;
965
+ }