ym923 | 3bf06b1 | 2025-06-09 18:18:51 +0800 | [diff] [blame] | 1 | /* chat.css */ |
| 2 | .chatbox-container { |
| 3 | display: flex; |
| 4 | flex-direction: column; |
| 5 | height: 100%; |
| 6 | background: #fafafa; |
| 7 | border: 1px solid #d9d9d9; |
| 8 | border-radius: 10px; |
| 9 | overflow: hidden; |
| 10 | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); |
| 11 | } |
| 12 | |
| 13 | .chatbox-header { |
| 14 | padding: 16px; |
| 15 | background-color: #f0f5ff; |
| 16 | border-bottom: 1px solid #adc6ff; |
| 17 | text-align: center; |
| 18 | } |
| 19 | |
| 20 | .chatbox-content { |
| 21 | flex: 1; |
| 22 | padding: 16px; |
| 23 | background-color: #fff; |
| 24 | overflow-y: auto; |
| 25 | scrollbar-width: thin; |
| 26 | scrollbar-color: #91d5ff transparent; |
| 27 | } |
| 28 | |
| 29 | .chatbox-content::-webkit-scrollbar { |
| 30 | width: 8px; |
| 31 | } |
| 32 | |
| 33 | .chatbox-content::-webkit-scrollbar-thumb { |
| 34 | background-color: #91d5ff; |
| 35 | border-radius: 4px; |
| 36 | } |
| 37 | |
| 38 | .chatbox-content::-webkit-scrollbar-track { |
| 39 | background: transparent; |
| 40 | } |
| 41 | |
| 42 | .no-messages { |
| 43 | color: #999; |
| 44 | text-align: center; |
| 45 | margin-top: 40px; |
| 46 | font-size: 14px; |
| 47 | } |
| 48 | |
| 49 | .chat-message { |
| 50 | display: flex; |
| 51 | align-items: flex-end; |
| 52 | margin-bottom: 10px; |
| 53 | gap: 8px; |
| 54 | max-width: 100%; |
| 55 | } |
| 56 | |
| 57 | .chat-message.sender { |
| 58 | justify-content: flex-end; |
| 59 | } |
| 60 | |
| 61 | .chat-message.receiver { |
| 62 | justify-content: flex-start; |
| 63 | } |
| 64 | |
| 65 | .message-bubble-wrapper { |
| 66 | max-width: 75%; |
| 67 | } |
| 68 | |
| 69 | .message-bubble { |
| 70 | padding: 10px 14px; |
| 71 | border-radius: 14px; |
| 72 | font-size: 14px; |
| 73 | word-break: break-word; |
| 74 | box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); |
| 75 | } |
| 76 | |
| 77 | .chat-message.sender .message-bubble { |
| 78 | background-color: #69c0ff; |
| 79 | color: #fff; |
| 80 | border-bottom-right-radius: 0; |
| 81 | } |
| 82 | |
| 83 | .chat-message.receiver .message-bubble { |
| 84 | background-color: #e6f7ff; |
| 85 | color: #000; |
| 86 | border-bottom-left-radius: 0; |
| 87 | } |
| 88 | |
| 89 | .message-time { |
| 90 | font-size: 10px; |
| 91 | color: #666; |
| 92 | margin-top: 4px; |
| 93 | text-align: right; |
| 94 | } |
| 95 | |
| 96 | .avatar { |
| 97 | flex-shrink: 0; |
| 98 | user-select: none; |
| 99 | box-shadow: 0 0 4px rgba(0, 0, 0, 0.1); |
| 100 | } |
| 101 | |
| 102 | .chatbox-footer { |
| 103 | display: flex; |
| 104 | padding: 12px; |
| 105 | border-top: 1px solid #f0f0f0; |
| 106 | background-color: #fff; |
| 107 | gap: 8px; |
| 108 | align-items: flex-end; |
| 109 | } |
| 110 | |
| 111 | .chat-input { |
| 112 | flex: 1; |
| 113 | border-radius: 8px; |
| 114 | resize: none; |
| 115 | } |
| 116 | |
| 117 | .send-btn { |
| 118 | min-width: 80px; |
| 119 | border-radius: 8px; |
| 120 | height: 44px; |
| 121 | } |
| 122 | |
| 123 | .emoji-btn { |
| 124 | background: white; |
| 125 | border: none; |
| 126 | padding: 6px; |
| 127 | border-radius: 8px; |
| 128 | color: #666; |
| 129 | font-size: 18px; |
| 130 | cursor: pointer; |
| 131 | height: 44px; |
| 132 | display: flex; |
| 133 | align-items: center; |
| 134 | justify-content: center; |
| 135 | } |
| 136 | |
| 137 | .emoji-btn:hover { |
| 138 | background-color: #f0f0f0; |
| 139 | color: #333; |
| 140 | } |
| 141 | |
| 142 | .emoji-picker { |
| 143 | display: grid; |
| 144 | grid-template-columns: repeat(8, 1fr); |
| 145 | gap: 6px; |
| 146 | padding: 10px; |
| 147 | width: 280px; |
| 148 | max-height: 260px; |
| 149 | overflow-y: auto; |
| 150 | } |
| 151 | |
| 152 | .emoji-item { |
| 153 | font-size: 20px; |
| 154 | padding: 4px; |
| 155 | cursor: pointer; |
| 156 | text-align: center; |
| 157 | transition: all 0.2s ease; |
| 158 | } |
| 159 | |
| 160 | .emoji-item:hover { |
| 161 | transform: scale(1.2); |
| 162 | background: #f0f9ff; |
| 163 | border-radius: 4px; |
| 164 | } |
| 165 | |
| 166 | .emoji-popover .ant-popover-inner { |
| 167 | padding: 0; |
| 168 | border-radius: 8px; |
| 169 | box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); |
| 170 | } |
| 171 | |
| 172 | .emoji-popover .ant-popover-title { |
| 173 | padding: 8px; |
| 174 | border-bottom: 1px solid #f0f0f0; |
| 175 | font-weight: bold; |
| 176 | background-color: #f9f9f9; |
| 177 | } |
| 178 | |
| 179 | /* 响应式调整 */ |
| 180 | @media (max-width: 768px) { |
| 181 | .chatbox-container { |
| 182 | border-radius: 0; |
| 183 | border: none; |
| 184 | } |
| 185 | |
| 186 | .chatbox-header { |
| 187 | padding: 12px; |
| 188 | } |
| 189 | |
| 190 | .chatbox-content { |
| 191 | padding: 12px; |
| 192 | } |
| 193 | |
| 194 | .message-bubble-wrapper { |
| 195 | max-width: 85%; |
| 196 | } |
| 197 | |
| 198 | .chatbox-footer { |
| 199 | padding: 8px; |
| 200 | gap: 6px; |
| 201 | } |
| 202 | |
| 203 | .emoji-picker { |
| 204 | width: 240px; |
| 205 | grid-template-columns: repeat(7, 1fr); |
| 206 | } |
| 207 | |
| 208 | .send-btn { |
| 209 | min-width: 60px; |
| 210 | height: 40px; |
| 211 | } |
| 212 | |
| 213 | .emoji-btn { |
| 214 | height: 40px; |
| 215 | } |
| 216 | } |