@duskmoon-dev/core 1.17.2 → 1.18.1

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.
@@ -180,6 +180,56 @@
180
180
  filter: none;
181
181
  }
182
182
 
183
+ /* Semantic Colors — must precede outline/ghost/text/tonal so those variants
184
+ can override the filled background at equal specificity. */
185
+ .btn-info {
186
+ --btn-text-color: var(--color-info-content);
187
+ background-color: var(--color-info);
188
+ border-color: var(--color-info);
189
+ }
190
+
191
+ .btn-info:hover {
192
+ background-color: color-mix(in oklch, var(--color-info), black 10%);
193
+ border-color: color-mix(in oklch, var(--color-info), black 10%);
194
+ filter: none;
195
+ }
196
+
197
+ .btn-success {
198
+ --btn-text-color: var(--color-success-content);
199
+ background-color: var(--color-success);
200
+ border-color: var(--color-success);
201
+ }
202
+
203
+ .btn-success:hover {
204
+ background-color: color-mix(in oklch, var(--color-success), black 10%);
205
+ border-color: color-mix(in oklch, var(--color-success), black 10%);
206
+ filter: none;
207
+ }
208
+
209
+ .btn-warning {
210
+ --btn-text-color: var(--color-warning-content);
211
+ background-color: var(--color-warning);
212
+ border-color: var(--color-warning);
213
+ }
214
+
215
+ .btn-warning:hover {
216
+ background-color: color-mix(in oklch, var(--color-warning), black 10%);
217
+ border-color: color-mix(in oklch, var(--color-warning), black 10%);
218
+ filter: none;
219
+ }
220
+
221
+ .btn-error {
222
+ --btn-text-color: var(--color-error-content);
223
+ background-color: var(--color-error);
224
+ border-color: var(--color-error);
225
+ }
226
+
227
+ .btn-error:hover {
228
+ background-color: color-mix(in oklch, var(--color-error), black 10%);
229
+ border-color: color-mix(in oklch, var(--color-error), black 10%);
230
+ filter: none;
231
+ }
232
+
183
233
  /* Outline / Outlined Variant (.btn-outlined is an alias) */
184
234
  .btn-outline,
185
235
  .btn-outlined {
@@ -539,55 +589,6 @@
539
589
  background-color: var(--color-error-container);
540
590
  }
541
591
 
542
- /* Semantic Colors */
543
- .btn-info {
544
- --btn-text-color: var(--color-info-content);
545
- background-color: var(--color-info);
546
- border-color: var(--color-info);
547
- }
548
-
549
- .btn-info:hover {
550
- background-color: color-mix(in oklch, var(--color-info), black 10%);
551
- border-color: color-mix(in oklch, var(--color-info), black 10%);
552
- filter: none;
553
- }
554
-
555
- .btn-success {
556
- --btn-text-color: var(--color-success-content);
557
- background-color: var(--color-success);
558
- border-color: var(--color-success);
559
- }
560
-
561
- .btn-success:hover {
562
- background-color: color-mix(in oklch, var(--color-success), black 10%);
563
- border-color: color-mix(in oklch, var(--color-success), black 10%);
564
- filter: none;
565
- }
566
-
567
- .btn-warning {
568
- --btn-text-color: var(--color-warning-content);
569
- background-color: var(--color-warning);
570
- border-color: var(--color-warning);
571
- }
572
-
573
- .btn-warning:hover {
574
- background-color: color-mix(in oklch, var(--color-warning), black 10%);
575
- border-color: color-mix(in oklch, var(--color-warning), black 10%);
576
- filter: none;
577
- }
578
-
579
- .btn-error {
580
- --btn-text-color: var(--color-error-content);
581
- background-color: var(--color-error);
582
- border-color: var(--color-error);
583
- }
584
-
585
- .btn-error:hover {
586
- background-color: color-mix(in oklch, var(--color-error), black 10%);
587
- border-color: color-mix(in oklch, var(--color-error), black 10%);
588
- filter: none;
589
- }
590
-
591
592
  /* Size Variants */
592
593
  .btn-xs {
593
594
  --btn-p: 0.5rem;
@@ -3385,198 +3386,567 @@
3385
3386
  }
3386
3387
  }
3387
3388
 
3388
- /**
3389
- * Chat Component Styles
3390
- * DuskMoonUI - LLM-oriented chat primitives
3391
- */
3392
-
3393
3389
  @layer components {
3394
- .chat {
3390
+ /**
3391
+ * Scrollable transcript with Scroll-Driven Animations indicators.
3392
+ * Set an explicit height / max-height (or place in a flex child with min-height: 0).
3393
+ * Pair each .chat[data-chat-tl="N"] with .chat-scroll-indicator[data-chat-tl="N"] (N = 1..24).
3394
+ */
3395
+ .chat-scroll {
3396
+ --chat-scroll-indicator-size: 0.875rem;
3397
+ --chat-scroll-indicator-active-size: 1.125rem;
3398
+ --chat-scroll-indicator-thickness: 0.1875rem;
3399
+ --chat-scroll-indicator-gap: 0.3125rem;
3400
+ --chat-scroll-indicator-hover-scale: 1.55;
3401
+ --chat-scroll-indicator-neighbor-scale: 1.22;
3402
+
3403
+ container-type: size;
3404
+ container-name: chat-scroll;
3395
3405
  display: grid;
3396
3406
  grid-template-columns: auto minmax(0, 1fr);
3397
3407
  column-gap: 0.75rem;
3398
- align-items: end;
3399
- padding: 0.25rem 0;
3408
+ align-items: start;
3409
+ min-height: 0;
3410
+ overflow-x: hidden;
3411
+ overflow-y: auto;
3412
+ scroll-behavior: smooth;
3413
+ overscroll-behavior-y: contain;
3414
+ timeline-scope:
3415
+ --chat-1,
3416
+ --chat-2,
3417
+ --chat-3,
3418
+ --chat-4,
3419
+ --chat-5,
3420
+ --chat-6,
3421
+ --chat-7,
3422
+ --chat-8,
3423
+ --chat-9,
3424
+ --chat-10,
3425
+ --chat-11,
3426
+ --chat-12,
3427
+ --chat-13,
3428
+ --chat-14,
3429
+ --chat-15,
3430
+ --chat-16,
3431
+ --chat-17,
3432
+ --chat-18,
3433
+ --chat-19,
3434
+ --chat-20,
3435
+ --chat-21,
3436
+ --chat-22,
3437
+ --chat-23,
3438
+ --chat-24;
3439
+ }
3440
+
3441
+ .chat-scroll-track {
3442
+ position: sticky;
3443
+ top: 0;
3444
+ z-index: 1;
3445
+ display: flex;
3446
+ flex-direction: column;
3447
+ justify-content: center;
3448
+ align-items: center;
3449
+ gap: var(--chat-scroll-indicator-gap);
3450
+ width: calc(
3451
+ var(--chat-scroll-indicator-active-size) * var(--chat-scroll-indicator-hover-scale)
3452
+ );
3453
+ height: 100cqh;
3454
+ margin: 0;
3455
+ padding: 0.75rem 0;
3456
+ overflow: visible;
3457
+ list-style: none;
3458
+ pointer-events: none;
3400
3459
  }
3401
3460
 
3402
- .chat-start {
3403
- grid-template-columns: auto minmax(0, 1fr);
3461
+ .chat-scroll-body {
3462
+ display: flex;
3463
+ flex-direction: column;
3464
+ min-width: 0;
3404
3465
  }
3405
3466
 
3406
- .chat-end {
3407
- grid-template-columns: minmax(0, 1fr) auto;
3467
+ .chat-scroll-indicator {
3468
+ display: block;
3469
+ flex-shrink: 0;
3470
+ width: var(--chat-scroll-indicator-size);
3471
+ height: var(--chat-scroll-indicator-thickness);
3472
+ border: 0;
3473
+ border-radius: 999px;
3474
+ padding: 0;
3475
+ appearance: none;
3476
+ background-color: color-mix(in oklch, var(--color-on-surface) 28%, transparent);
3477
+ color: inherit;
3478
+ font: inherit;
3479
+ opacity: 0.45;
3480
+ pointer-events: auto;
3481
+ text-decoration: none;
3482
+ cursor: pointer;
3483
+ transform: scaleX(1);
3484
+ transform-origin: center;
3485
+ transition:
3486
+ transform 140ms ease,
3487
+ opacity 140ms ease,
3488
+ background-color 140ms ease;
3408
3489
  }
3409
3490
 
3410
- .chat-avatar {
3411
- grid-row: 1 / span 999;
3412
- grid-column: 1;
3413
- align-self: start;
3414
- justify-self: start;
3491
+ .chat-scroll-indicator:hover,
3492
+ .chat-scroll-indicator:focus-visible {
3493
+ transform: scaleX(var(--chat-scroll-indicator-hover-scale)) scaleY(1.35);
3494
+ background-color: var(--color-on-surface);
3495
+ opacity: 1;
3415
3496
  }
3416
3497
 
3417
- .chat-end .chat-avatar {
3418
- grid-column: 2;
3419
- justify-self: end;
3498
+ .chat-scroll-indicator:hover + .chat-scroll-indicator,
3499
+ .chat-scroll-indicator:has(+ .chat-scroll-indicator:hover) {
3500
+ transform: scaleX(var(--chat-scroll-indicator-neighbor-scale)) scaleY(1.15);
3501
+ background-color: color-mix(in oklch, var(--color-on-surface) 55%, transparent);
3502
+ opacity: 0.75;
3420
3503
  }
3421
3504
 
3422
- .chat > :not(.chat-avatar) {
3423
- grid-column: 2;
3424
- justify-self: start;
3425
- max-width: 100%;
3426
- margin-bottom: 0.25rem;
3505
+ .chat[data-chat-tl] {
3506
+ scroll-margin-block-start: 0.5rem;
3427
3507
  }
3428
3508
 
3429
- .chat-end > :not(.chat-avatar) {
3430
- grid-column: 1;
3431
- justify-self: end;
3509
+ .chat-scroll-indicator:focus-visible {
3510
+ outline: none;
3511
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 20%, transparent);
3432
3512
  }
3433
3513
 
3434
- .chat-header,
3435
- .chat-footer {
3436
- color: var(--color-on-surface-variant);
3437
- font-size: 0.75rem;
3438
- line-height: 1rem;
3514
+ @supports (animation-timeline: --chat-1) {
3515
+ .chat-scroll-indicator {
3516
+ animation-name: chat-scroll-indicator-activate;
3517
+ animation-duration: 1ms;
3518
+ animation-timing-function: linear;
3519
+ animation-fill-mode: both;
3520
+ animation-range: entry 0% exit 100%;
3521
+ }
3439
3522
  }
3440
3523
 
3441
- .chat-header {
3442
- margin-bottom: 0.125rem;
3524
+ .chat[data-chat-tl="1"] {
3525
+ view-timeline-name: --chat-1;
3526
+ view-timeline-axis: block;
3443
3527
  }
3444
3528
 
3445
- .chat-footer {
3446
- margin-top: 0.125rem;
3447
- margin-bottom: 0;
3529
+ .chat[data-chat-tl="2"] {
3530
+ view-timeline-name: --chat-2;
3531
+ view-timeline-axis: block;
3448
3532
  }
3449
3533
 
3450
- .chat-bubble {
3451
- --chat-bubble-bg: var(--color-surface-container-highest);
3452
- --chat-bubble-fg: var(--color-on-surface);
3534
+ .chat[data-chat-tl="3"] {
3535
+ view-timeline-name: --chat-3;
3536
+ view-timeline-axis: block;
3537
+ }
3453
3538
 
3454
- position: relative;
3455
- max-width: min(80ch, 100%);
3456
- padding: 0.625rem 0.875rem;
3457
- border-radius: 1rem;
3458
- background-color: var(--chat-bubble-bg);
3459
- color: var(--chat-bubble-fg);
3460
- box-shadow: inset 0 0 0 1px var(--color-outline-variant);
3461
- font-size: 0.875rem;
3462
- line-height: 1.45;
3463
- overflow-wrap: anywhere;
3464
- word-break: break-word;
3539
+ .chat[data-chat-tl="4"] {
3540
+ view-timeline-name: --chat-4;
3541
+ view-timeline-axis: block;
3465
3542
  }
3466
3543
 
3467
- .chat-start .chat-bubble::before,
3468
- .chat-end .chat-bubble::before,
3469
- .chat-start .chat-bubble::after,
3470
- .chat-end .chat-bubble::after {
3471
- content: "";
3472
- position: absolute;
3473
- top: 0;
3474
- clip-path: polygon(0 0, 100% 0, 100% 100%);
3544
+ .chat[data-chat-tl="5"] {
3545
+ view-timeline-name: --chat-5;
3546
+ view-timeline-axis: block;
3475
3547
  }
3476
3548
 
3477
- .chat-start .chat-bubble::before {
3478
- left: -0.625rem;
3479
- width: 1rem;
3480
- height: 1rem;
3481
- background-color: var(--color-outline-variant);
3549
+ .chat[data-chat-tl="6"] {
3550
+ view-timeline-name: --chat-6;
3551
+ view-timeline-axis: block;
3482
3552
  }
3483
3553
 
3484
- .chat-start .chat-bubble::after {
3485
- left: -0.5rem;
3486
- width: calc(1rem - 2px);
3487
- height: calc(1rem - 2px);
3488
- top: 1px;
3489
- background-color: var(--chat-bubble-bg);
3554
+ .chat[data-chat-tl="7"] {
3555
+ view-timeline-name: --chat-7;
3556
+ view-timeline-axis: block;
3490
3557
  }
3491
3558
 
3492
- .chat-start .chat-bubble {
3493
- border-top-left-radius: 0;
3559
+ .chat[data-chat-tl="8"] {
3560
+ view-timeline-name: --chat-8;
3561
+ view-timeline-axis: block;
3494
3562
  }
3495
3563
 
3496
- .chat-end .chat-bubble::before {
3497
- right: -0.625rem;
3498
- width: 1rem;
3499
- height: 1rem;
3500
- background-color: var(--color-outline-variant);
3501
- transform: scaleX(-1);
3564
+ .chat[data-chat-tl="9"] {
3565
+ view-timeline-name: --chat-9;
3566
+ view-timeline-axis: block;
3502
3567
  }
3503
3568
 
3504
- .chat-end .chat-bubble::after {
3505
- right: -0.5rem;
3506
- width: calc(1rem - 2px);
3507
- height: calc(1rem - 2px);
3508
- top: 1px;
3509
- background-color: var(--chat-bubble-bg);
3510
- transform: scaleX(-1);
3569
+ .chat[data-chat-tl="10"] {
3570
+ view-timeline-name: --chat-10;
3571
+ view-timeline-axis: block;
3511
3572
  }
3512
3573
 
3513
- .chat-end .chat-bubble {
3514
- border-top-right-radius: 0;
3574
+ .chat[data-chat-tl="11"] {
3575
+ view-timeline-name: --chat-11;
3576
+ view-timeline-axis: block;
3515
3577
  }
3516
3578
 
3517
- .chat-bubble-primary {
3518
- --chat-bubble-bg: var(--color-primary-container);
3519
- --chat-bubble-fg: var(--color-on-primary-container);
3579
+ .chat[data-chat-tl="12"] {
3580
+ view-timeline-name: --chat-12;
3581
+ view-timeline-axis: block;
3520
3582
  }
3521
3583
 
3522
- .chat-bubble-secondary {
3523
- --chat-bubble-bg: var(--color-secondary-container);
3524
- --chat-bubble-fg: var(--color-on-secondary-container);
3584
+ .chat[data-chat-tl="13"] {
3585
+ view-timeline-name: --chat-13;
3586
+ view-timeline-axis: block;
3525
3587
  }
3526
3588
 
3527
- .chat-bubble-tertiary {
3528
- --chat-bubble-bg: var(--color-tertiary-container);
3529
- --chat-bubble-fg: var(--color-on-tertiary-container);
3589
+ .chat[data-chat-tl="14"] {
3590
+ view-timeline-name: --chat-14;
3591
+ view-timeline-axis: block;
3530
3592
  }
3531
3593
 
3532
- .chat-bubble-info {
3533
- --chat-bubble-bg: var(--color-info-container);
3534
- --chat-bubble-fg: var(--color-on-info-container);
3594
+ .chat[data-chat-tl="15"] {
3595
+ view-timeline-name: --chat-15;
3596
+ view-timeline-axis: block;
3535
3597
  }
3536
3598
 
3537
- .chat-bubble-success {
3538
- --chat-bubble-bg: var(--color-success-container);
3539
- --chat-bubble-fg: var(--color-on-success-container);
3599
+ .chat[data-chat-tl="16"] {
3600
+ view-timeline-name: --chat-16;
3601
+ view-timeline-axis: block;
3540
3602
  }
3541
3603
 
3542
- .chat-bubble-warning {
3543
- --chat-bubble-bg: var(--color-warning-container);
3544
- --chat-bubble-fg: var(--color-on-warning-container);
3604
+ .chat[data-chat-tl="17"] {
3605
+ view-timeline-name: --chat-17;
3606
+ view-timeline-axis: block;
3545
3607
  }
3546
3608
 
3547
- .chat-bubble-error {
3548
- --chat-bubble-bg: var(--color-error-container);
3549
- --chat-bubble-fg: var(--color-on-error-container);
3609
+ .chat[data-chat-tl="18"] {
3610
+ view-timeline-name: --chat-18;
3611
+ view-timeline-axis: block;
3550
3612
  }
3551
3613
 
3552
- .chat-bubble-accent {
3553
- --chat-bubble-bg: color-mix(in oklch, var(--color-accent) 15%, var(--color-surface));
3554
- --chat-bubble-fg: var(--color-on-surface);
3614
+ .chat[data-chat-tl="19"] {
3615
+ view-timeline-name: --chat-19;
3616
+ view-timeline-axis: block;
3555
3617
  }
3556
3618
 
3557
- .chat-bubble-neutral {
3558
- --chat-bubble-bg: color-mix(in oklch, var(--color-neutral) 15%, var(--color-surface));
3559
- --chat-bubble-fg: var(--color-on-surface);
3619
+ .chat[data-chat-tl="20"] {
3620
+ view-timeline-name: --chat-20;
3621
+ view-timeline-axis: block;
3560
3622
  }
3561
3623
 
3562
- .chat-bubble-base {
3563
- --chat-bubble-bg: var(--color-base-200);
3564
- --chat-bubble-fg: var(--color-base-content);
3624
+ .chat[data-chat-tl="21"] {
3625
+ view-timeline-name: --chat-21;
3626
+ view-timeline-axis: block;
3565
3627
  }
3566
3628
 
3567
- .chat-bubble-filled.chat-bubble-primary {
3568
- --chat-bubble-bg: var(--color-primary);
3569
- --chat-bubble-fg: var(--color-primary-content);
3629
+ .chat[data-chat-tl="22"] {
3630
+ view-timeline-name: --chat-22;
3631
+ view-timeline-axis: block;
3570
3632
  }
3571
3633
 
3572
- .chat-bubble-filled.chat-bubble-secondary {
3573
- --chat-bubble-bg: var(--color-secondary);
3574
- --chat-bubble-fg: var(--color-secondary-content);
3634
+ .chat[data-chat-tl="23"] {
3635
+ view-timeline-name: --chat-23;
3636
+ view-timeline-axis: block;
3575
3637
  }
3576
3638
 
3577
- .chat-bubble-filled.chat-bubble-tertiary {
3578
- --chat-bubble-bg: var(--color-tertiary);
3579
- --chat-bubble-fg: var(--color-tertiary-content);
3639
+ .chat[data-chat-tl="24"] {
3640
+ view-timeline-name: --chat-24;
3641
+ view-timeline-axis: block;
3642
+ }
3643
+
3644
+ .chat-scroll-indicator[data-chat-tl="1"] {
3645
+ animation-timeline: --chat-1;
3646
+ }
3647
+
3648
+ .chat-scroll-indicator[data-chat-tl="2"] {
3649
+ animation-timeline: --chat-2;
3650
+ }
3651
+
3652
+ .chat-scroll-indicator[data-chat-tl="3"] {
3653
+ animation-timeline: --chat-3;
3654
+ }
3655
+
3656
+ .chat-scroll-indicator[data-chat-tl="4"] {
3657
+ animation-timeline: --chat-4;
3658
+ }
3659
+
3660
+ .chat-scroll-indicator[data-chat-tl="5"] {
3661
+ animation-timeline: --chat-5;
3662
+ }
3663
+
3664
+ .chat-scroll-indicator[data-chat-tl="6"] {
3665
+ animation-timeline: --chat-6;
3666
+ }
3667
+
3668
+ .chat-scroll-indicator[data-chat-tl="7"] {
3669
+ animation-timeline: --chat-7;
3670
+ }
3671
+
3672
+ .chat-scroll-indicator[data-chat-tl="8"] {
3673
+ animation-timeline: --chat-8;
3674
+ }
3675
+
3676
+ .chat-scroll-indicator[data-chat-tl="9"] {
3677
+ animation-timeline: --chat-9;
3678
+ }
3679
+
3680
+ .chat-scroll-indicator[data-chat-tl="10"] {
3681
+ animation-timeline: --chat-10;
3682
+ }
3683
+
3684
+ .chat-scroll-indicator[data-chat-tl="11"] {
3685
+ animation-timeline: --chat-11;
3686
+ }
3687
+
3688
+ .chat-scroll-indicator[data-chat-tl="12"] {
3689
+ animation-timeline: --chat-12;
3690
+ }
3691
+
3692
+ .chat-scroll-indicator[data-chat-tl="13"] {
3693
+ animation-timeline: --chat-13;
3694
+ }
3695
+
3696
+ .chat-scroll-indicator[data-chat-tl="14"] {
3697
+ animation-timeline: --chat-14;
3698
+ }
3699
+
3700
+ .chat-scroll-indicator[data-chat-tl="15"] {
3701
+ animation-timeline: --chat-15;
3702
+ }
3703
+
3704
+ .chat-scroll-indicator[data-chat-tl="16"] {
3705
+ animation-timeline: --chat-16;
3706
+ }
3707
+
3708
+ .chat-scroll-indicator[data-chat-tl="17"] {
3709
+ animation-timeline: --chat-17;
3710
+ }
3711
+
3712
+ .chat-scroll-indicator[data-chat-tl="18"] {
3713
+ animation-timeline: --chat-18;
3714
+ }
3715
+
3716
+ .chat-scroll-indicator[data-chat-tl="19"] {
3717
+ animation-timeline: --chat-19;
3718
+ }
3719
+
3720
+ .chat-scroll-indicator[data-chat-tl="20"] {
3721
+ animation-timeline: --chat-20;
3722
+ }
3723
+
3724
+ .chat-scroll-indicator[data-chat-tl="21"] {
3725
+ animation-timeline: --chat-21;
3726
+ }
3727
+
3728
+ .chat-scroll-indicator[data-chat-tl="22"] {
3729
+ animation-timeline: --chat-22;
3730
+ }
3731
+
3732
+ .chat-scroll-indicator[data-chat-tl="23"] {
3733
+ animation-timeline: --chat-23;
3734
+ }
3735
+
3736
+ .chat-scroll-indicator[data-chat-tl="24"] {
3737
+ animation-timeline: --chat-24;
3738
+ }
3739
+
3740
+ @keyframes chat-scroll-indicator-activate {
3741
+ 0%,
3742
+ 100% {
3743
+ width: var(--chat-scroll-indicator-size);
3744
+ background-color: color-mix(in oklch, var(--color-on-surface) 28%, transparent);
3745
+ opacity: 0.45;
3746
+ }
3747
+
3748
+ 35%,
3749
+ 65% {
3750
+ width: var(--chat-scroll-indicator-active-size);
3751
+ background-color: var(--color-on-surface);
3752
+ opacity: 1;
3753
+ }
3754
+ }
3755
+
3756
+ .chat {
3757
+ display: grid;
3758
+ grid-template-columns: auto minmax(0, 1fr);
3759
+ column-gap: 0.75rem;
3760
+ align-items: end;
3761
+ padding: 0.25rem 0;
3762
+ }
3763
+
3764
+ .chat-start {
3765
+ grid-template-columns: auto minmax(0, 1fr);
3766
+ }
3767
+
3768
+ .chat-end {
3769
+ grid-template-columns: minmax(0, 1fr) auto;
3770
+ }
3771
+
3772
+ .chat-avatar {
3773
+ grid-row: 1 / span 999;
3774
+ grid-column: 1;
3775
+ align-self: start;
3776
+ justify-self: start;
3777
+ }
3778
+
3779
+ .chat-end .chat-avatar {
3780
+ grid-column: 2;
3781
+ justify-self: end;
3782
+ }
3783
+
3784
+ .chat > :not(.chat-avatar) {
3785
+ grid-column: 2;
3786
+ justify-self: start;
3787
+ max-width: 100%;
3788
+ margin-bottom: 0.25rem;
3789
+ }
3790
+
3791
+ .chat-end > :not(.chat-avatar) {
3792
+ grid-column: 1;
3793
+ justify-self: end;
3794
+ }
3795
+
3796
+ .chat-header,
3797
+ .chat-footer {
3798
+ color: var(--color-on-surface-variant);
3799
+ font-size: 0.75rem;
3800
+ line-height: 1rem;
3801
+ }
3802
+
3803
+ .chat-header {
3804
+ margin-bottom: 0.125rem;
3805
+ }
3806
+
3807
+ .chat-footer {
3808
+ margin-top: 0.125rem;
3809
+ margin-bottom: 0;
3810
+ }
3811
+
3812
+ .chat-bubble {
3813
+ --chat-bubble-bg: var(--color-surface-container-highest);
3814
+ --chat-bubble-fg: var(--color-on-surface);
3815
+
3816
+ position: relative;
3817
+ display: flex;
3818
+ flex-direction: column;
3819
+ align-items: stretch;
3820
+ gap: 0.5rem;
3821
+ max-width: min(80ch, 100%);
3822
+ padding: 0.625rem 0.875rem;
3823
+ border-radius: 1rem;
3824
+ background-color: var(--chat-bubble-bg);
3825
+ color: var(--chat-bubble-fg);
3826
+ box-shadow: inset 0 0 0 1px var(--color-outline-variant);
3827
+ font-size: 0.875rem;
3828
+ line-height: 1.45;
3829
+ overflow-wrap: anywhere;
3830
+ word-break: break-word;
3831
+ }
3832
+
3833
+ .chat-bubble-content {
3834
+ min-width: 0;
3835
+ }
3836
+
3837
+ .chat-start .chat-bubble::before,
3838
+ .chat-end .chat-bubble::before,
3839
+ .chat-start .chat-bubble::after,
3840
+ .chat-end .chat-bubble::after {
3841
+ content: "";
3842
+ position: absolute;
3843
+ top: 0;
3844
+ clip-path: polygon(0 0, 100% 0, 100% 100%);
3845
+ }
3846
+
3847
+ .chat-start .chat-bubble::before {
3848
+ left: -0.625rem;
3849
+ width: 1rem;
3850
+ height: 1rem;
3851
+ background-color: var(--color-outline-variant);
3852
+ }
3853
+
3854
+ .chat-start .chat-bubble::after {
3855
+ left: -0.5rem;
3856
+ width: calc(1rem - 2px);
3857
+ height: calc(1rem - 2px);
3858
+ top: 1px;
3859
+ background-color: var(--chat-bubble-bg);
3860
+ }
3861
+
3862
+ .chat-start .chat-bubble {
3863
+ border-top-left-radius: 0;
3864
+ }
3865
+
3866
+ .chat-end .chat-bubble::before {
3867
+ right: -0.625rem;
3868
+ width: 1rem;
3869
+ height: 1rem;
3870
+ background-color: var(--color-outline-variant);
3871
+ transform: scaleX(-1);
3872
+ }
3873
+
3874
+ .chat-end .chat-bubble::after {
3875
+ right: -0.5rem;
3876
+ width: calc(1rem - 2px);
3877
+ height: calc(1rem - 2px);
3878
+ top: 1px;
3879
+ background-color: var(--chat-bubble-bg);
3880
+ transform: scaleX(-1);
3881
+ }
3882
+
3883
+ .chat-end .chat-bubble {
3884
+ border-top-right-radius: 0;
3885
+ }
3886
+
3887
+ .chat-bubble-primary {
3888
+ --chat-bubble-bg: var(--color-primary-container);
3889
+ --chat-bubble-fg: var(--color-on-primary-container);
3890
+ }
3891
+
3892
+ .chat-bubble-secondary {
3893
+ --chat-bubble-bg: var(--color-secondary-container);
3894
+ --chat-bubble-fg: var(--color-on-secondary-container);
3895
+ }
3896
+
3897
+ .chat-bubble-tertiary {
3898
+ --chat-bubble-bg: var(--color-tertiary-container);
3899
+ --chat-bubble-fg: var(--color-on-tertiary-container);
3900
+ }
3901
+
3902
+ .chat-bubble-info {
3903
+ --chat-bubble-bg: var(--color-info-container);
3904
+ --chat-bubble-fg: var(--color-on-info-container);
3905
+ }
3906
+
3907
+ .chat-bubble-success {
3908
+ --chat-bubble-bg: var(--color-success-container);
3909
+ --chat-bubble-fg: var(--color-on-success-container);
3910
+ }
3911
+
3912
+ .chat-bubble-warning {
3913
+ --chat-bubble-bg: var(--color-warning-container);
3914
+ --chat-bubble-fg: var(--color-on-warning-container);
3915
+ }
3916
+
3917
+ .chat-bubble-error {
3918
+ --chat-bubble-bg: var(--color-error-container);
3919
+ --chat-bubble-fg: var(--color-on-error-container);
3920
+ }
3921
+
3922
+ .chat-bubble-accent {
3923
+ --chat-bubble-bg: color-mix(in oklch, var(--color-accent) 15%, var(--color-surface));
3924
+ --chat-bubble-fg: var(--color-on-surface);
3925
+ }
3926
+
3927
+ .chat-bubble-neutral {
3928
+ --chat-bubble-bg: color-mix(in oklch, var(--color-neutral) 15%, var(--color-surface));
3929
+ --chat-bubble-fg: var(--color-on-surface);
3930
+ }
3931
+
3932
+ .chat-bubble-base {
3933
+ --chat-bubble-bg: var(--color-base-200);
3934
+ --chat-bubble-fg: var(--color-base-content);
3935
+ }
3936
+
3937
+ .chat-bubble-filled.chat-bubble-primary {
3938
+ --chat-bubble-bg: var(--color-primary);
3939
+ --chat-bubble-fg: var(--color-primary-content);
3940
+ }
3941
+
3942
+ .chat-bubble-filled.chat-bubble-secondary {
3943
+ --chat-bubble-bg: var(--color-secondary);
3944
+ --chat-bubble-fg: var(--color-secondary-content);
3945
+ }
3946
+
3947
+ .chat-bubble-filled.chat-bubble-tertiary {
3948
+ --chat-bubble-bg: var(--color-tertiary);
3949
+ --chat-bubble-fg: var(--color-tertiary-content);
3580
3950
  }
3581
3951
 
3582
3952
  .chat-bubble-filled.chat-bubble-info {
@@ -3646,6 +4016,14 @@
3646
4016
  overflow: hidden;
3647
4017
  }
3648
4018
 
4019
+ .chat-bubble > .chat-reasoning,
4020
+ .chat-bubble > .chat-tool,
4021
+ .chat-reasoning .chat-tool,
4022
+ .chat-reasoning-body > .chat-tool {
4023
+ width: 100%;
4024
+ max-width: none;
4025
+ }
4026
+
3649
4027
  .chat-reasoning > summary,
3650
4028
  .chat-tool > summary {
3651
4029
  cursor: pointer;
@@ -3658,12 +4036,28 @@
3658
4036
  font-weight: 500;
3659
4037
  }
3660
4038
 
3661
- .chat-reasoning > :not(summary) {
4039
+ .chat-reasoning-body {
4040
+ display: flex;
4041
+ flex-direction: column;
4042
+ gap: 0.5rem;
3662
4043
  padding: 0 0.75rem 0.75rem;
3663
4044
  color: var(--color-on-surface-variant);
4045
+ }
4046
+
4047
+ .chat-reasoning-body > :not(.chat-tool) {
3664
4048
  font-style: italic;
3665
4049
  }
3666
4050
 
4051
+ .chat-reasoning > div:not(.chat-tool):not(.chat-reasoning-body) {
4052
+ padding: 0 0.75rem 0.75rem;
4053
+ color: var(--color-on-surface-variant);
4054
+ font-style: italic;
4055
+ }
4056
+
4057
+ .chat-reasoning > .chat-tool {
4058
+ margin: 0 0.75rem 0.75rem;
4059
+ }
4060
+
3667
4061
  .chat-tool-header {
3668
4062
  display: flex;
3669
4063
  align-items: center;
@@ -3758,7 +4152,8 @@
3758
4152
  animation-delay: 300ms;
3759
4153
  }
3760
4154
 
3761
- .chat-bubble-streaming::after {
4155
+ .chat-bubble-streaming::after,
4156
+ .chat-bubble-content.chat-bubble-streaming::after {
3762
4157
  content: "";
3763
4158
  display: inline-block;
3764
4159
  width: 1px;
@@ -3769,6 +4164,10 @@
3769
4164
  animation: chat-stream-caret 1s step-end infinite;
3770
4165
  }
3771
4166
 
4167
+ .chat-bubble.chat-bubble-streaming:has(.chat-reasoning, .chat-tool, .chat-bubble-content)::after {
4168
+ content: none;
4169
+ }
4170
+
3772
4171
  .chat-reasoning > summary:focus-visible,
3773
4172
  .chat-tool > summary:focus-visible {
3774
4173
  outline: none;
@@ -3808,15 +4207,26 @@
3808
4207
  }
3809
4208
 
3810
4209
  @media (prefers-reduced-motion: reduce) {
4210
+ .chat-scroll {
4211
+ scroll-behavior: auto;
4212
+ }
4213
+
4214
+ .chat-scroll-indicator {
4215
+ animation: none;
4216
+ transition: none;
4217
+ }
4218
+
3811
4219
  .chat-typing::before,
3812
4220
  .chat-typing::after,
3813
4221
  .chat-typing span,
3814
4222
  .chat-bubble-streaming::after,
4223
+ .chat-bubble-content.chat-bubble-streaming::after,
3815
4224
  .chat-tool-running .chat-tool-header::before {
3816
4225
  animation: none;
3817
4226
  }
3818
4227
 
3819
- .chat-bubble-streaming::after {
4228
+ .chat-bubble-streaming::after,
4229
+ .chat-bubble-content.chat-bubble-streaming::after {
3820
4230
  opacity: 1;
3821
4231
  }
3822
4232
  }
@@ -13714,439 +14124,243 @@
13714
14124
  .toast-ghost.toast-warning { color: var(--color-warning); }
13715
14125
  .toast-ghost.toast-error { color: var(--color-error); }
13716
14126
  .toast-ghost.toast-accent { color: var(--color-accent); }
13717
- .toast-ghost.toast-neutral { color: var(--color-neutral); }
13718
- .toast-ghost.toast-base { color: var(--color-base-content); }
13719
-
13720
- .toast-ghost .toast-title,
13721
- .toast-ghost .toast-message {
13722
- color: inherit;
13723
- }
13724
-
13725
- /* Progress Bar (for auto-dismiss) */
13726
- .toast-progress {
13727
- position: absolute;
13728
- bottom: 0;
13729
- left: 0;
13730
- height: 3px;
13731
- background-color: currentColor;
13732
- border-radius: 0 0 var(--radius-md) var(--radius-md);
13733
- animation: toast-progress linear forwards;
13734
- }
13735
-
13736
- @keyframes toast-progress {
13737
- from {
13738
- width: 100%;
13739
- }
13740
- to {
13741
- width: 0%;
13742
- }
13743
- }
13744
-
13745
- /* Reduce Motion */
13746
- @media (prefers-reduced-motion: reduce) {
13747
- .toast {
13748
- transition: opacity 0ms;
13749
- transform: none;
13750
- }
13751
-
13752
- .toast-progress {
13753
- animation: none;
13754
- }
13755
- }
13756
- }
13757
-
13758
- /**
13759
- * Tooltip Component Styles
13760
- * DuskMoonUI - Material Design 3 inspired tooltip system
13761
- */
13762
-
13763
- @layer components {
13764
- /* Base Tooltip */
13765
- .tooltip {
13766
- position: relative;
13767
- display: inline-block;
13768
- }
13769
-
13770
- /* Tooltip Content */
13771
- .tooltip-content {
13772
- position: absolute;
13773
- z-index: 1000;
13774
- padding: 0.375rem 0.75rem;
13775
- font-size: 0.75rem;
13776
- font-weight: 500;
13777
- line-height: 1rem;
13778
- white-space: nowrap;
13779
- background-color: var(--color-on-surface);
13780
- color: var(--color-surface);
13781
- border-radius: var(--radius-xs);
13782
- box-shadow: var(--shadow-md);
13783
- opacity: 0;
13784
- visibility: hidden;
13785
- transition: opacity 150ms ease-out, visibility 150ms ease-out;
13786
- pointer-events: none;
13787
- }
13788
-
13789
- /* Tooltip Arrow */
13790
- .tooltip-content::before {
13791
- content: '';
13792
- position: absolute;
13793
- width: 0;
13794
- height: 0;
13795
- border: 0.375rem solid transparent;
13796
- }
13797
-
13798
- /* Show Tooltip */
13799
- .tooltip:hover .tooltip-content,
13800
- .tooltip:focus-within .tooltip-content,
13801
- .tooltip-open .tooltip-content {
13802
- opacity: 1;
13803
- visibility: visible;
13804
- }
13805
-
13806
- /* Position: Top (default) - applied to all tooltips as base */
13807
- .tooltip .tooltip-content {
13808
- bottom: 100%;
13809
- top: auto;
13810
- left: 50%;
13811
- right: auto;
13812
- transform: translateX(-50%);
13813
- margin-bottom: 0.5rem;
13814
- margin-top: 0;
13815
- margin-left: 0;
13816
- margin-right: 0;
13817
- }
13818
-
13819
- .tooltip .tooltip-content::before {
13820
- top: 100%;
13821
- bottom: auto;
13822
- left: 50%;
13823
- right: auto;
13824
- transform: translateX(-50%);
13825
- border-top-color: var(--color-on-surface);
13826
- border-bottom-color: transparent;
13827
- border-left-color: transparent;
13828
- border-right-color: transparent;
13829
- }
13830
-
13831
- /* Position: Bottom */
13832
- .tooltip.tooltip-bottom .tooltip-content {
13833
- top: 100%;
13834
- bottom: auto;
13835
- left: 50%;
13836
- right: auto;
13837
- transform: translateX(-50%);
13838
- margin-top: 0.5rem;
13839
- margin-bottom: 0;
13840
- margin-left: 0;
13841
- margin-right: 0;
13842
- }
13843
-
13844
- .tooltip.tooltip-bottom .tooltip-content::before {
13845
- bottom: 100%;
13846
- top: auto;
13847
- left: 50%;
13848
- right: auto;
13849
- transform: translateX(-50%);
13850
- border-bottom-color: var(--color-on-surface);
13851
- border-top-color: transparent;
13852
- border-left-color: transparent;
13853
- border-right-color: transparent;
13854
- }
13855
-
13856
- /* Position: Left */
13857
- .tooltip.tooltip-left .tooltip-content {
13858
- right: 100%;
13859
- left: auto;
13860
- top: 50%;
13861
- bottom: auto;
13862
- transform: translateY(-50%);
13863
- margin-right: 0.5rem;
13864
- margin-left: 0;
13865
- margin-top: 0;
13866
- margin-bottom: 0;
13867
- }
13868
-
13869
- .tooltip.tooltip-left .tooltip-content::before {
13870
- left: 100%;
13871
- right: auto;
13872
- top: 50%;
13873
- bottom: auto;
13874
- transform: translateY(-50%);
13875
- border-left-color: var(--color-on-surface);
13876
- border-right-color: transparent;
13877
- border-top-color: transparent;
13878
- border-bottom-color: transparent;
13879
- }
13880
-
13881
- /* Position: Right */
13882
- .tooltip.tooltip-right .tooltip-content {
13883
- left: 100%;
13884
- right: auto;
13885
- top: 50%;
13886
- bottom: auto;
13887
- transform: translateY(-50%);
13888
- margin-left: 0.5rem;
13889
- margin-right: 0;
13890
- margin-top: 0;
13891
- margin-bottom: 0;
13892
- }
13893
-
13894
- .tooltip.tooltip-right .tooltip-content::before {
13895
- right: 100%;
13896
- left: auto;
13897
- top: 50%;
13898
- bottom: auto;
13899
- transform: translateY(-50%);
13900
- border-right-color: var(--color-on-surface);
13901
- border-left-color: transparent;
13902
- border-top-color: transparent;
13903
- border-bottom-color: transparent;
13904
- }
13905
-
13906
- /* Light Tooltip */
13907
- .tooltip.tooltip-light .tooltip-content {
13908
- background-color: var(--color-surface);
13909
- color: var(--color-on-surface);
13910
- border: 1px solid var(--color-outline);
13911
- box-shadow: var(--shadow-md);
13912
- }
13913
-
13914
- .tooltip.tooltip-light .tooltip-content::before {
13915
- border-top-color: var(--color-surface);
13916
- }
13917
-
13918
- .tooltip.tooltip-light.tooltip-bottom .tooltip-content::before {
13919
- border-bottom-color: var(--color-surface);
13920
- }
13921
-
13922
- .tooltip.tooltip-light.tooltip-left .tooltip-content::before {
13923
- border-left-color: var(--color-surface);
13924
- }
13925
-
13926
- .tooltip.tooltip-light.tooltip-right .tooltip-content::before {
13927
- border-right-color: var(--color-surface);
13928
- }
13929
-
13930
- /* Color Variants */
13931
- .tooltip.tooltip-primary .tooltip-content {
13932
- background-color: var(--color-primary);
13933
- color: var(--color-primary-content);
13934
- }
13935
-
13936
- .tooltip.tooltip-primary .tooltip-content::before {
13937
- border-top-color: var(--color-primary);
13938
- }
13939
-
13940
- .tooltip.tooltip-primary.tooltip-bottom .tooltip-content::before {
13941
- border-bottom-color: var(--color-primary);
13942
- }
13943
-
13944
- .tooltip.tooltip-primary.tooltip-left .tooltip-content::before {
13945
- border-left-color: var(--color-primary);
13946
- }
13947
-
13948
- .tooltip.tooltip-primary.tooltip-right .tooltip-content::before {
13949
- border-right-color: var(--color-primary);
13950
- }
13951
-
13952
- .tooltip.tooltip-secondary .tooltip-content {
13953
- background-color: var(--color-secondary);
13954
- color: var(--color-secondary-content);
13955
- }
13956
-
13957
- .tooltip.tooltip-secondary .tooltip-content::before {
13958
- border-top-color: var(--color-secondary);
13959
- }
13960
-
13961
- .tooltip.tooltip-secondary.tooltip-bottom .tooltip-content::before {
13962
- border-bottom-color: var(--color-secondary);
13963
- }
13964
-
13965
- .tooltip.tooltip-secondary.tooltip-left .tooltip-content::before {
13966
- border-left-color: var(--color-secondary);
13967
- }
13968
-
13969
- .tooltip.tooltip-secondary.tooltip-right .tooltip-content::before {
13970
- border-right-color: var(--color-secondary);
13971
- }
13972
-
13973
- .tooltip.tooltip-error .tooltip-content {
13974
- background-color: var(--color-error);
13975
- color: var(--color-error-content);
13976
- }
13977
-
13978
- .tooltip.tooltip-error .tooltip-content::before {
13979
- border-top-color: var(--color-error);
13980
- }
13981
-
13982
- .tooltip.tooltip-error.tooltip-bottom .tooltip-content::before {
13983
- border-bottom-color: var(--color-error);
13984
- }
13985
-
13986
- .tooltip.tooltip-error.tooltip-left .tooltip-content::before {
13987
- border-left-color: var(--color-error);
13988
- }
13989
-
13990
- .tooltip.tooltip-error.tooltip-right .tooltip-content::before {
13991
- border-right-color: var(--color-error);
13992
- }
14127
+ .toast-ghost.toast-neutral { color: var(--color-neutral); }
14128
+ .toast-ghost.toast-base { color: var(--color-base-content); }
13993
14129
 
13994
- .tooltip.tooltip-tertiary .tooltip-content {
13995
- background-color: var(--color-tertiary);
13996
- color: var(--color-tertiary-content);
14130
+ .toast-ghost .toast-title,
14131
+ .toast-ghost .toast-message {
14132
+ color: inherit;
13997
14133
  }
13998
14134
 
13999
- .tooltip.tooltip-tertiary .tooltip-content::before {
14000
- border-top-color: var(--color-tertiary);
14135
+ /* Progress Bar (for auto-dismiss) */
14136
+ .toast-progress {
14137
+ position: absolute;
14138
+ bottom: 0;
14139
+ left: 0;
14140
+ height: 3px;
14141
+ background-color: currentColor;
14142
+ border-radius: 0 0 var(--radius-md) var(--radius-md);
14143
+ animation: toast-progress linear forwards;
14001
14144
  }
14002
14145
 
14003
- .tooltip.tooltip-tertiary.tooltip-bottom .tooltip-content::before {
14004
- border-bottom-color: var(--color-tertiary);
14146
+ @keyframes toast-progress {
14147
+ from {
14148
+ width: 100%;
14149
+ }
14150
+ to {
14151
+ width: 0%;
14152
+ }
14005
14153
  }
14006
14154
 
14007
- .tooltip.tooltip-tertiary.tooltip-left .tooltip-content::before {
14008
- border-left-color: var(--color-tertiary);
14009
- }
14155
+ /* Reduce Motion */
14156
+ @media (prefers-reduced-motion: reduce) {
14157
+ .toast {
14158
+ transition: opacity 0ms;
14159
+ transform: none;
14160
+ }
14010
14161
 
14011
- .tooltip.tooltip-tertiary.tooltip-right .tooltip-content::before {
14012
- border-right-color: var(--color-tertiary);
14162
+ .toast-progress {
14163
+ animation: none;
14164
+ }
14013
14165
  }
14166
+ }
14014
14167
 
14015
- .tooltip.tooltip-info .tooltip-content {
14016
- background-color: var(--color-info);
14017
- color: var(--color-info-content);
14018
- }
14168
+ /**
14169
+ * Tooltip Component Styles
14170
+ * DuskMoonUI - Material Design 3 inspired tooltip system
14171
+ *
14172
+ * Breaking: uses native Popover API (popover="hint") + CSS Anchor Positioning.
14173
+ * Markup:
14174
+ * <button interestfor="id" style="anchor-name: --id" class="tooltip-delay">…</button>
14175
+ * <div id="id" popover="hint" class="tooltip tooltip-top" style="position-anchor: --id">…</div>
14176
+ */
14019
14177
 
14020
- .tooltip.tooltip-info .tooltip-content::before {
14021
- border-top-color: var(--color-info);
14022
- }
14178
+ @layer components {
14179
+ /* ========================================
14180
+ * Base surface (the popover element itself)
14181
+ * ======================================== */
14023
14182
 
14024
- .tooltip.tooltip-info.tooltip-bottom .tooltip-content::before {
14025
- border-bottom-color: var(--color-info);
14026
- }
14183
+ .tooltip[popover] {
14184
+ --tooltip-bg: var(--color-on-surface);
14185
+ --tooltip-fg: var(--color-surface);
14027
14186
 
14028
- .tooltip.tooltip-info.tooltip-left .tooltip-content::before {
14029
- border-left-color: var(--color-info);
14187
+ position: absolute;
14188
+ inset: auto;
14189
+ z-index: 1000;
14190
+ margin: 0.5rem;
14191
+ padding: 0.375rem 0.75rem;
14192
+ font-size: 0.75rem;
14193
+ font-weight: 500;
14194
+ line-height: 1rem;
14195
+ white-space: nowrap;
14196
+ background-color: var(--tooltip-bg);
14197
+ color: var(--tooltip-fg);
14198
+ border: none;
14199
+ border-radius: var(--radius-xs);
14200
+ box-shadow: var(--shadow-md);
14201
+ pointer-events: none;
14202
+ opacity: 0;
14203
+ transform: scale(0.95);
14204
+ position-area: top;
14205
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
14206
+ transition:
14207
+ opacity 150ms ease-out,
14208
+ transform 150ms ease-out,
14209
+ overlay 150ms ease-out allow-discrete,
14210
+ display 150ms ease-out allow-discrete;
14030
14211
  }
14031
14212
 
14032
- .tooltip.tooltip-info.tooltip-right .tooltip-content::before {
14033
- border-right-color: var(--color-info);
14213
+ .tooltip[popover]:popover-open {
14214
+ opacity: 1;
14215
+ transform: scale(1);
14034
14216
  }
14035
14217
 
14036
- .tooltip.tooltip-success .tooltip-content {
14037
- background-color: var(--color-success);
14038
- color: var(--color-success-content);
14218
+ @starting-style {
14219
+ .tooltip[popover]:popover-open {
14220
+ opacity: 0;
14221
+ transform: scale(0.95);
14222
+ }
14039
14223
  }
14040
14224
 
14041
- .tooltip.tooltip-success .tooltip-content::before {
14042
- border-top-color: var(--color-success);
14043
- }
14225
+ /* ========================================
14226
+ * Preferred position-area
14227
+ * ======================================== */
14044
14228
 
14045
- .tooltip.tooltip-success.tooltip-bottom .tooltip-content::before {
14046
- border-bottom-color: var(--color-success);
14229
+ .tooltip-top[popover] {
14230
+ position-area: top;
14047
14231
  }
14048
14232
 
14049
- .tooltip.tooltip-success.tooltip-left .tooltip-content::before {
14050
- border-left-color: var(--color-success);
14233
+ .tooltip-bottom[popover] {
14234
+ position-area: bottom;
14051
14235
  }
14052
14236
 
14053
- .tooltip.tooltip-success.tooltip-right .tooltip-content::before {
14054
- border-right-color: var(--color-success);
14237
+ .tooltip-left[popover] {
14238
+ position-area: left;
14055
14239
  }
14056
14240
 
14057
- .tooltip.tooltip-warning .tooltip-content {
14058
- background-color: var(--color-warning);
14059
- color: var(--color-warning-content);
14241
+ .tooltip-right[popover] {
14242
+ position-area: right;
14060
14243
  }
14061
14244
 
14062
- .tooltip.tooltip-warning .tooltip-content::before {
14063
- border-top-color: var(--color-warning);
14064
- }
14245
+ /* ========================================
14246
+ * Arrow (preferred position only; may be wrong after flip)
14247
+ * ======================================== */
14065
14248
 
14066
- .tooltip.tooltip-warning.tooltip-bottom .tooltip-content::before {
14067
- border-bottom-color: var(--color-warning);
14249
+ .tooltip[popover]::before {
14250
+ content: '';
14251
+ position: absolute;
14252
+ width: 0;
14253
+ height: 0;
14254
+ border: 0.375rem solid transparent;
14068
14255
  }
14069
14256
 
14070
- .tooltip.tooltip-warning.tooltip-left .tooltip-content::before {
14071
- border-left-color: var(--color-warning);
14257
+ .tooltip-top[popover]::before,
14258
+ .tooltip[popover]:not(.tooltip-bottom):not(.tooltip-left):not(.tooltip-right)::before {
14259
+ top: 100%;
14260
+ left: 50%;
14261
+ transform: translateX(-50%);
14262
+ border-top-color: var(--tooltip-bg);
14072
14263
  }
14073
14264
 
14074
- .tooltip.tooltip-warning.tooltip-right .tooltip-content::before {
14075
- border-right-color: var(--color-warning);
14265
+ .tooltip-bottom[popover]::before {
14266
+ bottom: 100%;
14267
+ top: auto;
14268
+ left: 50%;
14269
+ transform: translateX(-50%);
14270
+ border-bottom-color: var(--tooltip-bg);
14271
+ border-top-color: transparent;
14076
14272
  }
14077
14273
 
14078
- .tooltip.tooltip-accent .tooltip-content {
14079
- background-color: var(--color-accent);
14080
- color: var(--color-accent-content);
14274
+ .tooltip-left[popover]::before {
14275
+ left: 100%;
14276
+ top: 50%;
14277
+ bottom: auto;
14278
+ transform: translateY(-50%);
14279
+ border-left-color: var(--tooltip-bg);
14280
+ border-top-color: transparent;
14081
14281
  }
14082
14282
 
14083
- .tooltip.tooltip-accent .tooltip-content::before {
14084
- border-top-color: var(--color-accent);
14283
+ .tooltip-right[popover]::before {
14284
+ right: 100%;
14285
+ left: auto;
14286
+ top: 50%;
14287
+ bottom: auto;
14288
+ transform: translateY(-50%);
14289
+ border-right-color: var(--tooltip-bg);
14290
+ border-top-color: transparent;
14085
14291
  }
14086
14292
 
14087
- .tooltip.tooltip-accent.tooltip-bottom .tooltip-content::before {
14088
- border-bottom-color: var(--color-accent);
14089
- }
14293
+ /* ========================================
14294
+ * Color variants
14295
+ * ======================================== */
14090
14296
 
14091
- .tooltip.tooltip-accent.tooltip-left .tooltip-content::before {
14092
- border-left-color: var(--color-accent);
14297
+ .tooltip-light[popover] {
14298
+ --tooltip-bg: var(--color-surface);
14299
+ --tooltip-fg: var(--color-on-surface);
14300
+ border: 1px solid var(--color-outline);
14093
14301
  }
14094
14302
 
14095
- .tooltip.tooltip-accent.tooltip-right .tooltip-content::before {
14096
- border-right-color: var(--color-accent);
14303
+ .tooltip-primary[popover] {
14304
+ --tooltip-bg: var(--color-primary);
14305
+ --tooltip-fg: var(--color-primary-content);
14097
14306
  }
14098
14307
 
14099
- .tooltip.tooltip-neutral .tooltip-content {
14100
- background-color: var(--color-neutral);
14101
- color: var(--color-neutral-content);
14308
+ .tooltip-secondary[popover] {
14309
+ --tooltip-bg: var(--color-secondary);
14310
+ --tooltip-fg: var(--color-secondary-content);
14102
14311
  }
14103
14312
 
14104
- .tooltip.tooltip-neutral .tooltip-content::before {
14105
- border-top-color: var(--color-neutral);
14313
+ .tooltip-tertiary[popover] {
14314
+ --tooltip-bg: var(--color-tertiary);
14315
+ --tooltip-fg: var(--color-tertiary-content);
14106
14316
  }
14107
14317
 
14108
- .tooltip.tooltip-neutral.tooltip-bottom .tooltip-content::before {
14109
- border-bottom-color: var(--color-neutral);
14318
+ .tooltip-info[popover] {
14319
+ --tooltip-bg: var(--color-info);
14320
+ --tooltip-fg: var(--color-info-content);
14110
14321
  }
14111
14322
 
14112
- .tooltip.tooltip-neutral.tooltip-left .tooltip-content::before {
14113
- border-left-color: var(--color-neutral);
14323
+ .tooltip-success[popover] {
14324
+ --tooltip-bg: var(--color-success);
14325
+ --tooltip-fg: var(--color-success-content);
14114
14326
  }
14115
14327
 
14116
- .tooltip.tooltip-neutral.tooltip-right .tooltip-content::before {
14117
- border-right-color: var(--color-neutral);
14328
+ .tooltip-warning[popover] {
14329
+ --tooltip-bg: var(--color-warning);
14330
+ --tooltip-fg: var(--color-warning-content);
14118
14331
  }
14119
14332
 
14120
- .tooltip.tooltip-base .tooltip-content {
14121
- background-color: var(--color-base-100);
14122
- color: var(--color-base-content);
14333
+ .tooltip-error[popover] {
14334
+ --tooltip-bg: var(--color-error);
14335
+ --tooltip-fg: var(--color-error-content);
14123
14336
  }
14124
14337
 
14125
- .tooltip.tooltip-base .tooltip-content::before {
14126
- border-top-color: var(--color-base-100);
14338
+ .tooltip-accent[popover] {
14339
+ --tooltip-bg: var(--color-accent);
14340
+ --tooltip-fg: var(--color-accent-content);
14127
14341
  }
14128
14342
 
14129
- .tooltip.tooltip-base.tooltip-bottom .tooltip-content::before {
14130
- border-bottom-color: var(--color-base-100);
14343
+ .tooltip-neutral[popover] {
14344
+ --tooltip-bg: var(--color-neutral);
14345
+ --tooltip-fg: var(--color-neutral-content);
14131
14346
  }
14132
14347
 
14133
- .tooltip.tooltip-base.tooltip-left .tooltip-content::before {
14134
- border-left-color: var(--color-base-100);
14348
+ .tooltip-base[popover] {
14349
+ --tooltip-bg: var(--color-base-100);
14350
+ --tooltip-fg: var(--color-base-content);
14135
14351
  }
14136
14352
 
14137
- .tooltip.tooltip-base.tooltip-right .tooltip-content::before {
14138
- border-right-color: var(--color-base-100);
14139
- }
14353
+ /* ========================================
14354
+ * Content variants
14355
+ * ======================================== */
14140
14356
 
14141
- /* Multi-line Tooltip */
14142
- .tooltip-multiline .tooltip-content {
14357
+ .tooltip-multiline[popover] {
14143
14358
  white-space: normal;
14144
14359
  max-width: 16rem;
14145
14360
  text-align: center;
14146
14361
  }
14147
14362
 
14148
- /* Rich Tooltip */
14149
- .tooltip-rich .tooltip-content {
14363
+ .tooltip-rich[popover] {
14150
14364
  padding: 0.75rem 1rem;
14151
14365
  max-width: 20rem;
14152
14366
  white-space: normal;
@@ -14165,23 +14379,28 @@
14165
14379
  opacity: 0.9;
14166
14380
  }
14167
14381
 
14168
- /* Delay Variants */
14169
- .tooltip-delay .tooltip-content {
14170
- transition-delay: 300ms;
14382
+ /* ========================================
14383
+ * Invoker utilities (apply on the trigger)
14384
+ * ======================================== */
14385
+
14386
+ .tooltip-delay {
14387
+ interest-delay: 300ms;
14171
14388
  }
14172
14389
 
14173
- .tooltip-delay-long .tooltip-content {
14174
- transition-delay: 500ms;
14390
+ .tooltip-delay-long {
14391
+ interest-delay: 500ms;
14175
14392
  }
14176
14393
 
14177
- /* Interactive Tooltip */
14178
- .tooltip-interactive .tooltip-content {
14394
+ .tooltip-interactive[popover] {
14179
14395
  pointer-events: auto;
14180
14396
  }
14181
14397
 
14182
- /* Reduce Motion */
14398
+ /* ========================================
14399
+ * Reduce Motion
14400
+ * ======================================== */
14401
+
14183
14402
  @media (prefers-reduced-motion: reduce) {
14184
- .tooltip-content {
14403
+ .tooltip[popover] {
14185
14404
  transition: none;
14186
14405
  }
14187
14406
  }
@@ -17900,107 +18119,156 @@
17900
18119
  /**
17901
18120
  * Popover Component Styles
17902
18121
  * DuskMoonUI - Material Design 3 inspired popover system
18122
+ *
18123
+ * Uses native Popover API + CSS Anchor Positioning:
18124
+ * <button popovertarget="id" style="anchor-name: --id">…</button>
18125
+ * <div id="id" popover class="popover popover-bottom" style="position-anchor: --id">…</div>
17903
18126
  */
17904
18127
 
17905
18128
  @layer components {
17906
- /* Popover Container (class-based approach only, not native [popover]) */
17907
- .popover:not([popover]) {
17908
- position: relative;
17909
- display: inline-block;
18129
+ /* ========================================
18130
+ * Native Popover surface
18131
+ * ======================================== */
18132
+
18133
+ .popover {
18134
+ --popover-color-intensity: 30%;
17910
18135
  }
17911
18136
 
17912
- /* Popover Content */
17913
- .popover-content {
18137
+ .popover[popover] {
17914
18138
  position: absolute;
18139
+ inset: auto;
17915
18140
  z-index: 1050;
17916
18141
  min-width: 12rem;
17917
18142
  max-width: 20rem;
17918
18143
  padding: 1rem;
18144
+ margin: 0.5rem;
17919
18145
  background-color: var(--color-surface);
17920
18146
  border: 1px solid var(--color-outline-variant);
17921
18147
  border-radius: var(--radius-md);
17922
18148
  box-shadow: var(--shadow-lg);
17923
18149
  opacity: 0;
17924
- visibility: hidden;
17925
18150
  transform: scale(0.95);
17926
- transform-origin: center;
17927
- transition: opacity 150ms ease-out, visibility 150ms ease-out, transform 150ms ease-out;
18151
+ position-area: bottom;
18152
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
18153
+ transition:
18154
+ opacity 150ms ease-out,
18155
+ transform 150ms ease-out,
18156
+ overlay 150ms ease-out allow-discrete,
18157
+ display 150ms ease-out allow-discrete;
17928
18158
  }
17929
18159
 
17930
- .popover.show .popover-content,
17931
- .popover-content.show {
18160
+ .popover[popover]:popover-open {
17932
18161
  opacity: 1;
17933
18162
  visibility: visible;
17934
18163
  transform: scale(1);
17935
18164
  }
17936
18165
 
17937
- /* Direct popover structure (without .popover-content wrapper) */
17938
- .popover.popover-show,
17939
- .popover.show {
17940
- opacity: 1;
17941
- visibility: visible;
18166
+ @starting-style {
18167
+ .popover[popover]:popover-open {
18168
+ opacity: 0;
18169
+ transform: scale(0.95);
18170
+ }
17942
18171
  }
17943
18172
 
17944
- /* Popover as direct overlay (simpler structure) */
17945
- .popover:not([popover])[class*="popover-top"],
17946
- .popover:not([popover])[class*="popover-bottom"],
17947
- .popover:not([popover])[class*="popover-left"],
17948
- .popover:not([popover])[class*="popover-right"] {
17949
- position: absolute;
17950
- z-index: 1050;
17951
- min-width: 12rem;
17952
- max-width: 20rem;
17953
- padding: 1rem;
17954
- background-color: var(--color-surface);
17955
- border: 1px solid var(--color-outline-variant);
17956
- border-radius: var(--radius-md);
17957
- box-shadow: var(--shadow-lg);
17958
- opacity: 0;
17959
- visibility: hidden;
17960
- transition: opacity 150ms ease-out, visibility 150ms ease-out;
18173
+ /* Preferred position-area */
18174
+ .popover-top[popover] {
18175
+ position-area: top;
17961
18176
  }
17962
18177
 
17963
- .popover[class*="popover-top"].popover-show,
17964
- .popover[class*="popover-bottom"].popover-show,
17965
- .popover[class*="popover-left"].popover-show,
17966
- .popover[class*="popover-right"].popover-show {
17967
- opacity: 1;
17968
- visibility: visible;
18178
+ .popover-bottom[popover] {
18179
+ position-area: bottom;
17969
18180
  }
17970
18181
 
17971
- /* Direct position: Top */
17972
- .popover.popover-top:not(:has(.popover-content)) {
17973
- bottom: 100%;
17974
- left: 50%;
17975
- transform: translateX(-50%);
17976
- margin-bottom: 0.75rem;
18182
+ .popover-left[popover] {
18183
+ position-area: left;
17977
18184
  }
17978
18185
 
17979
- /* Direct position: Bottom */
17980
- .popover.popover-bottom:not(:has(.popover-content)) {
17981
- top: 100%;
17982
- left: 50%;
17983
- transform: translateX(-50%);
17984
- margin-top: 0.75rem;
18186
+ .popover-right[popover] {
18187
+ position-area: right;
17985
18188
  }
17986
18189
 
17987
- /* Direct position: Left */
17988
- .popover.popover-left:not(:has(.popover-content)) {
17989
- right: 100%;
17990
- top: 50%;
17991
- transform: translateY(-50%);
17992
- margin-right: 0.75rem;
18190
+ /* Alignment variants */
18191
+ .popover-start[popover] {
18192
+ position-area: bottom span-right;
17993
18193
  }
17994
18194
 
17995
- /* Direct position: Right */
17996
- .popover.popover-right:not(:has(.popover-content)) {
17997
- left: 100%;
17998
- top: 50%;
17999
- transform: translateY(-50%);
18000
- margin-left: 0.75rem;
18195
+ .popover-end[popover] {
18196
+ position-area: bottom span-left;
18197
+ }
18198
+
18199
+ .popover-top.popover-start[popover] {
18200
+ position-area: top span-right;
18201
+ }
18202
+
18203
+ .popover-top.popover-end[popover] {
18204
+ position-area: top span-left;
18205
+ }
18206
+
18207
+ .popover-bottom.popover-start[popover] {
18208
+ position-area: bottom span-right;
18209
+ }
18210
+
18211
+ .popover-bottom.popover-end[popover] {
18212
+ position-area: bottom span-left;
18213
+ }
18214
+
18215
+ .popover-left.popover-start[popover] {
18216
+ position-area: left span-bottom;
18217
+ }
18218
+
18219
+ .popover-left.popover-end[popover] {
18220
+ position-area: left span-top;
18001
18221
  }
18002
18222
 
18003
- /* Popover Arrow */
18223
+ .popover-right.popover-start[popover] {
18224
+ position-area: right span-bottom;
18225
+ }
18226
+
18227
+ .popover-right.popover-end[popover] {
18228
+ position-area: right span-top;
18229
+ }
18230
+
18231
+ /* Backdrop */
18232
+ .popover[popover]::backdrop {
18233
+ background-color: transparent;
18234
+ transition:
18235
+ background-color 150ms ease-out,
18236
+ overlay 150ms ease-out allow-discrete,
18237
+ display 150ms ease-out allow-discrete;
18238
+ }
18239
+
18240
+ .popover[popover]:popover-open::backdrop {
18241
+ background-color: color-mix(in srgb, var(--color-scrim) 10%, transparent);
18242
+ }
18243
+
18244
+ @starting-style {
18245
+ .popover[popover]:popover-open::backdrop {
18246
+ background-color: transparent;
18247
+ }
18248
+ }
18249
+
18250
+ .popover-modal[popover]::backdrop {
18251
+ background-color: transparent;
18252
+ transition:
18253
+ background-color 150ms ease-out,
18254
+ overlay 150ms ease-out allow-discrete,
18255
+ display 150ms ease-out allow-discrete;
18256
+ }
18257
+
18258
+ .popover-modal[popover]:popover-open::backdrop {
18259
+ background-color: color-mix(in srgb, var(--color-scrim) 30%, transparent);
18260
+ }
18261
+
18262
+ @starting-style {
18263
+ .popover-modal[popover]:popover-open::backdrop {
18264
+ background-color: transparent;
18265
+ }
18266
+ }
18267
+
18268
+ /* ========================================
18269
+ * Arrow (preferred position; may be wrong after flip)
18270
+ * ======================================== */
18271
+
18004
18272
  .popover-arrow {
18005
18273
  position: absolute;
18006
18274
  width: 0.75rem;
@@ -18010,22 +18278,8 @@
18010
18278
  transform: rotate(45deg);
18011
18279
  }
18012
18280
 
18013
- /* Position: Top (default) */
18014
- .popover-top .popover-content,
18015
- .popover .popover-content {
18016
- bottom: 100%;
18017
- left: 50%;
18018
- transform: translateX(-50%) scale(0.95);
18019
- margin-bottom: 0.75rem;
18020
- }
18021
-
18022
- .popover-top.show .popover-content,
18023
- .popover.show .popover-content {
18024
- transform: translateX(-50%) scale(1);
18025
- }
18026
-
18027
- .popover-top .popover-arrow,
18028
- .popover .popover-arrow {
18281
+ .popover-top[popover] > .popover-arrow,
18282
+ .popover[popover]:not(.popover-bottom):not(.popover-left):not(.popover-right) > .popover-arrow {
18029
18283
  bottom: -0.375rem;
18030
18284
  left: 50%;
18031
18285
  transform: translateX(-50%) rotate(45deg);
@@ -18033,19 +18287,7 @@
18033
18287
  border-left: none;
18034
18288
  }
18035
18289
 
18036
- /* Position: Bottom */
18037
- .popover-bottom .popover-content {
18038
- top: 100%;
18039
- left: 50%;
18040
- transform: translateX(-50%) scale(0.95);
18041
- margin-top: 0.75rem;
18042
- }
18043
-
18044
- .popover-bottom.show .popover-content {
18045
- transform: translateX(-50%) scale(1);
18046
- }
18047
-
18048
- .popover-bottom .popover-arrow {
18290
+ .popover-bottom[popover] > .popover-arrow {
18049
18291
  top: -0.375rem;
18050
18292
  left: 50%;
18051
18293
  transform: translateX(-50%) rotate(45deg);
@@ -18053,19 +18295,7 @@
18053
18295
  border-right: none;
18054
18296
  }
18055
18297
 
18056
- /* Position: Left */
18057
- .popover-left .popover-content {
18058
- right: 100%;
18059
- top: 50%;
18060
- transform: translateY(-50%) scale(0.95);
18061
- margin-right: 0.75rem;
18062
- }
18063
-
18064
- .popover-left.show .popover-content {
18065
- transform: translateY(-50%) scale(1);
18066
- }
18067
-
18068
- .popover-left .popover-arrow {
18298
+ .popover-left[popover] > .popover-arrow {
18069
18299
  right: -0.375rem;
18070
18300
  top: 50%;
18071
18301
  transform: translateY(-50%) rotate(45deg);
@@ -18073,19 +18303,7 @@
18073
18303
  border-bottom: none;
18074
18304
  }
18075
18305
 
18076
- /* Position: Right */
18077
- .popover-right .popover-content {
18078
- left: 100%;
18079
- top: 50%;
18080
- transform: translateY(-50%) scale(0.95);
18081
- margin-left: 0.75rem;
18082
- }
18083
-
18084
- .popover-right.show .popover-content {
18085
- transform: translateY(-50%) scale(1);
18086
- }
18087
-
18088
- .popover-right .popover-arrow {
18306
+ .popover-right[popover] > .popover-arrow {
18089
18307
  left: -0.375rem;
18090
18308
  top: 50%;
18091
18309
  transform: translateY(-50%) rotate(45deg);
@@ -18093,7 +18311,14 @@
18093
18311
  border-top: none;
18094
18312
  }
18095
18313
 
18096
- /* Popover Header */
18314
+ .popover-no-arrow > .popover-arrow {
18315
+ display: none;
18316
+ }
18317
+
18318
+ /* ========================================
18319
+ * Structure
18320
+ * ======================================== */
18321
+
18097
18322
  .popover-header {
18098
18323
  display: flex;
18099
18324
  align-items: center;
@@ -18105,17 +18330,24 @@
18105
18330
 
18106
18331
  .popover-title {
18107
18332
  flex: 1;
18333
+ min-width: 0;
18334
+ margin: 0;
18108
18335
  font-size: 0.875rem;
18109
18336
  font-weight: 600;
18337
+ line-height: 1.5rem;
18110
18338
  color: var(--color-on-surface);
18111
18339
  }
18112
18340
 
18341
+ /* Prefer placing .popover-close inside .popover-header for aligned title + close */
18113
18342
  .popover-close {
18114
- display: flex;
18343
+ display: inline-flex;
18344
+ flex-shrink: 0;
18115
18345
  align-items: center;
18116
18346
  justify-content: center;
18117
18347
  width: 1.5rem;
18118
18348
  height: 1.5rem;
18349
+ margin-inline-start: auto;
18350
+ padding: 0;
18119
18351
  color: var(--color-on-surface-variant);
18120
18352
  background-color: transparent;
18121
18353
  border: none;
@@ -18124,6 +18356,18 @@
18124
18356
  transition: background-color 150ms ease-in-out;
18125
18357
  }
18126
18358
 
18359
+ /* Fallback when close is a direct child of the popover (not in header) */
18360
+ .popover[popover] > .popover-close {
18361
+ position: absolute;
18362
+ top: 1rem;
18363
+ right: 1rem;
18364
+ margin-inline-start: 0;
18365
+ }
18366
+
18367
+ .popover[popover]:has(> .popover-close) > .popover-header {
18368
+ padding-right: 1.75rem;
18369
+ }
18370
+
18127
18371
  .popover-close:hover {
18128
18372
  background-color: var(--color-surface-container);
18129
18373
  }
@@ -18133,14 +18377,12 @@
18133
18377
  box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 20%, transparent);
18134
18378
  }
18135
18379
 
18136
- /* Popover Body */
18137
18380
  .popover-body {
18138
18381
  font-size: 0.875rem;
18139
18382
  color: var(--color-on-surface-variant);
18140
18383
  line-height: 1.5;
18141
18384
  }
18142
18385
 
18143
- /* Popover Footer */
18144
18386
  .popover-footer {
18145
18387
  display: flex;
18146
18388
  align-items: center;
@@ -18151,194 +18393,112 @@
18151
18393
  border-top: 1px solid var(--color-outline-variant);
18152
18394
  }
18153
18395
 
18154
- /* No Arrow Variant */
18155
- .popover-no-arrow .popover-arrow {
18156
- display: none;
18157
- }
18396
+ /* ========================================
18397
+ * Size variants
18398
+ * ======================================== */
18158
18399
 
18159
- /* Size Variants */
18160
- .popover-sm .popover-content {
18400
+ .popover-sm[popover] {
18161
18401
  min-width: 8rem;
18162
18402
  max-width: 14rem;
18163
18403
  padding: 0.75rem;
18164
18404
  }
18165
18405
 
18166
- .popover-lg .popover-content {
18406
+ .popover-lg[popover] {
18167
18407
  min-width: 16rem;
18168
18408
  max-width: 28rem;
18169
18409
  padding: 1.25rem;
18170
18410
  }
18171
18411
 
18172
- .popover-full .popover-content {
18412
+ .popover-full[popover] {
18173
18413
  min-width: 0;
18174
18414
  max-width: none;
18175
18415
  width: max-content;
18176
18416
  }
18177
18417
 
18178
- /* Color Variants */
18179
- /*
18180
- * Color intensity for themed popovers.
18181
- * Override this variable to adjust how strongly colors appear:
18182
- * - 20% = subtle tint
18183
- * - 30% = moderate (default)
18184
- * - 40% = bold/prominent
18185
- */
18186
- .popover {
18187
- --popover-color-intensity: 30%;
18188
- }
18189
-
18190
- /* Dark variant */
18191
- .popover-dark .popover-content {
18192
- background-color: var(--color-on-surface);
18193
- color: var(--color-surface);
18194
- border-color: transparent;
18195
- }
18418
+ /* ========================================
18419
+ * Color variants
18420
+ * ======================================== */
18196
18421
 
18197
- .popover-dark[class*="popover-top"],
18198
- .popover-dark[class*="popover-bottom"],
18199
- .popover-dark[class*="popover-left"],
18200
- .popover-dark[class*="popover-right"] {
18422
+ .popover-dark[popover] {
18201
18423
  background-color: var(--color-on-surface);
18202
18424
  color: var(--color-surface);
18203
18425
  border-color: transparent;
18204
18426
  }
18205
18427
 
18206
- .popover-dark .popover-arrow {
18428
+ .popover-dark[popover] > .popover-arrow {
18207
18429
  background-color: var(--color-on-surface);
18208
18430
  border-color: transparent;
18209
18431
  }
18210
18432
 
18211
- .popover-dark .popover-title {
18433
+ .popover-dark[popover] .popover-title {
18212
18434
  color: var(--color-surface);
18213
18435
  }
18214
18436
 
18215
- .popover-dark .popover-body {
18437
+ .popover-dark[popover] .popover-body {
18216
18438
  color: var(--color-surface);
18217
18439
  opacity: 0.9;
18218
18440
  }
18219
18441
 
18220
- /* Primary variant */
18221
- .popover-primary .popover-content {
18222
- background-color: color-mix(in oklch, var(--color-primary) var(--popover-color-intensity), var(--color-surface));
18223
- border-color: var(--color-primary);
18224
- }
18225
-
18226
- .popover-primary[class*="popover-top"],
18227
- .popover-primary[class*="popover-bottom"],
18228
- .popover-primary[class*="popover-left"],
18229
- .popover-primary[class*="popover-right"] {
18442
+ .popover-primary[popover] {
18230
18443
  background-color: color-mix(in oklch, var(--color-primary) var(--popover-color-intensity), var(--color-surface));
18231
18444
  border-color: var(--color-primary);
18232
18445
  }
18233
18446
 
18234
- .popover-primary .popover-arrow {
18447
+ .popover-primary[popover] > .popover-arrow {
18235
18448
  background-color: color-mix(in oklch, var(--color-primary) var(--popover-color-intensity), var(--color-surface));
18236
18449
  border-color: var(--color-primary);
18237
18450
  }
18238
18451
 
18239
- .popover-primary .popover-body {
18240
- color: var(--color-on-surface);
18241
- }
18242
-
18243
- .popover-primary .popover-title {
18452
+ .popover-primary[popover] .popover-body,
18453
+ .popover-primary[popover] .popover-title {
18244
18454
  color: var(--color-on-surface);
18245
18455
  }
18246
18456
 
18247
- /* Secondary variant */
18248
- .popover-secondary .popover-content {
18249
- background-color: color-mix(in oklch, var(--color-secondary) var(--popover-color-intensity), var(--color-surface));
18250
- border-color: var(--color-secondary);
18251
- }
18252
-
18253
- .popover-secondary[class*="popover-top"],
18254
- .popover-secondary[class*="popover-bottom"],
18255
- .popover-secondary[class*="popover-left"],
18256
- .popover-secondary[class*="popover-right"] {
18457
+ .popover-secondary[popover] {
18257
18458
  background-color: color-mix(in oklch, var(--color-secondary) var(--popover-color-intensity), var(--color-surface));
18258
18459
  border-color: var(--color-secondary);
18259
18460
  }
18260
18461
 
18261
- .popover-secondary .popover-arrow {
18462
+ .popover-secondary[popover] > .popover-arrow {
18262
18463
  background-color: color-mix(in oklch, var(--color-secondary) var(--popover-color-intensity), var(--color-surface));
18263
18464
  border-color: var(--color-secondary);
18264
18465
  }
18265
18466
 
18266
- .popover-secondary .popover-body {
18267
- color: var(--color-on-surface);
18268
- }
18269
-
18270
- .popover-secondary .popover-title {
18467
+ .popover-secondary[popover] .popover-body,
18468
+ .popover-secondary[popover] .popover-title {
18271
18469
  color: var(--color-on-surface);
18272
18470
  }
18273
18471
 
18274
- /* Tertiary variant */
18275
- .popover-tertiary .popover-content {
18276
- background-color: color-mix(in oklch, var(--color-tertiary) var(--popover-color-intensity), var(--color-surface));
18277
- border-color: var(--color-tertiary);
18278
- }
18279
-
18280
- .popover-tertiary[class*="popover-top"],
18281
- .popover-tertiary[class*="popover-bottom"],
18282
- .popover-tertiary[class*="popover-left"],
18283
- .popover-tertiary[class*="popover-right"] {
18472
+ .popover-tertiary[popover] {
18284
18473
  background-color: color-mix(in oklch, var(--color-tertiary) var(--popover-color-intensity), var(--color-surface));
18285
18474
  border-color: var(--color-tertiary);
18286
18475
  }
18287
18476
 
18288
- .popover-tertiary .popover-arrow {
18477
+ .popover-tertiary[popover] > .popover-arrow {
18289
18478
  background-color: color-mix(in oklch, var(--color-tertiary) var(--popover-color-intensity), var(--color-surface));
18290
18479
  border-color: var(--color-tertiary);
18291
18480
  }
18292
18481
 
18293
- .popover-tertiary .popover-body {
18294
- color: var(--color-on-surface);
18295
- }
18296
-
18297
- .popover-tertiary .popover-title {
18482
+ .popover-tertiary[popover] .popover-body,
18483
+ .popover-tertiary[popover] .popover-title {
18298
18484
  color: var(--color-on-surface);
18299
18485
  }
18300
18486
 
18301
- /* Surface highest variant */
18302
- .popover-surface-highest .popover-content {
18303
- background-color: var(--color-surface-container-highest);
18304
- border-color: var(--color-outline-variant);
18305
- }
18306
-
18307
- .popover-surface-highest[class*="popover-top"],
18308
- .popover-surface-highest[class*="popover-bottom"],
18309
- .popover-surface-highest[class*="popover-left"],
18310
- .popover-surface-highest[class*="popover-right"] {
18487
+ .popover-surface-highest[popover] {
18311
18488
  background-color: var(--color-surface-container-highest);
18312
18489
  border-color: var(--color-outline-variant);
18313
18490
  }
18314
18491
 
18315
- .popover-surface-highest .popover-arrow {
18492
+ .popover-surface-highest[popover] > .popover-arrow {
18316
18493
  background-color: var(--color-surface-container-highest);
18317
18494
  border-color: var(--color-outline-variant);
18318
18495
  }
18319
18496
 
18320
- /* Hover Trigger */
18321
- .popover-hover:hover .popover-content,
18322
- .popover-hover:focus-within .popover-content {
18323
- opacity: 1;
18324
- visibility: visible;
18325
- transform: translateX(-50%) scale(1);
18326
- }
18327
-
18328
- .popover-hover.popover-bottom:hover .popover-content,
18329
- .popover-hover.popover-bottom:focus-within .popover-content {
18330
- transform: translateX(-50%) scale(1);
18331
- }
18332
-
18333
- .popover-hover.popover-left:hover .popover-content,
18334
- .popover-hover.popover-left:focus-within .popover-content,
18335
- .popover-hover.popover-right:hover .popover-content,
18336
- .popover-hover.popover-right:focus-within .popover-content {
18337
- transform: translateY(-50%) scale(1);
18338
- }
18497
+ /* ========================================
18498
+ * Menu / confirm
18499
+ * ======================================== */
18339
18500
 
18340
- /* Menu Popover */
18341
- .popover-menu .popover-content {
18501
+ .popover-menu[popover] {
18342
18502
  padding: 0.5rem;
18343
18503
  }
18344
18504
 
@@ -18382,239 +18542,19 @@
18382
18542
  background-color: var(--color-outline-variant);
18383
18543
  }
18384
18544
 
18385
- /* Confirmation Popover */
18386
- .popover-confirm .popover-content {
18545
+ .popover-confirm[popover] {
18387
18546
  text-align: center;
18388
18547
  }
18389
18548
 
18390
- .popover-confirm .popover-footer {
18549
+ .popover-confirm[popover] .popover-footer {
18391
18550
  justify-content: center;
18392
18551
  }
18393
18552
 
18394
18553
  /* ========================================
18395
- * HTML Popover API Support
18396
- * Uses native [popover] attribute with :popover-open pseudo-class
18397
- * ======================================== */
18398
-
18399
- /* Native popover base styles */
18400
- .popover[popover] {
18401
- position: fixed;
18402
- inset: unset;
18403
- z-index: 1050;
18404
- min-width: 12rem;
18405
- max-width: 20rem;
18406
- padding: 1rem;
18407
- margin: 0;
18408
- background-color: var(--color-surface);
18409
- border: 1px solid var(--color-outline-variant);
18410
- border-radius: var(--radius-md);
18411
- box-shadow: var(--shadow-lg);
18412
- opacity: 0;
18413
- transform: scale(0.95);
18414
- transition: opacity 150ms ease-out, transform 150ms ease-out, overlay 150ms ease-out allow-discrete, display 150ms ease-out allow-discrete;
18415
- }
18416
-
18417
- /* Popover open state */
18418
- .popover[popover]:popover-open {
18419
- opacity: 1;
18420
- visibility: visible;
18421
- transform: scale(1);
18422
- }
18423
-
18424
- /* Starting state for entry animation */
18425
- @starting-style {
18426
- .popover[popover]:popover-open {
18427
- opacity: 0;
18428
- transform: scale(0.95);
18429
- }
18430
- }
18431
-
18432
- /* Native popover backdrop */
18433
- .popover[popover]::backdrop {
18434
- background-color: transparent;
18435
- transition: background-color 150ms ease-out, overlay 150ms ease-out allow-discrete, display 150ms ease-out allow-discrete;
18436
- }
18437
-
18438
- .popover[popover]:popover-open::backdrop {
18439
- background-color: color-mix(in srgb, var(--color-scrim) 10%, transparent);
18440
- }
18441
-
18442
- @starting-style {
18443
- .popover[popover]:popover-open::backdrop {
18444
- background-color: transparent;
18445
- }
18446
- }
18447
-
18448
- /* Native popover with modal backdrop */
18449
- .popover-modal[popover]::backdrop {
18450
- background-color: transparent;
18451
- transition: background-color 150ms ease-out, overlay 150ms ease-out allow-discrete, display 150ms ease-out allow-discrete;
18452
- }
18453
-
18454
- .popover-modal[popover]:popover-open::backdrop {
18455
- background-color: color-mix(in srgb, var(--color-scrim) 30%, transparent);
18456
- }
18457
-
18458
- @starting-style {
18459
- .popover-modal[popover]:popover-open::backdrop {
18460
- background-color: transparent;
18461
- }
18462
- }
18463
-
18464
- /* Native popover color variants */
18465
- .popover-primary[popover] {
18466
- background-color: color-mix(in oklch, var(--color-primary) var(--popover-color-intensity), var(--color-surface));
18467
- border-color: var(--color-primary);
18468
- }
18469
-
18470
- .popover-primary[popover] .popover-body {
18471
- color: var(--color-on-surface);
18472
- }
18473
-
18474
- .popover-primary[popover] .popover-title {
18475
- color: var(--color-on-surface);
18476
- }
18477
-
18478
- .popover-secondary[popover] {
18479
- background-color: color-mix(in oklch, var(--color-secondary) var(--popover-color-intensity), var(--color-surface));
18480
- border-color: var(--color-secondary);
18481
- }
18482
-
18483
- .popover-secondary[popover] .popover-body {
18484
- color: var(--color-on-surface);
18485
- }
18486
-
18487
- .popover-secondary[popover] .popover-title {
18488
- color: var(--color-on-surface);
18489
- }
18490
-
18491
- .popover-tertiary[popover] {
18492
- background-color: color-mix(in oklch, var(--color-tertiary) var(--popover-color-intensity), var(--color-surface));
18493
- border-color: var(--color-tertiary);
18494
- }
18495
-
18496
- .popover-tertiary[popover] .popover-body {
18497
- color: var(--color-on-surface);
18498
- }
18499
-
18500
- .popover-tertiary[popover] .popover-title {
18501
- color: var(--color-on-surface);
18502
- }
18503
-
18504
- .popover-dark[popover] {
18505
- background-color: var(--color-on-surface);
18506
- border-color: transparent;
18507
- }
18508
-
18509
- .popover-dark[popover] .popover-body {
18510
- color: var(--color-surface);
18511
- opacity: 0.9;
18512
- }
18513
-
18514
- .popover-dark[popover] .popover-title {
18515
- color: var(--color-surface);
18516
- }
18517
-
18518
- .popover-surface-highest[popover] {
18519
- background-color: var(--color-surface-container-highest);
18520
- border-color: var(--color-outline-variant);
18521
- }
18522
-
18523
- /* Native popover size variants */
18524
- .popover-sm[popover] {
18525
- min-width: 8rem;
18526
- max-width: 14rem;
18527
- padding: 0.75rem;
18528
- }
18529
-
18530
- .popover-lg[popover] {
18531
- min-width: 16rem;
18532
- max-width: 28rem;
18533
- padding: 1.25rem;
18534
- }
18535
-
18536
- .popover-full[popover] {
18537
- min-width: 0;
18538
- max-width: none;
18539
- width: max-content;
18540
- }
18541
-
18542
- /* ========================================
18543
- * CSS Anchor Positioning
18544
- * Enables popovers to track their trigger element on scroll
18545
- * Usage: Add anchor-name CSS property to trigger, position-anchor to popover
18554
+ * Reduce Motion
18546
18555
  * ======================================== */
18547
18556
 
18548
- /* Popover trigger anchor - use inline style or custom class to set anchor-name */
18549
- [popovertarget] {
18550
- /* Each trigger needs unique anchor-name, set via inline style:
18551
- style="anchor-name: --my-popover" */
18552
- }
18553
-
18554
- /* Anchored popover positioning
18555
- * Uses anchor() functions instead of position-area to avoid
18556
- * a Chrome rendering bug at HiDPI (DPR>=2) where position-area
18557
- * computes correct CSS-pixel offsets but renders at physical-pixel
18558
- * coordinates, doubling the distance from the anchor. */
18559
- .popover[popover][style*="position-anchor"] {
18560
- inset: unset;
18561
- top: anchor(bottom);
18562
- justify-self: anchor-center;
18563
- margin-top: 0.5rem;
18564
- }
18565
-
18566
- /* Position variants for anchored popovers */
18567
- .popover-top[popover][style*="position-anchor"] {
18568
- top: unset;
18569
- bottom: anchor(top);
18570
- margin-top: 0;
18571
- margin-bottom: 0.5rem;
18572
- }
18573
-
18574
- .popover-bottom[popover][style*="position-anchor"] {
18575
- top: anchor(bottom);
18576
- margin-top: 0.5rem;
18577
- margin-bottom: 0;
18578
- }
18579
-
18580
- .popover-left[popover][style*="position-anchor"] {
18581
- top: anchor(center);
18582
- right: anchor(left);
18583
- justify-self: unset;
18584
- translate: 0 -50%;
18585
- margin-top: 0;
18586
- margin-right: 0.5rem;
18587
- }
18588
-
18589
- .popover-right[popover][style*="position-anchor"] {
18590
- top: anchor(center);
18591
- left: anchor(right);
18592
- justify-self: unset;
18593
- translate: 0 -50%;
18594
- margin-top: 0;
18595
- margin-left: 0.5rem;
18596
- }
18597
-
18598
- /* Anchored popover alignment variants */
18599
- .popover-start[popover][style*="position-anchor"] {
18600
- justify-self: start;
18601
- }
18602
-
18603
- .popover-end[popover][style*="position-anchor"] {
18604
- justify-self: end;
18605
- }
18606
-
18607
- .popover-top.popover-start[popover][style*="position-anchor"] {
18608
- justify-self: start;
18609
- }
18610
-
18611
- .popover-top.popover-end[popover][style*="position-anchor"] {
18612
- justify-self: end;
18613
- }
18614
-
18615
- /* Reduce Motion */
18616
18557
  @media (prefers-reduced-motion: reduce) {
18617
- .popover-content,
18618
18558
  .popover-close,
18619
18559
  .popover-menu-item,
18620
18560
  .popover[popover],