@truconsent/consent-notice 0.0.9 → 0.0.11

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.
@@ -473,4 +473,21 @@
473
473
  width: auto !important;
474
474
  border-radius: 6px !important;
475
475
  line-height: 1.2 !important;
476
+ }
477
+
478
+ /* Group Headings */
479
+ .tru-group-heading {
480
+ font-size: 0.7rem;
481
+ font-weight: 700;
482
+ text-transform: uppercase;
483
+ color: var(--banner-text-muted);
484
+ letter-spacing: 0.05em;
485
+ padding: 0.25rem 0.25rem;
486
+ margin-top: 0.75rem;
487
+ margin-bottom: 0.25rem;
488
+ opacity: 0.8;
489
+ }
490
+
491
+ .tru-group-heading:first-child {
492
+ margin-top: 0.25rem;
476
493
  }
@@ -131,7 +131,8 @@
131
131
 
132
132
  .mcm-error-icon {
133
133
  font-size: 48px;
134
- color: #ef4444; /* Standard danger red */
134
+ color: #ef4444;
135
+ /* Standard danger red */
135
136
  line-height: 1;
136
137
  margin-bottom: 8px;
137
138
  }
@@ -1292,4 +1293,551 @@ input:checked+.track+.thumb {
1292
1293
  position: relative;
1293
1294
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
1294
1295
  border: 1px solid var(--banner-border);
1296
+ }
1297
+
1298
+ /* ===================================================================
1299
+ TabbedBannerUI — Tab-based consent banner styles
1300
+ =================================================================== */
1301
+
1302
+ .tru-banner-root {
1303
+ display: flex;
1304
+ flex-direction: column;
1305
+ overflow: hidden;
1306
+ text-align: left;
1307
+ border-radius: 12px;
1308
+ border: 1px solid var(--banner-border);
1309
+ background-color: var(--banner-bg);
1310
+ color: var(--banner-text);
1311
+ height: 600px;
1312
+ max-height: 90vh;
1313
+ width: 100%;
1314
+ }
1315
+
1316
+ @media (max-width: 640px) {
1317
+ .tru-banner-root {
1318
+ height: auto;
1319
+ max-height: 85vh;
1320
+ }
1321
+ }
1322
+
1323
+ /* Header area */
1324
+ .tru-banner-header-area {
1325
+ flex-shrink: 0;
1326
+ padding: 14px 16px 10px;
1327
+ border-bottom: 1px solid var(--banner-border);
1328
+ background-color: var(--banner-hover-bg);
1329
+ }
1330
+
1331
+ @media (max-width: 480px) {
1332
+ .tru-banner-header-area {
1333
+ padding: 10px 12px 8px;
1334
+ }
1335
+ }
1336
+
1337
+ .tru-disclaimer-box {
1338
+ margin-top: 8px;
1339
+ line-height: 1.4;
1340
+ font-size: 0.8125em !important;
1341
+ }
1342
+
1343
+ @media (min-width: 641px) {
1344
+ .tru-disclaimer-box {
1345
+ font-size: 0.875em !important;
1346
+ }
1347
+ }
1348
+
1349
+ /* Tab bar */
1350
+ .tru-tabs-bar {
1351
+ display: flex;
1352
+ gap: 24px;
1353
+ padding: 0 20px;
1354
+ background-color: var(--banner-bg);
1355
+ border-bottom: 1px solid var(--banner-border);
1356
+ flex-shrink: 0;
1357
+ }
1358
+
1359
+ .tru-tab-button {
1360
+ position: relative;
1361
+ padding: 14px 4px;
1362
+ font-size: 0.875em;
1363
+ font-weight: 700;
1364
+ color: var(--banner-text-muted);
1365
+ background: none;
1366
+ border: none;
1367
+ border-bottom: 3px solid transparent;
1368
+ cursor: pointer;
1369
+ transition: all 0.2s ease;
1370
+ white-space: nowrap;
1371
+ margin-bottom: -1px;
1372
+ }
1373
+
1374
+ .tru-tab-button:hover {
1375
+ color: var(--banner-text);
1376
+ }
1377
+
1378
+ .tru-tab-button[data-active] {
1379
+ color: var(--banner-primary-color);
1380
+ border-bottom-color: var(--banner-primary-color);
1381
+ }
1382
+
1383
+ /* Tab panel */
1384
+ .tru-tab-panel {
1385
+ animation: truTabFadeIn 0.25s ease;
1386
+ }
1387
+
1388
+ @keyframes truTabFadeIn {
1389
+ from {
1390
+ opacity: 0;
1391
+ transform: translateY(4px);
1392
+ }
1393
+
1394
+ to {
1395
+ opacity: 1;
1396
+ transform: translateY(0);
1397
+ }
1398
+ }
1399
+
1400
+ /* Scrollable content area */
1401
+ .tru-banner-scroll-area {
1402
+ flex: 1;
1403
+ overflow-y: auto;
1404
+ padding: 12px 16px;
1405
+ background-color: var(--banner-bg);
1406
+ min-height: 200px;
1407
+ /* Prevent jumping when switching tabs */
1408
+ }
1409
+
1410
+ /* Footer area */
1411
+ .tru-banner-footer-area {
1412
+ flex-shrink: 0;
1413
+ border-top: 1px solid var(--banner-border);
1414
+ padding: 14px 16px;
1415
+ background-color: var(--banner-hover-bg);
1416
+ display: flex;
1417
+ flex-direction: column;
1418
+ }
1419
+
1420
+ /* Legitimate Use content */
1421
+ .tru-legitimate-content {
1422
+ display: flex;
1423
+ flex-direction: column;
1424
+ gap: 12px;
1425
+ }
1426
+
1427
+ .tru-notice-info-card {
1428
+ border: 1px solid var(--banner-info-border);
1429
+ background-color: var(--banner-info-bg);
1430
+ border-radius: 10px;
1431
+ padding: 14px 16px;
1432
+ display: flex;
1433
+ flex-direction: column;
1434
+ gap: 8px;
1435
+ }
1436
+
1437
+ .tru-notice-icon-row {
1438
+ display: flex;
1439
+ align-items: center;
1440
+ gap: 8px;
1441
+ color: var(--banner-info-text);
1442
+ }
1443
+
1444
+ .tru-notice-info-title {
1445
+ font-weight: 700;
1446
+ font-size: 0.9375em;
1447
+ }
1448
+
1449
+ .tru-notice-info-desc {
1450
+ font-size: 0.8125em;
1451
+ line-height: 1.5;
1452
+ color: var(--banner-text-muted);
1453
+ }
1454
+
1455
+ .tru-legitimate-disclaimer {
1456
+ display: flex;
1457
+ align-items: flex-start;
1458
+ gap: 10px;
1459
+ padding: 12px 14px;
1460
+ border-radius: 10px;
1461
+ background-color: var(--banner-info-bg);
1462
+ border: 1px solid var(--banner-info-border);
1463
+ margin-top: 16px;
1464
+ animation: truTabFadeIn 0.3s ease;
1465
+ }
1466
+
1467
+ .tru-legitimate-disclaimer svg {
1468
+ flex-shrink: 0;
1469
+ margin-top: 2px;
1470
+ color: var(--banner-info-text);
1471
+ opacity: 0.8;
1472
+ }
1473
+
1474
+ .tru-legitimate-disclaimer p {
1475
+ font-size: 0.8125em;
1476
+ line-height: 1.5;
1477
+ font-weight: 500;
1478
+ color: var(--banner-info-text);
1479
+ margin: 0;
1480
+ }
1481
+
1482
+ .tru-notice-log-badge {
1483
+ display: inline-flex;
1484
+ align-items: center;
1485
+ gap: 6px;
1486
+ padding: 6px 12px;
1487
+ border-radius: 6px;
1488
+ font-size: 0.75em;
1489
+ font-weight: 600;
1490
+ color: var(--banner-info-text);
1491
+ background-color: var(--banner-bg);
1492
+ border: 1px solid var(--banner-info-border);
1493
+ width: fit-content;
1494
+ }
1495
+
1496
+ /* Consent purposes content */
1497
+ .tru-consent-content {
1498
+ display: flex;
1499
+ flex-direction: column;
1500
+ gap: 16px;
1501
+ }
1502
+
1503
+ .tru-purpose-group {
1504
+ display: flex;
1505
+ flex-direction: column;
1506
+ gap: 8px;
1507
+ }
1508
+
1509
+ .tru-purpose-group-title {
1510
+ display: flex;
1511
+ align-items: center;
1512
+ gap: 6px;
1513
+ font-size: 0.8125em;
1514
+ font-weight: 700;
1515
+ text-transform: uppercase;
1516
+ letter-spacing: 0.03em;
1517
+ color: var(--banner-text-muted);
1518
+ padding-bottom: 4px;
1519
+ border-bottom: 1px solid var(--banner-border);
1520
+ }
1521
+
1522
+ .tru-purposes-list {
1523
+ display: flex;
1524
+ flex-direction: column;
1525
+ gap: 8px;
1526
+ }
1527
+
1528
+ /* Warning bar */
1529
+ .tru-warning-bar {
1530
+ display: flex;
1531
+ align-items: flex-start;
1532
+ gap: 8px;
1533
+ padding: 10px 12px;
1534
+ border-radius: 8px;
1535
+ background-color: var(--banner-warning-bg);
1536
+ border: 1px solid var(--banner-warning-border);
1537
+ }
1538
+
1539
+ .tru-warning-bar svg {
1540
+ flex-shrink: 0;
1541
+ margin-top: 2px;
1542
+ color: var(--banner-warning-text);
1543
+ opacity: 0.7;
1544
+ }
1545
+
1546
+ .tru-warning-bar p {
1547
+ font-size: 0.75em;
1548
+ line-height: 1.4;
1549
+ font-weight: 500;
1550
+ color: var(--banner-warning-text);
1551
+ margin: 0;
1552
+ }
1553
+
1554
+ /* Action buttons */
1555
+ .tru-actions-row {
1556
+ display: flex;
1557
+ flex-wrap: wrap;
1558
+ gap: 8px;
1559
+ justify-content: flex-end;
1560
+ }
1561
+
1562
+ .tru-actions-row.tru-actions-center {
1563
+ justify-content: center;
1564
+ }
1565
+
1566
+ .tru-btn {
1567
+ padding: 8px 18px;
1568
+ font-size: 0.8125em;
1569
+ font-weight: 700;
1570
+ border-radius: 8px;
1571
+ border: none;
1572
+ cursor: pointer;
1573
+ transition: all 0.2s ease;
1574
+ white-space: nowrap;
1575
+ display: inline-flex;
1576
+ align-items: center;
1577
+ justify-content: center;
1578
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
1579
+ }
1580
+
1581
+ .tru-btn:hover:not(:disabled) {
1582
+ opacity: 0.9;
1583
+ transform: translateY(-1px);
1584
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
1585
+ }
1586
+
1587
+ .tru-btn:active:not(:disabled) {
1588
+ transform: translateY(0);
1589
+ }
1590
+
1591
+ .tru-btn:disabled {
1592
+ opacity: 0.45;
1593
+ cursor: not-allowed;
1594
+ background-color: var(--banner-border) !important;
1595
+ color: var(--banner-text-muted);
1596
+ }
1597
+
1598
+ .tru-btn-primary {
1599
+ color: #fff;
1600
+ min-width: 120px;
1601
+ }
1602
+
1603
+ .tru-btn-accept {
1604
+ color: #fff;
1605
+ }
1606
+
1607
+ .tru-btn-reject {
1608
+ color: #fff;
1609
+ }
1610
+
1611
+ .tru-btn-save {
1612
+ color: #fff;
1613
+ }
1614
+
1615
+ /* Scroll hint */
1616
+ .tru-scroll-hint {
1617
+ text-align: center;
1618
+ font-size: 10px;
1619
+ color: var(--banner-text-muted);
1620
+ margin-bottom: 4px;
1621
+ animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
1622
+ }
1623
+
1624
+ @keyframes pulse {
1625
+
1626
+ 0%,
1627
+ 100% {
1628
+ opacity: 1;
1629
+ }
1630
+
1631
+ 50% {
1632
+ opacity: 0.5;
1633
+ }
1634
+ }
1635
+
1636
+ /* ===================================================================
1637
+ Responsive: Mobile
1638
+ =================================================================== */
1639
+ @media (max-width: 480px) {
1640
+ /* Modal wrapper: use more screen width on mobile */
1641
+ .mcm-wrapper {
1642
+ width: 95% !important;
1643
+ }
1644
+
1645
+ /* Close button: move inside the modal at a sensible position */
1646
+ .mcm-close-btn {
1647
+ top: -10px !important;
1648
+ right: -5px !important;
1649
+ width: 26px !important;
1650
+ height: 26px !important;
1651
+ z-index: 100 !important;
1652
+ display: flex !important;
1653
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
1654
+ background: var(--banner-bg) !important;
1655
+ font-size: 16px !important;
1656
+ align-items: center !important;
1657
+ justify-content: center !important;
1658
+ }
1659
+
1660
+ /* Banner root: flexible height, not fixed */
1661
+ .tru-banner-root {
1662
+ width: 100% !important;
1663
+ margin: 0 !important;
1664
+ height: auto !important;
1665
+ min-height: 0 !important;
1666
+ max-height: 88vh !important;
1667
+ border: none !important;
1668
+ border-radius: 0 !important;
1669
+ box-shadow: none !important;
1670
+ background-color: var(--banner-bg) !important;
1671
+ }
1672
+
1673
+ /* Header: right padding reserves space for the close button */
1674
+ .tru-banner-header-area {
1675
+ padding: 10px 40px 8px 12px !important;
1676
+ position: relative !important;
1677
+ }
1678
+
1679
+ /* The space-y-2 wrapper stays as a vertical stack (block), not a flex row */
1680
+ .tru-banner-header-area > div:first-child {
1681
+ display: block !important;
1682
+ padding-right: 0 !important;
1683
+ }
1684
+
1685
+ /* Language toggle: stay in normal flex flow (no absolute positioning) */
1686
+ .tru-language-toggle {
1687
+ position: static !important;
1688
+ font-size: 0.7rem !important;
1689
+ padding: 2px 4px !important;
1690
+ flex-shrink: 0 !important;
1691
+ white-space: nowrap !important;
1692
+ z-index: auto !important;
1693
+ }
1694
+
1695
+ .tru-language-toggle svg {
1696
+ height: 12px !important;
1697
+ width: 12px !important;
1698
+ }
1699
+
1700
+ .tru-language-dropdown {
1701
+ width: 120px !important;
1702
+ }
1703
+
1704
+ .tru-language-dropdown button {
1705
+ padding: 6px 10px !important;
1706
+ font-size: 0.725rem !important;
1707
+ }
1708
+
1709
+ .tru-banner-logo {
1710
+ max-height: 20px !important;
1711
+ width: auto !important;
1712
+ flex-shrink: 0 !important;
1713
+ }
1714
+
1715
+ .tru-banner-title {
1716
+ font-size: 0.875rem !important;
1717
+ line-height: 1.2 !important;
1718
+ overflow-wrap: break-word !important;
1719
+ word-break: break-word !important;
1720
+ }
1721
+
1722
+ .tru-disclaimer-box {
1723
+ font-size: 0.675rem !important;
1724
+ padding: 4px 10px !important;
1725
+ line-height: 1.3 !important;
1726
+ margin-top: 4px !important;
1727
+ }
1728
+
1729
+ /* Tab bar */
1730
+ .tru-tabs-bar {
1731
+ padding: 0 8px;
1732
+ }
1733
+
1734
+ .tru-tab-button {
1735
+ padding: 6px 10px;
1736
+ font-size: 0.75rem !important;
1737
+ }
1738
+
1739
+ /* Scrollable area: fill remaining space, no fixed max-height */
1740
+ .tru-banner-scroll-area {
1741
+ flex: 1 !important;
1742
+ padding: 8px 12px !important;
1743
+ min-height: 120px !important;
1744
+ max-height: none !important;
1745
+ overflow-y: auto !important;
1746
+ }
1747
+
1748
+ .tru-group-heading {
1749
+ font-size: 0.6rem !important;
1750
+ margin-top: 6px !important;
1751
+ margin-bottom: 2px !important;
1752
+ letter-spacing: 0.05em;
1753
+ text-transform: uppercase;
1754
+ opacity: 0.8;
1755
+ }
1756
+
1757
+ /* Footer: auto height, not fixed */
1758
+ .tru-banner-footer-area {
1759
+ padding: 8px 12px 12px !important;
1760
+ height: auto !important;
1761
+ min-height: 0 !important;
1762
+ flex-shrink: 0 !important;
1763
+ display: flex !important;
1764
+ flex-direction: column !important;
1765
+ gap: 6px !important;
1766
+ border-top: 1px solid var(--banner-border) !important;
1767
+ background-color: var(--banner-hover-bg) !important;
1768
+ }
1769
+
1770
+ .tru-footer-box {
1771
+ font-size: 0.675rem !important;
1772
+ padding: 4px 10px !important;
1773
+ line-height: 1.3 !important;
1774
+ margin-bottom: 2px !important;
1775
+ }
1776
+
1777
+ .tru-actions-row {
1778
+ flex-direction: row !important;
1779
+ flex-wrap: wrap !important;
1780
+ gap: 6px !important;
1781
+ justify-content: flex-end !important;
1782
+ }
1783
+
1784
+ .tru-actions-row.tru-actions-center {
1785
+ justify-content: center !important;
1786
+ }
1787
+
1788
+ .tru-btn {
1789
+ padding: 8px 14px !important;
1790
+ font-size: 0.775rem !important;
1791
+ min-width: 0 !important;
1792
+ }
1793
+
1794
+ .tru-btn-primary {
1795
+ min-width: 100px !important;
1796
+ }
1797
+
1798
+ .tru-actions-row .tru-btn {
1799
+ flex: 1 1 auto !important;
1800
+ min-width: 80px !important;
1801
+ }
1802
+
1803
+ /* Purpose cards */
1804
+ .tru-notice-info-card {
1805
+ padding: 10px 12px;
1806
+ }
1807
+
1808
+ .tru-legitimate-disclaimer,
1809
+ .tru-warning-bar {
1810
+ padding: 6px 10px !important;
1811
+ font-size: 0.7rem !important;
1812
+ margin-top: 6px !important;
1813
+ }
1814
+
1815
+ .tru-legitimate-disclaimer svg,
1816
+ .tru-warning-bar svg {
1817
+ width: 11px !important;
1818
+ height: 11px !important;
1819
+ }
1820
+
1821
+ .tru-purpose-card {
1822
+ padding: 0.5rem !important;
1823
+ border-radius: 8px !important;
1824
+ }
1825
+
1826
+ .tru-purpose-card h3 {
1827
+ font-size: 0.875rem !important;
1828
+ }
1829
+
1830
+ .tru-data-section button {
1831
+ padding: 4px 0 !important;
1832
+ font-size: 0.75rem !important;
1833
+ }
1834
+
1835
+ .tru-data-section div[class*="flex-wrap"] div {
1836
+ padding: 2px 8px !important;
1837
+ font-size: 0.675rem !important;
1838
+ }
1839
+
1840
+ .switch.scale-90 {
1841
+ transform: scale(0.72) !important;
1842
+ }
1295
1843
  }