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