@customviews-js/customviews 1.1.5 → 1.1.6

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @customviews-js/customviews v1.1.4
2
+ * @customviews-js/customviews v1.1.6
3
3
  * (c) 2025 Chan Ger Teck
4
4
  * Released under the MIT License.
5
5
  */
@@ -467,12 +467,12 @@ class TabManager {
467
467
  const tabElements = Array.from(groupEl.children).filter((child) => child.tagName.toLowerCase() === 'cv-tab');
468
468
  // Check for Font Awesome shortcodes in tab headers
469
469
  tabElements.forEach((tabEl) => {
470
- const tabId = tabEl.getAttribute('id');
471
- if (!tabId)
470
+ const rawTabId = tabEl.getAttribute('id');
471
+ if (!rawTabId)
472
472
  return;
473
- const splitIds = this.splitTabIds(tabId);
474
- const firstId = splitIds[0] || tabId;
475
- const header = tabEl.getAttribute('header') || this.getTabLabel(firstId, groupId, cfgGroups) || firstId || '';
473
+ const splitIds = this.splitTabIds(rawTabId);
474
+ const tabId = splitIds[0] || rawTabId;
475
+ const header = tabEl.getAttribute('header') || this.getTabLabel(tabId, groupId, cfgGroups) || tabId || '';
476
476
  if (/:fa-[\w-]+:/.test(header)) {
477
477
  hasFontAwesomeShortcodes = true;
478
478
  }
@@ -510,78 +510,64 @@ class TabManager {
510
510
  groupEl.insertBefore(navContainer, groupEl.firstChild);
511
511
  // Build nav items
512
512
  tabElements.forEach((tabEl) => {
513
- const tabId = tabEl.getAttribute('id');
514
- if (!tabId)
513
+ const rawTabId = tabEl.getAttribute('id');
514
+ if (!rawTabId)
515
515
  return;
516
- const splitIds = this.splitTabIds(tabId);
517
- // Header demarcation: if header contains |, split and use per tab.
518
- // If header attribute is present and not demarcated, use it as the fallback header.
516
+ const splitIds = this.splitTabIds(rawTabId);
517
+ // If multiple IDs, use the first as primary
518
+ const tabId = splitIds[0] || rawTabId;
519
+ // Get header for this tab (single header, not multiple)
519
520
  const headerAttr = tabEl.getAttribute('header') || '';
520
- let headerParts = [];
521
- if (headerAttr && headerAttr.includes('|')) {
522
- headerParts = headerAttr.split('|').map(h => h.trim());
521
+ let header = '';
522
+ if (headerAttr) {
523
+ // Single header provided on the element
524
+ header = headerAttr;
523
525
  }
524
- const firstId = splitIds[0] || tabId;
525
- let fallbackHeader = '';
526
- if (headerAttr && !headerAttr.includes('|')) {
527
- // Single header provided on the element: use for all split IDs
528
- fallbackHeader = headerAttr;
526
+ else {
527
+ // Use config label or id as fallback
528
+ header = this.getTabLabel(tabId, groupId, cfgGroups) || tabId || '';
529
+ }
530
+ // Create a single nav link for this tab element
531
+ const listItem = document.createElement('li');
532
+ listItem.className = 'nav-item';
533
+ const navLink = document.createElement('a');
534
+ navLink.className = 'nav-link';
535
+ navLink.innerHTML = replaceIconShortcodes(header);
536
+ navLink.href = '#';
537
+ navLink.setAttribute('data-tab-id', tabId);
538
+ navLink.setAttribute('data-raw-tab-id', rawTabId);
539
+ navLink.setAttribute('data-group-id', groupId);
540
+ navLink.setAttribute('role', 'tab');
541
+ // Check if any of the split IDs is active
542
+ const activeTabId = this.resolveActiveTabForGroup(groupId, {}, cfgGroups, groupEl); // Pass empty tabs for initial state
543
+ const isActive = splitIds.includes(activeTabId || '');
544
+ if (isActive) {
545
+ navLink.classList.add('active');
546
+ navLink.setAttribute('aria-selected', 'true');
529
547
  }
530
548
  else {
531
- // No header attribute or multi-part header: use config label or id as fallback
532
- fallbackHeader = this.getTabLabel(firstId, groupId, cfgGroups) || firstId || '';
549
+ navLink.setAttribute('aria-selected', 'false');
533
550
  }
534
- // Create nav links for each split ID
535
- splitIds.forEach((splitId, idx) => {
536
- const listItem = document.createElement('li');
537
- listItem.className = 'nav-item';
538
- const navLink = document.createElement('a');
539
- navLink.className = 'nav-link';
540
- // Use demarcated header if available, else prefer config label for this specific splitId
541
- let header = fallbackHeader;
542
- if (headerParts.length === splitIds.length) {
543
- header = headerParts[idx] ?? fallbackHeader;
544
- }
545
- else if (!headerAttr || headerAttr.includes('|')) {
546
- // Prefer the config label for the individual splitId over using firstId
547
- header = this.getTabLabel(splitId, groupId, cfgGroups) || splitId || '';
548
- }
549
- navLink.innerHTML = replaceIconShortcodes(header);
550
- navLink.href = '#';
551
- navLink.setAttribute('data-tab-id', splitId);
552
- navLink.setAttribute('data-group-id', groupId);
553
- navLink.setAttribute('role', 'tab');
554
- // Check if this split ID is active (same logic as applySelections)
555
- const activeTabId = this.resolveActiveTabForGroup(groupId, {}, cfgGroups, groupEl); // Pass empty tabs for initial state
556
- const isActive = splitIds.includes(activeTabId || '');
557
- if (isActive) {
558
- navLink.classList.add('active');
559
- navLink.setAttribute('aria-selected', 'true');
560
- }
561
- else {
562
- navLink.setAttribute('aria-selected', 'false');
563
- }
564
- // Add click handler for local tab switch
565
- if (onTabClick) {
566
- navLink.addEventListener('click', (e) => {
567
- e.preventDefault();
568
- // console.log("Single-click detected");
569
- onTabClick(groupId, splitId, groupEl);
570
- });
571
- }
572
- // Add double-click handler for sync
573
- if (onTabDoubleClick) {
574
- navLink.addEventListener('dblclick', (e) => {
575
- e.preventDefault();
576
- // console.log("Double-click detected");
577
- onTabDoubleClick(groupId, splitId, groupEl);
578
- });
579
- }
580
- // Add tooltip for UX feedback (use native title attribute)
581
- navLink.setAttribute('title', 'Double click to change switch tabs across all groups');
582
- listItem.appendChild(navLink);
583
- navContainer.appendChild(listItem);
584
- });
551
+ // Add click handler for local tab switch (if split id, switches to default first ID)
552
+ if (onTabClick) {
553
+ navLink.addEventListener('click', (e) => {
554
+ e.preventDefault();
555
+ // console.log("Single-click detected");
556
+ onTabClick(groupId, tabId, groupEl);
557
+ });
558
+ }
559
+ // Add double-click handler for sync
560
+ if (onTabDoubleClick) {
561
+ navLink.addEventListener('dblclick', (e) => {
562
+ e.preventDefault();
563
+ // console.log("Double-click detected");
564
+ onTabDoubleClick(groupId, tabId, groupEl);
565
+ });
566
+ }
567
+ // Add tooltip for UX feedback (use native title attribute)
568
+ navLink.setAttribute('title', 'Double click to change switch tabs across all groups');
569
+ listItem.appendChild(navLink);
570
+ navContainer.appendChild(listItem);
585
571
  });
586
572
  // Add bottom border line at the end of the tab group
587
573
  const bottomBorder = document.createElement('div');
@@ -645,12 +631,12 @@ class TabManager {
645
631
  static updateNavActiveState(groupEl, activeTabId) {
646
632
  const navLinks = groupEl.querySelectorAll('.nav-link');
647
633
  navLinks.forEach((link) => {
648
- const linkTabId = link.getAttribute('data-tab-id');
649
- if (!linkTabId)
634
+ const rawTabId = link.getAttribute('data-raw-tab-id');
635
+ if (!rawTabId)
650
636
  return;
651
- // Check if activeTabId matches or is in the split IDs of this link
652
- const splitIds = this.splitTabIds(linkTabId);
653
- const isActive = linkTabId === activeTabId || splitIds.includes(activeTabId);
637
+ // Check if activeTabId is in the split IDs of this link
638
+ const splitIds = this.splitTabIds(rawTabId);
639
+ const isActive = splitIds.includes(activeTabId);
654
640
  if (isActive) {
655
641
  link.classList.add('active');
656
642
  link.setAttribute('aria-selected', 'true');
@@ -677,12 +663,12 @@ class TabManager {
677
663
  // Update nav links for this group
678
664
  const navLinks = groupEl.querySelectorAll('.nav-link');
679
665
  navLinks.forEach((link) => {
680
- const linkTabId = link.getAttribute('data-tab-id');
681
- if (!linkTabId)
666
+ const rawTabId = link.getAttribute('data-raw-tab-id');
667
+ if (!rawTabId)
682
668
  return;
683
- // Check if activeTabId matches or is in the split IDs of this link
684
- const splitIds = this.splitTabIds(linkTabId);
685
- const isActive = linkTabId === activeTabId || splitIds.includes(activeTabId);
669
+ // Check if activeTabId is in the split IDs of this link
670
+ const splitIds = this.splitTabIds(rawTabId);
671
+ const isActive = splitIds.includes(activeTabId);
686
672
  if (isActive) {
687
673
  link.classList.add('active');
688
674
  link.setAttribute('aria-selected', 'true');
@@ -850,166 +836,166 @@ class ToggleManager {
850
836
  /**
851
837
  * Styles for toggle visibility and animations
852
838
  */
853
- const TOGGLE_STYLES = `
854
- /* Core toggle visibility transitions */
855
- [data-cv-toggle], [data-customviews-toggle], cv-toggle {
856
- transition: opacity 150ms ease,
857
- transform 150ms ease,
858
- max-height 200ms ease,
859
- margin 150ms ease;
860
- will-change: opacity, transform, max-height, margin;
861
- }
862
-
863
- .cv-visible {
864
- opacity: 1 !important;
865
- transform: translateY(0) !important;
866
- max-height: var(--cv-max-height, 9999px) !important;
867
- }
868
-
869
- .cv-hidden {
870
- opacity: 0 !important;
871
- transform: translateY(-4px) !important;
872
- pointer-events: none !important;
873
- padding-top: 0 !important;
874
- padding-bottom: 0 !important;
875
- border-top-width: 0 !important;
876
- border-bottom-width: 0 !important;
877
- max-height: 0 !important;
878
- margin-top: 0 !important;
879
- margin-bottom: 0 !important;
880
- overflow: hidden !important;
881
- }
839
+ const TOGGLE_STYLES = `
840
+ /* Core toggle visibility transitions */
841
+ [data-cv-toggle], [data-customviews-toggle], cv-toggle {
842
+ transition: opacity 150ms ease,
843
+ transform 150ms ease,
844
+ max-height 200ms ease,
845
+ margin 150ms ease;
846
+ will-change: opacity, transform, max-height, margin;
847
+ }
848
+
849
+ .cv-visible {
850
+ opacity: 1 !important;
851
+ transform: translateY(0) !important;
852
+ max-height: var(--cv-max-height, 9999px) !important;
853
+ }
854
+
855
+ .cv-hidden {
856
+ opacity: 0 !important;
857
+ transform: translateY(-4px) !important;
858
+ pointer-events: none !important;
859
+ padding-top: 0 !important;
860
+ padding-bottom: 0 !important;
861
+ border-top-width: 0 !important;
862
+ border-bottom-width: 0 !important;
863
+ max-height: 0 !important;
864
+ margin-top: 0 !important;
865
+ margin-bottom: 0 !important;
866
+ overflow: hidden !important;
867
+ }
882
868
  `;
883
869
 
884
870
  /**
885
871
  * Styles for tab groups and tab navigation
886
872
  */
887
- const TAB_STYLES = `
888
- /* Tab navigation styles - Bootstrap-style tabs matching MarkBind */
889
- .cv-tabs-nav {
890
- display: flex;
891
- flex-wrap: wrap;
892
- padding-left: 0;
893
- margin-top: 0.5rem;
894
- margin-bottom: 1rem;
895
- list-style: none;
896
- border-bottom: 1px solid #dee2e6;
897
- }
898
-
899
- .cv-tabs-nav .nav-item {
900
- margin-bottom: -1px;
901
- list-style: none;
902
- display: inline-block;
903
- }
904
-
905
- .cv-tabs-nav .nav-link {
906
- display: block;
907
- padding: 0.5rem 1rem;
908
- color: #495057;
909
- text-decoration: none;
910
- background-color: transparent;
911
- border: 1px solid transparent;
912
- border-top-left-radius: 0.25rem;
913
- border-top-right-radius: 0.25rem;
914
- transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
915
- cursor: pointer;
916
- }
917
-
918
- .cv-tabs-nav .nav-link:hover,
919
- .cv-tabs-nav .nav-link:focus {
920
- border-color: #e9ecef #e9ecef #dee2e6;
921
- isolation: isolate;
922
- }
923
-
924
- .cv-tabs-nav .nav-link.active {
925
- color: #495057;
926
- background-color: #fff;
927
- border-color: #dee2e6 #dee2e6 #fff;
928
- }
929
-
930
- .cv-tabs-nav .nav-link:focus {
931
- outline: 0;
932
- box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
933
- }
934
-
935
- /* Legacy button-based nav (deprecated, kept for compatibility) */
936
- .cv-tabs-nav-item {
937
- background: none;
938
- border: none;
939
- border-bottom: 2px solid transparent;
940
- padding: 0.5rem 1rem;
941
- cursor: pointer;
942
- font-size: 1rem;
943
- color: #6c757d;
944
- transition: color 150ms ease, border-color 150ms ease;
945
- }
946
-
947
- .cv-tabs-nav-item:hover {
948
- color: #495057;
949
- border-bottom-color: #dee2e6;
950
- }
951
-
952
- .cv-tabs-nav-item.active {
953
- color: #007bff;
954
- border-bottom-color: #007bff;
955
- font-weight: 500;
956
- }
957
-
958
- .cv-tabs-nav-item:focus {
959
- outline: 2px solid #007bff;
960
- outline-offset: 2px;
961
- }
962
-
963
- /* Tab panel base styles */
964
- cv-tab {
965
- display: block;
966
- }
967
-
968
- /* Override visibility for tab panels - use display instead of collapse animation */
969
- cv-tab.cv-hidden {
970
- display: none !important;
971
- }
972
-
973
- cv-tab.cv-visible {
974
- display: block !important;
975
- }
976
-
977
- cv-tabgroup {
978
- display: block;
979
- margin-bottom: 1.5rem;
980
- }
981
-
982
- /* Bottom border line for tab groups */
983
- .cv-tabgroup-bottom-border {
984
- border-bottom: 1px solid #dee2e6;
985
- margin-top: 1rem;
986
- }
987
-
988
- /* Tab content wrapper */
989
- .cv-tab-content {
990
- padding: 1rem 0;
991
- }
992
-
993
- /* Viewer-controlled nav visibility: hide nav containers when requested */
994
- .cv-tabs-nav-hidden {
995
- display: none !important;
996
- }
997
-
998
- /* Print-friendly: hide tab navigation when printing to reduce clutter */
999
- @media print {
1000
- .cv-tabs-nav {
1001
- display: none !important;
1002
- }
1003
- }
873
+ const TAB_STYLES = `
874
+ /* Tab navigation styles - Bootstrap-style tabs matching MarkBind */
875
+ .cv-tabs-nav {
876
+ display: flex;
877
+ flex-wrap: wrap;
878
+ padding-left: 0;
879
+ margin-top: 0.5rem;
880
+ margin-bottom: 1rem;
881
+ list-style: none;
882
+ border-bottom: 1px solid #dee2e6;
883
+ }
884
+
885
+ .cv-tabs-nav .nav-item {
886
+ margin-bottom: -1px;
887
+ list-style: none;
888
+ display: inline-block;
889
+ }
890
+
891
+ .cv-tabs-nav .nav-link {
892
+ display: block;
893
+ padding: 0.5rem 1rem;
894
+ color: #495057;
895
+ text-decoration: none;
896
+ background-color: transparent;
897
+ border: 1px solid transparent;
898
+ border-top-left-radius: 0.25rem;
899
+ border-top-right-radius: 0.25rem;
900
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
901
+ cursor: pointer;
902
+ }
903
+
904
+ .cv-tabs-nav .nav-link:hover,
905
+ .cv-tabs-nav .nav-link:focus {
906
+ border-color: #e9ecef #e9ecef #dee2e6;
907
+ isolation: isolate;
908
+ }
909
+
910
+ .cv-tabs-nav .nav-link.active {
911
+ color: #495057;
912
+ background-color: #fff;
913
+ border-color: #dee2e6 #dee2e6 #fff;
914
+ }
915
+
916
+ .cv-tabs-nav .nav-link:focus {
917
+ outline: 0;
918
+ box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
919
+ }
920
+
921
+ /* Legacy button-based nav (deprecated, kept for compatibility) */
922
+ .cv-tabs-nav-item {
923
+ background: none;
924
+ border: none;
925
+ border-bottom: 2px solid transparent;
926
+ padding: 0.5rem 1rem;
927
+ cursor: pointer;
928
+ font-size: 1rem;
929
+ color: #6c757d;
930
+ transition: color 150ms ease, border-color 150ms ease;
931
+ }
932
+
933
+ .cv-tabs-nav-item:hover {
934
+ color: #495057;
935
+ border-bottom-color: #dee2e6;
936
+ }
937
+
938
+ .cv-tabs-nav-item.active {
939
+ color: #007bff;
940
+ border-bottom-color: #007bff;
941
+ font-weight: 500;
942
+ }
943
+
944
+ .cv-tabs-nav-item:focus {
945
+ outline: 2px solid #007bff;
946
+ outline-offset: 2px;
947
+ }
948
+
949
+ /* Tab panel base styles */
950
+ cv-tab {
951
+ display: block;
952
+ }
953
+
954
+ /* Override visibility for tab panels - use display instead of collapse animation */
955
+ cv-tab.cv-hidden {
956
+ display: none !important;
957
+ }
958
+
959
+ cv-tab.cv-visible {
960
+ display: block !important;
961
+ }
962
+
963
+ cv-tabgroup {
964
+ display: block;
965
+ margin-bottom: 1.5rem;
966
+ }
967
+
968
+ /* Bottom border line for tab groups */
969
+ .cv-tabgroup-bottom-border {
970
+ border-bottom: 1px solid #dee2e6;
971
+ margin-top: 1rem;
972
+ }
973
+
974
+ /* Tab content wrapper */
975
+ .cv-tab-content {
976
+ padding: 1rem 0;
977
+ }
978
+
979
+ /* Viewer-controlled nav visibility: hide nav containers when requested */
980
+ .cv-tabs-nav-hidden {
981
+ display: none !important;
982
+ }
983
+
984
+ /* Print-friendly: hide tab navigation when printing to reduce clutter */
985
+ @media print {
986
+ .cv-tabs-nav {
987
+ display: none !important;
988
+ }
989
+ }
1004
990
  `;
1005
991
 
1006
992
  /**
1007
993
  * Combined core styles for toggles and tabs
1008
994
  */
1009
- const CORE_STYLES = `
1010
- ${TOGGLE_STYLES}
1011
-
1012
- ${TAB_STYLES}
995
+ const CORE_STYLES = `
996
+ ${TOGGLE_STYLES}
997
+
998
+ ${TAB_STYLES}
1013
999
  `;
1014
1000
  /**
1015
1001
  * Add styles for hiding and showing toggles animations and transitions to the document head
@@ -1403,993 +1389,993 @@ class CustomViews {
1403
1389
  * Note: Styles are kept as a TypeScript string for compatibility with the build system.
1404
1390
  * This approach ensures the styles are properly bundled and don't require separate CSS file handling.
1405
1391
  */
1406
- const WIDGET_STYLES = `
1407
- /* Rounded rectangle widget icon styles */
1408
- .cv-widget-icon {
1409
- position: fixed;
1410
- /* Slightly transparent by default so the widget is subtle at the page edge */
1411
- background: rgba(255, 255, 255, 0.92);
1412
- color: rgba(0, 0, 0, 0.9);
1413
- opacity: 0.6;
1414
- display: flex;
1415
- align-items: center;
1416
- justify-content: center;
1417
- font-size: 18px;
1418
- font-weight: bold;
1419
- cursor: pointer;
1420
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1421
- z-index: 9998;
1422
- transition: all 0.3s ease;
1423
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
1424
- }
1425
-
1426
- .cv-widget-icon:hover {
1427
- /* Become fully opaque on hover to improve readability */
1428
- background: rgba(255, 255, 255, 1);
1429
- color: rgba(0, 0, 0, 1);
1430
- opacity: 1;
1431
- }
1432
-
1433
- /* Top-right: rounded end on left, sticks out leftward on hover */
1434
- .cv-widget-top-right {
1435
- top: 20px;
1436
- right: 0;
1437
- border-radius: 18px 0 0 18px;
1438
- padding-left: 8px;
1439
- justify-content: flex-start;
1440
- }
1441
-
1442
- /* Top-left: rounded end on right, sticks out rightward on hover */
1443
- .cv-widget-top-left {
1444
- top: 20px;
1445
- left: 0;
1446
- border-radius: 0 18px 18px 0;
1447
- padding-right: 8px;
1448
- justify-content: flex-end;
1449
- }
1450
-
1451
- /* Bottom-right: rounded end on left, sticks out leftward on hover */
1452
- .cv-widget-bottom-right {
1453
- bottom: 20px;
1454
- right: 0;
1455
- border-radius: 18px 0 0 18px;
1456
- padding-left: 8px;
1457
- justify-content: flex-start;
1458
- }
1459
-
1460
- /* Bottom-left: rounded end on right, sticks out rightward on hover */
1461
- .cv-widget-bottom-left {
1462
- bottom: 20px;
1463
- left: 0;
1464
- border-radius: 0 18px 18px 0;
1465
- padding-right: 8px;
1466
- justify-content: flex-end;
1467
- }
1468
-
1469
- /* Middle-left: rounded end on right, sticks out rightward on hover */
1470
- .cv-widget-middle-left {
1471
- top: 50%;
1472
- left: 0;
1473
- transform: translateY(-50%);
1474
- border-radius: 0 18px 18px 0;
1475
- padding-right: 8px;
1476
- justify-content: flex-end;
1477
- }
1478
-
1479
- /* Middle-right: rounded end on left, sticks out leftward on hover */
1480
- .cv-widget-middle-right {
1481
- top: 50%;
1482
- right: 0;
1483
- transform: translateY(-50%);
1484
- border-radius: 18px 0 0 18px;
1485
- padding-left: 8px;
1486
- justify-content: flex-start;
1487
- }
1488
-
1489
- .cv-widget-top-right,
1490
- .cv-widget-middle-right,
1491
- .cv-widget-bottom-right,
1492
- .cv-widget-top-left,
1493
- .cv-widget-middle-left,
1494
- .cv-widget-bottom-left {
1495
- height: 36px;
1496
- width: 36px;
1497
- }
1498
-
1499
- .cv-widget-middle-right:hover,
1500
- .cv-widget-top-right:hover,
1501
- .cv-widget-bottom-right:hover,
1502
- .cv-widget-top-left:hover,
1503
- .cv-widget-middle-left:hover,
1504
- .cv-widget-bottom-left:hover {
1505
- width: 55px;
1506
- }
1507
-
1508
- /* Modal content styles */
1509
- .cv-widget-section {
1510
- margin-bottom: 16px;
1511
- }
1512
-
1513
- .cv-widget-section:last-child {
1514
- margin-bottom: 0;
1515
- }
1516
-
1517
- .cv-widget-section label {
1518
- display: block;
1519
- margin-bottom: 4px;
1520
- font-weight: 500;
1521
- color: #555;
1522
- }
1523
-
1524
- .cv-widget-profile-select,
1525
- .cv-widget-state-select {
1526
- width: 100%;
1527
- padding: 8px 12px;
1528
- border: 1px solid #ddd;
1529
- border-radius: 4px;
1530
- background: white;
1531
- font-size: 14px;
1532
- }
1533
-
1534
- .cv-widget-profile-select:focus,
1535
- .cv-widget-state-select:focus {
1536
- outline: none;
1537
- border-color: #007bff;
1538
- box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
1539
- }
1540
-
1541
- .cv-widget-profile-select:disabled,
1542
- .cv-widget-state-select:disabled {
1543
- background: #f8f9fa;
1544
- color: #6c757d;
1545
- cursor: not-allowed;
1546
- }
1547
-
1548
- .cv-widget-current {
1549
- margin: 16px 0;
1550
- padding: 12px;
1551
- background: #f8f9fa;
1552
- border-radius: 4px;
1553
- border-left: 4px solid #007bff;
1554
- }
1555
-
1556
- .cv-widget-current label {
1557
- font-size: 12px;
1558
- text-transform: uppercase;
1559
- letter-spacing: 0.5px;
1560
- color: #666;
1561
- margin-bottom: 4px;
1562
- }
1563
-
1564
- .cv-widget-current-view {
1565
- font-weight: 500;
1566
- color: #333;
1567
- }
1568
-
1569
- .cv-widget-reset {
1570
- width: 100%;
1571
- padding: 8px 16px;
1572
- background: #dc3545;
1573
- color: white;
1574
- border: none;
1575
- border-radius: 4px;
1576
- cursor: pointer;
1577
- font-size: 14px;
1578
- font-weight: 500;
1579
- }
1580
-
1581
- .cv-widget-reset:hover {
1582
- background: #c82333;
1583
- }
1584
-
1585
- .cv-widget-reset:active {
1586
- background: #bd2130;
1587
- }
1588
-
1589
- /* Responsive design for mobile */
1590
- @media (max-width: 768px) {
1591
- .cv-widget-top-right,
1592
- .cv-widget-top-left {
1593
- top: 10px;
1594
- }
1595
-
1596
- .cv-widget-bottom-right,
1597
- .cv-widget-bottom-left {
1598
- bottom: 10px;
1599
- }
1600
-
1601
- /* All widgets stay flush with screen edges */
1602
- .cv-widget-top-right,
1603
- .cv-widget-bottom-right,
1604
- .cv-widget-middle-right {
1605
- right: 0;
1606
- }
1607
-
1608
- .cv-widget-top-left,
1609
- .cv-widget-bottom-left,
1610
- .cv-widget-middle-left {
1611
- left: 0;
1612
- }
1613
-
1614
- /* Slightly smaller on mobile */
1615
- .cv-widget-icon {
1616
- width: 60px;
1617
- height: 32px;
1618
- }
1619
-
1620
- .cv-widget-icon:hover {
1621
- width: 75px;
1622
- }
1623
- }
1624
-
1625
- /* Modal styles */
1626
- .cv-widget-modal-overlay {
1627
- position: fixed;
1628
- top: 0;
1629
- left: 0;
1630
- right: 0;
1631
- bottom: 0;
1632
- background: rgba(0, 0, 0, 0.5);
1633
- display: flex;
1634
- align-items: center;
1635
- justify-content: center;
1636
- z-index: 10002;
1637
- animation: fadeIn 0.2s ease;
1638
- }
1639
-
1640
- @keyframes fadeIn {
1641
- from { opacity: 0; }
1642
- to { opacity: 1; }
1643
- }
1644
-
1645
- .cv-widget-modal {
1646
- background: white;
1647
- border-radius: 0.75rem;
1648
- box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
1649
- max-width: 32rem;
1650
- width: 90vw;
1651
- max-height: 80vh;
1652
- animation: slideIn 0.2s ease;
1653
- display: flex;
1654
- flex-direction: column;
1655
- }
1656
-
1657
- @keyframes slideIn {
1658
- from {
1659
- opacity: 0;
1660
- transform: scale(0.9) translateY(-20px);
1661
- }
1662
- to {
1663
- opacity: 1;
1664
- transform: scale(1) translateY(0);
1665
- }
1666
- }
1667
-
1668
- .cv-modal-header {
1669
- display: flex;
1670
- align-items: center;
1671
- justify-content: space-between;
1672
- padding: 0.5rem 1rem;
1673
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
1674
- }
1675
-
1676
- .cv-modal-header-content {
1677
- display: flex;
1678
- align-items: center;
1679
- gap: 0.75rem;
1680
- }
1681
-
1682
- .cv-modal-icon {
1683
- position: relative;
1684
- width: 1rem;
1685
- height: 1rem;
1686
- display: flex;
1687
- align-items: center;
1688
- justify-content: center;
1689
- border-radius: 9999px;
1690
- }
1691
-
1692
- .cv-modal-icon-svg {
1693
- width: 100%;
1694
- height: 100%;
1695
- opacity: 1;
1696
- }
1697
-
1698
- .cv-modal-title {
1699
- font-size: 1.125rem;
1700
- font-weight: bold;
1701
- color: rgba(0, 0, 0, 0.9);
1702
- margin: 0;
1703
- }
1704
-
1705
- .cv-modal-close {
1706
- width: 2rem;
1707
- height: 2rem;
1708
- display: flex;
1709
- align-items: center;
1710
- justify-content: center;
1711
- border-radius: 9999px;
1712
- background: transparent;
1713
- border: none;
1714
- color: rgba(0, 0, 0, 0.6);
1715
- cursor: pointer;
1716
- transition: all 0.2s ease;
1717
- }
1718
-
1719
- .cv-modal-close:hover {
1720
- background: rgba(62, 132, 244, 0.1);
1721
- color: #3e84f4;
1722
- }
1723
-
1724
- .cv-modal-close-icon {
1725
- width: 1.25rem;
1726
- height: 1.25rem;
1727
- }
1728
-
1729
- .cv-modal-main {
1730
- padding: 1rem;
1731
- flex: 1;
1732
- display: flex;
1733
- flex-direction: column;
1734
- gap: 1rem;
1735
- overflow-y: auto;
1736
- max-height: calc(80vh - 8rem);
1737
- }
1738
-
1739
- .cv-modal-description {
1740
- font-size: 0.875rem;
1741
- color: rgba(0, 0, 0, 0.8);
1742
- margin: 0;
1743
- line-height: 1.4;
1744
- }
1745
-
1746
- .cv-content-section,
1747
- .cv-tab-groups-section {
1748
- display: flex;
1749
- flex-direction: column;
1750
- gap: 0.75rem;
1751
- }
1752
-
1753
- .cv-section-heading {
1754
- font-size: 1rem;
1755
- font-weight: bold;
1756
- color: rgba(0, 0, 0, 0.9);
1757
- margin: 0;
1758
- }
1759
-
1760
- .cv-widget-modal-actions {
1761
- margin-top: 20px;
1762
- padding-top: 16px;
1763
- border-top: 1px solid #e9ecef;
1764
- }
1765
-
1766
- .cv-widget-restore {
1767
- width: 100%;
1768
- padding: 10px 16px;
1769
- background: #28a745;
1770
- color: white;
1771
- border: none;
1772
- border-radius: 4px;
1773
- cursor: pointer;
1774
- font-size: 14px;
1775
- font-weight: 500;
1776
- }
1777
-
1778
- .cv-widget-restore:hover {
1779
- background: #218838;
1780
- }
1781
-
1782
- .cv-widget-create-state {
1783
- width: 100%;
1784
- padding: 10px 16px;
1785
- background: #007bff;
1786
- color: white;
1787
- border: none;
1788
- border-radius: 4px;
1789
- cursor: pointer;
1790
- font-size: 14px;
1791
- font-weight: 500;
1792
- margin-bottom: 10px;
1793
- }
1794
-
1795
- .cv-widget-create-state:hover {
1796
- background: #0056b3;
1797
- }
1798
-
1799
- .cv-widget-theme-dark .cv-widget-modal {
1800
- background: #101722;
1801
- color: #e2e8f0;
1802
- }
1803
-
1804
- .cv-widget-theme-dark .cv-modal-header {
1805
- border-color: rgba(255, 255, 255, 0.1);
1806
- }
1807
-
1808
- .cv-widget-theme-dark .cv-modal-title {
1809
- color: #e2e8f0;
1810
- }
1811
-
1812
- .cv-widget-theme-dark .cv-modal-close {
1813
- color: rgba(255, 255, 255, 0.6);
1814
- }
1815
-
1816
- .cv-widget-theme-dark .cv-modal-close:hover {
1817
- background: rgba(62, 132, 244, 0.2);
1818
- color: #3e84f4;
1819
- }
1820
-
1821
- .cv-widget-theme-dark .cv-modal-description {
1822
- color: rgba(255, 255, 255, 0.8);
1823
- }
1824
-
1825
- .cv-widget-theme-dark .cv-section-heading {
1826
- color: #e2e8f0;
1827
- }
1828
-
1829
- .cv-widget-theme-dark .cv-toggles-container
1830
- .cv-widget-theme-dark .cv-tabgroups-container {
1831
- border-color: rgba(255, 255, 255, 0.1);
1832
- }
1833
-
1834
- .cv-widget-theme-dark .cv-toggle-card,
1835
- .cv-widget-theme-dark .cv-tabgroup-card {
1836
- background: #101722;
1837
- border-color: rgba(255, 255, 255, 0.1);
1838
- }
1839
-
1840
- .cv-widget-theme-dark .cv-toggle-title,
1841
- .cv-widget-theme-dark .cv-tabgroup-title {
1842
- color: #e2e8f0;
1843
- }
1844
-
1845
- .cv-widget-theme-dark .cv-toggle-description,
1846
- .cv-widget-theme-dark .cv-tabgroup-description {
1847
- color: rgba(255, 255, 255, 0.6);
1848
- }
1849
-
1850
- .cv-widget-theme-dark .cv-toggle-slider {
1851
- background: rgba(255, 255, 255, 0.2);
1852
- }
1853
-
1854
- .cv-widget-theme-dark .cv-tab-group-description {
1855
- color: rgba(255, 255, 255, 0.8);
1856
- }
1857
-
1858
- .cv-widget-theme-dark .cv-tabgroup-select {
1859
- background: #101722;
1860
- border-color: rgba(255, 255, 255, 0.2);
1861
- color: #e2e8f0;
1862
- }
1863
-
1864
- .cv-widget-theme-dark .cv-modal-footer {
1865
- border-color: rgba(255, 255, 255, 0.1);
1866
- background: #101722;
1867
- }
1868
-
1869
- .cv-widget-theme-dark .cv-reset-btn {
1870
- color: #e2e8f0;
1871
- background: rgba(255, 255, 255, 0.1);
1872
- }
1873
-
1874
- .cv-widget-theme-dark .cv-reset-btn:hover {
1875
- background: rgba(255, 255, 255, 0.2);
1876
- }
1877
-
1878
- /* Custom state creator styles */
1879
- .cv-custom-state-modal {
1880
- max-width: 500px;
1881
- }
1882
-
1883
- .cv-custom-state-form .cv-section-header {
1884
- font-size: 16px;
1885
- font-weight: 600;
1886
- color: #333;
1887
- border-bottom: 1px solid #e9ecef;
1888
- padding-bottom: 5px;
1889
- }
1890
-
1891
- .cv-custom-state-form p {
1892
- font-size: 15px;
1893
- line-height: 1.6;
1894
- color: #555;
1895
- margin-bottom: 24px;
1896
- text-align: justify;
1897
- }
1898
-
1899
- .cv-custom-state-section {
1900
- margin-bottom: 16px;
1901
- }
1902
-
1903
- .cv-custom-state-section label {
1904
- display: block;
1905
- margin-bottom: 4px;
1906
- font-weight: 500;
1907
- color: #555;
1908
- }
1909
-
1910
- .cv-custom-state-input {
1911
- width: 100%;
1912
- padding: 8px 12px;
1913
- border: 1px solid #ddd;
1914
- border-radius: 4px;
1915
- background: white;
1916
- font-size: 14px;
1917
- }
1918
-
1919
- .cv-custom-state-input:focus {
1920
- outline: none;
1921
- border-color: #007bff;
1922
- box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
1923
- }
1924
-
1925
- /* Toggles Container */
1926
- .cv-toggles-container {
1927
- display: flex;
1928
- flex-direction: column;
1929
- gap: 0.5rem;
1930
- border-radius: 0.5rem;
1931
- border: 1px solid rgba(0, 0, 0, 0.1);
1932
- overflow: hidden;
1933
- }
1934
-
1935
- .cv-toggle-card,
1936
- .cv-tabgroup-card {
1937
- background: white;
1938
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
1939
- }
1940
-
1941
- .cv-toggle-card:last-child {
1942
- border-bottom: none;
1943
- }
1944
-
1945
- .cv-toggle-content {
1946
- display: flex;
1947
- align-items: center;
1948
- justify-content: space-between;
1949
- padding: 0.75rem;
1950
- }
1951
-
1952
- .cv-toggle-title {
1953
- font-weight: 500;
1954
- font-size: 0.875rem;
1955
- color: rgba(0, 0, 0, 0.9);
1956
- margin: 0 0 0.125rem 0;
1957
- }
1958
-
1959
- .cv-toggle-description {
1960
- font-size: 0.75rem;
1961
- color: rgba(0, 0, 0, 0.6);
1962
- margin: 0;
1963
- }
1964
-
1965
- .cv-toggle-label{
1966
- position: relative;
1967
- display: inline-block;
1968
- width: 2.75rem;
1969
- height: 1.5rem;
1970
- cursor: pointer;
1971
- }
1972
-
1973
- .cv-toggle-input {
1974
- opacity: 0;
1975
- width: 0;
1976
- height: 0;
1977
- }
1978
-
1979
- .cv-toggle-slider {
1980
- position: absolute;
1981
- top: 0;
1982
- left: 0;
1983
- right: 0;
1984
- bottom: 0;
1985
- background: rgba(0, 0, 0, 0.2);
1986
- border-radius: 9999px;
1987
- transition: background-color 0.2s ease;
1988
- }
1989
-
1990
- .cv-toggle-slider:before {
1991
- position: absolute;
1992
- content: "";
1993
- height: 1rem;
1994
- width: 1rem;
1995
- left: 0.25rem;
1996
- bottom: 0.25rem;
1997
- background: white;
1998
- border-radius: 50%;
1999
- transition: transform 0.2s ease;
2000
- }
2001
-
2002
- .cv-toggle-input:checked + .cv-toggle-slider {
2003
- background: #3e84f4;
2004
- }
2005
-
2006
- .cv-toggle-input:checked + .cv-toggle-slider:before {
2007
- transform: translateX(1.25rem);
2008
- }
2009
-
2010
- /* Dark theme toggle switch styles */
2011
- .cv-widget-theme-dark .cv-toggle-switch {
2012
- background: #4a5568;
2013
- }
2014
-
2015
- .cv-widget-theme-dark .cv-toggle-switch:hover {
2016
- background: #5a6578;
2017
- }
2018
-
2019
- .cv-widget-theme-dark .cv-toggle-switch.cv-toggle-active {
2020
- background: #63b3ed;
2021
- }
2022
-
2023
- .cv-widget-theme-dark .cv-toggle-switch.cv-toggle-active:hover {
2024
- background: #4299e1;
2025
- }
2026
-
2027
- /* Tab Groups Container */
2028
- .cv-tab-groups-list {
2029
- display: flex;
2030
- flex-direction: column;
2031
- gap: 1px;
2032
- border: 1px solid rgba(0, 0, 0, 0.1);
2033
- border-radius: 0.5rem;
2034
- overflow: hidden;
2035
- }
2036
-
2037
- /* Tab Group Card - Header (Navigation Headers toggle) */
2038
- .cv-tabgroup-card.cv-tabgroup-header {
2039
- display: flex;
2040
- align-items: center;
2041
- justify-content: space-between;
2042
- padding: 0.75rem;
2043
- border-bottom: 0px;
2044
- }
2045
-
2046
- .cv-tabgroup-card.cv-tabgroup-header .cv-tabgroup-row {
2047
- display: flex;
2048
- align-items: center;
2049
- justify-content: space-between;
2050
- width: 100%;
2051
- gap: 1rem;
2052
- }
2053
-
2054
- /* Tab Group Card - Items */
2055
- .cv-tabgroup-card.cv-tabgroup-item {
2056
- display: flex;
2057
- flex-direction: column;
2058
- gap: 0.5rem;
2059
- padding: 0.75rem;
2060
- background: white;
2061
- border-bottom: 1px solid rgba(0, 0, 0, 0.05);
2062
- }
2063
-
2064
- .cv-tabgroup-card.cv-tabgroup-item:last-child {
2065
- border-bottom: none;
2066
- }
2067
-
2068
- /* Tab Group Info */
2069
- .cv-tabgroup-info {
2070
- flex: 1;
2071
- }
2072
-
2073
- .cv-tabgroup-title {
2074
- font-weight: 500;
2075
- font-size: 0.875rem;
2076
- color: rgba(0, 0, 0, 0.9);
2077
- margin: 0 0 0.25rem 0;
2078
- }
2079
-
2080
- .cv-tabgroup-description {
2081
- font-size: 0.75rem;
2082
- color: rgba(0, 0, 0, 0.6);
2083
- margin: 0;
2084
- line-height: 1.3;
2085
- }
2086
-
2087
- /* Tab Group Label (for select dropdowns) */
2088
- .cv-tabgroup-label {
2089
- font-size: 0.875rem;
2090
- color: rgba(0, 0, 0, 0.8);
2091
- margin: 0;
2092
- line-height: 1.4;
2093
- font-weight: 500;
2094
- display: block;
2095
- cursor: pointer;
2096
- }
2097
-
2098
- /* Tab Group Select */
2099
- .cv-tabgroup-select {
2100
- width: 100%;
2101
- border-radius: 0.5rem;
2102
- background: white;
2103
- border: 1px solid rgba(0, 0, 0, 0.15);
2104
- color: rgba(0, 0, 0, 0.9);
2105
- padding: 0.5rem 0.75rem;
2106
- font-size: 0.875rem;
2107
- cursor: pointer;
2108
- transition: all 0.15s ease;
2109
- font-family: inherit;
2110
- }
2111
-
2112
- .cv-tabgroup-select:hover {
2113
- border-color: rgba(0, 0, 0, 0.25);
2114
- }
2115
-
2116
- .cv-tabgroup-select:focus {
2117
- outline: none;
2118
- border-color: #3e84f4;
2119
- box-shadow: 0 0 0 2px rgba(62, 132, 244, 0.2);
2120
- }
2121
-
2122
- /* Modern Toggle Switch */
2123
- .cv-toggle-switch {
2124
- position: relative;
2125
- display: inline-flex;
2126
- align-items: center;
2127
- width: 44px;
2128
- height: 24px;
2129
- background: rgba(0, 0, 0, 0.1);
2130
- border-radius: 9999px;
2131
- padding: 2px;
2132
- box-sizing: border-box;
2133
- cursor: pointer;
2134
- transition: background-color 0.2s ease;
2135
- border: none;
2136
- }
2137
-
2138
- .cv-toggle-switch input {
2139
- display: none;
2140
- }
2141
-
2142
- .cv-toggle-switch .cv-switch-bg {
2143
- position: absolute;
2144
- inset: 0;
2145
- border-radius: 9999px;
2146
- background: rgba(0, 0, 0, 0.1);
2147
- transition: background-color 0.2s ease;
2148
- pointer-events: none;
2149
- }
2150
-
2151
- .cv-toggle-switch .cv-switch-knob {
2152
- position: relative;
2153
- width: 20px;
2154
- height: 20px;
2155
- background: white;
2156
- border-radius: 50%;
2157
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
2158
- transition: transform 0.2s ease;
2159
- z-index: 1;
2160
- }
2161
-
2162
- .cv-toggle-switch input:checked + .cv-switch-bg {
2163
- background: #3e84f4;
2164
- }
2165
-
2166
- .cv-toggle-switch input:checked ~ .cv-switch-knob {
2167
- transform: translateX(20px);
2168
- }
2169
-
2170
- /* Dark Theme - Tab Groups */
2171
- .cv-widget-theme-dark .cv-tabgroup-card.cv-tabgroup-header {
2172
- background: #101722;
2173
- border-bottom-color: rgba(255, 255, 255, 0.1);
2174
- }
2175
-
2176
- .cv-widget-theme-dark .cv-tabgroup-card.cv-tabgroup-item {
2177
- background: #101722;
2178
- border-bottom-color: rgba(255, 255, 255, 0.05);
2179
- }
2180
-
2181
- .cv-widget-theme-dark .cv-tabgroup-title {
2182
- color: #e2e8f0;
2183
- }
2184
-
2185
- .cv-widget-theme-dark .cv-tabgroup-description {
2186
- color: rgba(255, 255, 255, 0.6);
2187
- }
2188
-
2189
- .cv-widget-theme-dark .cv-tabgroup-label {
2190
- color: rgba(255, 255, 255, 0.8);
2191
- }
2192
-
2193
- .cv-widget-theme-dark .cv-tab-groups-list {
2194
- border-color: rgba(255, 255, 255, 0.1);
2195
- }
2196
-
2197
- .cv-widget-theme-dark .cv-tabgroup-select {
2198
- background: #101722;
2199
- border-color: rgba(255, 255, 255, 0.15);
2200
- color: #e2e8f0;
2201
- }
2202
-
2203
- .cv-widget-theme-dark .cv-tabgroup-select:hover {
2204
- border-color: rgba(255, 255, 255, 0.25);
2205
- }
2206
-
2207
- .cv-widget-theme-dark .cv-tabgroup-select:focus {
2208
- border-color: #60a5fa;
2209
- box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
2210
- }
2211
-
2212
- /* Dark Theme - Toggle Switch */
2213
- .cv-widget-theme-dark .cv-toggle-switch .cv-switch-bg {
2214
- background: rgba(255, 255, 255, 0.1);
2215
- }
2216
-
2217
- .cv-widget-theme-dark .cv-toggle-switch .cv-switch-knob {
2218
- background: #e2e8f0;
2219
- }
2220
-
2221
- .cv-widget-theme-dark .cv-toggle-switch input:checked + .cv-switch-bg {
2222
- background: #63b3ed;
2223
- }
2224
-
2225
- .cv-modal-footer {
2226
- display: flex;
2227
- justify-content: space-between;
2228
- align-items: center;
2229
- padding: 0.75rem;
2230
- border-top: 1px solid rgba(0, 0, 0, 0.1);
2231
- }
2232
-
2233
- .cv-reset-btn,
2234
- .cv-share-btn {
2235
- display: flex;
2236
- align-items: center;
2237
- gap: 0.5rem;
2238
- padding: 0.375rem 0.75rem;
2239
- border-radius: 0.5rem;
2240
- font-weight: 600;
2241
- font-size: 0.875rem;
2242
- cursor: pointer;
2243
- transition: all 0.2s ease;
2244
- border: none;
2245
- }
2246
-
2247
- .cv-reset-btn {
2248
- color: rgba(0, 0, 0, 0.9);
2249
- background: rgba(0, 0, 0, 0.1);
2250
- }
2251
-
2252
- .cv-reset-btn:hover {
2253
- background: rgba(0, 0, 0, 0.2);
2254
- }
2255
-
2256
- .cv-share-btn {
2257
- color: white;
2258
- background: #3e84f4;
2259
- }
2260
-
2261
- .cv-share-btn:hover {
2262
- background: rgba(62, 132, 244, 0.9);
2263
- }
2264
-
2265
- .cv-btn-icon {
2266
- width: 1rem;
2267
- height: 1rem;
2268
- }
2269
-
2270
- /* Dark theme custom state styles */
2271
- /* Welcome modal styles */
2272
- .cv-welcome-modal {
2273
- max-width: 32rem;
2274
- width: 90vw;
2275
- background: white;
2276
- border-radius: 0.75rem;
2277
- box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
2278
- animation: slideIn 0.2s ease;
2279
- display: flex;
2280
- flex-direction: column;
2281
- }
2282
-
2283
- .cv-modal-main {
2284
- padding: 1rem;
2285
- flex: 1;
2286
- display: flex;
2287
- flex-direction: column;
2288
- gap: 1rem;
2289
- overflow-y: auto;
2290
- max-height: calc(80vh - 8rem);
2291
- }
2292
-
2293
- .cv-welcome-message {
2294
- font-size: 0.875rem;
2295
- color: rgba(0, 0, 0, 0.8);
2296
- margin: 0;
2297
- line-height: 1.4;
2298
- text-align: center;
2299
- }
2300
-
2301
- .cv-welcome-message a {
2302
- color: #3e84f4;
2303
- text-align: justify;
2304
- text-decoration: none;
2305
- }
2306
-
2307
- .cv-welcome-message a:hover {
2308
- text-decoration: underline;
2309
- }
2310
-
2311
- .cv-welcome-widget-preview {
2312
- display: flex;
2313
- align-items: center;
2314
- justify-content: center;
2315
- gap: 1rem;
2316
- padding: 1rem;
2317
- background: #f8f9fa;
2318
- border-radius: 0.5rem;
2319
- margin: 1rem 0;
2320
- }
2321
-
2322
- .cv-welcome-widget-icon {
2323
- width: 2rem;
2324
- height: 2rem;
2325
- background: rgba(62, 132, 244, 0.1);
2326
- border-radius: 9999px;
2327
- display: flex;
2328
- align-items: center;
2329
- justify-content: center;
2330
- animation: cv-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
2331
- color: #3e84f4;
2332
- }
2333
-
2334
- .cv-welcome-widget-label {
2335
- font-size: 0.875rem;
2336
- font-weight: 500;
2337
- color: rgba(0, 0, 0, 0.8);
2338
- margin: 0;
2339
- }
2340
-
2341
- .cv-welcome-got-it {
2342
- width: 100%;
2343
- background: #3e84f4;
2344
- color: white;
2345
- font-weight: 600;
2346
- padding: 0.75rem 1rem;
2347
- border-radius: 0.5rem;
2348
- border: none;
2349
- cursor: pointer;
2350
- font-size: 0.875rem;
2351
- transition: background-color 0.2s ease;
2352
- outline: none;
2353
- }
2354
-
2355
- .cv-welcome-got-it:hover {
2356
- background: rgba(62, 132, 244, 0.9);
2357
- }
2358
-
2359
- .cv-welcome-got-it:focus {
2360
- box-shadow: 0 0 0 2px rgba(62, 132, 244, 0.5);
2361
- }
2362
-
2363
- /* Animations */
2364
- @keyframes cv-pulse {
2365
- 0%, 100% {
2366
- opacity: 1;
2367
- }
2368
- 50% {
2369
- opacity: 0.5;
2370
- }
2371
- }
2372
-
2373
- /* Dark theme welcome modal styles */
2374
- .cv-widget-theme-dark .cv-welcome-modal {
2375
- background: #101722;
2376
- }
2377
-
2378
- .cv-widget-theme-dark .cv-welcome-message {
2379
- color: rgba(255, 255, 255, 0.8);
2380
- }
2381
-
2382
- .cv-widget-theme-dark .cv-welcome-message a {
2383
- color: #60a5fa;
2384
- }
2385
-
2386
- .cv-widget-theme-dark .cv-welcome-widget-preview {
2387
- background: rgba(255, 255, 255, 0.1);
2388
- }
2389
-
2390
- .cv-widget-theme-dark .cv-welcome-widget-label {
2391
- color: #e2e8f0;
2392
- }
1392
+ const WIDGET_STYLES = `
1393
+ /* Rounded rectangle widget icon styles */
1394
+ .cv-widget-icon {
1395
+ position: fixed;
1396
+ /* Slightly transparent by default so the widget is subtle at the page edge */
1397
+ background: rgba(255, 255, 255, 0.92);
1398
+ color: rgba(0, 0, 0, 0.9);
1399
+ opacity: 0.6;
1400
+ display: flex;
1401
+ align-items: center;
1402
+ justify-content: center;
1403
+ font-size: 18px;
1404
+ font-weight: bold;
1405
+ cursor: pointer;
1406
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1407
+ z-index: 9998;
1408
+ transition: all 0.3s ease;
1409
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
1410
+ }
1411
+
1412
+ .cv-widget-icon:hover {
1413
+ /* Become fully opaque on hover to improve readability */
1414
+ background: rgba(255, 255, 255, 1);
1415
+ color: rgba(0, 0, 0, 1);
1416
+ opacity: 1;
1417
+ }
1418
+
1419
+ /* Top-right: rounded end on left, sticks out leftward on hover */
1420
+ .cv-widget-top-right {
1421
+ top: 20px;
1422
+ right: 0;
1423
+ border-radius: 18px 0 0 18px;
1424
+ padding-left: 8px;
1425
+ justify-content: flex-start;
1426
+ }
1427
+
1428
+ /* Top-left: rounded end on right, sticks out rightward on hover */
1429
+ .cv-widget-top-left {
1430
+ top: 20px;
1431
+ left: 0;
1432
+ border-radius: 0 18px 18px 0;
1433
+ padding-right: 8px;
1434
+ justify-content: flex-end;
1435
+ }
1436
+
1437
+ /* Bottom-right: rounded end on left, sticks out leftward on hover */
1438
+ .cv-widget-bottom-right {
1439
+ bottom: 20px;
1440
+ right: 0;
1441
+ border-radius: 18px 0 0 18px;
1442
+ padding-left: 8px;
1443
+ justify-content: flex-start;
1444
+ }
1445
+
1446
+ /* Bottom-left: rounded end on right, sticks out rightward on hover */
1447
+ .cv-widget-bottom-left {
1448
+ bottom: 20px;
1449
+ left: 0;
1450
+ border-radius: 0 18px 18px 0;
1451
+ padding-right: 8px;
1452
+ justify-content: flex-end;
1453
+ }
1454
+
1455
+ /* Middle-left: rounded end on right, sticks out rightward on hover */
1456
+ .cv-widget-middle-left {
1457
+ top: 50%;
1458
+ left: 0;
1459
+ transform: translateY(-50%);
1460
+ border-radius: 0 18px 18px 0;
1461
+ padding-right: 8px;
1462
+ justify-content: flex-end;
1463
+ }
1464
+
1465
+ /* Middle-right: rounded end on left, sticks out leftward on hover */
1466
+ .cv-widget-middle-right {
1467
+ top: 50%;
1468
+ right: 0;
1469
+ transform: translateY(-50%);
1470
+ border-radius: 18px 0 0 18px;
1471
+ padding-left: 8px;
1472
+ justify-content: flex-start;
1473
+ }
1474
+
1475
+ .cv-widget-top-right,
1476
+ .cv-widget-middle-right,
1477
+ .cv-widget-bottom-right,
1478
+ .cv-widget-top-left,
1479
+ .cv-widget-middle-left,
1480
+ .cv-widget-bottom-left {
1481
+ height: 36px;
1482
+ width: 36px;
1483
+ }
1484
+
1485
+ .cv-widget-middle-right:hover,
1486
+ .cv-widget-top-right:hover,
1487
+ .cv-widget-bottom-right:hover,
1488
+ .cv-widget-top-left:hover,
1489
+ .cv-widget-middle-left:hover,
1490
+ .cv-widget-bottom-left:hover {
1491
+ width: 55px;
1492
+ }
1493
+
1494
+ /* Modal content styles */
1495
+ .cv-widget-section {
1496
+ margin-bottom: 16px;
1497
+ }
1498
+
1499
+ .cv-widget-section:last-child {
1500
+ margin-bottom: 0;
1501
+ }
1502
+
1503
+ .cv-widget-section label {
1504
+ display: block;
1505
+ margin-bottom: 4px;
1506
+ font-weight: 500;
1507
+ color: #555;
1508
+ }
1509
+
1510
+ .cv-widget-profile-select,
1511
+ .cv-widget-state-select {
1512
+ width: 100%;
1513
+ padding: 8px 12px;
1514
+ border: 1px solid #ddd;
1515
+ border-radius: 4px;
1516
+ background: white;
1517
+ font-size: 14px;
1518
+ }
1519
+
1520
+ .cv-widget-profile-select:focus,
1521
+ .cv-widget-state-select:focus {
1522
+ outline: none;
1523
+ border-color: #007bff;
1524
+ box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
1525
+ }
1526
+
1527
+ .cv-widget-profile-select:disabled,
1528
+ .cv-widget-state-select:disabled {
1529
+ background: #f8f9fa;
1530
+ color: #6c757d;
1531
+ cursor: not-allowed;
1532
+ }
1533
+
1534
+ .cv-widget-current {
1535
+ margin: 16px 0;
1536
+ padding: 12px;
1537
+ background: #f8f9fa;
1538
+ border-radius: 4px;
1539
+ border-left: 4px solid #007bff;
1540
+ }
1541
+
1542
+ .cv-widget-current label {
1543
+ font-size: 12px;
1544
+ text-transform: uppercase;
1545
+ letter-spacing: 0.5px;
1546
+ color: #666;
1547
+ margin-bottom: 4px;
1548
+ }
1549
+
1550
+ .cv-widget-current-view {
1551
+ font-weight: 500;
1552
+ color: #333;
1553
+ }
1554
+
1555
+ .cv-widget-reset {
1556
+ width: 100%;
1557
+ padding: 8px 16px;
1558
+ background: #dc3545;
1559
+ color: white;
1560
+ border: none;
1561
+ border-radius: 4px;
1562
+ cursor: pointer;
1563
+ font-size: 14px;
1564
+ font-weight: 500;
1565
+ }
1566
+
1567
+ .cv-widget-reset:hover {
1568
+ background: #c82333;
1569
+ }
1570
+
1571
+ .cv-widget-reset:active {
1572
+ background: #bd2130;
1573
+ }
1574
+
1575
+ /* Responsive design for mobile */
1576
+ @media (max-width: 768px) {
1577
+ .cv-widget-top-right,
1578
+ .cv-widget-top-left {
1579
+ top: 10px;
1580
+ }
1581
+
1582
+ .cv-widget-bottom-right,
1583
+ .cv-widget-bottom-left {
1584
+ bottom: 10px;
1585
+ }
1586
+
1587
+ /* All widgets stay flush with screen edges */
1588
+ .cv-widget-top-right,
1589
+ .cv-widget-bottom-right,
1590
+ .cv-widget-middle-right {
1591
+ right: 0;
1592
+ }
1593
+
1594
+ .cv-widget-top-left,
1595
+ .cv-widget-bottom-left,
1596
+ .cv-widget-middle-left {
1597
+ left: 0;
1598
+ }
1599
+
1600
+ /* Slightly smaller on mobile */
1601
+ .cv-widget-icon {
1602
+ width: 60px;
1603
+ height: 32px;
1604
+ }
1605
+
1606
+ .cv-widget-icon:hover {
1607
+ width: 75px;
1608
+ }
1609
+ }
1610
+
1611
+ /* Modal styles */
1612
+ .cv-widget-modal-overlay {
1613
+ position: fixed;
1614
+ top: 0;
1615
+ left: 0;
1616
+ right: 0;
1617
+ bottom: 0;
1618
+ background: rgba(0, 0, 0, 0.5);
1619
+ display: flex;
1620
+ align-items: center;
1621
+ justify-content: center;
1622
+ z-index: 10002;
1623
+ animation: fadeIn 0.2s ease;
1624
+ }
1625
+
1626
+ @keyframes fadeIn {
1627
+ from { opacity: 0; }
1628
+ to { opacity: 1; }
1629
+ }
1630
+
1631
+ .cv-widget-modal {
1632
+ background: white;
1633
+ border-radius: 0.75rem;
1634
+ box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
1635
+ max-width: 32rem;
1636
+ width: 90vw;
1637
+ max-height: 80vh;
1638
+ animation: slideIn 0.2s ease;
1639
+ display: flex;
1640
+ flex-direction: column;
1641
+ }
1642
+
1643
+ @keyframes slideIn {
1644
+ from {
1645
+ opacity: 0;
1646
+ transform: scale(0.9) translateY(-20px);
1647
+ }
1648
+ to {
1649
+ opacity: 1;
1650
+ transform: scale(1) translateY(0);
1651
+ }
1652
+ }
1653
+
1654
+ .cv-modal-header {
1655
+ display: flex;
1656
+ align-items: center;
1657
+ justify-content: space-between;
1658
+ padding: 0.5rem 1rem;
1659
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
1660
+ }
1661
+
1662
+ .cv-modal-header-content {
1663
+ display: flex;
1664
+ align-items: center;
1665
+ gap: 0.75rem;
1666
+ }
1667
+
1668
+ .cv-modal-icon {
1669
+ position: relative;
1670
+ width: 1rem;
1671
+ height: 1rem;
1672
+ display: flex;
1673
+ align-items: center;
1674
+ justify-content: center;
1675
+ border-radius: 9999px;
1676
+ }
1677
+
1678
+ .cv-modal-icon-svg {
1679
+ width: 100%;
1680
+ height: 100%;
1681
+ opacity: 1;
1682
+ }
1683
+
1684
+ .cv-modal-title {
1685
+ font-size: 1.125rem;
1686
+ font-weight: bold;
1687
+ color: rgba(0, 0, 0, 0.9);
1688
+ margin: 0;
1689
+ }
1690
+
1691
+ .cv-modal-close {
1692
+ width: 2rem;
1693
+ height: 2rem;
1694
+ display: flex;
1695
+ align-items: center;
1696
+ justify-content: center;
1697
+ border-radius: 9999px;
1698
+ background: transparent;
1699
+ border: none;
1700
+ color: rgba(0, 0, 0, 0.6);
1701
+ cursor: pointer;
1702
+ transition: all 0.2s ease;
1703
+ }
1704
+
1705
+ .cv-modal-close:hover {
1706
+ background: rgba(62, 132, 244, 0.1);
1707
+ color: #3e84f4;
1708
+ }
1709
+
1710
+ .cv-modal-close-icon {
1711
+ width: 1.25rem;
1712
+ height: 1.25rem;
1713
+ }
1714
+
1715
+ .cv-modal-main {
1716
+ padding: 1rem;
1717
+ flex: 1;
1718
+ display: flex;
1719
+ flex-direction: column;
1720
+ gap: 1rem;
1721
+ overflow-y: auto;
1722
+ max-height: calc(80vh - 8rem);
1723
+ }
1724
+
1725
+ .cv-modal-description {
1726
+ font-size: 0.875rem;
1727
+ color: rgba(0, 0, 0, 0.8);
1728
+ margin: 0;
1729
+ line-height: 1.4;
1730
+ }
1731
+
1732
+ .cv-content-section,
1733
+ .cv-tab-groups-section {
1734
+ display: flex;
1735
+ flex-direction: column;
1736
+ gap: 0.75rem;
1737
+ }
1738
+
1739
+ .cv-section-heading {
1740
+ font-size: 1rem;
1741
+ font-weight: bold;
1742
+ color: rgba(0, 0, 0, 0.9);
1743
+ margin: 0;
1744
+ }
1745
+
1746
+ .cv-widget-modal-actions {
1747
+ margin-top: 20px;
1748
+ padding-top: 16px;
1749
+ border-top: 1px solid #e9ecef;
1750
+ }
1751
+
1752
+ .cv-widget-restore {
1753
+ width: 100%;
1754
+ padding: 10px 16px;
1755
+ background: #28a745;
1756
+ color: white;
1757
+ border: none;
1758
+ border-radius: 4px;
1759
+ cursor: pointer;
1760
+ font-size: 14px;
1761
+ font-weight: 500;
1762
+ }
1763
+
1764
+ .cv-widget-restore:hover {
1765
+ background: #218838;
1766
+ }
1767
+
1768
+ .cv-widget-create-state {
1769
+ width: 100%;
1770
+ padding: 10px 16px;
1771
+ background: #007bff;
1772
+ color: white;
1773
+ border: none;
1774
+ border-radius: 4px;
1775
+ cursor: pointer;
1776
+ font-size: 14px;
1777
+ font-weight: 500;
1778
+ margin-bottom: 10px;
1779
+ }
1780
+
1781
+ .cv-widget-create-state:hover {
1782
+ background: #0056b3;
1783
+ }
1784
+
1785
+ .cv-widget-theme-dark .cv-widget-modal {
1786
+ background: #101722;
1787
+ color: #e2e8f0;
1788
+ }
1789
+
1790
+ .cv-widget-theme-dark .cv-modal-header {
1791
+ border-color: rgba(255, 255, 255, 0.1);
1792
+ }
1793
+
1794
+ .cv-widget-theme-dark .cv-modal-title {
1795
+ color: #e2e8f0;
1796
+ }
1797
+
1798
+ .cv-widget-theme-dark .cv-modal-close {
1799
+ color: rgba(255, 255, 255, 0.6);
1800
+ }
1801
+
1802
+ .cv-widget-theme-dark .cv-modal-close:hover {
1803
+ background: rgba(62, 132, 244, 0.2);
1804
+ color: #3e84f4;
1805
+ }
1806
+
1807
+ .cv-widget-theme-dark .cv-modal-description {
1808
+ color: rgba(255, 255, 255, 0.8);
1809
+ }
1810
+
1811
+ .cv-widget-theme-dark .cv-section-heading {
1812
+ color: #e2e8f0;
1813
+ }
1814
+
1815
+ .cv-widget-theme-dark .cv-toggles-container
1816
+ .cv-widget-theme-dark .cv-tabgroups-container {
1817
+ border-color: rgba(255, 255, 255, 0.1);
1818
+ }
1819
+
1820
+ .cv-widget-theme-dark .cv-toggle-card,
1821
+ .cv-widget-theme-dark .cv-tabgroup-card {
1822
+ background: #101722;
1823
+ border-color: rgba(255, 255, 255, 0.1);
1824
+ }
1825
+
1826
+ .cv-widget-theme-dark .cv-toggle-title,
1827
+ .cv-widget-theme-dark .cv-tabgroup-title {
1828
+ color: #e2e8f0;
1829
+ }
1830
+
1831
+ .cv-widget-theme-dark .cv-toggle-description,
1832
+ .cv-widget-theme-dark .cv-tabgroup-description {
1833
+ color: rgba(255, 255, 255, 0.6);
1834
+ }
1835
+
1836
+ .cv-widget-theme-dark .cv-toggle-slider {
1837
+ background: rgba(255, 255, 255, 0.2);
1838
+ }
1839
+
1840
+ .cv-widget-theme-dark .cv-tab-group-description {
1841
+ color: rgba(255, 255, 255, 0.8);
1842
+ }
1843
+
1844
+ .cv-widget-theme-dark .cv-tabgroup-select {
1845
+ background: #101722;
1846
+ border-color: rgba(255, 255, 255, 0.2);
1847
+ color: #e2e8f0;
1848
+ }
1849
+
1850
+ .cv-widget-theme-dark .cv-modal-footer {
1851
+ border-color: rgba(255, 255, 255, 0.1);
1852
+ background: #101722;
1853
+ }
1854
+
1855
+ .cv-widget-theme-dark .cv-reset-btn {
1856
+ color: #e2e8f0;
1857
+ background: rgba(255, 255, 255, 0.1);
1858
+ }
1859
+
1860
+ .cv-widget-theme-dark .cv-reset-btn:hover {
1861
+ background: rgba(255, 255, 255, 0.2);
1862
+ }
1863
+
1864
+ /* Custom state creator styles */
1865
+ .cv-custom-state-modal {
1866
+ max-width: 500px;
1867
+ }
1868
+
1869
+ .cv-custom-state-form .cv-section-header {
1870
+ font-size: 16px;
1871
+ font-weight: 600;
1872
+ color: #333;
1873
+ border-bottom: 1px solid #e9ecef;
1874
+ padding-bottom: 5px;
1875
+ }
1876
+
1877
+ .cv-custom-state-form p {
1878
+ font-size: 15px;
1879
+ line-height: 1.6;
1880
+ color: #555;
1881
+ margin-bottom: 24px;
1882
+ text-align: justify;
1883
+ }
1884
+
1885
+ .cv-custom-state-section {
1886
+ margin-bottom: 16px;
1887
+ }
1888
+
1889
+ .cv-custom-state-section label {
1890
+ display: block;
1891
+ margin-bottom: 4px;
1892
+ font-weight: 500;
1893
+ color: #555;
1894
+ }
1895
+
1896
+ .cv-custom-state-input {
1897
+ width: 100%;
1898
+ padding: 8px 12px;
1899
+ border: 1px solid #ddd;
1900
+ border-radius: 4px;
1901
+ background: white;
1902
+ font-size: 14px;
1903
+ }
1904
+
1905
+ .cv-custom-state-input:focus {
1906
+ outline: none;
1907
+ border-color: #007bff;
1908
+ box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
1909
+ }
1910
+
1911
+ /* Toggles Container */
1912
+ .cv-toggles-container {
1913
+ display: flex;
1914
+ flex-direction: column;
1915
+ gap: 0.5rem;
1916
+ border-radius: 0.5rem;
1917
+ border: 1px solid rgba(0, 0, 0, 0.1);
1918
+ overflow: hidden;
1919
+ }
1920
+
1921
+ .cv-toggle-card,
1922
+ .cv-tabgroup-card {
1923
+ background: white;
1924
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
1925
+ }
1926
+
1927
+ .cv-toggle-card:last-child {
1928
+ border-bottom: none;
1929
+ }
1930
+
1931
+ .cv-toggle-content {
1932
+ display: flex;
1933
+ align-items: center;
1934
+ justify-content: space-between;
1935
+ padding: 0.75rem;
1936
+ }
1937
+
1938
+ .cv-toggle-title {
1939
+ font-weight: 500;
1940
+ font-size: 0.875rem;
1941
+ color: rgba(0, 0, 0, 0.9);
1942
+ margin: 0 0 0.125rem 0;
1943
+ }
1944
+
1945
+ .cv-toggle-description {
1946
+ font-size: 0.75rem;
1947
+ color: rgba(0, 0, 0, 0.6);
1948
+ margin: 0;
1949
+ }
1950
+
1951
+ .cv-toggle-label{
1952
+ position: relative;
1953
+ display: inline-block;
1954
+ width: 2.75rem;
1955
+ height: 1.5rem;
1956
+ cursor: pointer;
1957
+ }
1958
+
1959
+ .cv-toggle-input {
1960
+ opacity: 0;
1961
+ width: 0;
1962
+ height: 0;
1963
+ }
1964
+
1965
+ .cv-toggle-slider {
1966
+ position: absolute;
1967
+ top: 0;
1968
+ left: 0;
1969
+ right: 0;
1970
+ bottom: 0;
1971
+ background: rgba(0, 0, 0, 0.2);
1972
+ border-radius: 9999px;
1973
+ transition: background-color 0.2s ease;
1974
+ }
1975
+
1976
+ .cv-toggle-slider:before {
1977
+ position: absolute;
1978
+ content: "";
1979
+ height: 1rem;
1980
+ width: 1rem;
1981
+ left: 0.25rem;
1982
+ bottom: 0.25rem;
1983
+ background: white;
1984
+ border-radius: 50%;
1985
+ transition: transform 0.2s ease;
1986
+ }
1987
+
1988
+ .cv-toggle-input:checked + .cv-toggle-slider {
1989
+ background: #3e84f4;
1990
+ }
1991
+
1992
+ .cv-toggle-input:checked + .cv-toggle-slider:before {
1993
+ transform: translateX(1.25rem);
1994
+ }
1995
+
1996
+ /* Dark theme toggle switch styles */
1997
+ .cv-widget-theme-dark .cv-toggle-switch {
1998
+ background: #4a5568;
1999
+ }
2000
+
2001
+ .cv-widget-theme-dark .cv-toggle-switch:hover {
2002
+ background: #5a6578;
2003
+ }
2004
+
2005
+ .cv-widget-theme-dark .cv-toggle-switch.cv-toggle-active {
2006
+ background: #63b3ed;
2007
+ }
2008
+
2009
+ .cv-widget-theme-dark .cv-toggle-switch.cv-toggle-active:hover {
2010
+ background: #4299e1;
2011
+ }
2012
+
2013
+ /* Tab Groups Container */
2014
+ .cv-tab-groups-list {
2015
+ display: flex;
2016
+ flex-direction: column;
2017
+ gap: 1px;
2018
+ border: 1px solid rgba(0, 0, 0, 0.1);
2019
+ border-radius: 0.5rem;
2020
+ overflow: hidden;
2021
+ }
2022
+
2023
+ /* Tab Group Card - Header (Navigation Headers toggle) */
2024
+ .cv-tabgroup-card.cv-tabgroup-header {
2025
+ display: flex;
2026
+ align-items: center;
2027
+ justify-content: space-between;
2028
+ padding: 0.75rem;
2029
+ border-bottom: 0px;
2030
+ }
2031
+
2032
+ .cv-tabgroup-card.cv-tabgroup-header .cv-tabgroup-row {
2033
+ display: flex;
2034
+ align-items: center;
2035
+ justify-content: space-between;
2036
+ width: 100%;
2037
+ gap: 1rem;
2038
+ }
2039
+
2040
+ /* Tab Group Card - Items */
2041
+ .cv-tabgroup-card.cv-tabgroup-item {
2042
+ display: flex;
2043
+ flex-direction: column;
2044
+ gap: 0.5rem;
2045
+ padding: 0.75rem;
2046
+ background: white;
2047
+ border-bottom: 1px solid rgba(0, 0, 0, 0.05);
2048
+ }
2049
+
2050
+ .cv-tabgroup-card.cv-tabgroup-item:last-child {
2051
+ border-bottom: none;
2052
+ }
2053
+
2054
+ /* Tab Group Info */
2055
+ .cv-tabgroup-info {
2056
+ flex: 1;
2057
+ }
2058
+
2059
+ .cv-tabgroup-title {
2060
+ font-weight: 500;
2061
+ font-size: 0.875rem;
2062
+ color: rgba(0, 0, 0, 0.9);
2063
+ margin: 0 0 0.25rem 0;
2064
+ }
2065
+
2066
+ .cv-tabgroup-description {
2067
+ font-size: 0.75rem;
2068
+ color: rgba(0, 0, 0, 0.6);
2069
+ margin: 0;
2070
+ line-height: 1.3;
2071
+ }
2072
+
2073
+ /* Tab Group Label (for select dropdowns) */
2074
+ .cv-tabgroup-label {
2075
+ font-size: 0.875rem;
2076
+ color: rgba(0, 0, 0, 0.8);
2077
+ margin: 0;
2078
+ line-height: 1.4;
2079
+ font-weight: 500;
2080
+ display: block;
2081
+ cursor: pointer;
2082
+ }
2083
+
2084
+ /* Tab Group Select */
2085
+ .cv-tabgroup-select {
2086
+ width: 100%;
2087
+ border-radius: 0.5rem;
2088
+ background: white;
2089
+ border: 1px solid rgba(0, 0, 0, 0.15);
2090
+ color: rgba(0, 0, 0, 0.9);
2091
+ padding: 0.5rem 0.75rem;
2092
+ font-size: 0.875rem;
2093
+ cursor: pointer;
2094
+ transition: all 0.15s ease;
2095
+ font-family: inherit;
2096
+ }
2097
+
2098
+ .cv-tabgroup-select:hover {
2099
+ border-color: rgba(0, 0, 0, 0.25);
2100
+ }
2101
+
2102
+ .cv-tabgroup-select:focus {
2103
+ outline: none;
2104
+ border-color: #3e84f4;
2105
+ box-shadow: 0 0 0 2px rgba(62, 132, 244, 0.2);
2106
+ }
2107
+
2108
+ /* Modern Toggle Switch */
2109
+ .cv-toggle-switch {
2110
+ position: relative;
2111
+ display: inline-flex;
2112
+ align-items: center;
2113
+ width: 44px;
2114
+ height: 24px;
2115
+ background: rgba(0, 0, 0, 0.1);
2116
+ border-radius: 9999px;
2117
+ padding: 2px;
2118
+ box-sizing: border-box;
2119
+ cursor: pointer;
2120
+ transition: background-color 0.2s ease;
2121
+ border: none;
2122
+ }
2123
+
2124
+ .cv-toggle-switch input {
2125
+ display: none;
2126
+ }
2127
+
2128
+ .cv-toggle-switch .cv-switch-bg {
2129
+ position: absolute;
2130
+ inset: 0;
2131
+ border-radius: 9999px;
2132
+ background: rgba(0, 0, 0, 0.1);
2133
+ transition: background-color 0.2s ease;
2134
+ pointer-events: none;
2135
+ }
2136
+
2137
+ .cv-toggle-switch .cv-switch-knob {
2138
+ position: relative;
2139
+ width: 20px;
2140
+ height: 20px;
2141
+ background: white;
2142
+ border-radius: 50%;
2143
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
2144
+ transition: transform 0.2s ease;
2145
+ z-index: 1;
2146
+ }
2147
+
2148
+ .cv-toggle-switch input:checked + .cv-switch-bg {
2149
+ background: #3e84f4;
2150
+ }
2151
+
2152
+ .cv-toggle-switch input:checked ~ .cv-switch-knob {
2153
+ transform: translateX(20px);
2154
+ }
2155
+
2156
+ /* Dark Theme - Tab Groups */
2157
+ .cv-widget-theme-dark .cv-tabgroup-card.cv-tabgroup-header {
2158
+ background: #101722;
2159
+ border-bottom-color: rgba(255, 255, 255, 0.1);
2160
+ }
2161
+
2162
+ .cv-widget-theme-dark .cv-tabgroup-card.cv-tabgroup-item {
2163
+ background: #101722;
2164
+ border-bottom-color: rgba(255, 255, 255, 0.05);
2165
+ }
2166
+
2167
+ .cv-widget-theme-dark .cv-tabgroup-title {
2168
+ color: #e2e8f0;
2169
+ }
2170
+
2171
+ .cv-widget-theme-dark .cv-tabgroup-description {
2172
+ color: rgba(255, 255, 255, 0.6);
2173
+ }
2174
+
2175
+ .cv-widget-theme-dark .cv-tabgroup-label {
2176
+ color: rgba(255, 255, 255, 0.8);
2177
+ }
2178
+
2179
+ .cv-widget-theme-dark .cv-tab-groups-list {
2180
+ border-color: rgba(255, 255, 255, 0.1);
2181
+ }
2182
+
2183
+ .cv-widget-theme-dark .cv-tabgroup-select {
2184
+ background: #101722;
2185
+ border-color: rgba(255, 255, 255, 0.15);
2186
+ color: #e2e8f0;
2187
+ }
2188
+
2189
+ .cv-widget-theme-dark .cv-tabgroup-select:hover {
2190
+ border-color: rgba(255, 255, 255, 0.25);
2191
+ }
2192
+
2193
+ .cv-widget-theme-dark .cv-tabgroup-select:focus {
2194
+ border-color: #60a5fa;
2195
+ box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
2196
+ }
2197
+
2198
+ /* Dark Theme - Toggle Switch */
2199
+ .cv-widget-theme-dark .cv-toggle-switch .cv-switch-bg {
2200
+ background: rgba(255, 255, 255, 0.1);
2201
+ }
2202
+
2203
+ .cv-widget-theme-dark .cv-toggle-switch .cv-switch-knob {
2204
+ background: #e2e8f0;
2205
+ }
2206
+
2207
+ .cv-widget-theme-dark .cv-toggle-switch input:checked + .cv-switch-bg {
2208
+ background: #63b3ed;
2209
+ }
2210
+
2211
+ .cv-modal-footer {
2212
+ display: flex;
2213
+ justify-content: space-between;
2214
+ align-items: center;
2215
+ padding: 0.75rem;
2216
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
2217
+ }
2218
+
2219
+ .cv-reset-btn,
2220
+ .cv-share-btn {
2221
+ display: flex;
2222
+ align-items: center;
2223
+ gap: 0.5rem;
2224
+ padding: 0.375rem 0.75rem;
2225
+ border-radius: 0.5rem;
2226
+ font-weight: 600;
2227
+ font-size: 0.875rem;
2228
+ cursor: pointer;
2229
+ transition: all 0.2s ease;
2230
+ border: none;
2231
+ }
2232
+
2233
+ .cv-reset-btn {
2234
+ color: rgba(0, 0, 0, 0.9);
2235
+ background: rgba(0, 0, 0, 0.1);
2236
+ }
2237
+
2238
+ .cv-reset-btn:hover {
2239
+ background: rgba(0, 0, 0, 0.2);
2240
+ }
2241
+
2242
+ .cv-share-btn {
2243
+ color: white;
2244
+ background: #3e84f4;
2245
+ }
2246
+
2247
+ .cv-share-btn:hover {
2248
+ background: rgba(62, 132, 244, 0.9);
2249
+ }
2250
+
2251
+ .cv-btn-icon {
2252
+ width: 1rem;
2253
+ height: 1rem;
2254
+ }
2255
+
2256
+ /* Dark theme custom state styles */
2257
+ /* Welcome modal styles */
2258
+ .cv-welcome-modal {
2259
+ max-width: 32rem;
2260
+ width: 90vw;
2261
+ background: white;
2262
+ border-radius: 0.75rem;
2263
+ box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
2264
+ animation: slideIn 0.2s ease;
2265
+ display: flex;
2266
+ flex-direction: column;
2267
+ }
2268
+
2269
+ .cv-modal-main {
2270
+ padding: 1rem;
2271
+ flex: 1;
2272
+ display: flex;
2273
+ flex-direction: column;
2274
+ gap: 1rem;
2275
+ overflow-y: auto;
2276
+ max-height: calc(80vh - 8rem);
2277
+ }
2278
+
2279
+ .cv-welcome-message {
2280
+ font-size: 0.875rem;
2281
+ color: rgba(0, 0, 0, 0.8);
2282
+ margin: 0;
2283
+ line-height: 1.4;
2284
+ text-align: center;
2285
+ }
2286
+
2287
+ .cv-welcome-message a {
2288
+ color: #3e84f4;
2289
+ text-align: justify;
2290
+ text-decoration: none;
2291
+ }
2292
+
2293
+ .cv-welcome-message a:hover {
2294
+ text-decoration: underline;
2295
+ }
2296
+
2297
+ .cv-welcome-widget-preview {
2298
+ display: flex;
2299
+ align-items: center;
2300
+ justify-content: center;
2301
+ gap: 1rem;
2302
+ padding: 1rem;
2303
+ background: #f8f9fa;
2304
+ border-radius: 0.5rem;
2305
+ margin: 1rem 0;
2306
+ }
2307
+
2308
+ .cv-welcome-widget-icon {
2309
+ width: 2rem;
2310
+ height: 2rem;
2311
+ background: rgba(62, 132, 244, 0.1);
2312
+ border-radius: 9999px;
2313
+ display: flex;
2314
+ align-items: center;
2315
+ justify-content: center;
2316
+ animation: cv-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
2317
+ color: #3e84f4;
2318
+ }
2319
+
2320
+ .cv-welcome-widget-label {
2321
+ font-size: 0.875rem;
2322
+ font-weight: 500;
2323
+ color: rgba(0, 0, 0, 0.8);
2324
+ margin: 0;
2325
+ }
2326
+
2327
+ .cv-welcome-got-it {
2328
+ width: 100%;
2329
+ background: #3e84f4;
2330
+ color: white;
2331
+ font-weight: 600;
2332
+ padding: 0.75rem 1rem;
2333
+ border-radius: 0.5rem;
2334
+ border: none;
2335
+ cursor: pointer;
2336
+ font-size: 0.875rem;
2337
+ transition: background-color 0.2s ease;
2338
+ outline: none;
2339
+ }
2340
+
2341
+ .cv-welcome-got-it:hover {
2342
+ background: rgba(62, 132, 244, 0.9);
2343
+ }
2344
+
2345
+ .cv-welcome-got-it:focus {
2346
+ box-shadow: 0 0 0 2px rgba(62, 132, 244, 0.5);
2347
+ }
2348
+
2349
+ /* Animations */
2350
+ @keyframes cv-pulse {
2351
+ 0%, 100% {
2352
+ opacity: 1;
2353
+ }
2354
+ 50% {
2355
+ opacity: 0.5;
2356
+ }
2357
+ }
2358
+
2359
+ /* Dark theme welcome modal styles */
2360
+ .cv-widget-theme-dark .cv-welcome-modal {
2361
+ background: #101722;
2362
+ }
2363
+
2364
+ .cv-widget-theme-dark .cv-welcome-message {
2365
+ color: rgba(255, 255, 255, 0.8);
2366
+ }
2367
+
2368
+ .cv-widget-theme-dark .cv-welcome-message a {
2369
+ color: #60a5fa;
2370
+ }
2371
+
2372
+ .cv-widget-theme-dark .cv-welcome-widget-preview {
2373
+ background: rgba(255, 255, 255, 0.1);
2374
+ }
2375
+
2376
+ .cv-widget-theme-dark .cv-welcome-widget-label {
2377
+ color: #e2e8f0;
2378
+ }
2393
2379
  `;
2394
2380
  /**
2395
2381
  * Inject widget styles into the document head
@@ -2412,34 +2398,34 @@ function injectWidgetStyles() {
2412
2398
  * Settings gear icon for modal header
2413
2399
  */
2414
2400
  function getGearIcon() {
2415
- return `<svg class="cv-modal-icon-svg" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2416
- <path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M12 8.00002C9.79085 8.00002 7.99999 9.79088 7.99999 12C7.99999 14.2092 9.79085 16 12 16C14.2091 16 16 14.2092 16 12C16 9.79088 14.2091 8.00002 12 8.00002ZM9.99999 12C9.99999 10.8955 10.8954 10 12 10C13.1046 10 14 10.8955 14 12C14 13.1046 13.1046 14 12 14C10.8954 14 9.99999 13.1046 9.99999 12Z" fill="#0F1729"/>
2417
- <path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M10.7673 1.01709C10.9925 0.999829 11.2454 0.99993 11.4516 1.00001L12.5484 1.00001C12.7546 0.99993 13.0075 0.999829 13.2327 1.01709C13.4989 1.03749 13.8678 1.08936 14.2634 1.26937C14.7635 1.49689 15.1915 1.85736 15.5007 2.31147C15.7454 2.67075 15.8592 3.0255 15.9246 3.2843C15.9799 3.50334 16.0228 3.75249 16.0577 3.9557L16.1993 4.77635L16.2021 4.77788C16.2369 4.79712 16.2715 4.81659 16.306 4.8363L16.3086 4.83774L17.2455 4.49865C17.4356 4.42978 17.6693 4.34509 17.8835 4.28543C18.1371 4.2148 18.4954 4.13889 18.9216 4.17026C19.4614 4.20998 19.9803 4.39497 20.4235 4.70563C20.7734 4.95095 21.0029 5.23636 21.1546 5.4515C21.2829 5.63326 21.4103 5.84671 21.514 6.02029L22.0158 6.86003C22.1256 7.04345 22.2594 7.26713 22.3627 7.47527C22.4843 7.7203 22.6328 8.07474 22.6777 8.52067C22.7341 9.08222 22.6311 9.64831 22.3803 10.1539C22.1811 10.5554 21.9171 10.8347 21.7169 11.0212C21.5469 11.1795 21.3428 11.3417 21.1755 11.4746L20.5 12L21.1755 12.5254C21.3428 12.6584 21.5469 12.8205 21.7169 12.9789C21.9171 13.1653 22.1811 13.4446 22.3802 13.8461C22.631 14.3517 22.7341 14.9178 22.6776 15.4794C22.6328 15.9253 22.4842 16.2797 22.3626 16.5248C22.2593 16.7329 22.1255 16.9566 22.0158 17.14L21.5138 17.9799C21.4102 18.1535 21.2828 18.3668 21.1546 18.5485C21.0028 18.7637 20.7734 19.0491 20.4234 19.2944C19.9803 19.6051 19.4613 19.7901 18.9216 19.8298C18.4954 19.8612 18.1371 19.7852 17.8835 19.7146C17.6692 19.6549 17.4355 19.5703 17.2454 19.5014L16.3085 19.1623L16.306 19.1638C16.2715 19.1835 16.2369 19.2029 16.2021 19.2222L16.1993 19.2237L16.0577 20.0443C16.0228 20.2475 15.9799 20.4967 15.9246 20.7157C15.8592 20.9745 15.7454 21.3293 15.5007 21.6886C15.1915 22.1427 14.7635 22.5032 14.2634 22.7307C13.8678 22.9107 13.4989 22.9626 13.2327 22.983C13.0074 23.0002 12.7546 23.0001 12.5484 23H11.4516C11.2454 23.0001 10.9925 23.0002 10.7673 22.983C10.5011 22.9626 10.1322 22.9107 9.73655 22.7307C9.23648 22.5032 8.80849 22.1427 8.49926 21.6886C8.25461 21.3293 8.14077 20.9745 8.07542 20.7157C8.02011 20.4967 7.97723 20.2475 7.94225 20.0443L7.80068 19.2237L7.79791 19.2222C7.7631 19.2029 7.72845 19.1835 7.69396 19.1637L7.69142 19.1623L6.75458 19.5014C6.5645 19.5702 6.33078 19.6549 6.11651 19.7146C5.86288 19.7852 5.50463 19.8611 5.07841 19.8298C4.53866 19.7901 4.01971 19.6051 3.57654 19.2944C3.2266 19.0491 2.99714 18.7637 2.84539 18.5485C2.71718 18.3668 2.58974 18.1534 2.4861 17.9798L1.98418 17.14C1.87447 16.9566 1.74067 16.7329 1.63737 16.5248C1.51575 16.2797 1.36719 15.9253 1.32235 15.4794C1.26588 14.9178 1.36897 14.3517 1.61976 13.8461C1.81892 13.4446 2.08289 13.1653 2.28308 12.9789C2.45312 12.8205 2.65717 12.6584 2.82449 12.5254L3.47844 12.0054V11.9947L2.82445 11.4746C2.65712 11.3417 2.45308 11.1795 2.28304 11.0212C2.08285 10.8347 1.81888 10.5554 1.61972 10.1539C1.36893 9.64832 1.26584 9.08224 1.3223 8.52069C1.36714 8.07476 1.51571 7.72032 1.63732 7.47528C1.74062 7.26715 1.87443 7.04347 1.98414 6.86005L2.48605 6.02026C2.58969 5.84669 2.71714 5.63326 2.84534 5.45151C2.9971 5.23637 3.22655 4.95096 3.5765 4.70565C4.01966 4.39498 4.53862 4.20999 5.07837 4.17027C5.50458 4.1389 5.86284 4.21481 6.11646 4.28544C6.33072 4.34511 6.56444 4.4298 6.75451 4.49867L7.69141 4.83775L7.69394 4.8363C7.72844 4.8166 7.7631 4.79712 7.79791 4.77788L7.80068 4.77635L7.94225 3.95571C7.97723 3.7525 8.02011 3.50334 8.07542 3.2843C8.14077 3.0255 8.25461 2.67075 8.49926 2.31147C8.80849 1.85736 9.23648 1.49689 9.73655 1.26937C10.1322 1.08936 10.5011 1.03749 10.7673 1.01709ZM14.0938 4.3363C14.011 3.85634 13.9696 3.61637 13.8476 3.43717C13.7445 3.2858 13.6019 3.16564 13.4352 3.0898C13.2378 3.00002 12.9943 3.00002 12.5073 3.00002H11.4927C11.0057 3.00002 10.7621 3.00002 10.5648 3.0898C10.3981 3.16564 10.2555 3.2858 10.1524 3.43717C10.0304 3.61637 9.98895 3.85634 9.90615 4.3363L9.75012 5.24064C9.69445 5.56333 9.66662 5.72467 9.60765 5.84869C9.54975 5.97047 9.50241 6.03703 9.40636 6.13166C9.30853 6.22804 9.12753 6.3281 8.76554 6.52822C8.73884 6.54298 8.71227 6.55791 8.68582 6.57302C8.33956 6.77078 8.16643 6.86966 8.03785 6.90314C7.91158 6.93602 7.83293 6.94279 7.70289 6.93196C7.57049 6.92094 7.42216 6.86726 7.12551 6.7599L6.11194 6.39308C5.66271 6.2305 5.43809 6.14921 5.22515 6.16488C5.04524 6.17811 4.87225 6.23978 4.72453 6.34333C4.5497 6.46589 4.42715 6.67094 4.18206 7.08103L3.72269 7.84965C3.46394 8.2826 3.33456 8.49907 3.31227 8.72078C3.29345 8.90796 3.32781 9.09665 3.41141 9.26519C3.51042 9.4648 3.7078 9.62177 4.10256 9.9357L4.82745 10.5122C5.07927 10.7124 5.20518 10.8126 5.28411 10.9199C5.36944 11.036 5.40583 11.1114 5.44354 11.2504C5.47844 11.379 5.47844 11.586 5.47844 12C5.47844 12.414 5.47844 12.621 5.44354 12.7497C5.40582 12.8887 5.36944 12.9641 5.28413 13.0801C5.20518 13.1875 5.07927 13.2876 4.82743 13.4879L4.10261 14.0643C3.70785 14.3783 3.51047 14.5352 3.41145 14.7349C3.32785 14.9034 3.29349 15.0921 3.31231 15.2793C3.33461 15.501 3.46398 15.7174 3.72273 16.1504L4.1821 16.919C4.4272 17.3291 4.54974 17.5342 4.72457 17.6567C4.8723 17.7603 5.04528 17.8219 5.2252 17.8352C5.43813 17.8508 5.66275 17.7695 6.11199 17.607L7.12553 17.2402C7.42216 17.1328 7.5705 17.0791 7.7029 17.0681C7.83294 17.0573 7.91159 17.064 8.03786 17.0969C8.16644 17.1304 8.33956 17.2293 8.68582 17.427C8.71228 17.4421 8.73885 17.4571 8.76554 17.4718C9.12753 17.6719 9.30853 17.772 9.40635 17.8684C9.50241 17.963 9.54975 18.0296 9.60765 18.1514C9.66662 18.2754 9.69445 18.4367 9.75012 18.7594L9.90615 19.6637C9.98895 20.1437 10.0304 20.3837 10.1524 20.5629C10.2555 20.7142 10.3981 20.8344 10.5648 20.9102C10.7621 21 11.0057 21 11.4927 21H12.5073C12.9943 21 13.2378 21 13.4352 20.9102C13.6019 20.8344 13.7445 20.7142 13.8476 20.5629C13.9696 20.3837 14.011 20.1437 14.0938 19.6637L14.2499 18.7594C14.3055 18.4367 14.3334 18.2754 14.3923 18.1514C14.4502 18.0296 14.4976 17.963 14.5936 17.8684C14.6915 17.772 14.8725 17.6719 15.2344 17.4718C15.2611 17.4571 15.2877 17.4421 15.3141 17.427C15.6604 17.2293 15.8335 17.1304 15.9621 17.0969C16.0884 17.064 16.167 17.0573 16.2971 17.0681C16.4295 17.0791 16.5778 17.1328 16.8744 17.2402L17.888 17.607C18.3372 17.7696 18.5619 17.8509 18.7748 17.8352C18.9547 17.8219 19.1277 17.7603 19.2754 17.6567C19.4502 17.5342 19.5728 17.3291 19.8179 16.919L20.2773 16.1504C20.536 15.7175 20.6654 15.501 20.6877 15.2793C20.7065 15.0921 20.6721 14.9034 20.5885 14.7349C20.4895 14.5353 20.2921 14.3783 19.8974 14.0643L19.1726 13.4879C18.9207 13.2876 18.7948 13.1875 18.7159 13.0801C18.6306 12.9641 18.5942 12.8887 18.5564 12.7497C18.5215 12.6211 18.5215 12.414 18.5215 12C18.5215 11.586 18.5215 11.379 18.5564 11.2504C18.5942 11.1114 18.6306 11.036 18.7159 10.9199C18.7948 10.8126 18.9207 10.7124 19.1725 10.5122L19.8974 9.9357C20.2922 9.62176 20.4896 9.46479 20.5886 9.26517C20.6722 9.09664 20.7065 8.90795 20.6877 8.72076C20.6654 8.49906 20.5361 8.28259 20.2773 7.84964L19.8179 7.08102C19.5728 6.67093 19.4503 6.46588 19.2755 6.34332C19.1277 6.23977 18.9548 6.1781 18.7748 6.16486C18.5619 6.14919 18.3373 6.23048 17.888 6.39307L16.8745 6.75989C16.5778 6.86725 16.4295 6.92093 16.2971 6.93195C16.167 6.94278 16.0884 6.93601 15.9621 6.90313C15.8335 6.86965 15.6604 6.77077 15.3142 6.57302C15.2877 6.55791 15.2611 6.54298 15.2345 6.52822C14.8725 6.3281 14.6915 6.22804 14.5936 6.13166C14.4976 6.03703 14.4502 5.97047 14.3923 5.84869C14.3334 5.72467 14.3055 5.56332 14.2499 5.24064L14.0938 4.3363Z" fill="#0F1729"/>
2401
+ return `<svg class="cv-modal-icon-svg" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2402
+ <path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M12 8.00002C9.79085 8.00002 7.99999 9.79088 7.99999 12C7.99999 14.2092 9.79085 16 12 16C14.2091 16 16 14.2092 16 12C16 9.79088 14.2091 8.00002 12 8.00002ZM9.99999 12C9.99999 10.8955 10.8954 10 12 10C13.1046 10 14 10.8955 14 12C14 13.1046 13.1046 14 12 14C10.8954 14 9.99999 13.1046 9.99999 12Z" fill="#0F1729"/>
2403
+ <path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M10.7673 1.01709C10.9925 0.999829 11.2454 0.99993 11.4516 1.00001L12.5484 1.00001C12.7546 0.99993 13.0075 0.999829 13.2327 1.01709C13.4989 1.03749 13.8678 1.08936 14.2634 1.26937C14.7635 1.49689 15.1915 1.85736 15.5007 2.31147C15.7454 2.67075 15.8592 3.0255 15.9246 3.2843C15.9799 3.50334 16.0228 3.75249 16.0577 3.9557L16.1993 4.77635L16.2021 4.77788C16.2369 4.79712 16.2715 4.81659 16.306 4.8363L16.3086 4.83774L17.2455 4.49865C17.4356 4.42978 17.6693 4.34509 17.8835 4.28543C18.1371 4.2148 18.4954 4.13889 18.9216 4.17026C19.4614 4.20998 19.9803 4.39497 20.4235 4.70563C20.7734 4.95095 21.0029 5.23636 21.1546 5.4515C21.2829 5.63326 21.4103 5.84671 21.514 6.02029L22.0158 6.86003C22.1256 7.04345 22.2594 7.26713 22.3627 7.47527C22.4843 7.7203 22.6328 8.07474 22.6777 8.52067C22.7341 9.08222 22.6311 9.64831 22.3803 10.1539C22.1811 10.5554 21.9171 10.8347 21.7169 11.0212C21.5469 11.1795 21.3428 11.3417 21.1755 11.4746L20.5 12L21.1755 12.5254C21.3428 12.6584 21.5469 12.8205 21.7169 12.9789C21.9171 13.1653 22.1811 13.4446 22.3802 13.8461C22.631 14.3517 22.7341 14.9178 22.6776 15.4794C22.6328 15.9253 22.4842 16.2797 22.3626 16.5248C22.2593 16.7329 22.1255 16.9566 22.0158 17.14L21.5138 17.9799C21.4102 18.1535 21.2828 18.3668 21.1546 18.5485C21.0028 18.7637 20.7734 19.0491 20.4234 19.2944C19.9803 19.6051 19.4613 19.7901 18.9216 19.8298C18.4954 19.8612 18.1371 19.7852 17.8835 19.7146C17.6692 19.6549 17.4355 19.5703 17.2454 19.5014L16.3085 19.1623L16.306 19.1638C16.2715 19.1835 16.2369 19.2029 16.2021 19.2222L16.1993 19.2237L16.0577 20.0443C16.0228 20.2475 15.9799 20.4967 15.9246 20.7157C15.8592 20.9745 15.7454 21.3293 15.5007 21.6886C15.1915 22.1427 14.7635 22.5032 14.2634 22.7307C13.8678 22.9107 13.4989 22.9626 13.2327 22.983C13.0074 23.0002 12.7546 23.0001 12.5484 23H11.4516C11.2454 23.0001 10.9925 23.0002 10.7673 22.983C10.5011 22.9626 10.1322 22.9107 9.73655 22.7307C9.23648 22.5032 8.80849 22.1427 8.49926 21.6886C8.25461 21.3293 8.14077 20.9745 8.07542 20.7157C8.02011 20.4967 7.97723 20.2475 7.94225 20.0443L7.80068 19.2237L7.79791 19.2222C7.7631 19.2029 7.72845 19.1835 7.69396 19.1637L7.69142 19.1623L6.75458 19.5014C6.5645 19.5702 6.33078 19.6549 6.11651 19.7146C5.86288 19.7852 5.50463 19.8611 5.07841 19.8298C4.53866 19.7901 4.01971 19.6051 3.57654 19.2944C3.2266 19.0491 2.99714 18.7637 2.84539 18.5485C2.71718 18.3668 2.58974 18.1534 2.4861 17.9798L1.98418 17.14C1.87447 16.9566 1.74067 16.7329 1.63737 16.5248C1.51575 16.2797 1.36719 15.9253 1.32235 15.4794C1.26588 14.9178 1.36897 14.3517 1.61976 13.8461C1.81892 13.4446 2.08289 13.1653 2.28308 12.9789C2.45312 12.8205 2.65717 12.6584 2.82449 12.5254L3.47844 12.0054V11.9947L2.82445 11.4746C2.65712 11.3417 2.45308 11.1795 2.28304 11.0212C2.08285 10.8347 1.81888 10.5554 1.61972 10.1539C1.36893 9.64832 1.26584 9.08224 1.3223 8.52069C1.36714 8.07476 1.51571 7.72032 1.63732 7.47528C1.74062 7.26715 1.87443 7.04347 1.98414 6.86005L2.48605 6.02026C2.58969 5.84669 2.71714 5.63326 2.84534 5.45151C2.9971 5.23637 3.22655 4.95096 3.5765 4.70565C4.01966 4.39498 4.53862 4.20999 5.07837 4.17027C5.50458 4.1389 5.86284 4.21481 6.11646 4.28544C6.33072 4.34511 6.56444 4.4298 6.75451 4.49867L7.69141 4.83775L7.69394 4.8363C7.72844 4.8166 7.7631 4.79712 7.79791 4.77788L7.80068 4.77635L7.94225 3.95571C7.97723 3.7525 8.02011 3.50334 8.07542 3.2843C8.14077 3.0255 8.25461 2.67075 8.49926 2.31147C8.80849 1.85736 9.23648 1.49689 9.73655 1.26937C10.1322 1.08936 10.5011 1.03749 10.7673 1.01709ZM14.0938 4.3363C14.011 3.85634 13.9696 3.61637 13.8476 3.43717C13.7445 3.2858 13.6019 3.16564 13.4352 3.0898C13.2378 3.00002 12.9943 3.00002 12.5073 3.00002H11.4927C11.0057 3.00002 10.7621 3.00002 10.5648 3.0898C10.3981 3.16564 10.2555 3.2858 10.1524 3.43717C10.0304 3.61637 9.98895 3.85634 9.90615 4.3363L9.75012 5.24064C9.69445 5.56333 9.66662 5.72467 9.60765 5.84869C9.54975 5.97047 9.50241 6.03703 9.40636 6.13166C9.30853 6.22804 9.12753 6.3281 8.76554 6.52822C8.73884 6.54298 8.71227 6.55791 8.68582 6.57302C8.33956 6.77078 8.16643 6.86966 8.03785 6.90314C7.91158 6.93602 7.83293 6.94279 7.70289 6.93196C7.57049 6.92094 7.42216 6.86726 7.12551 6.7599L6.11194 6.39308C5.66271 6.2305 5.43809 6.14921 5.22515 6.16488C5.04524 6.17811 4.87225 6.23978 4.72453 6.34333C4.5497 6.46589 4.42715 6.67094 4.18206 7.08103L3.72269 7.84965C3.46394 8.2826 3.33456 8.49907 3.31227 8.72078C3.29345 8.90796 3.32781 9.09665 3.41141 9.26519C3.51042 9.4648 3.7078 9.62177 4.10256 9.9357L4.82745 10.5122C5.07927 10.7124 5.20518 10.8126 5.28411 10.9199C5.36944 11.036 5.40583 11.1114 5.44354 11.2504C5.47844 11.379 5.47844 11.586 5.47844 12C5.47844 12.414 5.47844 12.621 5.44354 12.7497C5.40582 12.8887 5.36944 12.9641 5.28413 13.0801C5.20518 13.1875 5.07927 13.2876 4.82743 13.4879L4.10261 14.0643C3.70785 14.3783 3.51047 14.5352 3.41145 14.7349C3.32785 14.9034 3.29349 15.0921 3.31231 15.2793C3.33461 15.501 3.46398 15.7174 3.72273 16.1504L4.1821 16.919C4.4272 17.3291 4.54974 17.5342 4.72457 17.6567C4.8723 17.7603 5.04528 17.8219 5.2252 17.8352C5.43813 17.8508 5.66275 17.7695 6.11199 17.607L7.12553 17.2402C7.42216 17.1328 7.5705 17.0791 7.7029 17.0681C7.83294 17.0573 7.91159 17.064 8.03786 17.0969C8.16644 17.1304 8.33956 17.2293 8.68582 17.427C8.71228 17.4421 8.73885 17.4571 8.76554 17.4718C9.12753 17.6719 9.30853 17.772 9.40635 17.8684C9.50241 17.963 9.54975 18.0296 9.60765 18.1514C9.66662 18.2754 9.69445 18.4367 9.75012 18.7594L9.90615 19.6637C9.98895 20.1437 10.0304 20.3837 10.1524 20.5629C10.2555 20.7142 10.3981 20.8344 10.5648 20.9102C10.7621 21 11.0057 21 11.4927 21H12.5073C12.9943 21 13.2378 21 13.4352 20.9102C13.6019 20.8344 13.7445 20.7142 13.8476 20.5629C13.9696 20.3837 14.011 20.1437 14.0938 19.6637L14.2499 18.7594C14.3055 18.4367 14.3334 18.2754 14.3923 18.1514C14.4502 18.0296 14.4976 17.963 14.5936 17.8684C14.6915 17.772 14.8725 17.6719 15.2344 17.4718C15.2611 17.4571 15.2877 17.4421 15.3141 17.427C15.6604 17.2293 15.8335 17.1304 15.9621 17.0969C16.0884 17.064 16.167 17.0573 16.2971 17.0681C16.4295 17.0791 16.5778 17.1328 16.8744 17.2402L17.888 17.607C18.3372 17.7696 18.5619 17.8509 18.7748 17.8352C18.9547 17.8219 19.1277 17.7603 19.2754 17.6567C19.4502 17.5342 19.5728 17.3291 19.8179 16.919L20.2773 16.1504C20.536 15.7175 20.6654 15.501 20.6877 15.2793C20.7065 15.0921 20.6721 14.9034 20.5885 14.7349C20.4895 14.5353 20.2921 14.3783 19.8974 14.0643L19.1726 13.4879C18.9207 13.2876 18.7948 13.1875 18.7159 13.0801C18.6306 12.9641 18.5942 12.8887 18.5564 12.7497C18.5215 12.6211 18.5215 12.414 18.5215 12C18.5215 11.586 18.5215 11.379 18.5564 11.2504C18.5942 11.1114 18.6306 11.036 18.7159 10.9199C18.7948 10.8126 18.9207 10.7124 19.1725 10.5122L19.8974 9.9357C20.2922 9.62176 20.4896 9.46479 20.5886 9.26517C20.6722 9.09664 20.7065 8.90795 20.6877 8.72076C20.6654 8.49906 20.5361 8.28259 20.2773 7.84964L19.8179 7.08102C19.5728 6.67093 19.4503 6.46588 19.2755 6.34332C19.1277 6.23977 18.9548 6.1781 18.7748 6.16486C18.5619 6.14919 18.3373 6.23048 17.888 6.39307L16.8745 6.75989C16.5778 6.86725 16.4295 6.92093 16.2971 6.93195C16.167 6.94278 16.0884 6.93601 15.9621 6.90313C15.8335 6.86965 15.6604 6.77077 15.3142 6.57302C15.2877 6.55791 15.2611 6.54298 15.2345 6.52822C14.8725 6.3281 14.6915 6.22804 14.5936 6.13166C14.4976 6.03703 14.4502 5.97047 14.3923 5.84869C14.3334 5.72467 14.3055 5.56332 14.2499 5.24064L14.0938 4.3363Z" fill="#0F1729"/>
2418
2404
  </svg>`;
2419
2405
  }
2420
2406
  /**
2421
2407
  * Close/X icon for modal close button
2422
2408
  */
2423
2409
  function getCloseIcon() {
2424
- return `<svg class="cv-modal-close-icon" fill="currentColor" height="20px" viewBox="0 0 256 256" width="20px" xmlns="http://www.w3.org/2000/svg">
2425
- <path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>
2410
+ return `<svg class="cv-modal-close-icon" fill="currentColor" height="20px" viewBox="0 0 256 256" width="20px" xmlns="http://www.w3.org/2000/svg">
2411
+ <path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>
2426
2412
  </svg>`;
2427
2413
  }
2428
2414
  /**
2429
2415
  * Reset/refresh icon for reset button
2430
2416
  */
2431
2417
  function getResetIcon() {
2432
- return `<svg class="cv-btn-icon" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2433
- <path d="M22.719 12A10.719 10.719 0 0 1 1.28 12h.838a9.916 9.916 0 1 0 1.373-5H8v1H2V2h1v4.2A10.71 10.71 0 0 1 22.719 12z"/><path fill="none" d="M0 0h24v24H0z"/>
2418
+ return `<svg class="cv-btn-icon" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2419
+ <path d="M22.719 12A10.719 10.719 0 0 1 1.28 12h.838a9.916 9.916 0 1 0 1.373-5H8v1H2V2h1v4.2A10.71 10.71 0 0 1 22.719 12z"/><path fill="none" d="M0 0h24v24H0z"/>
2434
2420
  </svg>`;
2435
2421
  }
2436
2422
  /**
2437
2423
  * Share icon for share button
2438
2424
  */
2439
2425
  function getShareIcon() {
2440
- return `<svg class="cv-btn-icon" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2441
- <path xmlns="http://www.w3.org/2000/svg" d="M6 11C6 8.17157 6 6.75736 6.87868 5.87868C7.75736 5 9.17157 5 12 5H15C17.8284 5 19.2426 5 20.1213 5.87868C21 6.75736 21 8.17157 21 11V16C21 18.8284 21 20.2426 20.1213 21.1213C19.2426 22 17.8284 22 15 22H12C9.17157 22 7.75736 22 6.87868 21.1213C6 20.2426 6 18.8284 6 16V11Z" stroke="#1C274C" stroke-width="1.5"/>
2442
- <path xmlns="http://www.w3.org/2000/svg" opacity="0.5" d="M6 19C4.34315 19 3 17.6569 3 16V10C3 6.22876 3 4.34315 4.17157 3.17157C5.34315 2 7.22876 2 11 2H15C16.6569 2 18 3.34315 18 5" stroke="#1C274C" stroke-width="1.5"/>
2426
+ return `<svg class="cv-btn-icon" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2427
+ <path xmlns="http://www.w3.org/2000/svg" d="M6 11C6 8.17157 6 6.75736 6.87868 5.87868C7.75736 5 9.17157 5 12 5H15C17.8284 5 19.2426 5 20.1213 5.87868C21 6.75736 21 8.17157 21 11V16C21 18.8284 21 20.2426 20.1213 21.1213C19.2426 22 17.8284 22 15 22H12C9.17157 22 7.75736 22 6.87868 21.1213C6 20.2426 6 18.8284 6 16V11Z" stroke="#1C274C" stroke-width="1.5"/>
2428
+ <path xmlns="http://www.w3.org/2000/svg" opacity="0.5" d="M6 19C4.34315 19 3 17.6569 3 16V10C3 6.22876 3 4.34315 4.17157 3.17157C5.34315 2 7.22876 2 11 2H15C16.6569 2 18 3.34315 18 5" stroke="#1C274C" stroke-width="1.5"/>
2443
2429
  </svg>`;
2444
2430
  }
2445
2431
 
@@ -2543,18 +2529,18 @@ class CustomViewsWidget {
2543
2529
  this.modal = document.createElement('div');
2544
2530
  this.modal.className = 'cv-widget-modal-overlay';
2545
2531
  this.applyThemeToModal();
2546
- const toggleControlsHtml = toggles.map(toggle => `
2547
- <div class="cv-toggle-card">
2548
- <div class="cv-toggle-content">
2549
- <div>
2550
- <p class="cv-toggle-title">${this.formatToggleName(toggle)}</p>
2551
- </div>
2552
- <label class="cv-toggle-label">
2553
- <input class="cv-toggle-input" type="checkbox" data-toggle="${toggle}"/>
2554
- <span class="cv-toggle-slider"></span>
2555
- </label>
2556
- </div>
2557
- </div>
2532
+ const toggleControlsHtml = toggles.map(toggle => `
2533
+ <div class="cv-toggle-card">
2534
+ <div class="cv-toggle-content">
2535
+ <div>
2536
+ <p class="cv-toggle-title">${this.formatToggleName(toggle)}</p>
2537
+ </div>
2538
+ <label class="cv-toggle-label">
2539
+ <input class="cv-toggle-input" type="checkbox" data-toggle="${toggle}"/>
2540
+ <span class="cv-toggle-slider"></span>
2541
+ </label>
2542
+ </div>
2543
+ </div>
2558
2544
  `).join('');
2559
2545
  // Todo: Re-add description if needed (Line 168, add label field to toggles if needed change structure)
2560
2546
  // <p class="cv-toggle-description">Show or hide the ${this.formatToggleName(toggle).toLowerCase()} area </p>
@@ -2584,82 +2570,82 @@ class CustomViewsWidget {
2584
2570
  ensureFontAwesomeInjected();
2585
2571
  }
2586
2572
  if (this.options.showTabGroups && tabGroups && tabGroups.length > 0) {
2587
- tabGroupControlsHTML = `
2588
- <div class="cv-tabgroup-card cv-tabgroup-header">
2589
- <div class="cv-tabgroup-row">
2590
- <div class="cv-tabgroup-info">
2591
- <p class="cv-tabgroup-title">Navigation Headers</p>
2592
- <p class="cv-tabgroup-description">Show or hide navigation headers</p>
2593
- </div>
2594
- <label class="cv-toggle-switch cv-nav-toggle">
2595
- <input class="cv-nav-pref-input" type="checkbox" aria-label="Show or hide navigation headers" />
2596
- <span class="cv-switch-bg"></span>
2597
- <span class="cv-switch-knob"></span>
2598
- </label>
2599
- </div>
2600
- </div>
2601
- <div class="cv-tab-groups-list">
2602
- ${tabGroups.map(group => `
2603
- <div class="cv-tabgroup-card cv-tabgroup-item">
2604
- <label class="cv-tabgroup-label" for="tab-group-${group.id}">
2605
- ${replaceIconShortcodes(group.label || group.id)}
2606
- </label>
2607
- <select id="tab-group-${group.id}" class="cv-tabgroup-select" data-group-id="${group.id}">
2608
- ${group.tabs.map(tab => `<option value="${tab.id}">${replaceIconShortcodes(tab.label || tab.id)}</option>`).join('')}
2609
- </select>
2610
- </div>
2611
- `).join('')}
2612
- </div>
2573
+ tabGroupControlsHTML = `
2574
+ <div class="cv-tabgroup-card cv-tabgroup-header">
2575
+ <div class="cv-tabgroup-row">
2576
+ <div class="cv-tabgroup-info">
2577
+ <p class="cv-tabgroup-title">Navigation Headers</p>
2578
+ <p class="cv-tabgroup-description">Show or hide navigation headers</p>
2579
+ </div>
2580
+ <label class="cv-toggle-switch cv-nav-toggle">
2581
+ <input class="cv-nav-pref-input" type="checkbox" aria-label="Show or hide navigation headers" />
2582
+ <span class="cv-switch-bg"></span>
2583
+ <span class="cv-switch-knob"></span>
2584
+ </label>
2585
+ </div>
2586
+ </div>
2587
+ <div class="cv-tab-groups-list">
2588
+ ${tabGroups.map(group => `
2589
+ <div class="cv-tabgroup-card cv-tabgroup-item">
2590
+ <label class="cv-tabgroup-label" for="tab-group-${group.id}">
2591
+ ${replaceIconShortcodes(group.label || group.id)}
2592
+ </label>
2593
+ <select id="tab-group-${group.id}" class="cv-tabgroup-select" data-group-id="${group.id}">
2594
+ ${group.tabs.map(tab => `<option value="${tab.id}">${replaceIconShortcodes(tab.label || tab.id)}</option>`).join('')}
2595
+ </select>
2596
+ </div>
2597
+ `).join('')}
2598
+ </div>
2613
2599
  `;
2614
2600
  }
2615
- this.modal.innerHTML = `
2616
- <div class="cv-widget-modal cv-custom-state-modal">
2617
- <header class="cv-modal-header">
2618
- <div class="cv-modal-header-content">
2619
- <div class="cv-modal-icon">
2620
- ${getGearIcon()}
2621
- </div>
2622
- <div class="cv-modal-title">${this.options.title}</div>
2623
- </div>
2624
- <button class="cv-modal-close" aria-label="Close modal">
2625
- ${getCloseIcon()}
2626
- </button>
2627
- </header>
2628
- <main class="cv-modal-main">
2629
- ${this.options.description ? `<p class="cv-modal-description">${this.options.description}</p>` : ''}
2630
-
2631
- ${toggles.length ? `
2632
- <div class="cv-content-section">
2633
- <div class="cv-section-heading">Toggles</div>
2634
- <div class="cv-toggles-container">
2635
- ${toggleControlsHtml}
2636
- </div>
2637
- </div>
2638
- ` : ''}
2639
-
2640
- ${this.options.showTabGroups && tabGroups && tabGroups.length > 0 ? `
2641
- <div class="cv-content-section">
2642
- <div class="cv-section-heading">Tab Groups</div>
2643
- <div class="cv-tabgroups-container">
2644
- ${tabGroupControlsHTML}
2645
- </div>
2646
- </div>
2647
- ` : ''}
2648
- </main>
2649
-
2650
- <footer class="cv-modal-footer">
2651
- ${this.options.showReset ? `
2652
- <button class="cv-reset-btn">
2653
- ${getResetIcon()}
2654
- <span>Reset to Default</span>
2655
- </button>
2656
- ` : ''}
2657
- <button class="cv-share-btn">
2658
- ${getShareIcon()}
2659
- <span>Copy Shareable URL</span>
2660
- </button>
2661
- </footer>
2662
- </div>
2601
+ this.modal.innerHTML = `
2602
+ <div class="cv-widget-modal cv-custom-state-modal">
2603
+ <header class="cv-modal-header">
2604
+ <div class="cv-modal-header-content">
2605
+ <div class="cv-modal-icon">
2606
+ ${getGearIcon()}
2607
+ </div>
2608
+ <div class="cv-modal-title">${this.options.title}</div>
2609
+ </div>
2610
+ <button class="cv-modal-close" aria-label="Close modal">
2611
+ ${getCloseIcon()}
2612
+ </button>
2613
+ </header>
2614
+ <main class="cv-modal-main">
2615
+ ${this.options.description ? `<p class="cv-modal-description">${this.options.description}</p>` : ''}
2616
+
2617
+ ${toggles.length ? `
2618
+ <div class="cv-content-section">
2619
+ <div class="cv-section-heading">Toggles</div>
2620
+ <div class="cv-toggles-container">
2621
+ ${toggleControlsHtml}
2622
+ </div>
2623
+ </div>
2624
+ ` : ''}
2625
+
2626
+ ${this.options.showTabGroups && tabGroups && tabGroups.length > 0 ? `
2627
+ <div class="cv-content-section">
2628
+ <div class="cv-section-heading">Tab Groups</div>
2629
+ <div class="cv-tabgroups-container">
2630
+ ${tabGroupControlsHTML}
2631
+ </div>
2632
+ </div>
2633
+ ` : ''}
2634
+ </main>
2635
+
2636
+ <footer class="cv-modal-footer">
2637
+ ${this.options.showReset ? `
2638
+ <button class="cv-reset-btn">
2639
+ ${getResetIcon()}
2640
+ <span>Reset to Default</span>
2641
+ </button>
2642
+ ` : ''}
2643
+ <button class="cv-share-btn">
2644
+ ${getShareIcon()}
2645
+ <span>Copy Shareable URL</span>
2646
+ </button>
2647
+ </footer>
2648
+ </div>
2663
2649
  `;
2664
2650
  document.body.appendChild(this.modal);
2665
2651
  this.attachStateModalEventListeners();
@@ -2835,7 +2821,7 @@ class CustomViewsWidget {
2835
2821
  });
2836
2822
  // Load tab group selections
2837
2823
  const activeTabs = this.core.getCurrentActiveTabs();
2838
- const tabGroupSelects = this.modal.querySelectorAll('.cv-tab-groupselect');
2824
+ const tabGroupSelects = this.modal.querySelectorAll('.cv-tabgroup-select');
2839
2825
  tabGroupSelects.forEach(select => {
2840
2826
  const groupId = select.dataset.groupId;
2841
2827
  if (groupId && activeTabs[groupId]) {
@@ -2893,29 +2879,29 @@ class CustomViewsWidget {
2893
2879
  this.modal = document.createElement('div');
2894
2880
  this.modal.className = 'cv-widget-modal-overlay cv-welcome-modal-overlay';
2895
2881
  this.applyThemeToModal();
2896
- this.modal.innerHTML = `
2897
- <div class="cv-widget-modal cv-welcome-modal">
2898
- <header class="cv-modal-header">
2899
- <div class="cv-modal-header-content">
2900
- <div class="cv-modal-icon">
2901
- ${getGearIcon()}
2902
- </div>
2903
- <h1 class="cv-modal-title">${this.options.welcomeTitle}</h1>
2904
- </div>
2905
- </header>
2906
- <div class="cv-modal-main">
2907
- <p class="cv-welcome-message">${this.options.welcomeMessage}</p>
2908
-
2909
- <div class="cv-welcome-widget-preview">
2910
- <div class="cv-welcome-widget-icon">
2911
- ${getGearIcon()}
2912
- </div>
2913
- <p class="cv-welcome-widget-label">Look for this widget</p>
2914
- </div>
2915
-
2916
- <button class="cv-welcome-got-it">Got it!</button>
2917
- </div>
2918
- </div>
2882
+ this.modal.innerHTML = `
2883
+ <div class="cv-widget-modal cv-welcome-modal">
2884
+ <header class="cv-modal-header">
2885
+ <div class="cv-modal-header-content">
2886
+ <div class="cv-modal-icon">
2887
+ ${getGearIcon()}
2888
+ </div>
2889
+ <h1 class="cv-modal-title">${this.options.welcomeTitle}</h1>
2890
+ </div>
2891
+ </header>
2892
+ <div class="cv-modal-main">
2893
+ <p class="cv-welcome-message">${this.options.welcomeMessage}</p>
2894
+
2895
+ <div class="cv-welcome-widget-preview">
2896
+ <div class="cv-welcome-widget-icon">
2897
+ ${getGearIcon()}
2898
+ </div>
2899
+ <p class="cv-welcome-widget-label">Look for this widget</p>
2900
+ </div>
2901
+
2902
+ <button class="cv-welcome-got-it">Got it!</button>
2903
+ </div>
2904
+ </div>
2919
2905
  `;
2920
2906
  document.body.appendChild(this.modal);
2921
2907
  this.attachWelcomeModalEventListeners();