chatbot-chatgpt.css
379 lines
| 1 | #mwai-chat-id { |
| 2 | --mwai-spacing: 15px; |
| 3 | --mwai-fontSize: 15px; |
| 4 | --mwai-borderRadius: 10px; |
| 5 | --mwai-fontColor: #FFFFFF; |
| 6 | --mwai-backgroundPrimaryColor: #454654; |
| 7 | --mwai-backgroundSecondaryColor: #343541; |
| 8 | --mwai-aiAvatarBackgroundColor: #10a37f; |
| 9 | --mwai-userAvatarBackgroundColor: #135ea4; |
| 10 | } |
| 11 | |
| 12 | #mwai-chat-id .mwai-open-button { |
| 13 | position: absolute; |
| 14 | right: 0; |
| 15 | bottom: 0; |
| 16 | transition: all 0.2s ease-out; |
| 17 | z-index: 9999; |
| 18 | } |
| 19 | |
| 20 | #mwai-chat-id .mwai-open-button:hover { |
| 21 | cursor: pointer; |
| 22 | filter: hue-rotate(100deg); |
| 23 | } |
| 24 | |
| 25 | #mwai-chat-id .mwai-content { |
| 26 | background: var(--mwai-backgroundSecondaryColor); |
| 27 | color: var(--mwai-fontColor); |
| 28 | font-size: var(--mwai-fontSize); |
| 29 | border-radius: var(--mwai-borderRadius); |
| 30 | overflow: hidden; |
| 31 | display: flex; |
| 32 | flex-direction: column; |
| 33 | } |
| 34 | |
| 35 | #mwai-chat-id .mwai-conversation { |
| 36 | overflow: auto; |
| 37 | } |
| 38 | |
| 39 | #mwai-chat-id * { |
| 40 | box-sizing: border-box; |
| 41 | } |
| 42 | |
| 43 | #mwai-chat-id a { |
| 44 | color: #2196f3; |
| 45 | } |
| 46 | |
| 47 | #mwai-chat-id h1 { |
| 48 | font-size: 200%; |
| 49 | } |
| 50 | |
| 51 | #mwai-chat-id h2 { |
| 52 | font-size: 160%; |
| 53 | } |
| 54 | |
| 55 | #mwai-chat-id h3 { |
| 56 | font-size: 140%; |
| 57 | } |
| 58 | |
| 59 | #mwai-chat-id h4 { |
| 60 | font-size: 120%; |
| 61 | } |
| 62 | |
| 63 | #mwai-chat-id pre { |
| 64 | color: var(--mwai-fontColor); |
| 65 | border-radius: var(--mwai-borderRadius); |
| 66 | padding: calc(var(--mwai-spacing) * 2 / 3) var(--mwai-spacing); |
| 67 | break-after: auto; |
| 68 | font-size: 95%; |
| 69 | font-family: system-ui; |
| 70 | background: #343541; |
| 71 | } |
| 72 | |
| 73 | #mwai-chat-id pre code { |
| 74 | padding: 0 !important; |
| 75 | font-family: system-ui; |
| 76 | background: #343541; |
| 77 | } |
| 78 | |
| 79 | #mwai-chat-id ol { |
| 80 | padding: 0; |
| 81 | margin: 0 0 0 20px; |
| 82 | } |
| 83 | |
| 84 | #mwai-chat-id .mwai-reply { |
| 85 | display: flex; |
| 86 | padding: var(--mwai-spacing); |
| 87 | } |
| 88 | |
| 89 | #mwai-chat-id .mwai-ai, #mwai-chat-id .mwai-system { |
| 90 | background: var(--mwai-backgroundPrimaryColor); |
| 91 | } |
| 92 | |
| 93 | #mwai-chat-id .mwai-name { |
| 94 | color: #a0a0a0; |
| 95 | margin-right: 20px; |
| 96 | } |
| 97 | |
| 98 | #mwai-chat-id .mwai-name .mwai-avatar { |
| 99 | width: 40px; |
| 100 | height: 40px; |
| 101 | background: var(--mwai-aiAvatarBackgroundColor); |
| 102 | display: flex; |
| 103 | align-items: center; |
| 104 | justify-content: center; |
| 105 | border-radius: 5px; |
| 106 | overflow: hidden; |
| 107 | } |
| 108 | |
| 109 | #mwai-chat-id .mwai-name .mwai-avatar img { |
| 110 | max-width: 100%; |
| 111 | max-height: 100%; |
| 112 | } |
| 113 | |
| 114 | #mwai-chat-id .mwai-name .mwai-avatar.mwai-svg img { |
| 115 | width: 28px; |
| 116 | height: 28px; |
| 117 | filter: brightness(0) invert(1); |
| 118 | } |
| 119 | |
| 120 | #mwai-chat-id .mwai-user .mwai-name .mwai-avatar { |
| 121 | background: var(--mwai-userAvatarBackgroundColor); |
| 122 | } |
| 123 | |
| 124 | #mwai-chat-id .mwai-text { |
| 125 | flex: auto; |
| 126 | } |
| 127 | |
| 128 | #mwai-chat-id .mwai-text > *:first-child { |
| 129 | margin-top: 0; |
| 130 | } |
| 131 | |
| 132 | #mwai-chat-id .mwai-text > *:last-child { |
| 133 | margin-bottom: 0; |
| 134 | } |
| 135 | |
| 136 | #mwai-chat-id .mwai-input { |
| 137 | display: flex; |
| 138 | padding: var(--mwai-spacing); |
| 139 | border-top: 1px solid var(--mwai-backgroundPrimaryColor); |
| 140 | } |
| 141 | |
| 142 | #mwai-chat-id .mwai-input textarea { |
| 143 | background: var(--mwai-backgroundPrimaryColor); |
| 144 | color: var(--mwai-fontColor); |
| 145 | flex: auto; |
| 146 | padding: calc(var(--mwai-spacing) / 2) var(--mwai-spacing); |
| 147 | border: none; |
| 148 | border-radius: 5px; |
| 149 | font-size: var(--mwai-fontSize); |
| 150 | resize: none; |
| 151 | font-family: inherit; |
| 152 | line-height: calc(var(--mwai-spacing) * 2); |
| 153 | } |
| 154 | |
| 155 | #mwai-chat-id .mwai-input textarea:focus { |
| 156 | outline: none; |
| 157 | } |
| 158 | |
| 159 | #mwai-chat-id .mwai-input button { |
| 160 | background: none; |
| 161 | color: var(--mwai-fontColor); |
| 162 | background-color: var(--mwai-backgroundSecondaryColor); |
| 163 | border: 1px solid var(--mwai-backgroundPrimaryColor); |
| 164 | margin-left: var(--mwai-spacing); |
| 165 | width: 80px; |
| 166 | border-radius: 5px; |
| 167 | cursor: pointer; |
| 168 | transition: all 0.2s ease-out; |
| 169 | max-height: 60px; |
| 170 | } |
| 171 | |
| 172 | #mwai-chat-id .mwai-input button:hover { |
| 173 | background: var(--mwai-backgroundPrimaryColor); |
| 174 | } |
| 175 | |
| 176 | #mwai-chat-id button { |
| 177 | position: relative; |
| 178 | } |
| 179 | |
| 180 | #mwai-chat-id button[disabled] span { |
| 181 | display: none; |
| 182 | } |
| 183 | |
| 184 | #mwai-chat-id button[disabled]::after { |
| 185 | content: ''; |
| 186 | position: absolute; |
| 187 | width: 18px; |
| 188 | height: 18px; |
| 189 | top: 0; |
| 190 | left: 0; |
| 191 | right: 0; |
| 192 | bottom: 0; |
| 193 | margin: auto; |
| 194 | border: 3px solid transparent; |
| 195 | border-top-color: var(--mwai-fontColor); |
| 196 | border-radius: 50%; |
| 197 | animation: mwai-button-spinner 1s ease infinite; |
| 198 | } |
| 199 | |
| 200 | #mwai-chat-id.mwai-window { |
| 201 | position: fixed; |
| 202 | right: 30px; |
| 203 | bottom: 30px; |
| 204 | width: 460px; |
| 205 | z-index: 9999; |
| 206 | } |
| 207 | |
| 208 | #mwai-chat-id.mwai-window .mwai-header { |
| 209 | display: none; |
| 210 | justify-content: flex-end; |
| 211 | align-items: center; |
| 212 | } |
| 213 | |
| 214 | #mwai-chat-id.mwai-window .mwai-header .mwai-resize-button { |
| 215 | justify-content: center; |
| 216 | height: 40px; |
| 217 | width: 36px; |
| 218 | cursor: pointer; |
| 219 | display: flex; |
| 220 | justify-content: center; |
| 221 | align-items: center; |
| 222 | } |
| 223 | |
| 224 | #mwai-chat-id.mwai-window .mwai-header .mwai-resize-button:before { |
| 225 | transition: all 0.2s ease-out; |
| 226 | content: ' '; |
| 227 | cursor: pointer; |
| 228 | position: absolute; |
| 229 | height: 15px; |
| 230 | width: 15px; |
| 231 | opacity: 0.75; |
| 232 | border: 2px solid var(--mwai-fontColor); |
| 233 | } |
| 234 | |
| 235 | #mwai-chat-id.mwai-window .mwai-header .mwai-resize-button:hover:before { |
| 236 | width: 20px; |
| 237 | height: 20px; |
| 238 | } |
| 239 | |
| 240 | #mwai-chat-id.mwai-window .mwai-header .mwai-close-button { |
| 241 | justify-content: center; |
| 242 | height: 40px; |
| 243 | width: 35px; |
| 244 | cursor: pointer; |
| 245 | } |
| 246 | |
| 247 | #mwai-chat-id.mwai-window .mwai-header .mwai-close-button:before, #mwai-chat-id.mwai-window .mwai-header .mwai-close-button:after { |
| 248 | content: ' '; |
| 249 | cursor: pointer; |
| 250 | position: absolute; |
| 251 | height: 30px; |
| 252 | width: 2px; |
| 253 | background-color: var(--mwai-fontColor); |
| 254 | opacity: 0.75; |
| 255 | } |
| 256 | |
| 257 | #mwai-chat-id.mwai-window .mwai-header .mwai-close-button:before { |
| 258 | transition: all 0.2s ease-out; |
| 259 | transform: translate(16px, 5px) rotate(45deg); |
| 260 | } |
| 261 | |
| 262 | #mwai-chat-id.mwai-window .mwai-header .mwai-close-button:after { |
| 263 | transition: all 0.2s ease-out; |
| 264 | transform: translate(16px, 5px) rotate(-45deg); |
| 265 | } |
| 266 | |
| 267 | #mwai-chat-id.mwai-window .mwai-header .mwai-close-button:hover:before { |
| 268 | opacity: 1; |
| 269 | transform: translate(16px, 5px) rotate(135deg); |
| 270 | } |
| 271 | |
| 272 | #mwai-chat-id.mwai-window .mwai-header .mwai-close-button:hover:after { |
| 273 | opacity: 1; |
| 274 | transform: translate(16px, 5px) rotate(45deg); |
| 275 | } |
| 276 | |
| 277 | #mwai-chat-id.mwai-window .mwai-content { |
| 278 | display: flex; |
| 279 | opacity: 0; |
| 280 | max-height: 40vh; |
| 281 | } |
| 282 | |
| 283 | #mwai-chat-id .mwai-gallery { |
| 284 | display: grid; |
| 285 | grid-template-columns: repeat(3, 1fr); |
| 286 | grid-gap: 5px; |
| 287 | } |
| 288 | |
| 289 | #mwai-chat-id .mwai-gallery img { |
| 290 | width: 100%; |
| 291 | } |
| 292 | |
| 293 | #mwai-chat-id.mwai-window.mwai-fullscreen .mwai-resize-button:before { |
| 294 | width: 20px; |
| 295 | height: 20px; |
| 296 | } |
| 297 | |
| 298 | #mwai-chat-id.mwai-window.mwai-fullscreen .mwai-resize-button:hover:before { |
| 299 | width: 15px; |
| 300 | height: 15px; |
| 301 | } |
| 302 | |
| 303 | #mwai-chat-id.mwai-fullscreen:not(.mwai-window), #mwai-chat-id.mwai-fullscreen.mwai-window.mwai-open { |
| 304 | position: fixed; |
| 305 | left: 0; |
| 306 | right: 0; |
| 307 | bottom: 0; |
| 308 | top: 0; |
| 309 | width: inherit; |
| 310 | height: inherit; |
| 311 | max-height: inherit; |
| 312 | max-width: inherit; |
| 313 | display: flex; |
| 314 | flex-direction: column; |
| 315 | margin: 0; |
| 316 | } |
| 317 | |
| 318 | #mwai-chat-id.mwai-fullscreen:not(.mwai-window) .mwai-content, #mwai-chat-id.mwai-fullscreen.mwai-window.mwai-open .mwai-content { |
| 319 | height: 100%; |
| 320 | max-height: inherit; |
| 321 | border-radius: inherit; |
| 322 | } |
| 323 | |
| 324 | #mwai-chat-id.mwai-fullscreen:not(.mwai-window) .mwai-content .mwai-conversation, #mwai-chat-id.mwai-fullscreen.mwai-window.mwai-open .mwai-content .mwai-conversation { |
| 325 | flex: auto; |
| 326 | } |
| 327 | |
| 328 | #mwai-chat-id.mwai-window.mwai-open .mwai-header { |
| 329 | display: flex; |
| 330 | } |
| 331 | |
| 332 | #mwai-chat-id.mwai-window.mwai-open .mwai-content { |
| 333 | display: flex; |
| 334 | transition: opacity 200ms ease-in-out 0s; |
| 335 | opacity: 1; |
| 336 | } |
| 337 | |
| 338 | #mwai-chat-id.mwai-window.mwai-open .mwai-open-button { |
| 339 | display: none; |
| 340 | } |
| 341 | |
| 342 | @media (max-width: 760px) { |
| 343 | #mwai-chat-id.mwai-window { |
| 344 | left: 10px; |
| 345 | right: 10px; |
| 346 | bottom: 10px; |
| 347 | width: inherit; |
| 348 | } |
| 349 | #mwai-chat-id .mwai-reply { |
| 350 | flex-direction: column; |
| 351 | } |
| 352 | #mwai-chat-id .mwai-input { |
| 353 | flex-direction: column; |
| 354 | } |
| 355 | #mwai-chat-id .mwai-input button { |
| 356 | margin: 15px 0 0 0; |
| 357 | height: 40px; |
| 358 | width: inherit; |
| 359 | } |
| 360 | #mwai-chat-id .mwai-name { |
| 361 | margin-right: 0; |
| 362 | max-width: inherit; |
| 363 | } |
| 364 | } |
| 365 | |
| 366 | @keyframes mwai-button-spinner { |
| 367 | from { |
| 368 | transform: rotate(0turn); |
| 369 | } |
| 370 | to { |
| 371 | transform: rotate(1turn); |
| 372 | } |
| 373 | } |
| 374 | |
| 375 | .admin-bar #mwai-chat-id.mwai-fullscreen:not(.mwai-window), |
| 376 | .admin-bar #mwai-chat-id.mwai-fullscreen.mwai-window.mwai-open { |
| 377 | top: 32px; |
| 378 | } |
| 379 |