vpschatbotwidget 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.css CHANGED
@@ -1,5 +1,4 @@
1
1
  @import url("https://fonts.googleapis.com/css2?family=Bai+Jamjuree:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700&display=swap");
2
- @import "tailwindcss";
3
2
 
4
3
  :root {
5
4
  --vps-white: #fff;
@@ -61,12 +60,14 @@
61
60
 
62
61
  --bubble-user-bg: var(--tint-solus-10);
63
62
  --bubble-user-text: var(--vps-dark-blue);
63
+ --bubble-bot-message-bg: var(--vps-white);
64
64
  --bubble-assistant-bg: var(--surface-muted);
65
65
 
66
66
  --text-main: var(--vps-dark-blue);
67
67
  --text-muted: var(--grey-600);
68
68
  --text-subtle: var(--grey-400);
69
69
  --text-on-action: var(--vps-white);
70
+ --text-primary: var(--vps-dark-blue);
70
71
 
71
72
  --success: var(--success-600);
72
73
  --error-bg: var(--error-50);
@@ -76,30 +77,12 @@
76
77
  --code-bg: var(--vps-dark-blue);
77
78
  --overlay: #1a1a3133;
78
79
  --scrollbar: var(--grey-300);
80
+ --border: var(--grey-200);
79
81
 
80
82
  --font-main: "Bai Jamjuree", sans-serif;
81
83
  --font-jamjuree: "Bai Jamjuree", sans-serif;
82
84
  }
83
85
 
84
- @theme inline {
85
- --color-vps-white: var(--vps-white);
86
- --color-vps-dark-blue: var(--vps-dark-blue);
87
- --color-vps-light-blue: var(--vps-light-blue);
88
- --color-vps-light-grey: var(--vps-light-grey);
89
- --color-vps-orange: var(--vps-orange);
90
- --color-background: var(--bg-app);
91
- --color-foreground: var(--text-main);
92
- --color-card: var(--card-bg);
93
- --color-muted: var(--surface-muted);
94
- --color-muted-foreground: var(--text-muted);
95
- --color-border: var(--border-light);
96
- --color-primary: var(--primary);
97
- --color-primary-foreground: var(--text-on-action);
98
- --color-action: var(--action);
99
- --color-action-foreground: var(--text-on-action);
100
- --color-success: var(--success);
101
- }
102
-
103
86
  * {
104
87
  box-sizing: border-box;
105
88
  }
@@ -548,3 +531,984 @@ button {
548
531
  background: #fef3c7;
549
532
  border-color: #fcd34d;
550
533
  }
534
+
535
+ /* ═══════════════════════════════════════════════════════════════
536
+ Component CSS — converted from Tailwind utility classes
537
+ ═══════════════════════════════════════════════════════════════ */
538
+
539
+ /* ── Accessibility ──────────────────────────────────────────── */
540
+ .sr-only {
541
+ position: absolute;
542
+ width: 1px;
543
+ height: 1px;
544
+ padding: 0;
545
+ margin: -1px;
546
+ overflow: hidden;
547
+ clip: rect(0, 0, 0, 0);
548
+ white-space: nowrap;
549
+ border-width: 0;
550
+ }
551
+
552
+ /* ── App Shell ──────────────────────────────────────────────── */
553
+ .app-shell {
554
+ display: flex;
555
+ min-height: 100vh;
556
+ flex-direction: column;
557
+ background-color: var(--bg-app);
558
+ }
559
+
560
+ /* ── App Header (demo page) ─────────────────────────────────── */
561
+ .app-header {
562
+ position: sticky;
563
+ top: 0;
564
+ z-index: 50;
565
+ display: flex;
566
+ flex-wrap: wrap;
567
+ align-items: center;
568
+ justify-content: space-between;
569
+ gap: 12px;
570
+ border-bottom: 1px solid var(--border-light);
571
+ background-color: var(--card-bg);
572
+ padding: 14px 28px;
573
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
574
+ }
575
+
576
+ .app-header-brand {
577
+ display: flex;
578
+ align-items: center;
579
+ gap: 12px;
580
+ }
581
+
582
+ .app-header-title {
583
+ font-size: 1rem;
584
+ font-weight: 700;
585
+ color: var(--text-main);
586
+ margin: 0;
587
+ }
588
+
589
+ .app-header-subtitle {
590
+ font-size: 0.75rem;
591
+ color: var(--text-muted);
592
+ margin: 0;
593
+ }
594
+
595
+ .app-header-controls {
596
+ display: flex;
597
+ flex-wrap: wrap;
598
+ align-items: center;
599
+ gap: 6px;
600
+ }
601
+
602
+ /* Mode toggle buttons (Widget / Slide-out) */
603
+ .mode-btn {
604
+ display: inline-flex;
605
+ align-items: center;
606
+ gap: 6px;
607
+ border-radius: 8px;
608
+ border: 1px solid;
609
+ padding: 6px 12px;
610
+ font-size: 12.5px;
611
+ font-weight: 600;
612
+ cursor: pointer;
613
+ transition: background 0.15s, color 0.15s;
614
+ }
615
+
616
+ .mode-btn--active {
617
+ border-color: var(--action);
618
+ background-color: var(--action);
619
+ color: var(--text-on-action);
620
+ }
621
+
622
+ .mode-btn--inactive {
623
+ border-color: var(--border-light);
624
+ background-color: var(--surface-muted);
625
+ color: var(--text-muted);
626
+ }
627
+
628
+ /* ── ChatPanel ──────────────────────────────────────────────── */
629
+ .chat-panel {
630
+ display: flex;
631
+ height: 100%;
632
+ min-height: 0;
633
+ flex-direction: column;
634
+ overflow: hidden;
635
+ background-color: var(--card-bg);
636
+ }
637
+
638
+ .chat-panel-body {
639
+ position: relative;
640
+ min-height: 0;
641
+ flex: 1;
642
+ }
643
+
644
+ /* ── ChatHeader ─────────────────────────────────────────────── */
645
+ .chat-header {
646
+ display: flex;
647
+ align-items: center;
648
+ justify-content: space-between;
649
+ border-bottom: 1px solid var(--border-light);
650
+ background-color: var(--card-bg);
651
+ padding: 16px 20px;
652
+ }
653
+
654
+ .chat-header-left {
655
+ display: flex;
656
+ align-items: center;
657
+ gap: 12px;
658
+ }
659
+
660
+ .chat-header-title-row {
661
+ display: flex;
662
+ align-items: center;
663
+ gap: 6px;
664
+ }
665
+
666
+ .chat-header-title {
667
+ font-size: 16px;
668
+ font-weight: 700;
669
+ letter-spacing: -0.015em;
670
+ color: var(--text-main);
671
+ margin: 0;
672
+ }
673
+
674
+ .chat-header-subtitle {
675
+ font-size: 12px;
676
+ font-weight: 500;
677
+ color: var(--text-subtle);
678
+ margin: 0;
679
+ }
680
+
681
+ .chat-header-actions {
682
+ display: flex;
683
+ align-items: center;
684
+ gap: 4px;
685
+ }
686
+
687
+ /* ── Icon avatar (bot icon circle) ─────────────────────────── */
688
+ .avatar-circle {
689
+ display: flex;
690
+ height: 32px;
691
+ width: 32px;
692
+ align-items: center;
693
+ justify-content: center;
694
+ border-radius: 50%;
695
+ background-color: var(--primary);
696
+ color: var(--text-on-action);
697
+ flex-shrink: 0;
698
+ }
699
+
700
+ .avatar-circle--mt {
701
+ margin-top: 2px;
702
+ }
703
+
704
+ /* Back button */
705
+ .icon-btn-back {
706
+ display: flex;
707
+ height: 32px;
708
+ width: 32px;
709
+ align-items: center;
710
+ justify-content: center;
711
+ border-radius: 50%;
712
+ border: 1px solid var(--border-light);
713
+ background-color: var(--surface-muted);
714
+ color: var(--text-muted);
715
+ cursor: pointer;
716
+ }
717
+
718
+ .icon-btn-back:hover {
719
+ background-color: var(--grey-100);
720
+ }
721
+
722
+ /* Action icon button (reset / close) */
723
+ .icon-btn-action {
724
+ display: flex;
725
+ height: 28px;
726
+ width: 28px;
727
+ align-items: center;
728
+ justify-content: center;
729
+ border-radius: 6px;
730
+ border: none;
731
+ background: none;
732
+ color: var(--text-subtle);
733
+ cursor: pointer;
734
+ transition: background 0.15s, color 0.15s;
735
+ }
736
+
737
+ .icon-btn-action:hover {
738
+ background-color: var(--surface-muted);
739
+ color: var(--text-main);
740
+ }
741
+
742
+ /* ── ChatInput ──────────────────────────────────────────────── */
743
+ .chat-input-wrapper {
744
+ background-color: var(--card-bg);
745
+ padding: 8px 16px 12px;
746
+ }
747
+
748
+ .chat-input-row {
749
+ display: flex;
750
+ align-items: flex-end;
751
+ gap: 8px;
752
+ border-radius: 12px;
753
+ background-color: var(--input-bg);
754
+ padding: 6px 10px;
755
+ }
756
+
757
+ .chat-textarea {
758
+ max-height: 96px;
759
+ flex: 1;
760
+ resize: none;
761
+ background: transparent;
762
+ border: none;
763
+ outline: none;
764
+ padding: 6px 0;
765
+ font-size: 13.5px;
766
+ color: var(--text-main);
767
+ font-family: inherit;
768
+ }
769
+
770
+ .chat-textarea::placeholder {
771
+ color: var(--text-subtle);
772
+ }
773
+
774
+ .chat-textarea:disabled {
775
+ opacity: 0.6;
776
+ }
777
+
778
+ .chat-send-btn {
779
+ display: flex;
780
+ height: 32px;
781
+ width: 32px;
782
+ flex-shrink: 0;
783
+ align-items: center;
784
+ justify-content: center;
785
+ border-radius: 8px;
786
+ border: none;
787
+ background-color: var(--action);
788
+ color: var(--text-on-action);
789
+ cursor: pointer;
790
+ margin-bottom: 2px;
791
+ transition: background 0.15s;
792
+ }
793
+
794
+ .chat-send-btn:hover:not(:disabled) {
795
+ background-color: var(--action-hover);
796
+ }
797
+
798
+ .chat-send-btn:disabled {
799
+ cursor: not-allowed;
800
+ opacity: 0.4;
801
+ }
802
+
803
+ .chat-input-footer {
804
+ margin-top: 8px;
805
+ text-align: center;
806
+ font-size: 11px;
807
+ font-weight: 500;
808
+ color: var(--text-subtle);
809
+ }
810
+
811
+ .chat-input-footer-brand {
812
+ color: var(--primary);
813
+ font-weight: 700;
814
+ cursor: pointer;
815
+ }
816
+
817
+ .chat-input-footer-brand:hover {
818
+ text-decoration: underline;
819
+ }
820
+
821
+ /* ── ChatMessage ─────────────────────────────────────────────── */
822
+ .msg-row {
823
+ display: flex;
824
+ align-items: flex-start;
825
+ gap: 10px;
826
+ }
827
+
828
+ .msg-row--user {
829
+ flex-direction: row-reverse;
830
+ }
831
+
832
+ .msg-col {
833
+ display: flex;
834
+ max-width: 82%;
835
+ flex-direction: column;
836
+ }
837
+
838
+ .msg-col--user {
839
+ align-items: flex-end;
840
+ }
841
+
842
+ .msg-bubble {
843
+ border-radius: 16px;
844
+ padding: 10px 14px;
845
+ font-size: 13.5px;
846
+ line-height: 1.55;
847
+ }
848
+
849
+ .msg-bubble--user {
850
+ border-radius: 16px 4px 16px 16px;
851
+ background-color: var(--bubble-user-bg);
852
+ color: var(--bubble-user-text);
853
+ font-weight: 500;
854
+ }
855
+
856
+ .msg-bubble--bot {
857
+ border-radius: 4px 16px 16px 16px;
858
+ border: 1px solid var(--border-light);
859
+ background-color: var(--bubble-bot-message-bg);
860
+ color: var(--text-main);
861
+ }
862
+
863
+ .msg-bubble--error {
864
+ border-radius: 4px 16px 16px 16px;
865
+ border: 1px solid var(--error-border);
866
+ background-color: var(--error-bg);
867
+ color: var(--error-text);
868
+ }
869
+
870
+ .msg-user-pre {
871
+ white-space: pre-wrap;
872
+ margin: 0;
873
+ }
874
+
875
+ .msg-tick {
876
+ margin-top: 4px;
877
+ color: var(--success);
878
+ }
879
+
880
+ /* Sources panel */
881
+ .sources-panel {
882
+ margin-top: 8px;
883
+ border-top: 1px solid var(--border-light);
884
+ padding-top: 6px;
885
+ }
886
+
887
+ .sources-toggle-btn {
888
+ display: inline-flex;
889
+ align-items: center;
890
+ gap: 6px;
891
+ font-size: 11.5px;
892
+ font-weight: 600;
893
+ color: var(--text-muted);
894
+ background: none;
895
+ border: none;
896
+ cursor: pointer;
897
+ padding: 0;
898
+ }
899
+
900
+ .sources-toggle-btn:hover {
901
+ color: var(--text-main);
902
+ }
903
+
904
+ .sources-list {
905
+ margin-top: 6px;
906
+ display: flex;
907
+ flex-direction: column;
908
+ gap: 4px;
909
+ list-style: none;
910
+ padding: 0;
911
+ }
912
+
913
+ .source-item {
914
+ display: flex;
915
+ align-items: center;
916
+ justify-content: space-between;
917
+ border-radius: 6px;
918
+ border: 1px solid var(--border-light);
919
+ background-color: var(--surface-muted);
920
+ padding: 4px 8px;
921
+ font-size: 11px;
922
+ color: var(--text-muted);
923
+ }
924
+
925
+ .source-score {
926
+ margin-left: 8px;
927
+ font-weight: 600;
928
+ color: var(--success);
929
+ }
930
+
931
+ .source-name {
932
+ overflow: hidden;
933
+ text-overflow: ellipsis;
934
+ white-space: nowrap;
935
+ }
936
+
937
+ /* Tool call badges */
938
+ .tool-badges {
939
+ margin-top: 8px;
940
+ display: flex;
941
+ flex-wrap: wrap;
942
+ gap: 6px;
943
+ }
944
+
945
+ .tool-badge {
946
+ display: inline-flex;
947
+ align-items: center;
948
+ border-radius: 9999px;
949
+ border: 1px solid var(--border-light);
950
+ background-color: var(--surface-muted);
951
+ padding: 2px 8px;
952
+ font-size: 11px;
953
+ color: var(--text-muted);
954
+ }
955
+
956
+ /* ── ChatMarkdown ─────────────────────────────────────────────── */
957
+ .md-ul {
958
+ margin: 6px 0;
959
+ margin-left: 16px;
960
+ padding: 0;
961
+ list-style: disc;
962
+ display: flex;
963
+ flex-direction: column;
964
+ gap: 2px;
965
+ }
966
+
967
+ .md-ol {
968
+ margin: 6px 0;
969
+ margin-left: 16px;
970
+ padding: 0;
971
+ list-style: decimal;
972
+ display: flex;
973
+ flex-direction: column;
974
+ gap: 2px;
975
+ }
976
+
977
+ .md-pre {
978
+ margin: 8px 0;
979
+ overflow-x: auto;
980
+ border-radius: 8px;
981
+ background-color: var(--code-bg);
982
+ padding: 12px;
983
+ font-family: monospace;
984
+ font-size: 12px;
985
+ color: var(--text-on-action);
986
+ }
987
+
988
+ .md-code {
989
+ border-radius: 4px;
990
+ background-color: var(--input-bg);
991
+ padding: 1px 4px;
992
+ font-family: monospace;
993
+ font-size: 12px;
994
+ color: var(--text-main);
995
+ }
996
+
997
+ .md-link {
998
+ text-decoration: underline;
999
+ text-underline-offset: 2px;
1000
+ }
1001
+
1002
+ .md-p {
1003
+ margin-bottom: 8px;
1004
+ white-space: pre-wrap;
1005
+ }
1006
+
1007
+ .md-p:last-child {
1008
+ margin-bottom: 0;
1009
+ }
1010
+
1011
+ /* Inline code (textHighlighter) */
1012
+ .inline-code {
1013
+ border-radius: 4px;
1014
+ background-color: var(--input-bg);
1015
+ padding: 1px 4px;
1016
+ font-family: monospace;
1017
+ font-size: 12px;
1018
+ color: var(--text-main);
1019
+ }
1020
+
1021
+ /* ── ChatTypingIndicator ─────────────────────────────────────── */
1022
+ .typing-indicator {
1023
+ display: flex;
1024
+ align-items: center;
1025
+ gap: 4px;
1026
+ padding: 2px 0;
1027
+ }
1028
+
1029
+ .typing-dot {
1030
+ height: 6px;
1031
+ width: 6px;
1032
+ border-radius: 50%;
1033
+ background-color: var(--text-subtle);
1034
+ animation: pulse 1.5s ease-in-out infinite;
1035
+ }
1036
+
1037
+ .typing-dot:nth-child(2) { animation-delay: 150ms; }
1038
+ .typing-dot:nth-child(3) { animation-delay: 300ms; }
1039
+
1040
+ @keyframes pulse {
1041
+ 0%, 100% { opacity: 1; }
1042
+ 50% { opacity: 0.35; }
1043
+ }
1044
+
1045
+ @media (prefers-reduced-motion: reduce) {
1046
+ .typing-dot { animation: none; }
1047
+ }
1048
+
1049
+ /* ── ChatSuggestions ─────────────────────────────────────────── */
1050
+ .suggestions-badge-list {
1051
+ margin-bottom: 8px;
1052
+ display: flex;
1053
+ flex-wrap: wrap;
1054
+ gap: 6px;
1055
+ list-style: none;
1056
+ padding: 0;
1057
+ }
1058
+
1059
+ .suggestion-badge-item {
1060
+ max-width: 100%;
1061
+ }
1062
+
1063
+ .suggestion-badge-btn {
1064
+ max-width: 100%;
1065
+ overflow: hidden;
1066
+ text-overflow: ellipsis;
1067
+ white-space: nowrap;
1068
+ border-radius: 9999px;
1069
+ border: 1px solid var(--border-light);
1070
+ background-color: var(--card-bg);
1071
+ padding: 4px 10px;
1072
+ text-align: left;
1073
+ font-size: 11.5px;
1074
+ font-weight: 600;
1075
+ color: var(--text-main);
1076
+ cursor: pointer;
1077
+ transition: border-color 0.15s, background 0.15s, color 0.15s;
1078
+ }
1079
+
1080
+ .suggestion-badge-btn:hover:not(:disabled) {
1081
+ border-color: var(--primary);
1082
+ background-color: var(--tint-solus-10);
1083
+ color: var(--primary);
1084
+ }
1085
+
1086
+ .suggestion-badge-btn:disabled {
1087
+ cursor: not-allowed;
1088
+ opacity: 0.5;
1089
+ }
1090
+
1091
+ .suggestions-list {
1092
+ margin-top: 12px;
1093
+ display: flex;
1094
+ flex-direction: column;
1095
+ gap: 8px;
1096
+ }
1097
+
1098
+ .suggestion-list-btn {
1099
+ border-radius: 8px;
1100
+ border: 1px solid var(--border-light);
1101
+ background-color: var(--card-bg);
1102
+ padding: 10px 14px;
1103
+ text-align: left;
1104
+ font-size: 13px;
1105
+ font-weight: 600;
1106
+ color: var(--text-main);
1107
+ cursor: pointer;
1108
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
1109
+ transition: transform 0.15s, border-color 0.15s, background 0.15s;
1110
+ }
1111
+
1112
+ .suggestion-list-btn:hover:not(:disabled) {
1113
+ transform: translateY(-1px);
1114
+ border-color: var(--vps-light-grey);
1115
+ background-color: var(--surface-muted);
1116
+ }
1117
+
1118
+ .suggestion-list-btn:disabled {
1119
+ cursor: not-allowed;
1120
+ opacity: 0.5;
1121
+ }
1122
+
1123
+ /* ── ChatEmptyState ──────────────────────────────────────────── */
1124
+ .chat-empty-row {
1125
+ display: flex;
1126
+ align-items: flex-start;
1127
+ gap: 10px;
1128
+ }
1129
+
1130
+ .chat-empty-bubble {
1131
+ max-width: 82%;
1132
+ border-radius: 16px 16px 16px 4px;
1133
+ border: 1px solid var(--border-light);
1134
+ background-color: var(--bubble-assistant-bg);
1135
+ padding: 10px 14px;
1136
+ font-size: 13.5px;
1137
+ line-height: 1.55;
1138
+ color: var(--text-main);
1139
+ }
1140
+
1141
+ /* ── ChatError ───────────────────────────────────────────────── */
1142
+ .chat-error-banner {
1143
+ margin: 0 16px 8px;
1144
+ border-radius: 8px;
1145
+ border: 1px solid var(--error-border);
1146
+ background-color: var(--error-bg);
1147
+ padding: 8px 12px;
1148
+ font-size: 12.5px;
1149
+ color: var(--error-text);
1150
+ }
1151
+
1152
+ .chat-error-retry-btn {
1153
+ margin-top: 6px;
1154
+ font-size: 12px;
1155
+ font-weight: 600;
1156
+ background: none;
1157
+ border: none;
1158
+ color: inherit;
1159
+ cursor: pointer;
1160
+ text-decoration: underline;
1161
+ text-underline-offset: 2px;
1162
+ padding: 0;
1163
+ }
1164
+
1165
+ /* ── ChatTicketConfirmation ──────────────────────────────────── */
1166
+ .ticket-card {
1167
+ margin: 0 16px 12px;
1168
+ border-radius: 12px;
1169
+ border: 1px solid var(--border-light);
1170
+ background-color: var(--card-bg);
1171
+ padding: 16px;
1172
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
1173
+ }
1174
+
1175
+ .ticket-card-title {
1176
+ font-size: 13.5px;
1177
+ font-weight: 700;
1178
+ color: var(--text-main);
1179
+ margin: 0;
1180
+ }
1181
+
1182
+ .ticket-card-desc {
1183
+ margin-top: 6px;
1184
+ font-size: 12.5px;
1185
+ line-height: 1.25rem;
1186
+ color: var(--text-muted);
1187
+ }
1188
+
1189
+ .ticket-card-body {
1190
+ margin-top: 8px;
1191
+ border-radius: 6px;
1192
+ background-color: var(--surface-muted);
1193
+ padding: 8px 10px;
1194
+ font-size: 12.5px;
1195
+ color: var(--text-main);
1196
+ }
1197
+
1198
+ .ticket-id-label {
1199
+ display: block;
1200
+ margin-top: 12px;
1201
+ font-size: 12px;
1202
+ font-weight: 600;
1203
+ color: var(--text-main);
1204
+ }
1205
+
1206
+ .ticket-id-input {
1207
+ display: block;
1208
+ width: 100%;
1209
+ margin-top: 4px;
1210
+ border-radius: 6px;
1211
+ border: 1px solid var(--border-light);
1212
+ padding: 8px 10px;
1213
+ font-size: 13px;
1214
+ font-weight: 400;
1215
+ outline: none;
1216
+ font-family: inherit;
1217
+ color: var(--text-main);
1218
+ background: var(--card-bg);
1219
+ box-sizing: border-box;
1220
+ }
1221
+
1222
+ .ticket-id-input:focus-visible {
1223
+ outline: 2px solid var(--primary);
1224
+ outline-offset: 0;
1225
+ }
1226
+
1227
+ .ticket-actions {
1228
+ margin-top: 12px;
1229
+ display: flex;
1230
+ justify-content: flex-end;
1231
+ gap: 8px;
1232
+ }
1233
+
1234
+ .ticket-cancel-btn {
1235
+ border-radius: 8px;
1236
+ border: 1px solid var(--border-light);
1237
+ background-color: var(--card-bg);
1238
+ padding: 6px 14px;
1239
+ font-size: 12.5px;
1240
+ font-weight: 600;
1241
+ color: var(--text-muted);
1242
+ cursor: pointer;
1243
+ transition: background 0.15s;
1244
+ }
1245
+
1246
+ .ticket-cancel-btn:hover:not(:disabled) {
1247
+ background-color: var(--surface-muted);
1248
+ }
1249
+
1250
+ .ticket-confirm-btn {
1251
+ border-radius: 8px;
1252
+ border: none;
1253
+ background-color: var(--action);
1254
+ padding: 6px 14px;
1255
+ font-size: 12.5px;
1256
+ font-weight: 600;
1257
+ color: var(--text-on-action);
1258
+ cursor: pointer;
1259
+ transition: background 0.15s;
1260
+ }
1261
+
1262
+ .ticket-confirm-btn:hover:not(:disabled) {
1263
+ background-color: var(--action-hover);
1264
+ }
1265
+
1266
+ .ticket-confirm-btn:disabled {
1267
+ opacity: 0.4;
1268
+ }
1269
+
1270
+ /* ── ChatbotWidgetTrigger ────────────────────────────────────── */
1271
+ .widget-trigger-btn {
1272
+ position: fixed;
1273
+ bottom: 28px;
1274
+ right: 28px;
1275
+ z-index: 1000;
1276
+ display: flex;
1277
+ height: 58px;
1278
+ width: 58px;
1279
+ align-items: center;
1280
+ justify-content: center;
1281
+ border-radius: 12px;
1282
+ border: none;
1283
+ background-color: var(--primary);
1284
+ color: var(--text-on-action);
1285
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1286
+ cursor: pointer;
1287
+ transition: background 0.2s, transform 0.2s;
1288
+ }
1289
+
1290
+ .widget-trigger-btn:hover {
1291
+ background-color: var(--primary-hover);
1292
+ }
1293
+
1294
+ .widget-trigger-btn:focus-visible {
1295
+ outline: 2px solid var(--primary);
1296
+ outline-offset: 2px;
1297
+ }
1298
+
1299
+ @media (prefers-reduced-motion: reduce) {
1300
+ .widget-trigger-btn { transition: none; }
1301
+ }
1302
+
1303
+ /* ── ChatbotWidgetPanel ──────────────────────────────────────── */
1304
+ .widget-panel {
1305
+ position: fixed;
1306
+ bottom: 98px;
1307
+ right: 28px;
1308
+ z-index: 999;
1309
+ display: flex;
1310
+ height: min(660px, calc(100vh - 120px));
1311
+ width: min(420px, calc(100vw - 32px));
1312
+ flex-direction: column;
1313
+ overflow: hidden;
1314
+ border-radius: 20px;
1315
+ border: 1px solid var(--border-light);
1316
+ background-color: var(--card-bg);
1317
+ box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.12);
1318
+ transform-origin: bottom right;
1319
+ animation: chat-pop 180ms ease-out;
1320
+ }
1321
+
1322
+ @media (prefers-reduced-motion: reduce) {
1323
+ .widget-panel { animation: none; }
1324
+ }
1325
+
1326
+ /* ── EmbeddedChatbotPanel ────────────────────────────────────── */
1327
+ .embedded-overlay {
1328
+ position: fixed;
1329
+ inset: 0;
1330
+ z-index: 90;
1331
+ background-color: var(--overlay);
1332
+ transition: opacity 0.2s;
1333
+ }
1334
+
1335
+ .embedded-overlay--open { opacity: 1; pointer-events: auto; }
1336
+ .embedded-overlay--closed { opacity: 0; pointer-events: none; }
1337
+
1338
+ @media (min-width: 640px) {
1339
+ .embedded-overlay { display: none; }
1340
+ }
1341
+
1342
+ @media (prefers-reduced-motion: reduce) {
1343
+ .embedded-overlay { transition: none; }
1344
+ }
1345
+
1346
+ .embedded-panel {
1347
+ position: fixed;
1348
+ top: 0;
1349
+ bottom: 0;
1350
+ right: 0;
1351
+ z-index: 100;
1352
+ display: flex;
1353
+ width: 100%;
1354
+ max-width: 440px;
1355
+ flex-direction: column;
1356
+ border-left: 1px solid var(--border-light);
1357
+ background-color: var(--card-bg);
1358
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
1359
+ transition: transform 0.3s ease-out;
1360
+ }
1361
+
1362
+ .embedded-panel--open { transform: translateX(0); }
1363
+ .embedded-panel--closed { transform: translateX(100%); }
1364
+
1365
+ @media (prefers-reduced-motion: reduce) {
1366
+ .embedded-panel { transition: none; }
1367
+ }
1368
+
1369
+ /* ── EmbeddedChatbotTrigger ──────────────────────────────────── */
1370
+ .embedded-trigger-btn {
1371
+ position: fixed;
1372
+ right: 0;
1373
+ z-index: 80;
1374
+ display: flex;
1375
+ align-items: center;
1376
+ gap: 8px;
1377
+ border-radius: 8px 0 0 8px;
1378
+ border: none;
1379
+ background-color: var(--action);
1380
+ padding: 10px 12px;
1381
+ font-size: 12.5px;
1382
+ font-weight: 600;
1383
+ color: var(--text-on-action);
1384
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
1385
+ touch-action: none;
1386
+ transition: background 0.15s;
1387
+ }
1388
+
1389
+ .embedded-trigger-btn:hover {
1390
+ background-color: var(--action-hover);
1391
+ }
1392
+
1393
+ .embedded-trigger-btn:focus-visible {
1394
+ outline: 2px solid var(--primary);
1395
+ outline-offset: 0;
1396
+ }
1397
+
1398
+ .embedded-trigger-btn--grab { cursor: grab; }
1399
+ .embedded-trigger-btn--grabbing { cursor: grabbing; }
1400
+
1401
+ /* ── MessageScroller ─────────────────────────────────────────── */
1402
+ .msg-scroller-root {
1403
+ position: relative;
1404
+ display: flex;
1405
+ width: 100%;
1406
+ height: 100%;
1407
+ min-height: 0;
1408
+ flex-direction: column;
1409
+ overflow: hidden;
1410
+ }
1411
+
1412
+ .msg-scroller-viewport {
1413
+ width: 100%;
1414
+ height: 100%;
1415
+ min-height: 0;
1416
+ min-width: 0;
1417
+ overflow-y: auto;
1418
+ overscroll-behavior: contain;
1419
+ }
1420
+
1421
+ .msg-scroller-viewport[data-pending-scroll] {
1422
+ visibility: hidden;
1423
+ }
1424
+
1425
+ .msg-scroller-content {
1426
+ display: flex;
1427
+ height: max-content;
1428
+ min-height: 100%;
1429
+ flex-direction: column;
1430
+ gap: 16px;
1431
+ padding: 16px;
1432
+ }
1433
+
1434
+ .msg-scroller-item {
1435
+ min-width: 0;
1436
+ flex-shrink: 0;
1437
+ contain-intrinsic-size: auto 10rem;
1438
+ content-visibility: auto;
1439
+ }
1440
+
1441
+ .msg-scroller-btn {
1442
+ position: absolute;
1443
+ left: 50%;
1444
+ z-index: 10;
1445
+ display: flex;
1446
+ height: 36px;
1447
+ width: 36px;
1448
+ transform: translateX(-50%);
1449
+ align-items: center;
1450
+ justify-content: center;
1451
+ border-radius: 50%;
1452
+ border: 1px solid var(--border-light);
1453
+ background-color: var(--card-bg);
1454
+ color: var(--text-main);
1455
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
1456
+ cursor: pointer;
1457
+ transition: opacity 0.2s, transform 0.2s;
1458
+ }
1459
+
1460
+ .msg-scroller-btn:hover {
1461
+ background-color: var(--input-bg);
1462
+ }
1463
+
1464
+ .msg-scroller-btn[data-direction="end"] { bottom: 12px; }
1465
+ .msg-scroller-btn[data-direction="start"] { top: 12px; }
1466
+
1467
+ .msg-scroller-btn[data-active="false"] {
1468
+ pointer-events: none;
1469
+ transform: translateX(-50%) scale(0.95);
1470
+ opacity: 0;
1471
+ }
1472
+
1473
+ .msg-scroller-btn[data-active="true"] {
1474
+ transform: translateX(-50%) scale(1);
1475
+ opacity: 1;
1476
+ }
1477
+
1478
+ @media (prefers-reduced-motion: reduce) {
1479
+ .msg-scroller-btn { transition: none; }
1480
+ }
1481
+
1482
+ /* ── EnvBadge inline overrides ───────────────────────────────── */
1483
+ .env-badge-inline {
1484
+ color: var(--vps-orange);
1485
+ font-weight: 500;
1486
+ font-size: 10px;
1487
+ line-height: 12px;
1488
+ padding: 2px 6px;
1489
+ border-radius: 9999px;
1490
+ border: 1px solid var(--border-light);
1491
+ background-color: var(--orange-50);
1492
+ display: inline-flex;
1493
+ align-items: center;
1494
+ gap: 4px;
1495
+ cursor: pointer;
1496
+ transition: background 0.15s, color 0.15s;
1497
+ }
1498
+
1499
+ .env-badge-inline:hover {
1500
+ background-color: var(--grey-200);
1501
+ color: var(--text-main);
1502
+ }
1503
+
1504
+ .env-badge-inline-label {
1505
+ color: var(--text-primary);
1506
+ font-weight: 500;
1507
+ font-size: 10px;
1508
+ line-height: 12px;
1509
+ }
1510
+
1511
+ .rotate-180 {
1512
+ transform: rotate(180deg);
1513
+ }
1514
+