|
1 | | -:host { |
2 | | - pointer-events: none; |
| 1 | +nz-float-button-group, |
| 2 | +nz-float-button { |
| 3 | + position: absolute; |
| 4 | + right: 1px; |
| 5 | + top: 0; |
3 | 6 | } |
4 | 7 |
|
5 | | -.chat-overlay-root { |
| 8 | +.chat-container { |
6 | 9 | position: fixed; |
7 | | - inset: 0; |
| 10 | + bottom: 200px; |
| 11 | + right: 9px; |
8 | 12 | z-index: 99999; |
9 | | - pointer-events: none; |
10 | | -} |
11 | | - |
12 | | -.chat-launcher { |
13 | | - position: absolute; |
14 | | - display: flex; |
15 | | - flex-direction: column; |
16 | | - align-items: center; |
17 | | - gap: 2px; |
18 | | - width: 40px; |
19 | | - padding: 4px; |
20 | | - border-radius: 20px; |
21 | | - color: rgba(255, 255, 255, 0.5); |
22 | | - background: rgba(255, 255, 255, 0.05); |
23 | | - box-shadow: none; |
24 | | - pointer-events: auto; |
| 13 | + cursor: move; |
25 | 14 | user-select: none; |
26 | | - z-index: 1; |
27 | | -} |
28 | | - |
29 | | -.chat-drag-handle, |
30 | | -.chat-action-button { |
| 15 | + overflow: visible; |
| 16 | + padding: 10px 0; |
31 | 17 | display: flex; |
32 | | - align-items: center; |
33 | | - justify-content: center; |
34 | | - width: 32px; |
35 | | - height: 28px; |
36 | | - padding: 0; |
37 | | - border: 0; |
38 | | - border-radius: 12.5px; |
39 | | - color: rgba(255, 255, 255, 0.5); |
40 | | - background: transparent; |
41 | | - cursor: pointer; |
42 | | - transition: |
43 | | - color 0.16s ease, |
44 | | - background 0.16s ease; |
45 | | - |
46 | | - &:hover, |
47 | | - &:focus-visible { |
48 | | - color: #fff; |
49 | | - background: rgba(255, 255, 255, 0.08); |
50 | | - } |
51 | | -} |
52 | | - |
53 | | -.chat-drag-handle { |
54 | | - cursor: grab; |
55 | | - touch-action: none; |
| 18 | + flex-direction: column; |
| 19 | + align-items: flex-end; |
56 | 20 |
|
57 | | - &.dragging { |
58 | | - cursor: grabbing; |
| 21 | + .content { |
| 22 | + height: 100%; |
| 23 | + iframe { |
| 24 | + border: none; |
| 25 | + } |
59 | 26 | } |
60 | | -} |
61 | | - |
62 | | -.chat-action-group { |
63 | | - display: flex; |
64 | | - flex-direction: column; |
65 | | - align-items: center; |
66 | | - gap: 2px; |
67 | | - width: 32px; |
68 | | -} |
69 | 27 |
|
70 | | -.chat-action-button { |
71 | | - .anticon { |
72 | | - font-size: 16px; |
| 28 | + .drawer-panel { |
| 29 | + background-color: transparent; |
| 30 | + position: fixed; |
| 31 | + top: 0; |
| 32 | + right: 440px; |
| 33 | + width: 440px; |
| 34 | + min-width: 260px; |
| 35 | + height: 100vh; |
| 36 | + user-select: none; |
| 37 | + border-radius: 10px 0 0 10px; |
| 38 | + transition: transform 0.25s cubic-bezier(0.7, 0.3, 0.1, 1); |
| 39 | + box-shadow: 0 0 8px 4px #00000014; |
| 40 | + transform: translate(100%); |
| 41 | + z-index: 1000; |
| 42 | + opacity: 0.95; |
73 | 43 | } |
74 | 44 |
|
75 | | - .chat-img { |
76 | | - width: 16px; |
77 | | - height: 16px; |
78 | | - opacity: 0.5; |
79 | | - transition: opacity 0.16s ease; |
| 45 | + .show { |
| 46 | + transition: all 0.3s cubic-bezier(0.7, 0.3, 0.1, 1); |
80 | 47 | } |
81 | 48 |
|
82 | | - &:hover .chat-img, |
83 | | - &:focus-visible .chat-img { |
| 49 | + .show .modal { |
| 50 | + position: fixed; |
| 51 | + top: 0; |
| 52 | + width: 100%; |
| 53 | + height: 100%; |
| 54 | + z-index: 100; |
84 | 55 | opacity: 1; |
85 | 56 | } |
86 | | -} |
87 | | - |
88 | | -.chat-panel { |
89 | | - position: fixed; |
90 | | - right: 12px; |
91 | | - bottom: 12px; |
92 | | - width: min(440px, calc(100vw - 24px)); |
93 | | - min-width: 260px; |
94 | | - height: min(400px, calc(100dvh - 24px)); |
95 | | - overflow: hidden; |
96 | | - border-radius: 10px; |
97 | | - background: #fff; |
98 | | - box-shadow: 0 0 8px 4px #00000014; |
99 | | - pointer-events: auto; |
100 | | - transition: |
101 | | - width 0.25s cubic-bezier(0.7, 0.3, 0.1, 1), |
102 | | - height 0.25s cubic-bezier(0.7, 0.3, 0.1, 1), |
103 | | - border-radius 0.25s cubic-bezier(0.7, 0.3, 0.1, 1); |
104 | | - z-index: 2; |
105 | 57 |
|
106 | | - &.chat-panel-expanded { |
107 | | - top: 0; |
108 | | - right: 0; |
109 | | - bottom: auto; |
110 | | - width: min(440px, 100vw); |
111 | | - height: 100dvh; |
112 | | - border-radius: 10px 0 0 10px; |
| 58 | + .show .drawer-panel { |
| 59 | + transform: translate(0); |
113 | 60 | } |
114 | 61 |
|
115 | | - .content { |
116 | | - width: 100%; |
117 | | - height: 100%; |
| 62 | + ::ng-deep { |
| 63 | + .ant-float-btn-group { |
| 64 | + position: absolute; |
| 65 | + padding: 10px 0; |
| 66 | + opacity: 1; |
| 67 | + } |
118 | 68 |
|
119 | | - iframe { |
120 | | - display: block; |
121 | | - width: 100%; |
122 | | - height: 100%; |
| 69 | + .ant-float-btn-group-circle .ant-float-btn-circle:not(:last-child) { |
| 70 | + margin-bottom: 5px; |
| 71 | + } |
| 72 | + |
| 73 | + .ant-float-btn-default, |
| 74 | + .ant-float-btn-default .ant-float-btn-body { |
| 75 | + position: relative; |
| 76 | + background: rgba(30, 30, 30, 0.85); |
| 77 | + border-radius: 999px; |
| 78 | + box-shadow: 0 6px 16px rgba(0,0,0,.30); |
| 79 | + transition: background .2s ease, box-shadow .2s ease; |
123 | 80 | border: none; |
124 | 81 | } |
125 | | - } |
126 | | -} |
| 82 | + .ant-float-btn-default:hover, |
| 83 | + .ant-float-btn-default:hover .ant-float-btn-body { |
| 84 | + background: rgba(20, 20, 20, 0.92); |
| 85 | + box-shadow: 0 8px 22px rgba(0,0,0,.36); |
| 86 | + } |
127 | 87 |
|
128 | | -::ng-deep { |
129 | | - .chat-drag-handle .anticon { |
130 | | - font-size: 16px; |
131 | | - } |
132 | | -} |
| 88 | + .ant-float-btn-default .ant-float-btn-body::before, |
| 89 | + .ant-float-btn-default::before { |
| 90 | + content: ""; |
| 91 | + position: absolute; |
| 92 | + inset: 0; |
| 93 | + border-radius: 999px; |
| 94 | + pointer-events: none; |
| 95 | + box-shadow: |
| 96 | + inset 0 0 0 1px rgba(255,255,255,.65), |
| 97 | + 0 0 0 1px rgba(0,0,0,.75); |
| 98 | + } |
133 | 99 |
|
134 | | -@media (max-width: 480px) { |
135 | | - .chat-panel { |
136 | | - right: 6px; |
137 | | - bottom: 6px; |
138 | | - width: calc(100vw - 12px); |
139 | | - height: min(400px, calc(100dvh - 12px)); |
| 100 | + .ant-btn .anticon, |
| 101 | + .ant-float-btn .anticon { |
| 102 | + color: #fff; |
| 103 | + filter: drop-shadow(0 1px 1px rgba(0,0,0,.75)); |
| 104 | + } |
140 | 105 |
|
141 | | - &.chat-panel-expanded { |
142 | | - right: 0; |
143 | | - width: 100vw; |
144 | | - border-radius: 0; |
| 106 | + img.chat-img { |
| 107 | + width: 18px; |
| 108 | + height: 18px; |
| 109 | + opacity: .95; |
| 110 | + filter: drop-shadow(0 1px 1px rgba(0,0,0,.75)); |
145 | 111 | } |
146 | 112 | } |
147 | 113 | } |
0 commit comments