@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.
package/dist/index.css CHANGED
@@ -1155,6 +1155,56 @@ html {
1155
1155
  filter: none;
1156
1156
  }
1157
1157
 
1158
+ /* Semantic Colors — must precede outline/ghost/text/tonal so those variants
1159
+ can override the filled background at equal specificity. */
1160
+ .btn-info {
1161
+ --btn-text-color: var(--color-info-content);
1162
+ background-color: var(--color-info);
1163
+ border-color: var(--color-info);
1164
+ }
1165
+
1166
+ .btn-info:hover {
1167
+ background-color: color-mix(in oklch, var(--color-info), black 10%);
1168
+ border-color: color-mix(in oklch, var(--color-info), black 10%);
1169
+ filter: none;
1170
+ }
1171
+
1172
+ .btn-success {
1173
+ --btn-text-color: var(--color-success-content);
1174
+ background-color: var(--color-success);
1175
+ border-color: var(--color-success);
1176
+ }
1177
+
1178
+ .btn-success:hover {
1179
+ background-color: color-mix(in oklch, var(--color-success), black 10%);
1180
+ border-color: color-mix(in oklch, var(--color-success), black 10%);
1181
+ filter: none;
1182
+ }
1183
+
1184
+ .btn-warning {
1185
+ --btn-text-color: var(--color-warning-content);
1186
+ background-color: var(--color-warning);
1187
+ border-color: var(--color-warning);
1188
+ }
1189
+
1190
+ .btn-warning:hover {
1191
+ background-color: color-mix(in oklch, var(--color-warning), black 10%);
1192
+ border-color: color-mix(in oklch, var(--color-warning), black 10%);
1193
+ filter: none;
1194
+ }
1195
+
1196
+ .btn-error {
1197
+ --btn-text-color: var(--color-error-content);
1198
+ background-color: var(--color-error);
1199
+ border-color: var(--color-error);
1200
+ }
1201
+
1202
+ .btn-error:hover {
1203
+ background-color: color-mix(in oklch, var(--color-error), black 10%);
1204
+ border-color: color-mix(in oklch, var(--color-error), black 10%);
1205
+ filter: none;
1206
+ }
1207
+
1158
1208
  /* Outline / Outlined Variant (.btn-outlined is an alias) */
1159
1209
  .btn-outline,
1160
1210
  .btn-outlined {
@@ -1514,55 +1564,6 @@ html {
1514
1564
  background-color: var(--color-error-container);
1515
1565
  }
1516
1566
 
1517
- /* Semantic Colors */
1518
- .btn-info {
1519
- --btn-text-color: var(--color-info-content);
1520
- background-color: var(--color-info);
1521
- border-color: var(--color-info);
1522
- }
1523
-
1524
- .btn-info:hover {
1525
- background-color: color-mix(in oklch, var(--color-info), black 10%);
1526
- border-color: color-mix(in oklch, var(--color-info), black 10%);
1527
- filter: none;
1528
- }
1529
-
1530
- .btn-success {
1531
- --btn-text-color: var(--color-success-content);
1532
- background-color: var(--color-success);
1533
- border-color: var(--color-success);
1534
- }
1535
-
1536
- .btn-success:hover {
1537
- background-color: color-mix(in oklch, var(--color-success), black 10%);
1538
- border-color: color-mix(in oklch, var(--color-success), black 10%);
1539
- filter: none;
1540
- }
1541
-
1542
- .btn-warning {
1543
- --btn-text-color: var(--color-warning-content);
1544
- background-color: var(--color-warning);
1545
- border-color: var(--color-warning);
1546
- }
1547
-
1548
- .btn-warning:hover {
1549
- background-color: color-mix(in oklch, var(--color-warning), black 10%);
1550
- border-color: color-mix(in oklch, var(--color-warning), black 10%);
1551
- filter: none;
1552
- }
1553
-
1554
- .btn-error {
1555
- --btn-text-color: var(--color-error-content);
1556
- background-color: var(--color-error);
1557
- border-color: var(--color-error);
1558
- }
1559
-
1560
- .btn-error:hover {
1561
- background-color: color-mix(in oklch, var(--color-error), black 10%);
1562
- border-color: color-mix(in oklch, var(--color-error), black 10%);
1563
- filter: none;
1564
- }
1565
-
1566
1567
  /* Size Variants */
1567
1568
  .btn-xs {
1568
1569
  --btn-p: 0.5rem;
@@ -4360,198 +4361,567 @@ html {
4360
4361
  }
4361
4362
  }
4362
4363
 
4363
- /**
4364
- * Chat Component Styles
4365
- * DuskMoonUI - LLM-oriented chat primitives
4366
- */
4367
-
4368
4364
  @layer components {
4369
- .chat {
4365
+ /**
4366
+ * Scrollable transcript with Scroll-Driven Animations indicators.
4367
+ * Set an explicit height / max-height (or place in a flex child with min-height: 0).
4368
+ * Pair each .chat[data-chat-tl="N"] with .chat-scroll-indicator[data-chat-tl="N"] (N = 1..24).
4369
+ */
4370
+ .chat-scroll {
4371
+ --chat-scroll-indicator-size: 0.875rem;
4372
+ --chat-scroll-indicator-active-size: 1.125rem;
4373
+ --chat-scroll-indicator-thickness: 0.1875rem;
4374
+ --chat-scroll-indicator-gap: 0.3125rem;
4375
+ --chat-scroll-indicator-hover-scale: 1.55;
4376
+ --chat-scroll-indicator-neighbor-scale: 1.22;
4377
+
4378
+ container-type: size;
4379
+ container-name: chat-scroll;
4370
4380
  display: grid;
4371
4381
  grid-template-columns: auto minmax(0, 1fr);
4372
4382
  column-gap: 0.75rem;
4373
- align-items: end;
4374
- padding: 0.25rem 0;
4383
+ align-items: start;
4384
+ min-height: 0;
4385
+ overflow-x: hidden;
4386
+ overflow-y: auto;
4387
+ scroll-behavior: smooth;
4388
+ overscroll-behavior-y: contain;
4389
+ timeline-scope:
4390
+ --chat-1,
4391
+ --chat-2,
4392
+ --chat-3,
4393
+ --chat-4,
4394
+ --chat-5,
4395
+ --chat-6,
4396
+ --chat-7,
4397
+ --chat-8,
4398
+ --chat-9,
4399
+ --chat-10,
4400
+ --chat-11,
4401
+ --chat-12,
4402
+ --chat-13,
4403
+ --chat-14,
4404
+ --chat-15,
4405
+ --chat-16,
4406
+ --chat-17,
4407
+ --chat-18,
4408
+ --chat-19,
4409
+ --chat-20,
4410
+ --chat-21,
4411
+ --chat-22,
4412
+ --chat-23,
4413
+ --chat-24;
4414
+ }
4415
+
4416
+ .chat-scroll-track {
4417
+ position: sticky;
4418
+ top: 0;
4419
+ z-index: 1;
4420
+ display: flex;
4421
+ flex-direction: column;
4422
+ justify-content: center;
4423
+ align-items: center;
4424
+ gap: var(--chat-scroll-indicator-gap);
4425
+ width: calc(
4426
+ var(--chat-scroll-indicator-active-size) * var(--chat-scroll-indicator-hover-scale)
4427
+ );
4428
+ height: 100cqh;
4429
+ margin: 0;
4430
+ padding: 0.75rem 0;
4431
+ overflow: visible;
4432
+ list-style: none;
4433
+ pointer-events: none;
4375
4434
  }
4376
4435
 
4377
- .chat-start {
4378
- grid-template-columns: auto minmax(0, 1fr);
4436
+ .chat-scroll-body {
4437
+ display: flex;
4438
+ flex-direction: column;
4439
+ min-width: 0;
4379
4440
  }
4380
4441
 
4381
- .chat-end {
4382
- grid-template-columns: minmax(0, 1fr) auto;
4442
+ .chat-scroll-indicator {
4443
+ display: block;
4444
+ flex-shrink: 0;
4445
+ width: var(--chat-scroll-indicator-size);
4446
+ height: var(--chat-scroll-indicator-thickness);
4447
+ border: 0;
4448
+ border-radius: 999px;
4449
+ padding: 0;
4450
+ appearance: none;
4451
+ background-color: color-mix(in oklch, var(--color-on-surface) 28%, transparent);
4452
+ color: inherit;
4453
+ font: inherit;
4454
+ opacity: 0.45;
4455
+ pointer-events: auto;
4456
+ text-decoration: none;
4457
+ cursor: pointer;
4458
+ transform: scaleX(1);
4459
+ transform-origin: center;
4460
+ transition:
4461
+ transform 140ms ease,
4462
+ opacity 140ms ease,
4463
+ background-color 140ms ease;
4383
4464
  }
4384
4465
 
4385
- .chat-avatar {
4386
- grid-row: 1 / span 999;
4387
- grid-column: 1;
4388
- align-self: start;
4389
- justify-self: start;
4466
+ .chat-scroll-indicator:hover,
4467
+ .chat-scroll-indicator:focus-visible {
4468
+ transform: scaleX(var(--chat-scroll-indicator-hover-scale)) scaleY(1.35);
4469
+ background-color: var(--color-on-surface);
4470
+ opacity: 1;
4390
4471
  }
4391
4472
 
4392
- .chat-end .chat-avatar {
4393
- grid-column: 2;
4394
- justify-self: end;
4473
+ .chat-scroll-indicator:hover + .chat-scroll-indicator,
4474
+ .chat-scroll-indicator:has(+ .chat-scroll-indicator:hover) {
4475
+ transform: scaleX(var(--chat-scroll-indicator-neighbor-scale)) scaleY(1.15);
4476
+ background-color: color-mix(in oklch, var(--color-on-surface) 55%, transparent);
4477
+ opacity: 0.75;
4395
4478
  }
4396
4479
 
4397
- .chat > :not(.chat-avatar) {
4398
- grid-column: 2;
4399
- justify-self: start;
4400
- max-width: 100%;
4401
- margin-bottom: 0.25rem;
4480
+ .chat[data-chat-tl] {
4481
+ scroll-margin-block-start: 0.5rem;
4402
4482
  }
4403
4483
 
4404
- .chat-end > :not(.chat-avatar) {
4405
- grid-column: 1;
4406
- justify-self: end;
4484
+ .chat-scroll-indicator:focus-visible {
4485
+ outline: none;
4486
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 20%, transparent);
4407
4487
  }
4408
4488
 
4409
- .chat-header,
4410
- .chat-footer {
4411
- color: var(--color-on-surface-variant);
4412
- font-size: 0.75rem;
4413
- line-height: 1rem;
4489
+ @supports (animation-timeline: --chat-1) {
4490
+ .chat-scroll-indicator {
4491
+ animation-name: chat-scroll-indicator-activate;
4492
+ animation-duration: 1ms;
4493
+ animation-timing-function: linear;
4494
+ animation-fill-mode: both;
4495
+ animation-range: entry 0% exit 100%;
4496
+ }
4414
4497
  }
4415
4498
 
4416
- .chat-header {
4417
- margin-bottom: 0.125rem;
4499
+ .chat[data-chat-tl="1"] {
4500
+ view-timeline-name: --chat-1;
4501
+ view-timeline-axis: block;
4418
4502
  }
4419
4503
 
4420
- .chat-footer {
4421
- margin-top: 0.125rem;
4422
- margin-bottom: 0;
4504
+ .chat[data-chat-tl="2"] {
4505
+ view-timeline-name: --chat-2;
4506
+ view-timeline-axis: block;
4423
4507
  }
4424
4508
 
4425
- .chat-bubble {
4426
- --chat-bubble-bg: var(--color-surface-container-highest);
4427
- --chat-bubble-fg: var(--color-on-surface);
4509
+ .chat[data-chat-tl="3"] {
4510
+ view-timeline-name: --chat-3;
4511
+ view-timeline-axis: block;
4512
+ }
4428
4513
 
4429
- position: relative;
4430
- max-width: min(80ch, 100%);
4431
- padding: 0.625rem 0.875rem;
4432
- border-radius: 1rem;
4433
- background-color: var(--chat-bubble-bg);
4434
- color: var(--chat-bubble-fg);
4435
- box-shadow: inset 0 0 0 1px var(--color-outline-variant);
4436
- font-size: 0.875rem;
4437
- line-height: 1.45;
4438
- overflow-wrap: anywhere;
4439
- word-break: break-word;
4514
+ .chat[data-chat-tl="4"] {
4515
+ view-timeline-name: --chat-4;
4516
+ view-timeline-axis: block;
4440
4517
  }
4441
4518
 
4442
- .chat-start .chat-bubble::before,
4443
- .chat-end .chat-bubble::before,
4444
- .chat-start .chat-bubble::after,
4445
- .chat-end .chat-bubble::after {
4446
- content: "";
4447
- position: absolute;
4448
- top: 0;
4449
- clip-path: polygon(0 0, 100% 0, 100% 100%);
4519
+ .chat[data-chat-tl="5"] {
4520
+ view-timeline-name: --chat-5;
4521
+ view-timeline-axis: block;
4450
4522
  }
4451
4523
 
4452
- .chat-start .chat-bubble::before {
4453
- left: -0.625rem;
4454
- width: 1rem;
4455
- height: 1rem;
4456
- background-color: var(--color-outline-variant);
4524
+ .chat[data-chat-tl="6"] {
4525
+ view-timeline-name: --chat-6;
4526
+ view-timeline-axis: block;
4457
4527
  }
4458
4528
 
4459
- .chat-start .chat-bubble::after {
4460
- left: -0.5rem;
4461
- width: calc(1rem - 2px);
4462
- height: calc(1rem - 2px);
4463
- top: 1px;
4464
- background-color: var(--chat-bubble-bg);
4529
+ .chat[data-chat-tl="7"] {
4530
+ view-timeline-name: --chat-7;
4531
+ view-timeline-axis: block;
4465
4532
  }
4466
4533
 
4467
- .chat-start .chat-bubble {
4468
- border-top-left-radius: 0;
4534
+ .chat[data-chat-tl="8"] {
4535
+ view-timeline-name: --chat-8;
4536
+ view-timeline-axis: block;
4469
4537
  }
4470
4538
 
4471
- .chat-end .chat-bubble::before {
4472
- right: -0.625rem;
4473
- width: 1rem;
4474
- height: 1rem;
4475
- background-color: var(--color-outline-variant);
4476
- transform: scaleX(-1);
4539
+ .chat[data-chat-tl="9"] {
4540
+ view-timeline-name: --chat-9;
4541
+ view-timeline-axis: block;
4477
4542
  }
4478
4543
 
4479
- .chat-end .chat-bubble::after {
4480
- right: -0.5rem;
4481
- width: calc(1rem - 2px);
4482
- height: calc(1rem - 2px);
4483
- top: 1px;
4484
- background-color: var(--chat-bubble-bg);
4485
- transform: scaleX(-1);
4544
+ .chat[data-chat-tl="10"] {
4545
+ view-timeline-name: --chat-10;
4546
+ view-timeline-axis: block;
4486
4547
  }
4487
4548
 
4488
- .chat-end .chat-bubble {
4489
- border-top-right-radius: 0;
4549
+ .chat[data-chat-tl="11"] {
4550
+ view-timeline-name: --chat-11;
4551
+ view-timeline-axis: block;
4490
4552
  }
4491
4553
 
4492
- .chat-bubble-primary {
4493
- --chat-bubble-bg: var(--color-primary-container);
4494
- --chat-bubble-fg: var(--color-on-primary-container);
4554
+ .chat[data-chat-tl="12"] {
4555
+ view-timeline-name: --chat-12;
4556
+ view-timeline-axis: block;
4495
4557
  }
4496
4558
 
4497
- .chat-bubble-secondary {
4498
- --chat-bubble-bg: var(--color-secondary-container);
4499
- --chat-bubble-fg: var(--color-on-secondary-container);
4559
+ .chat[data-chat-tl="13"] {
4560
+ view-timeline-name: --chat-13;
4561
+ view-timeline-axis: block;
4500
4562
  }
4501
4563
 
4502
- .chat-bubble-tertiary {
4503
- --chat-bubble-bg: var(--color-tertiary-container);
4504
- --chat-bubble-fg: var(--color-on-tertiary-container);
4564
+ .chat[data-chat-tl="14"] {
4565
+ view-timeline-name: --chat-14;
4566
+ view-timeline-axis: block;
4505
4567
  }
4506
4568
 
4507
- .chat-bubble-info {
4508
- --chat-bubble-bg: var(--color-info-container);
4509
- --chat-bubble-fg: var(--color-on-info-container);
4569
+ .chat[data-chat-tl="15"] {
4570
+ view-timeline-name: --chat-15;
4571
+ view-timeline-axis: block;
4510
4572
  }
4511
4573
 
4512
- .chat-bubble-success {
4513
- --chat-bubble-bg: var(--color-success-container);
4514
- --chat-bubble-fg: var(--color-on-success-container);
4574
+ .chat[data-chat-tl="16"] {
4575
+ view-timeline-name: --chat-16;
4576
+ view-timeline-axis: block;
4515
4577
  }
4516
4578
 
4517
- .chat-bubble-warning {
4518
- --chat-bubble-bg: var(--color-warning-container);
4519
- --chat-bubble-fg: var(--color-on-warning-container);
4579
+ .chat[data-chat-tl="17"] {
4580
+ view-timeline-name: --chat-17;
4581
+ view-timeline-axis: block;
4520
4582
  }
4521
4583
 
4522
- .chat-bubble-error {
4523
- --chat-bubble-bg: var(--color-error-container);
4524
- --chat-bubble-fg: var(--color-on-error-container);
4584
+ .chat[data-chat-tl="18"] {
4585
+ view-timeline-name: --chat-18;
4586
+ view-timeline-axis: block;
4525
4587
  }
4526
4588
 
4527
- .chat-bubble-accent {
4528
- --chat-bubble-bg: color-mix(in oklch, var(--color-accent) 15%, var(--color-surface));
4529
- --chat-bubble-fg: var(--color-on-surface);
4589
+ .chat[data-chat-tl="19"] {
4590
+ view-timeline-name: --chat-19;
4591
+ view-timeline-axis: block;
4530
4592
  }
4531
4593
 
4532
- .chat-bubble-neutral {
4533
- --chat-bubble-bg: color-mix(in oklch, var(--color-neutral) 15%, var(--color-surface));
4534
- --chat-bubble-fg: var(--color-on-surface);
4594
+ .chat[data-chat-tl="20"] {
4595
+ view-timeline-name: --chat-20;
4596
+ view-timeline-axis: block;
4535
4597
  }
4536
4598
 
4537
- .chat-bubble-base {
4538
- --chat-bubble-bg: var(--color-base-200);
4539
- --chat-bubble-fg: var(--color-base-content);
4599
+ .chat[data-chat-tl="21"] {
4600
+ view-timeline-name: --chat-21;
4601
+ view-timeline-axis: block;
4540
4602
  }
4541
4603
 
4542
- .chat-bubble-filled.chat-bubble-primary {
4543
- --chat-bubble-bg: var(--color-primary);
4544
- --chat-bubble-fg: var(--color-primary-content);
4604
+ .chat[data-chat-tl="22"] {
4605
+ view-timeline-name: --chat-22;
4606
+ view-timeline-axis: block;
4545
4607
  }
4546
4608
 
4547
- .chat-bubble-filled.chat-bubble-secondary {
4548
- --chat-bubble-bg: var(--color-secondary);
4549
- --chat-bubble-fg: var(--color-secondary-content);
4609
+ .chat[data-chat-tl="23"] {
4610
+ view-timeline-name: --chat-23;
4611
+ view-timeline-axis: block;
4550
4612
  }
4551
4613
 
4552
- .chat-bubble-filled.chat-bubble-tertiary {
4553
- --chat-bubble-bg: var(--color-tertiary);
4554
- --chat-bubble-fg: var(--color-tertiary-content);
4614
+ .chat[data-chat-tl="24"] {
4615
+ view-timeline-name: --chat-24;
4616
+ view-timeline-axis: block;
4617
+ }
4618
+
4619
+ .chat-scroll-indicator[data-chat-tl="1"] {
4620
+ animation-timeline: --chat-1;
4621
+ }
4622
+
4623
+ .chat-scroll-indicator[data-chat-tl="2"] {
4624
+ animation-timeline: --chat-2;
4625
+ }
4626
+
4627
+ .chat-scroll-indicator[data-chat-tl="3"] {
4628
+ animation-timeline: --chat-3;
4629
+ }
4630
+
4631
+ .chat-scroll-indicator[data-chat-tl="4"] {
4632
+ animation-timeline: --chat-4;
4633
+ }
4634
+
4635
+ .chat-scroll-indicator[data-chat-tl="5"] {
4636
+ animation-timeline: --chat-5;
4637
+ }
4638
+
4639
+ .chat-scroll-indicator[data-chat-tl="6"] {
4640
+ animation-timeline: --chat-6;
4641
+ }
4642
+
4643
+ .chat-scroll-indicator[data-chat-tl="7"] {
4644
+ animation-timeline: --chat-7;
4645
+ }
4646
+
4647
+ .chat-scroll-indicator[data-chat-tl="8"] {
4648
+ animation-timeline: --chat-8;
4649
+ }
4650
+
4651
+ .chat-scroll-indicator[data-chat-tl="9"] {
4652
+ animation-timeline: --chat-9;
4653
+ }
4654
+
4655
+ .chat-scroll-indicator[data-chat-tl="10"] {
4656
+ animation-timeline: --chat-10;
4657
+ }
4658
+
4659
+ .chat-scroll-indicator[data-chat-tl="11"] {
4660
+ animation-timeline: --chat-11;
4661
+ }
4662
+
4663
+ .chat-scroll-indicator[data-chat-tl="12"] {
4664
+ animation-timeline: --chat-12;
4665
+ }
4666
+
4667
+ .chat-scroll-indicator[data-chat-tl="13"] {
4668
+ animation-timeline: --chat-13;
4669
+ }
4670
+
4671
+ .chat-scroll-indicator[data-chat-tl="14"] {
4672
+ animation-timeline: --chat-14;
4673
+ }
4674
+
4675
+ .chat-scroll-indicator[data-chat-tl="15"] {
4676
+ animation-timeline: --chat-15;
4677
+ }
4678
+
4679
+ .chat-scroll-indicator[data-chat-tl="16"] {
4680
+ animation-timeline: --chat-16;
4681
+ }
4682
+
4683
+ .chat-scroll-indicator[data-chat-tl="17"] {
4684
+ animation-timeline: --chat-17;
4685
+ }
4686
+
4687
+ .chat-scroll-indicator[data-chat-tl="18"] {
4688
+ animation-timeline: --chat-18;
4689
+ }
4690
+
4691
+ .chat-scroll-indicator[data-chat-tl="19"] {
4692
+ animation-timeline: --chat-19;
4693
+ }
4694
+
4695
+ .chat-scroll-indicator[data-chat-tl="20"] {
4696
+ animation-timeline: --chat-20;
4697
+ }
4698
+
4699
+ .chat-scroll-indicator[data-chat-tl="21"] {
4700
+ animation-timeline: --chat-21;
4701
+ }
4702
+
4703
+ .chat-scroll-indicator[data-chat-tl="22"] {
4704
+ animation-timeline: --chat-22;
4705
+ }
4706
+
4707
+ .chat-scroll-indicator[data-chat-tl="23"] {
4708
+ animation-timeline: --chat-23;
4709
+ }
4710
+
4711
+ .chat-scroll-indicator[data-chat-tl="24"] {
4712
+ animation-timeline: --chat-24;
4713
+ }
4714
+
4715
+ @keyframes chat-scroll-indicator-activate {
4716
+ 0%,
4717
+ 100% {
4718
+ width: var(--chat-scroll-indicator-size);
4719
+ background-color: color-mix(in oklch, var(--color-on-surface) 28%, transparent);
4720
+ opacity: 0.45;
4721
+ }
4722
+
4723
+ 35%,
4724
+ 65% {
4725
+ width: var(--chat-scroll-indicator-active-size);
4726
+ background-color: var(--color-on-surface);
4727
+ opacity: 1;
4728
+ }
4729
+ }
4730
+
4731
+ .chat {
4732
+ display: grid;
4733
+ grid-template-columns: auto minmax(0, 1fr);
4734
+ column-gap: 0.75rem;
4735
+ align-items: end;
4736
+ padding: 0.25rem 0;
4737
+ }
4738
+
4739
+ .chat-start {
4740
+ grid-template-columns: auto minmax(0, 1fr);
4741
+ }
4742
+
4743
+ .chat-end {
4744
+ grid-template-columns: minmax(0, 1fr) auto;
4745
+ }
4746
+
4747
+ .chat-avatar {
4748
+ grid-row: 1 / span 999;
4749
+ grid-column: 1;
4750
+ align-self: start;
4751
+ justify-self: start;
4752
+ }
4753
+
4754
+ .chat-end .chat-avatar {
4755
+ grid-column: 2;
4756
+ justify-self: end;
4757
+ }
4758
+
4759
+ .chat > :not(.chat-avatar) {
4760
+ grid-column: 2;
4761
+ justify-self: start;
4762
+ max-width: 100%;
4763
+ margin-bottom: 0.25rem;
4764
+ }
4765
+
4766
+ .chat-end > :not(.chat-avatar) {
4767
+ grid-column: 1;
4768
+ justify-self: end;
4769
+ }
4770
+
4771
+ .chat-header,
4772
+ .chat-footer {
4773
+ color: var(--color-on-surface-variant);
4774
+ font-size: 0.75rem;
4775
+ line-height: 1rem;
4776
+ }
4777
+
4778
+ .chat-header {
4779
+ margin-bottom: 0.125rem;
4780
+ }
4781
+
4782
+ .chat-footer {
4783
+ margin-top: 0.125rem;
4784
+ margin-bottom: 0;
4785
+ }
4786
+
4787
+ .chat-bubble {
4788
+ --chat-bubble-bg: var(--color-surface-container-highest);
4789
+ --chat-bubble-fg: var(--color-on-surface);
4790
+
4791
+ position: relative;
4792
+ display: flex;
4793
+ flex-direction: column;
4794
+ align-items: stretch;
4795
+ gap: 0.5rem;
4796
+ max-width: min(80ch, 100%);
4797
+ padding: 0.625rem 0.875rem;
4798
+ border-radius: 1rem;
4799
+ background-color: var(--chat-bubble-bg);
4800
+ color: var(--chat-bubble-fg);
4801
+ box-shadow: inset 0 0 0 1px var(--color-outline-variant);
4802
+ font-size: 0.875rem;
4803
+ line-height: 1.45;
4804
+ overflow-wrap: anywhere;
4805
+ word-break: break-word;
4806
+ }
4807
+
4808
+ .chat-bubble-content {
4809
+ min-width: 0;
4810
+ }
4811
+
4812
+ .chat-start .chat-bubble::before,
4813
+ .chat-end .chat-bubble::before,
4814
+ .chat-start .chat-bubble::after,
4815
+ .chat-end .chat-bubble::after {
4816
+ content: "";
4817
+ position: absolute;
4818
+ top: 0;
4819
+ clip-path: polygon(0 0, 100% 0, 100% 100%);
4820
+ }
4821
+
4822
+ .chat-start .chat-bubble::before {
4823
+ left: -0.625rem;
4824
+ width: 1rem;
4825
+ height: 1rem;
4826
+ background-color: var(--color-outline-variant);
4827
+ }
4828
+
4829
+ .chat-start .chat-bubble::after {
4830
+ left: -0.5rem;
4831
+ width: calc(1rem - 2px);
4832
+ height: calc(1rem - 2px);
4833
+ top: 1px;
4834
+ background-color: var(--chat-bubble-bg);
4835
+ }
4836
+
4837
+ .chat-start .chat-bubble {
4838
+ border-top-left-radius: 0;
4839
+ }
4840
+
4841
+ .chat-end .chat-bubble::before {
4842
+ right: -0.625rem;
4843
+ width: 1rem;
4844
+ height: 1rem;
4845
+ background-color: var(--color-outline-variant);
4846
+ transform: scaleX(-1);
4847
+ }
4848
+
4849
+ .chat-end .chat-bubble::after {
4850
+ right: -0.5rem;
4851
+ width: calc(1rem - 2px);
4852
+ height: calc(1rem - 2px);
4853
+ top: 1px;
4854
+ background-color: var(--chat-bubble-bg);
4855
+ transform: scaleX(-1);
4856
+ }
4857
+
4858
+ .chat-end .chat-bubble {
4859
+ border-top-right-radius: 0;
4860
+ }
4861
+
4862
+ .chat-bubble-primary {
4863
+ --chat-bubble-bg: var(--color-primary-container);
4864
+ --chat-bubble-fg: var(--color-on-primary-container);
4865
+ }
4866
+
4867
+ .chat-bubble-secondary {
4868
+ --chat-bubble-bg: var(--color-secondary-container);
4869
+ --chat-bubble-fg: var(--color-on-secondary-container);
4870
+ }
4871
+
4872
+ .chat-bubble-tertiary {
4873
+ --chat-bubble-bg: var(--color-tertiary-container);
4874
+ --chat-bubble-fg: var(--color-on-tertiary-container);
4875
+ }
4876
+
4877
+ .chat-bubble-info {
4878
+ --chat-bubble-bg: var(--color-info-container);
4879
+ --chat-bubble-fg: var(--color-on-info-container);
4880
+ }
4881
+
4882
+ .chat-bubble-success {
4883
+ --chat-bubble-bg: var(--color-success-container);
4884
+ --chat-bubble-fg: var(--color-on-success-container);
4885
+ }
4886
+
4887
+ .chat-bubble-warning {
4888
+ --chat-bubble-bg: var(--color-warning-container);
4889
+ --chat-bubble-fg: var(--color-on-warning-container);
4890
+ }
4891
+
4892
+ .chat-bubble-error {
4893
+ --chat-bubble-bg: var(--color-error-container);
4894
+ --chat-bubble-fg: var(--color-on-error-container);
4895
+ }
4896
+
4897
+ .chat-bubble-accent {
4898
+ --chat-bubble-bg: color-mix(in oklch, var(--color-accent) 15%, var(--color-surface));
4899
+ --chat-bubble-fg: var(--color-on-surface);
4900
+ }
4901
+
4902
+ .chat-bubble-neutral {
4903
+ --chat-bubble-bg: color-mix(in oklch, var(--color-neutral) 15%, var(--color-surface));
4904
+ --chat-bubble-fg: var(--color-on-surface);
4905
+ }
4906
+
4907
+ .chat-bubble-base {
4908
+ --chat-bubble-bg: var(--color-base-200);
4909
+ --chat-bubble-fg: var(--color-base-content);
4910
+ }
4911
+
4912
+ .chat-bubble-filled.chat-bubble-primary {
4913
+ --chat-bubble-bg: var(--color-primary);
4914
+ --chat-bubble-fg: var(--color-primary-content);
4915
+ }
4916
+
4917
+ .chat-bubble-filled.chat-bubble-secondary {
4918
+ --chat-bubble-bg: var(--color-secondary);
4919
+ --chat-bubble-fg: var(--color-secondary-content);
4920
+ }
4921
+
4922
+ .chat-bubble-filled.chat-bubble-tertiary {
4923
+ --chat-bubble-bg: var(--color-tertiary);
4924
+ --chat-bubble-fg: var(--color-tertiary-content);
4555
4925
  }
4556
4926
 
4557
4927
  .chat-bubble-filled.chat-bubble-info {
@@ -4621,6 +4991,14 @@ html {
4621
4991
  overflow: hidden;
4622
4992
  }
4623
4993
 
4994
+ .chat-bubble > .chat-reasoning,
4995
+ .chat-bubble > .chat-tool,
4996
+ .chat-reasoning .chat-tool,
4997
+ .chat-reasoning-body > .chat-tool {
4998
+ width: 100%;
4999
+ max-width: none;
5000
+ }
5001
+
4624
5002
  .chat-reasoning > summary,
4625
5003
  .chat-tool > summary {
4626
5004
  cursor: pointer;
@@ -4633,12 +5011,28 @@ html {
4633
5011
  font-weight: 500;
4634
5012
  }
4635
5013
 
4636
- .chat-reasoning > :not(summary) {
5014
+ .chat-reasoning-body {
5015
+ display: flex;
5016
+ flex-direction: column;
5017
+ gap: 0.5rem;
4637
5018
  padding: 0 0.75rem 0.75rem;
4638
5019
  color: var(--color-on-surface-variant);
5020
+ }
5021
+
5022
+ .chat-reasoning-body > :not(.chat-tool) {
4639
5023
  font-style: italic;
4640
5024
  }
4641
5025
 
5026
+ .chat-reasoning > div:not(.chat-tool):not(.chat-reasoning-body) {
5027
+ padding: 0 0.75rem 0.75rem;
5028
+ color: var(--color-on-surface-variant);
5029
+ font-style: italic;
5030
+ }
5031
+
5032
+ .chat-reasoning > .chat-tool {
5033
+ margin: 0 0.75rem 0.75rem;
5034
+ }
5035
+
4642
5036
  .chat-tool-header {
4643
5037
  display: flex;
4644
5038
  align-items: center;
@@ -4733,7 +5127,8 @@ html {
4733
5127
  animation-delay: 300ms;
4734
5128
  }
4735
5129
 
4736
- .chat-bubble-streaming::after {
5130
+ .chat-bubble-streaming::after,
5131
+ .chat-bubble-content.chat-bubble-streaming::after {
4737
5132
  content: "";
4738
5133
  display: inline-block;
4739
5134
  width: 1px;
@@ -4744,6 +5139,10 @@ html {
4744
5139
  animation: chat-stream-caret 1s step-end infinite;
4745
5140
  }
4746
5141
 
5142
+ .chat-bubble.chat-bubble-streaming:has(.chat-reasoning, .chat-tool, .chat-bubble-content)::after {
5143
+ content: none;
5144
+ }
5145
+
4747
5146
  .chat-reasoning > summary:focus-visible,
4748
5147
  .chat-tool > summary:focus-visible {
4749
5148
  outline: none;
@@ -4783,15 +5182,26 @@ html {
4783
5182
  }
4784
5183
 
4785
5184
  @media (prefers-reduced-motion: reduce) {
5185
+ .chat-scroll {
5186
+ scroll-behavior: auto;
5187
+ }
5188
+
5189
+ .chat-scroll-indicator {
5190
+ animation: none;
5191
+ transition: none;
5192
+ }
5193
+
4786
5194
  .chat-typing::before,
4787
5195
  .chat-typing::after,
4788
5196
  .chat-typing span,
4789
5197
  .chat-bubble-streaming::after,
5198
+ .chat-bubble-content.chat-bubble-streaming::after,
4790
5199
  .chat-tool-running .chat-tool-header::before {
4791
5200
  animation: none;
4792
5201
  }
4793
5202
 
4794
- .chat-bubble-streaming::after {
5203
+ .chat-bubble-streaming::after,
5204
+ .chat-bubble-content.chat-bubble-streaming::after {
4795
5205
  opacity: 1;
4796
5206
  }
4797
5207
  }
@@ -14689,439 +15099,243 @@ html {
14689
15099
  .toast-ghost.toast-warning { color: var(--color-warning); }
14690
15100
  .toast-ghost.toast-error { color: var(--color-error); }
14691
15101
  .toast-ghost.toast-accent { color: var(--color-accent); }
14692
- .toast-ghost.toast-neutral { color: var(--color-neutral); }
14693
- .toast-ghost.toast-base { color: var(--color-base-content); }
14694
-
14695
- .toast-ghost .toast-title,
14696
- .toast-ghost .toast-message {
14697
- color: inherit;
14698
- }
14699
-
14700
- /* Progress Bar (for auto-dismiss) */
14701
- .toast-progress {
14702
- position: absolute;
14703
- bottom: 0;
14704
- left: 0;
14705
- height: 3px;
14706
- background-color: currentColor;
14707
- border-radius: 0 0 var(--radius-md) var(--radius-md);
14708
- animation: toast-progress linear forwards;
14709
- }
14710
-
14711
- @keyframes toast-progress {
14712
- from {
14713
- width: 100%;
14714
- }
14715
- to {
14716
- width: 0%;
14717
- }
14718
- }
14719
-
14720
- /* Reduce Motion */
14721
- @media (prefers-reduced-motion: reduce) {
14722
- .toast {
14723
- transition: opacity 0ms;
14724
- transform: none;
14725
- }
14726
-
14727
- .toast-progress {
14728
- animation: none;
14729
- }
14730
- }
14731
- }
14732
-
14733
- /**
14734
- * Tooltip Component Styles
14735
- * DuskMoonUI - Material Design 3 inspired tooltip system
14736
- */
14737
-
14738
- @layer components {
14739
- /* Base Tooltip */
14740
- .tooltip {
14741
- position: relative;
14742
- display: inline-block;
14743
- }
14744
-
14745
- /* Tooltip Content */
14746
- .tooltip-content {
14747
- position: absolute;
14748
- z-index: 1000;
14749
- padding: 0.375rem 0.75rem;
14750
- font-size: 0.75rem;
14751
- font-weight: 500;
14752
- line-height: 1rem;
14753
- white-space: nowrap;
14754
- background-color: var(--color-on-surface);
14755
- color: var(--color-surface);
14756
- border-radius: var(--radius-xs);
14757
- box-shadow: var(--shadow-md);
14758
- opacity: 0;
14759
- visibility: hidden;
14760
- transition: opacity 150ms ease-out, visibility 150ms ease-out;
14761
- pointer-events: none;
14762
- }
14763
-
14764
- /* Tooltip Arrow */
14765
- .tooltip-content::before {
14766
- content: '';
14767
- position: absolute;
14768
- width: 0;
14769
- height: 0;
14770
- border: 0.375rem solid transparent;
14771
- }
14772
-
14773
- /* Show Tooltip */
14774
- .tooltip:hover .tooltip-content,
14775
- .tooltip:focus-within .tooltip-content,
14776
- .tooltip-open .tooltip-content {
14777
- opacity: 1;
14778
- visibility: visible;
14779
- }
14780
-
14781
- /* Position: Top (default) - applied to all tooltips as base */
14782
- .tooltip .tooltip-content {
14783
- bottom: 100%;
14784
- top: auto;
14785
- left: 50%;
14786
- right: auto;
14787
- transform: translateX(-50%);
14788
- margin-bottom: 0.5rem;
14789
- margin-top: 0;
14790
- margin-left: 0;
14791
- margin-right: 0;
14792
- }
14793
-
14794
- .tooltip .tooltip-content::before {
14795
- top: 100%;
14796
- bottom: auto;
14797
- left: 50%;
14798
- right: auto;
14799
- transform: translateX(-50%);
14800
- border-top-color: var(--color-on-surface);
14801
- border-bottom-color: transparent;
14802
- border-left-color: transparent;
14803
- border-right-color: transparent;
14804
- }
14805
-
14806
- /* Position: Bottom */
14807
- .tooltip.tooltip-bottom .tooltip-content {
14808
- top: 100%;
14809
- bottom: auto;
14810
- left: 50%;
14811
- right: auto;
14812
- transform: translateX(-50%);
14813
- margin-top: 0.5rem;
14814
- margin-bottom: 0;
14815
- margin-left: 0;
14816
- margin-right: 0;
14817
- }
14818
-
14819
- .tooltip.tooltip-bottom .tooltip-content::before {
14820
- bottom: 100%;
14821
- top: auto;
14822
- left: 50%;
14823
- right: auto;
14824
- transform: translateX(-50%);
14825
- border-bottom-color: var(--color-on-surface);
14826
- border-top-color: transparent;
14827
- border-left-color: transparent;
14828
- border-right-color: transparent;
14829
- }
14830
-
14831
- /* Position: Left */
14832
- .tooltip.tooltip-left .tooltip-content {
14833
- right: 100%;
14834
- left: auto;
14835
- top: 50%;
14836
- bottom: auto;
14837
- transform: translateY(-50%);
14838
- margin-right: 0.5rem;
14839
- margin-left: 0;
14840
- margin-top: 0;
14841
- margin-bottom: 0;
14842
- }
14843
-
14844
- .tooltip.tooltip-left .tooltip-content::before {
14845
- left: 100%;
14846
- right: auto;
14847
- top: 50%;
14848
- bottom: auto;
14849
- transform: translateY(-50%);
14850
- border-left-color: var(--color-on-surface);
14851
- border-right-color: transparent;
14852
- border-top-color: transparent;
14853
- border-bottom-color: transparent;
14854
- }
14855
-
14856
- /* Position: Right */
14857
- .tooltip.tooltip-right .tooltip-content {
14858
- left: 100%;
14859
- right: auto;
14860
- top: 50%;
14861
- bottom: auto;
14862
- transform: translateY(-50%);
14863
- margin-left: 0.5rem;
14864
- margin-right: 0;
14865
- margin-top: 0;
14866
- margin-bottom: 0;
14867
- }
14868
-
14869
- .tooltip.tooltip-right .tooltip-content::before {
14870
- right: 100%;
14871
- left: auto;
14872
- top: 50%;
14873
- bottom: auto;
14874
- transform: translateY(-50%);
14875
- border-right-color: var(--color-on-surface);
14876
- border-left-color: transparent;
14877
- border-top-color: transparent;
14878
- border-bottom-color: transparent;
14879
- }
14880
-
14881
- /* Light Tooltip */
14882
- .tooltip.tooltip-light .tooltip-content {
14883
- background-color: var(--color-surface);
14884
- color: var(--color-on-surface);
14885
- border: 1px solid var(--color-outline);
14886
- box-shadow: var(--shadow-md);
14887
- }
14888
-
14889
- .tooltip.tooltip-light .tooltip-content::before {
14890
- border-top-color: var(--color-surface);
14891
- }
14892
-
14893
- .tooltip.tooltip-light.tooltip-bottom .tooltip-content::before {
14894
- border-bottom-color: var(--color-surface);
14895
- }
14896
-
14897
- .tooltip.tooltip-light.tooltip-left .tooltip-content::before {
14898
- border-left-color: var(--color-surface);
14899
- }
14900
-
14901
- .tooltip.tooltip-light.tooltip-right .tooltip-content::before {
14902
- border-right-color: var(--color-surface);
14903
- }
14904
-
14905
- /* Color Variants */
14906
- .tooltip.tooltip-primary .tooltip-content {
14907
- background-color: var(--color-primary);
14908
- color: var(--color-primary-content);
14909
- }
14910
-
14911
- .tooltip.tooltip-primary .tooltip-content::before {
14912
- border-top-color: var(--color-primary);
14913
- }
14914
-
14915
- .tooltip.tooltip-primary.tooltip-bottom .tooltip-content::before {
14916
- border-bottom-color: var(--color-primary);
14917
- }
14918
-
14919
- .tooltip.tooltip-primary.tooltip-left .tooltip-content::before {
14920
- border-left-color: var(--color-primary);
14921
- }
14922
-
14923
- .tooltip.tooltip-primary.tooltip-right .tooltip-content::before {
14924
- border-right-color: var(--color-primary);
14925
- }
14926
-
14927
- .tooltip.tooltip-secondary .tooltip-content {
14928
- background-color: var(--color-secondary);
14929
- color: var(--color-secondary-content);
14930
- }
14931
-
14932
- .tooltip.tooltip-secondary .tooltip-content::before {
14933
- border-top-color: var(--color-secondary);
14934
- }
14935
-
14936
- .tooltip.tooltip-secondary.tooltip-bottom .tooltip-content::before {
14937
- border-bottom-color: var(--color-secondary);
14938
- }
14939
-
14940
- .tooltip.tooltip-secondary.tooltip-left .tooltip-content::before {
14941
- border-left-color: var(--color-secondary);
14942
- }
14943
-
14944
- .tooltip.tooltip-secondary.tooltip-right .tooltip-content::before {
14945
- border-right-color: var(--color-secondary);
14946
- }
14947
-
14948
- .tooltip.tooltip-error .tooltip-content {
14949
- background-color: var(--color-error);
14950
- color: var(--color-error-content);
14951
- }
14952
-
14953
- .tooltip.tooltip-error .tooltip-content::before {
14954
- border-top-color: var(--color-error);
14955
- }
14956
-
14957
- .tooltip.tooltip-error.tooltip-bottom .tooltip-content::before {
14958
- border-bottom-color: var(--color-error);
14959
- }
14960
-
14961
- .tooltip.tooltip-error.tooltip-left .tooltip-content::before {
14962
- border-left-color: var(--color-error);
14963
- }
14964
-
14965
- .tooltip.tooltip-error.tooltip-right .tooltip-content::before {
14966
- border-right-color: var(--color-error);
14967
- }
15102
+ .toast-ghost.toast-neutral { color: var(--color-neutral); }
15103
+ .toast-ghost.toast-base { color: var(--color-base-content); }
14968
15104
 
14969
- .tooltip.tooltip-tertiary .tooltip-content {
14970
- background-color: var(--color-tertiary);
14971
- color: var(--color-tertiary-content);
15105
+ .toast-ghost .toast-title,
15106
+ .toast-ghost .toast-message {
15107
+ color: inherit;
14972
15108
  }
14973
15109
 
14974
- .tooltip.tooltip-tertiary .tooltip-content::before {
14975
- border-top-color: var(--color-tertiary);
15110
+ /* Progress Bar (for auto-dismiss) */
15111
+ .toast-progress {
15112
+ position: absolute;
15113
+ bottom: 0;
15114
+ left: 0;
15115
+ height: 3px;
15116
+ background-color: currentColor;
15117
+ border-radius: 0 0 var(--radius-md) var(--radius-md);
15118
+ animation: toast-progress linear forwards;
14976
15119
  }
14977
15120
 
14978
- .tooltip.tooltip-tertiary.tooltip-bottom .tooltip-content::before {
14979
- border-bottom-color: var(--color-tertiary);
15121
+ @keyframes toast-progress {
15122
+ from {
15123
+ width: 100%;
15124
+ }
15125
+ to {
15126
+ width: 0%;
15127
+ }
14980
15128
  }
14981
15129
 
14982
- .tooltip.tooltip-tertiary.tooltip-left .tooltip-content::before {
14983
- border-left-color: var(--color-tertiary);
14984
- }
15130
+ /* Reduce Motion */
15131
+ @media (prefers-reduced-motion: reduce) {
15132
+ .toast {
15133
+ transition: opacity 0ms;
15134
+ transform: none;
15135
+ }
14985
15136
 
14986
- .tooltip.tooltip-tertiary.tooltip-right .tooltip-content::before {
14987
- border-right-color: var(--color-tertiary);
15137
+ .toast-progress {
15138
+ animation: none;
15139
+ }
14988
15140
  }
15141
+ }
14989
15142
 
14990
- .tooltip.tooltip-info .tooltip-content {
14991
- background-color: var(--color-info);
14992
- color: var(--color-info-content);
14993
- }
15143
+ /**
15144
+ * Tooltip Component Styles
15145
+ * DuskMoonUI - Material Design 3 inspired tooltip system
15146
+ *
15147
+ * Breaking: uses native Popover API (popover="hint") + CSS Anchor Positioning.
15148
+ * Markup:
15149
+ * <button interestfor="id" style="anchor-name: --id" class="tooltip-delay">…</button>
15150
+ * <div id="id" popover="hint" class="tooltip tooltip-top" style="position-anchor: --id">…</div>
15151
+ */
14994
15152
 
14995
- .tooltip.tooltip-info .tooltip-content::before {
14996
- border-top-color: var(--color-info);
14997
- }
15153
+ @layer components {
15154
+ /* ========================================
15155
+ * Base surface (the popover element itself)
15156
+ * ======================================== */
14998
15157
 
14999
- .tooltip.tooltip-info.tooltip-bottom .tooltip-content::before {
15000
- border-bottom-color: var(--color-info);
15001
- }
15158
+ .tooltip[popover] {
15159
+ --tooltip-bg: var(--color-on-surface);
15160
+ --tooltip-fg: var(--color-surface);
15002
15161
 
15003
- .tooltip.tooltip-info.tooltip-left .tooltip-content::before {
15004
- border-left-color: var(--color-info);
15162
+ position: absolute;
15163
+ inset: auto;
15164
+ z-index: 1000;
15165
+ margin: 0.5rem;
15166
+ padding: 0.375rem 0.75rem;
15167
+ font-size: 0.75rem;
15168
+ font-weight: 500;
15169
+ line-height: 1rem;
15170
+ white-space: nowrap;
15171
+ background-color: var(--tooltip-bg);
15172
+ color: var(--tooltip-fg);
15173
+ border: none;
15174
+ border-radius: var(--radius-xs);
15175
+ box-shadow: var(--shadow-md);
15176
+ pointer-events: none;
15177
+ opacity: 0;
15178
+ transform: scale(0.95);
15179
+ position-area: top;
15180
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
15181
+ transition:
15182
+ opacity 150ms ease-out,
15183
+ transform 150ms ease-out,
15184
+ overlay 150ms ease-out allow-discrete,
15185
+ display 150ms ease-out allow-discrete;
15005
15186
  }
15006
15187
 
15007
- .tooltip.tooltip-info.tooltip-right .tooltip-content::before {
15008
- border-right-color: var(--color-info);
15188
+ .tooltip[popover]:popover-open {
15189
+ opacity: 1;
15190
+ transform: scale(1);
15009
15191
  }
15010
15192
 
15011
- .tooltip.tooltip-success .tooltip-content {
15012
- background-color: var(--color-success);
15013
- color: var(--color-success-content);
15193
+ @starting-style {
15194
+ .tooltip[popover]:popover-open {
15195
+ opacity: 0;
15196
+ transform: scale(0.95);
15197
+ }
15014
15198
  }
15015
15199
 
15016
- .tooltip.tooltip-success .tooltip-content::before {
15017
- border-top-color: var(--color-success);
15018
- }
15200
+ /* ========================================
15201
+ * Preferred position-area
15202
+ * ======================================== */
15019
15203
 
15020
- .tooltip.tooltip-success.tooltip-bottom .tooltip-content::before {
15021
- border-bottom-color: var(--color-success);
15204
+ .tooltip-top[popover] {
15205
+ position-area: top;
15022
15206
  }
15023
15207
 
15024
- .tooltip.tooltip-success.tooltip-left .tooltip-content::before {
15025
- border-left-color: var(--color-success);
15208
+ .tooltip-bottom[popover] {
15209
+ position-area: bottom;
15026
15210
  }
15027
15211
 
15028
- .tooltip.tooltip-success.tooltip-right .tooltip-content::before {
15029
- border-right-color: var(--color-success);
15212
+ .tooltip-left[popover] {
15213
+ position-area: left;
15030
15214
  }
15031
15215
 
15032
- .tooltip.tooltip-warning .tooltip-content {
15033
- background-color: var(--color-warning);
15034
- color: var(--color-warning-content);
15216
+ .tooltip-right[popover] {
15217
+ position-area: right;
15035
15218
  }
15036
15219
 
15037
- .tooltip.tooltip-warning .tooltip-content::before {
15038
- border-top-color: var(--color-warning);
15039
- }
15220
+ /* ========================================
15221
+ * Arrow (preferred position only; may be wrong after flip)
15222
+ * ======================================== */
15040
15223
 
15041
- .tooltip.tooltip-warning.tooltip-bottom .tooltip-content::before {
15042
- border-bottom-color: var(--color-warning);
15224
+ .tooltip[popover]::before {
15225
+ content: '';
15226
+ position: absolute;
15227
+ width: 0;
15228
+ height: 0;
15229
+ border: 0.375rem solid transparent;
15043
15230
  }
15044
15231
 
15045
- .tooltip.tooltip-warning.tooltip-left .tooltip-content::before {
15046
- border-left-color: var(--color-warning);
15232
+ .tooltip-top[popover]::before,
15233
+ .tooltip[popover]:not(.tooltip-bottom):not(.tooltip-left):not(.tooltip-right)::before {
15234
+ top: 100%;
15235
+ left: 50%;
15236
+ transform: translateX(-50%);
15237
+ border-top-color: var(--tooltip-bg);
15047
15238
  }
15048
15239
 
15049
- .tooltip.tooltip-warning.tooltip-right .tooltip-content::before {
15050
- border-right-color: var(--color-warning);
15240
+ .tooltip-bottom[popover]::before {
15241
+ bottom: 100%;
15242
+ top: auto;
15243
+ left: 50%;
15244
+ transform: translateX(-50%);
15245
+ border-bottom-color: var(--tooltip-bg);
15246
+ border-top-color: transparent;
15051
15247
  }
15052
15248
 
15053
- .tooltip.tooltip-accent .tooltip-content {
15054
- background-color: var(--color-accent);
15055
- color: var(--color-accent-content);
15249
+ .tooltip-left[popover]::before {
15250
+ left: 100%;
15251
+ top: 50%;
15252
+ bottom: auto;
15253
+ transform: translateY(-50%);
15254
+ border-left-color: var(--tooltip-bg);
15255
+ border-top-color: transparent;
15056
15256
  }
15057
15257
 
15058
- .tooltip.tooltip-accent .tooltip-content::before {
15059
- border-top-color: var(--color-accent);
15258
+ .tooltip-right[popover]::before {
15259
+ right: 100%;
15260
+ left: auto;
15261
+ top: 50%;
15262
+ bottom: auto;
15263
+ transform: translateY(-50%);
15264
+ border-right-color: var(--tooltip-bg);
15265
+ border-top-color: transparent;
15060
15266
  }
15061
15267
 
15062
- .tooltip.tooltip-accent.tooltip-bottom .tooltip-content::before {
15063
- border-bottom-color: var(--color-accent);
15064
- }
15268
+ /* ========================================
15269
+ * Color variants
15270
+ * ======================================== */
15065
15271
 
15066
- .tooltip.tooltip-accent.tooltip-left .tooltip-content::before {
15067
- border-left-color: var(--color-accent);
15272
+ .tooltip-light[popover] {
15273
+ --tooltip-bg: var(--color-surface);
15274
+ --tooltip-fg: var(--color-on-surface);
15275
+ border: 1px solid var(--color-outline);
15068
15276
  }
15069
15277
 
15070
- .tooltip.tooltip-accent.tooltip-right .tooltip-content::before {
15071
- border-right-color: var(--color-accent);
15278
+ .tooltip-primary[popover] {
15279
+ --tooltip-bg: var(--color-primary);
15280
+ --tooltip-fg: var(--color-primary-content);
15072
15281
  }
15073
15282
 
15074
- .tooltip.tooltip-neutral .tooltip-content {
15075
- background-color: var(--color-neutral);
15076
- color: var(--color-neutral-content);
15283
+ .tooltip-secondary[popover] {
15284
+ --tooltip-bg: var(--color-secondary);
15285
+ --tooltip-fg: var(--color-secondary-content);
15077
15286
  }
15078
15287
 
15079
- .tooltip.tooltip-neutral .tooltip-content::before {
15080
- border-top-color: var(--color-neutral);
15288
+ .tooltip-tertiary[popover] {
15289
+ --tooltip-bg: var(--color-tertiary);
15290
+ --tooltip-fg: var(--color-tertiary-content);
15081
15291
  }
15082
15292
 
15083
- .tooltip.tooltip-neutral.tooltip-bottom .tooltip-content::before {
15084
- border-bottom-color: var(--color-neutral);
15293
+ .tooltip-info[popover] {
15294
+ --tooltip-bg: var(--color-info);
15295
+ --tooltip-fg: var(--color-info-content);
15085
15296
  }
15086
15297
 
15087
- .tooltip.tooltip-neutral.tooltip-left .tooltip-content::before {
15088
- border-left-color: var(--color-neutral);
15298
+ .tooltip-success[popover] {
15299
+ --tooltip-bg: var(--color-success);
15300
+ --tooltip-fg: var(--color-success-content);
15089
15301
  }
15090
15302
 
15091
- .tooltip.tooltip-neutral.tooltip-right .tooltip-content::before {
15092
- border-right-color: var(--color-neutral);
15303
+ .tooltip-warning[popover] {
15304
+ --tooltip-bg: var(--color-warning);
15305
+ --tooltip-fg: var(--color-warning-content);
15093
15306
  }
15094
15307
 
15095
- .tooltip.tooltip-base .tooltip-content {
15096
- background-color: var(--color-base-100);
15097
- color: var(--color-base-content);
15308
+ .tooltip-error[popover] {
15309
+ --tooltip-bg: var(--color-error);
15310
+ --tooltip-fg: var(--color-error-content);
15098
15311
  }
15099
15312
 
15100
- .tooltip.tooltip-base .tooltip-content::before {
15101
- border-top-color: var(--color-base-100);
15313
+ .tooltip-accent[popover] {
15314
+ --tooltip-bg: var(--color-accent);
15315
+ --tooltip-fg: var(--color-accent-content);
15102
15316
  }
15103
15317
 
15104
- .tooltip.tooltip-base.tooltip-bottom .tooltip-content::before {
15105
- border-bottom-color: var(--color-base-100);
15318
+ .tooltip-neutral[popover] {
15319
+ --tooltip-bg: var(--color-neutral);
15320
+ --tooltip-fg: var(--color-neutral-content);
15106
15321
  }
15107
15322
 
15108
- .tooltip.tooltip-base.tooltip-left .tooltip-content::before {
15109
- border-left-color: var(--color-base-100);
15323
+ .tooltip-base[popover] {
15324
+ --tooltip-bg: var(--color-base-100);
15325
+ --tooltip-fg: var(--color-base-content);
15110
15326
  }
15111
15327
 
15112
- .tooltip.tooltip-base.tooltip-right .tooltip-content::before {
15113
- border-right-color: var(--color-base-100);
15114
- }
15328
+ /* ========================================
15329
+ * Content variants
15330
+ * ======================================== */
15115
15331
 
15116
- /* Multi-line Tooltip */
15117
- .tooltip-multiline .tooltip-content {
15332
+ .tooltip-multiline[popover] {
15118
15333
  white-space: normal;
15119
15334
  max-width: 16rem;
15120
15335
  text-align: center;
15121
15336
  }
15122
15337
 
15123
- /* Rich Tooltip */
15124
- .tooltip-rich .tooltip-content {
15338
+ .tooltip-rich[popover] {
15125
15339
  padding: 0.75rem 1rem;
15126
15340
  max-width: 20rem;
15127
15341
  white-space: normal;
@@ -15140,23 +15354,28 @@ html {
15140
15354
  opacity: 0.9;
15141
15355
  }
15142
15356
 
15143
- /* Delay Variants */
15144
- .tooltip-delay .tooltip-content {
15145
- transition-delay: 300ms;
15357
+ /* ========================================
15358
+ * Invoker utilities (apply on the trigger)
15359
+ * ======================================== */
15360
+
15361
+ .tooltip-delay {
15362
+ interest-delay: 300ms;
15146
15363
  }
15147
15364
 
15148
- .tooltip-delay-long .tooltip-content {
15149
- transition-delay: 500ms;
15365
+ .tooltip-delay-long {
15366
+ interest-delay: 500ms;
15150
15367
  }
15151
15368
 
15152
- /* Interactive Tooltip */
15153
- .tooltip-interactive .tooltip-content {
15369
+ .tooltip-interactive[popover] {
15154
15370
  pointer-events: auto;
15155
15371
  }
15156
15372
 
15157
- /* Reduce Motion */
15373
+ /* ========================================
15374
+ * Reduce Motion
15375
+ * ======================================== */
15376
+
15158
15377
  @media (prefers-reduced-motion: reduce) {
15159
- .tooltip-content {
15378
+ .tooltip[popover] {
15160
15379
  transition: none;
15161
15380
  }
15162
15381
  }
@@ -18875,107 +19094,156 @@ html {
18875
19094
  /**
18876
19095
  * Popover Component Styles
18877
19096
  * DuskMoonUI - Material Design 3 inspired popover system
19097
+ *
19098
+ * Uses native Popover API + CSS Anchor Positioning:
19099
+ * <button popovertarget="id" style="anchor-name: --id">…</button>
19100
+ * <div id="id" popover class="popover popover-bottom" style="position-anchor: --id">…</div>
18878
19101
  */
18879
19102
 
18880
19103
  @layer components {
18881
- /* Popover Container (class-based approach only, not native [popover]) */
18882
- .popover:not([popover]) {
18883
- position: relative;
18884
- display: inline-block;
19104
+ /* ========================================
19105
+ * Native Popover surface
19106
+ * ======================================== */
19107
+
19108
+ .popover {
19109
+ --popover-color-intensity: 30%;
18885
19110
  }
18886
19111
 
18887
- /* Popover Content */
18888
- .popover-content {
19112
+ .popover[popover] {
18889
19113
  position: absolute;
19114
+ inset: auto;
18890
19115
  z-index: 1050;
18891
19116
  min-width: 12rem;
18892
19117
  max-width: 20rem;
18893
19118
  padding: 1rem;
19119
+ margin: 0.5rem;
18894
19120
  background-color: var(--color-surface);
18895
19121
  border: 1px solid var(--color-outline-variant);
18896
19122
  border-radius: var(--radius-md);
18897
19123
  box-shadow: var(--shadow-lg);
18898
19124
  opacity: 0;
18899
- visibility: hidden;
18900
19125
  transform: scale(0.95);
18901
- transform-origin: center;
18902
- transition: opacity 150ms ease-out, visibility 150ms ease-out, transform 150ms ease-out;
19126
+ position-area: bottom;
19127
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
19128
+ transition:
19129
+ opacity 150ms ease-out,
19130
+ transform 150ms ease-out,
19131
+ overlay 150ms ease-out allow-discrete,
19132
+ display 150ms ease-out allow-discrete;
18903
19133
  }
18904
19134
 
18905
- .popover.show .popover-content,
18906
- .popover-content.show {
19135
+ .popover[popover]:popover-open {
18907
19136
  opacity: 1;
18908
19137
  visibility: visible;
18909
19138
  transform: scale(1);
18910
19139
  }
18911
19140
 
18912
- /* Direct popover structure (without .popover-content wrapper) */
18913
- .popover.popover-show,
18914
- .popover.show {
18915
- opacity: 1;
18916
- visibility: visible;
19141
+ @starting-style {
19142
+ .popover[popover]:popover-open {
19143
+ opacity: 0;
19144
+ transform: scale(0.95);
19145
+ }
18917
19146
  }
18918
19147
 
18919
- /* Popover as direct overlay (simpler structure) */
18920
- .popover:not([popover])[class*="popover-top"],
18921
- .popover:not([popover])[class*="popover-bottom"],
18922
- .popover:not([popover])[class*="popover-left"],
18923
- .popover:not([popover])[class*="popover-right"] {
18924
- position: absolute;
18925
- z-index: 1050;
18926
- min-width: 12rem;
18927
- max-width: 20rem;
18928
- padding: 1rem;
18929
- background-color: var(--color-surface);
18930
- border: 1px solid var(--color-outline-variant);
18931
- border-radius: var(--radius-md);
18932
- box-shadow: var(--shadow-lg);
18933
- opacity: 0;
18934
- visibility: hidden;
18935
- transition: opacity 150ms ease-out, visibility 150ms ease-out;
19148
+ /* Preferred position-area */
19149
+ .popover-top[popover] {
19150
+ position-area: top;
18936
19151
  }
18937
19152
 
18938
- .popover[class*="popover-top"].popover-show,
18939
- .popover[class*="popover-bottom"].popover-show,
18940
- .popover[class*="popover-left"].popover-show,
18941
- .popover[class*="popover-right"].popover-show {
18942
- opacity: 1;
18943
- visibility: visible;
19153
+ .popover-bottom[popover] {
19154
+ position-area: bottom;
18944
19155
  }
18945
19156
 
18946
- /* Direct position: Top */
18947
- .popover.popover-top:not(:has(.popover-content)) {
18948
- bottom: 100%;
18949
- left: 50%;
18950
- transform: translateX(-50%);
18951
- margin-bottom: 0.75rem;
19157
+ .popover-left[popover] {
19158
+ position-area: left;
18952
19159
  }
18953
19160
 
18954
- /* Direct position: Bottom */
18955
- .popover.popover-bottom:not(:has(.popover-content)) {
18956
- top: 100%;
18957
- left: 50%;
18958
- transform: translateX(-50%);
18959
- margin-top: 0.75rem;
19161
+ .popover-right[popover] {
19162
+ position-area: right;
18960
19163
  }
18961
19164
 
18962
- /* Direct position: Left */
18963
- .popover.popover-left:not(:has(.popover-content)) {
18964
- right: 100%;
18965
- top: 50%;
18966
- transform: translateY(-50%);
18967
- margin-right: 0.75rem;
19165
+ /* Alignment variants */
19166
+ .popover-start[popover] {
19167
+ position-area: bottom span-right;
18968
19168
  }
18969
19169
 
18970
- /* Direct position: Right */
18971
- .popover.popover-right:not(:has(.popover-content)) {
18972
- left: 100%;
18973
- top: 50%;
18974
- transform: translateY(-50%);
18975
- margin-left: 0.75rem;
19170
+ .popover-end[popover] {
19171
+ position-area: bottom span-left;
19172
+ }
19173
+
19174
+ .popover-top.popover-start[popover] {
19175
+ position-area: top span-right;
19176
+ }
19177
+
19178
+ .popover-top.popover-end[popover] {
19179
+ position-area: top span-left;
19180
+ }
19181
+
19182
+ .popover-bottom.popover-start[popover] {
19183
+ position-area: bottom span-right;
19184
+ }
19185
+
19186
+ .popover-bottom.popover-end[popover] {
19187
+ position-area: bottom span-left;
19188
+ }
19189
+
19190
+ .popover-left.popover-start[popover] {
19191
+ position-area: left span-bottom;
19192
+ }
19193
+
19194
+ .popover-left.popover-end[popover] {
19195
+ position-area: left span-top;
18976
19196
  }
18977
19197
 
18978
- /* Popover Arrow */
19198
+ .popover-right.popover-start[popover] {
19199
+ position-area: right span-bottom;
19200
+ }
19201
+
19202
+ .popover-right.popover-end[popover] {
19203
+ position-area: right span-top;
19204
+ }
19205
+
19206
+ /* Backdrop */
19207
+ .popover[popover]::backdrop {
19208
+ background-color: transparent;
19209
+ transition:
19210
+ background-color 150ms ease-out,
19211
+ overlay 150ms ease-out allow-discrete,
19212
+ display 150ms ease-out allow-discrete;
19213
+ }
19214
+
19215
+ .popover[popover]:popover-open::backdrop {
19216
+ background-color: color-mix(in srgb, var(--color-scrim) 10%, transparent);
19217
+ }
19218
+
19219
+ @starting-style {
19220
+ .popover[popover]:popover-open::backdrop {
19221
+ background-color: transparent;
19222
+ }
19223
+ }
19224
+
19225
+ .popover-modal[popover]::backdrop {
19226
+ background-color: transparent;
19227
+ transition:
19228
+ background-color 150ms ease-out,
19229
+ overlay 150ms ease-out allow-discrete,
19230
+ display 150ms ease-out allow-discrete;
19231
+ }
19232
+
19233
+ .popover-modal[popover]:popover-open::backdrop {
19234
+ background-color: color-mix(in srgb, var(--color-scrim) 30%, transparent);
19235
+ }
19236
+
19237
+ @starting-style {
19238
+ .popover-modal[popover]:popover-open::backdrop {
19239
+ background-color: transparent;
19240
+ }
19241
+ }
19242
+
19243
+ /* ========================================
19244
+ * Arrow (preferred position; may be wrong after flip)
19245
+ * ======================================== */
19246
+
18979
19247
  .popover-arrow {
18980
19248
  position: absolute;
18981
19249
  width: 0.75rem;
@@ -18985,22 +19253,8 @@ html {
18985
19253
  transform: rotate(45deg);
18986
19254
  }
18987
19255
 
18988
- /* Position: Top (default) */
18989
- .popover-top .popover-content,
18990
- .popover .popover-content {
18991
- bottom: 100%;
18992
- left: 50%;
18993
- transform: translateX(-50%) scale(0.95);
18994
- margin-bottom: 0.75rem;
18995
- }
18996
-
18997
- .popover-top.show .popover-content,
18998
- .popover.show .popover-content {
18999
- transform: translateX(-50%) scale(1);
19000
- }
19001
-
19002
- .popover-top .popover-arrow,
19003
- .popover .popover-arrow {
19256
+ .popover-top[popover] > .popover-arrow,
19257
+ .popover[popover]:not(.popover-bottom):not(.popover-left):not(.popover-right) > .popover-arrow {
19004
19258
  bottom: -0.375rem;
19005
19259
  left: 50%;
19006
19260
  transform: translateX(-50%) rotate(45deg);
@@ -19008,19 +19262,7 @@ html {
19008
19262
  border-left: none;
19009
19263
  }
19010
19264
 
19011
- /* Position: Bottom */
19012
- .popover-bottom .popover-content {
19013
- top: 100%;
19014
- left: 50%;
19015
- transform: translateX(-50%) scale(0.95);
19016
- margin-top: 0.75rem;
19017
- }
19018
-
19019
- .popover-bottom.show .popover-content {
19020
- transform: translateX(-50%) scale(1);
19021
- }
19022
-
19023
- .popover-bottom .popover-arrow {
19265
+ .popover-bottom[popover] > .popover-arrow {
19024
19266
  top: -0.375rem;
19025
19267
  left: 50%;
19026
19268
  transform: translateX(-50%) rotate(45deg);
@@ -19028,19 +19270,7 @@ html {
19028
19270
  border-right: none;
19029
19271
  }
19030
19272
 
19031
- /* Position: Left */
19032
- .popover-left .popover-content {
19033
- right: 100%;
19034
- top: 50%;
19035
- transform: translateY(-50%) scale(0.95);
19036
- margin-right: 0.75rem;
19037
- }
19038
-
19039
- .popover-left.show .popover-content {
19040
- transform: translateY(-50%) scale(1);
19041
- }
19042
-
19043
- .popover-left .popover-arrow {
19273
+ .popover-left[popover] > .popover-arrow {
19044
19274
  right: -0.375rem;
19045
19275
  top: 50%;
19046
19276
  transform: translateY(-50%) rotate(45deg);
@@ -19048,19 +19278,7 @@ html {
19048
19278
  border-bottom: none;
19049
19279
  }
19050
19280
 
19051
- /* Position: Right */
19052
- .popover-right .popover-content {
19053
- left: 100%;
19054
- top: 50%;
19055
- transform: translateY(-50%) scale(0.95);
19056
- margin-left: 0.75rem;
19057
- }
19058
-
19059
- .popover-right.show .popover-content {
19060
- transform: translateY(-50%) scale(1);
19061
- }
19062
-
19063
- .popover-right .popover-arrow {
19281
+ .popover-right[popover] > .popover-arrow {
19064
19282
  left: -0.375rem;
19065
19283
  top: 50%;
19066
19284
  transform: translateY(-50%) rotate(45deg);
@@ -19068,7 +19286,14 @@ html {
19068
19286
  border-top: none;
19069
19287
  }
19070
19288
 
19071
- /* Popover Header */
19289
+ .popover-no-arrow > .popover-arrow {
19290
+ display: none;
19291
+ }
19292
+
19293
+ /* ========================================
19294
+ * Structure
19295
+ * ======================================== */
19296
+
19072
19297
  .popover-header {
19073
19298
  display: flex;
19074
19299
  align-items: center;
@@ -19080,17 +19305,24 @@ html {
19080
19305
 
19081
19306
  .popover-title {
19082
19307
  flex: 1;
19308
+ min-width: 0;
19309
+ margin: 0;
19083
19310
  font-size: 0.875rem;
19084
19311
  font-weight: 600;
19312
+ line-height: 1.5rem;
19085
19313
  color: var(--color-on-surface);
19086
19314
  }
19087
19315
 
19316
+ /* Prefer placing .popover-close inside .popover-header for aligned title + close */
19088
19317
  .popover-close {
19089
- display: flex;
19318
+ display: inline-flex;
19319
+ flex-shrink: 0;
19090
19320
  align-items: center;
19091
19321
  justify-content: center;
19092
19322
  width: 1.5rem;
19093
19323
  height: 1.5rem;
19324
+ margin-inline-start: auto;
19325
+ padding: 0;
19094
19326
  color: var(--color-on-surface-variant);
19095
19327
  background-color: transparent;
19096
19328
  border: none;
@@ -19099,6 +19331,18 @@ html {
19099
19331
  transition: background-color 150ms ease-in-out;
19100
19332
  }
19101
19333
 
19334
+ /* Fallback when close is a direct child of the popover (not in header) */
19335
+ .popover[popover] > .popover-close {
19336
+ position: absolute;
19337
+ top: 1rem;
19338
+ right: 1rem;
19339
+ margin-inline-start: 0;
19340
+ }
19341
+
19342
+ .popover[popover]:has(> .popover-close) > .popover-header {
19343
+ padding-right: 1.75rem;
19344
+ }
19345
+
19102
19346
  .popover-close:hover {
19103
19347
  background-color: var(--color-surface-container);
19104
19348
  }
@@ -19108,14 +19352,12 @@ html {
19108
19352
  box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 20%, transparent);
19109
19353
  }
19110
19354
 
19111
- /* Popover Body */
19112
19355
  .popover-body {
19113
19356
  font-size: 0.875rem;
19114
19357
  color: var(--color-on-surface-variant);
19115
19358
  line-height: 1.5;
19116
19359
  }
19117
19360
 
19118
- /* Popover Footer */
19119
19361
  .popover-footer {
19120
19362
  display: flex;
19121
19363
  align-items: center;
@@ -19126,194 +19368,112 @@ html {
19126
19368
  border-top: 1px solid var(--color-outline-variant);
19127
19369
  }
19128
19370
 
19129
- /* No Arrow Variant */
19130
- .popover-no-arrow .popover-arrow {
19131
- display: none;
19132
- }
19371
+ /* ========================================
19372
+ * Size variants
19373
+ * ======================================== */
19133
19374
 
19134
- /* Size Variants */
19135
- .popover-sm .popover-content {
19375
+ .popover-sm[popover] {
19136
19376
  min-width: 8rem;
19137
19377
  max-width: 14rem;
19138
19378
  padding: 0.75rem;
19139
19379
  }
19140
19380
 
19141
- .popover-lg .popover-content {
19381
+ .popover-lg[popover] {
19142
19382
  min-width: 16rem;
19143
19383
  max-width: 28rem;
19144
19384
  padding: 1.25rem;
19145
19385
  }
19146
19386
 
19147
- .popover-full .popover-content {
19387
+ .popover-full[popover] {
19148
19388
  min-width: 0;
19149
19389
  max-width: none;
19150
19390
  width: max-content;
19151
19391
  }
19152
19392
 
19153
- /* Color Variants */
19154
- /*
19155
- * Color intensity for themed popovers.
19156
- * Override this variable to adjust how strongly colors appear:
19157
- * - 20% = subtle tint
19158
- * - 30% = moderate (default)
19159
- * - 40% = bold/prominent
19160
- */
19161
- .popover {
19162
- --popover-color-intensity: 30%;
19163
- }
19164
-
19165
- /* Dark variant */
19166
- .popover-dark .popover-content {
19167
- background-color: var(--color-on-surface);
19168
- color: var(--color-surface);
19169
- border-color: transparent;
19170
- }
19393
+ /* ========================================
19394
+ * Color variants
19395
+ * ======================================== */
19171
19396
 
19172
- .popover-dark[class*="popover-top"],
19173
- .popover-dark[class*="popover-bottom"],
19174
- .popover-dark[class*="popover-left"],
19175
- .popover-dark[class*="popover-right"] {
19397
+ .popover-dark[popover] {
19176
19398
  background-color: var(--color-on-surface);
19177
19399
  color: var(--color-surface);
19178
19400
  border-color: transparent;
19179
19401
  }
19180
19402
 
19181
- .popover-dark .popover-arrow {
19403
+ .popover-dark[popover] > .popover-arrow {
19182
19404
  background-color: var(--color-on-surface);
19183
19405
  border-color: transparent;
19184
19406
  }
19185
19407
 
19186
- .popover-dark .popover-title {
19408
+ .popover-dark[popover] .popover-title {
19187
19409
  color: var(--color-surface);
19188
19410
  }
19189
19411
 
19190
- .popover-dark .popover-body {
19412
+ .popover-dark[popover] .popover-body {
19191
19413
  color: var(--color-surface);
19192
19414
  opacity: 0.9;
19193
19415
  }
19194
19416
 
19195
- /* Primary variant */
19196
- .popover-primary .popover-content {
19197
- background-color: color-mix(in oklch, var(--color-primary) var(--popover-color-intensity), var(--color-surface));
19198
- border-color: var(--color-primary);
19199
- }
19200
-
19201
- .popover-primary[class*="popover-top"],
19202
- .popover-primary[class*="popover-bottom"],
19203
- .popover-primary[class*="popover-left"],
19204
- .popover-primary[class*="popover-right"] {
19417
+ .popover-primary[popover] {
19205
19418
  background-color: color-mix(in oklch, var(--color-primary) var(--popover-color-intensity), var(--color-surface));
19206
19419
  border-color: var(--color-primary);
19207
19420
  }
19208
19421
 
19209
- .popover-primary .popover-arrow {
19422
+ .popover-primary[popover] > .popover-arrow {
19210
19423
  background-color: color-mix(in oklch, var(--color-primary) var(--popover-color-intensity), var(--color-surface));
19211
19424
  border-color: var(--color-primary);
19212
19425
  }
19213
19426
 
19214
- .popover-primary .popover-body {
19215
- color: var(--color-on-surface);
19216
- }
19217
-
19218
- .popover-primary .popover-title {
19427
+ .popover-primary[popover] .popover-body,
19428
+ .popover-primary[popover] .popover-title {
19219
19429
  color: var(--color-on-surface);
19220
19430
  }
19221
19431
 
19222
- /* Secondary variant */
19223
- .popover-secondary .popover-content {
19224
- background-color: color-mix(in oklch, var(--color-secondary) var(--popover-color-intensity), var(--color-surface));
19225
- border-color: var(--color-secondary);
19226
- }
19227
-
19228
- .popover-secondary[class*="popover-top"],
19229
- .popover-secondary[class*="popover-bottom"],
19230
- .popover-secondary[class*="popover-left"],
19231
- .popover-secondary[class*="popover-right"] {
19432
+ .popover-secondary[popover] {
19232
19433
  background-color: color-mix(in oklch, var(--color-secondary) var(--popover-color-intensity), var(--color-surface));
19233
19434
  border-color: var(--color-secondary);
19234
19435
  }
19235
19436
 
19236
- .popover-secondary .popover-arrow {
19437
+ .popover-secondary[popover] > .popover-arrow {
19237
19438
  background-color: color-mix(in oklch, var(--color-secondary) var(--popover-color-intensity), var(--color-surface));
19238
19439
  border-color: var(--color-secondary);
19239
19440
  }
19240
19441
 
19241
- .popover-secondary .popover-body {
19242
- color: var(--color-on-surface);
19243
- }
19244
-
19245
- .popover-secondary .popover-title {
19442
+ .popover-secondary[popover] .popover-body,
19443
+ .popover-secondary[popover] .popover-title {
19246
19444
  color: var(--color-on-surface);
19247
19445
  }
19248
19446
 
19249
- /* Tertiary variant */
19250
- .popover-tertiary .popover-content {
19251
- background-color: color-mix(in oklch, var(--color-tertiary) var(--popover-color-intensity), var(--color-surface));
19252
- border-color: var(--color-tertiary);
19253
- }
19254
-
19255
- .popover-tertiary[class*="popover-top"],
19256
- .popover-tertiary[class*="popover-bottom"],
19257
- .popover-tertiary[class*="popover-left"],
19258
- .popover-tertiary[class*="popover-right"] {
19447
+ .popover-tertiary[popover] {
19259
19448
  background-color: color-mix(in oklch, var(--color-tertiary) var(--popover-color-intensity), var(--color-surface));
19260
19449
  border-color: var(--color-tertiary);
19261
19450
  }
19262
19451
 
19263
- .popover-tertiary .popover-arrow {
19452
+ .popover-tertiary[popover] > .popover-arrow {
19264
19453
  background-color: color-mix(in oklch, var(--color-tertiary) var(--popover-color-intensity), var(--color-surface));
19265
19454
  border-color: var(--color-tertiary);
19266
19455
  }
19267
19456
 
19268
- .popover-tertiary .popover-body {
19269
- color: var(--color-on-surface);
19270
- }
19271
-
19272
- .popover-tertiary .popover-title {
19457
+ .popover-tertiary[popover] .popover-body,
19458
+ .popover-tertiary[popover] .popover-title {
19273
19459
  color: var(--color-on-surface);
19274
19460
  }
19275
19461
 
19276
- /* Surface highest variant */
19277
- .popover-surface-highest .popover-content {
19278
- background-color: var(--color-surface-container-highest);
19279
- border-color: var(--color-outline-variant);
19280
- }
19281
-
19282
- .popover-surface-highest[class*="popover-top"],
19283
- .popover-surface-highest[class*="popover-bottom"],
19284
- .popover-surface-highest[class*="popover-left"],
19285
- .popover-surface-highest[class*="popover-right"] {
19462
+ .popover-surface-highest[popover] {
19286
19463
  background-color: var(--color-surface-container-highest);
19287
19464
  border-color: var(--color-outline-variant);
19288
19465
  }
19289
19466
 
19290
- .popover-surface-highest .popover-arrow {
19467
+ .popover-surface-highest[popover] > .popover-arrow {
19291
19468
  background-color: var(--color-surface-container-highest);
19292
19469
  border-color: var(--color-outline-variant);
19293
19470
  }
19294
19471
 
19295
- /* Hover Trigger */
19296
- .popover-hover:hover .popover-content,
19297
- .popover-hover:focus-within .popover-content {
19298
- opacity: 1;
19299
- visibility: visible;
19300
- transform: translateX(-50%) scale(1);
19301
- }
19302
-
19303
- .popover-hover.popover-bottom:hover .popover-content,
19304
- .popover-hover.popover-bottom:focus-within .popover-content {
19305
- transform: translateX(-50%) scale(1);
19306
- }
19307
-
19308
- .popover-hover.popover-left:hover .popover-content,
19309
- .popover-hover.popover-left:focus-within .popover-content,
19310
- .popover-hover.popover-right:hover .popover-content,
19311
- .popover-hover.popover-right:focus-within .popover-content {
19312
- transform: translateY(-50%) scale(1);
19313
- }
19472
+ /* ========================================
19473
+ * Menu / confirm
19474
+ * ======================================== */
19314
19475
 
19315
- /* Menu Popover */
19316
- .popover-menu .popover-content {
19476
+ .popover-menu[popover] {
19317
19477
  padding: 0.5rem;
19318
19478
  }
19319
19479
 
@@ -19357,239 +19517,19 @@ html {
19357
19517
  background-color: var(--color-outline-variant);
19358
19518
  }
19359
19519
 
19360
- /* Confirmation Popover */
19361
- .popover-confirm .popover-content {
19520
+ .popover-confirm[popover] {
19362
19521
  text-align: center;
19363
19522
  }
19364
19523
 
19365
- .popover-confirm .popover-footer {
19524
+ .popover-confirm[popover] .popover-footer {
19366
19525
  justify-content: center;
19367
19526
  }
19368
19527
 
19369
19528
  /* ========================================
19370
- * HTML Popover API Support
19371
- * Uses native [popover] attribute with :popover-open pseudo-class
19372
- * ======================================== */
19373
-
19374
- /* Native popover base styles */
19375
- .popover[popover] {
19376
- position: fixed;
19377
- inset: unset;
19378
- z-index: 1050;
19379
- min-width: 12rem;
19380
- max-width: 20rem;
19381
- padding: 1rem;
19382
- margin: 0;
19383
- background-color: var(--color-surface);
19384
- border: 1px solid var(--color-outline-variant);
19385
- border-radius: var(--radius-md);
19386
- box-shadow: var(--shadow-lg);
19387
- opacity: 0;
19388
- transform: scale(0.95);
19389
- transition: opacity 150ms ease-out, transform 150ms ease-out, overlay 150ms ease-out allow-discrete, display 150ms ease-out allow-discrete;
19390
- }
19391
-
19392
- /* Popover open state */
19393
- .popover[popover]:popover-open {
19394
- opacity: 1;
19395
- visibility: visible;
19396
- transform: scale(1);
19397
- }
19398
-
19399
- /* Starting state for entry animation */
19400
- @starting-style {
19401
- .popover[popover]:popover-open {
19402
- opacity: 0;
19403
- transform: scale(0.95);
19404
- }
19405
- }
19406
-
19407
- /* Native popover backdrop */
19408
- .popover[popover]::backdrop {
19409
- background-color: transparent;
19410
- transition: background-color 150ms ease-out, overlay 150ms ease-out allow-discrete, display 150ms ease-out allow-discrete;
19411
- }
19412
-
19413
- .popover[popover]:popover-open::backdrop {
19414
- background-color: color-mix(in srgb, var(--color-scrim) 10%, transparent);
19415
- }
19416
-
19417
- @starting-style {
19418
- .popover[popover]:popover-open::backdrop {
19419
- background-color: transparent;
19420
- }
19421
- }
19422
-
19423
- /* Native popover with modal backdrop */
19424
- .popover-modal[popover]::backdrop {
19425
- background-color: transparent;
19426
- transition: background-color 150ms ease-out, overlay 150ms ease-out allow-discrete, display 150ms ease-out allow-discrete;
19427
- }
19428
-
19429
- .popover-modal[popover]:popover-open::backdrop {
19430
- background-color: color-mix(in srgb, var(--color-scrim) 30%, transparent);
19431
- }
19432
-
19433
- @starting-style {
19434
- .popover-modal[popover]:popover-open::backdrop {
19435
- background-color: transparent;
19436
- }
19437
- }
19438
-
19439
- /* Native popover color variants */
19440
- .popover-primary[popover] {
19441
- background-color: color-mix(in oklch, var(--color-primary) var(--popover-color-intensity), var(--color-surface));
19442
- border-color: var(--color-primary);
19443
- }
19444
-
19445
- .popover-primary[popover] .popover-body {
19446
- color: var(--color-on-surface);
19447
- }
19448
-
19449
- .popover-primary[popover] .popover-title {
19450
- color: var(--color-on-surface);
19451
- }
19452
-
19453
- .popover-secondary[popover] {
19454
- background-color: color-mix(in oklch, var(--color-secondary) var(--popover-color-intensity), var(--color-surface));
19455
- border-color: var(--color-secondary);
19456
- }
19457
-
19458
- .popover-secondary[popover] .popover-body {
19459
- color: var(--color-on-surface);
19460
- }
19461
-
19462
- .popover-secondary[popover] .popover-title {
19463
- color: var(--color-on-surface);
19464
- }
19465
-
19466
- .popover-tertiary[popover] {
19467
- background-color: color-mix(in oklch, var(--color-tertiary) var(--popover-color-intensity), var(--color-surface));
19468
- border-color: var(--color-tertiary);
19469
- }
19470
-
19471
- .popover-tertiary[popover] .popover-body {
19472
- color: var(--color-on-surface);
19473
- }
19474
-
19475
- .popover-tertiary[popover] .popover-title {
19476
- color: var(--color-on-surface);
19477
- }
19478
-
19479
- .popover-dark[popover] {
19480
- background-color: var(--color-on-surface);
19481
- border-color: transparent;
19482
- }
19483
-
19484
- .popover-dark[popover] .popover-body {
19485
- color: var(--color-surface);
19486
- opacity: 0.9;
19487
- }
19488
-
19489
- .popover-dark[popover] .popover-title {
19490
- color: var(--color-surface);
19491
- }
19492
-
19493
- .popover-surface-highest[popover] {
19494
- background-color: var(--color-surface-container-highest);
19495
- border-color: var(--color-outline-variant);
19496
- }
19497
-
19498
- /* Native popover size variants */
19499
- .popover-sm[popover] {
19500
- min-width: 8rem;
19501
- max-width: 14rem;
19502
- padding: 0.75rem;
19503
- }
19504
-
19505
- .popover-lg[popover] {
19506
- min-width: 16rem;
19507
- max-width: 28rem;
19508
- padding: 1.25rem;
19509
- }
19510
-
19511
- .popover-full[popover] {
19512
- min-width: 0;
19513
- max-width: none;
19514
- width: max-content;
19515
- }
19516
-
19517
- /* ========================================
19518
- * CSS Anchor Positioning
19519
- * Enables popovers to track their trigger element on scroll
19520
- * Usage: Add anchor-name CSS property to trigger, position-anchor to popover
19529
+ * Reduce Motion
19521
19530
  * ======================================== */
19522
19531
 
19523
- /* Popover trigger anchor - use inline style or custom class to set anchor-name */
19524
- [popovertarget] {
19525
- /* Each trigger needs unique anchor-name, set via inline style:
19526
- style="anchor-name: --my-popover" */
19527
- }
19528
-
19529
- /* Anchored popover positioning
19530
- * Uses anchor() functions instead of position-area to avoid
19531
- * a Chrome rendering bug at HiDPI (DPR>=2) where position-area
19532
- * computes correct CSS-pixel offsets but renders at physical-pixel
19533
- * coordinates, doubling the distance from the anchor. */
19534
- .popover[popover][style*="position-anchor"] {
19535
- inset: unset;
19536
- top: anchor(bottom);
19537
- justify-self: anchor-center;
19538
- margin-top: 0.5rem;
19539
- }
19540
-
19541
- /* Position variants for anchored popovers */
19542
- .popover-top[popover][style*="position-anchor"] {
19543
- top: unset;
19544
- bottom: anchor(top);
19545
- margin-top: 0;
19546
- margin-bottom: 0.5rem;
19547
- }
19548
-
19549
- .popover-bottom[popover][style*="position-anchor"] {
19550
- top: anchor(bottom);
19551
- margin-top: 0.5rem;
19552
- margin-bottom: 0;
19553
- }
19554
-
19555
- .popover-left[popover][style*="position-anchor"] {
19556
- top: anchor(center);
19557
- right: anchor(left);
19558
- justify-self: unset;
19559
- translate: 0 -50%;
19560
- margin-top: 0;
19561
- margin-right: 0.5rem;
19562
- }
19563
-
19564
- .popover-right[popover][style*="position-anchor"] {
19565
- top: anchor(center);
19566
- left: anchor(right);
19567
- justify-self: unset;
19568
- translate: 0 -50%;
19569
- margin-top: 0;
19570
- margin-left: 0.5rem;
19571
- }
19572
-
19573
- /* Anchored popover alignment variants */
19574
- .popover-start[popover][style*="position-anchor"] {
19575
- justify-self: start;
19576
- }
19577
-
19578
- .popover-end[popover][style*="position-anchor"] {
19579
- justify-self: end;
19580
- }
19581
-
19582
- .popover-top.popover-start[popover][style*="position-anchor"] {
19583
- justify-self: start;
19584
- }
19585
-
19586
- .popover-top.popover-end[popover][style*="position-anchor"] {
19587
- justify-self: end;
19588
- }
19589
-
19590
- /* Reduce Motion */
19591
19532
  @media (prefers-reduced-motion: reduce) {
19592
- .popover-content,
19593
19533
  .popover-close,
19594
19534
  .popover-menu-item,
19595
19535
  .popover[popover],