ChatGPT.module.css
3 years ago
ChatGPT.module.scss
3 years ago
iOSDark.module.css
3 years ago
iOSDark.module.scss
3 years ago
ChatGPT.module.scss
643 lines
| 1 | .mwai-chat { |
| 2 | --mwai-spacing: 15px; |
| 3 | --mwai-fontSize: 15px; |
| 4 | --mwai-lineHeight: 1.5; |
| 5 | --mwai-borderRadius: 10px; |
| 6 | --mwai-fontColor: #FFFFFF; |
| 7 | --mwai-backgroundPrimaryColor: #454654; |
| 8 | --mwai-backgroundSecondaryColor: #343541; |
| 9 | --mwai-userAvatarBackgroundColor: #135ea4; |
| 10 | --mwai-headerButtonsColor: #FFFFFF; |
| 11 | --mwai-width: 460px; |
| 12 | --mwai-maxHeight: 40vh; |
| 13 | |
| 14 | .mwai-open-button { |
| 15 | position: absolute; |
| 16 | right: 0; |
| 17 | bottom: 0; |
| 18 | transition: all 0.2s ease-out; |
| 19 | z-index: 9999; |
| 20 | display: flex; |
| 21 | flex-direction: column; |
| 22 | align-items: end; |
| 23 | |
| 24 | .mwai-icon-text { |
| 25 | background: var(--mwai-backgroundPrimaryColor); |
| 26 | color: var(--mwai-headerButtonsColor); |
| 27 | max-width: 200px; |
| 28 | font-size: 13px; |
| 29 | margin-bottom: 15px; |
| 30 | padding: 5px 10px; |
| 31 | border-radius: 8px; |
| 32 | } |
| 33 | |
| 34 | &:hover { |
| 35 | cursor: pointer; |
| 36 | filter: saturate(2.5) hue-rotate(5deg); |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | .mwai-content { |
| 41 | background: var(--mwai-backgroundSecondaryColor); |
| 42 | color: var(--mwai-fontColor); |
| 43 | font-size: var(--mwai-fontSize); |
| 44 | border-radius: var(--mwai-borderRadius); |
| 45 | overflow: hidden; |
| 46 | display: flex; |
| 47 | flex-direction: column; |
| 48 | } |
| 49 | |
| 50 | .mwai-conversation { |
| 51 | overflow: auto; |
| 52 | } |
| 53 | |
| 54 | * { |
| 55 | box-sizing: border-box; |
| 56 | } |
| 57 | |
| 58 | .mwai-reply { |
| 59 | display: flex; |
| 60 | padding: var(--mwai-spacing); |
| 61 | position: relative; |
| 62 | line-height: var(--mwai-lineHeight); |
| 63 | border-bottom: 1px solid var(--mwai-backgroundPrimaryColor); |
| 64 | |
| 65 | .mwai-copy-button { |
| 66 | opacity: 0; |
| 67 | transition: all 0.3s ease-out; |
| 68 | width: 22px; |
| 69 | height: 22px; |
| 70 | position: absolute; |
| 71 | right: var(--mwai-spacing); |
| 72 | |
| 73 | .mwai-copy-button-one { |
| 74 | position: absolute; |
| 75 | width: 16px; |
| 76 | height: 16px; |
| 77 | margin-top: 0px; |
| 78 | margin-left: 0px; |
| 79 | background: white; |
| 80 | opacity: 0.4; |
| 81 | transition: all 0.2s ease-in; |
| 82 | cursor: pointer; |
| 83 | border-radius: 2px; |
| 84 | } |
| 85 | |
| 86 | .mwai-copy-button-two { |
| 87 | position: absolute; |
| 88 | width: 16px; |
| 89 | height: 16px; |
| 90 | margin-top: 6px; |
| 91 | margin-left: 6px; |
| 92 | background: white; |
| 93 | opacity: 0.6; |
| 94 | transition: all 0.2s ease-in; |
| 95 | cursor: pointer; |
| 96 | border-radius: 2px; |
| 97 | } |
| 98 | |
| 99 | &:hover { |
| 100 | .mwai-copy-button-one { |
| 101 | opacity: 0.6; |
| 102 | margin-top: 0px; |
| 103 | margin-left: 6px; |
| 104 | } |
| 105 | |
| 106 | .mwai-copy-button-two { |
| 107 | opacity: 1; |
| 108 | margin-top: 6px; |
| 109 | margin-left: 0px; |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | &.mwai-animate { |
| 114 | |
| 115 | .mwai-copy-button-one { |
| 116 | opacity: 0; |
| 117 | } |
| 118 | |
| 119 | .mwai-copy-button-two { |
| 120 | width: 18px; |
| 121 | height: 18px; |
| 122 | margin-top: 2px; |
| 123 | margin-left: 2px; |
| 124 | opacity: 1; |
| 125 | } |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | &:hover { |
| 130 | .mwai-copy-button { |
| 131 | display: block; |
| 132 | opacity: 1; |
| 133 | } |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | .mwai-ai, .mwai-system { |
| 138 | background: var(--mwai-backgroundPrimaryColor); |
| 139 | } |
| 140 | |
| 141 | .mwai-name { |
| 142 | color: var(--mwai-fontColor); |
| 143 | margin-right: 5px; |
| 144 | |
| 145 | .mwai-name-text { |
| 146 | opacity: 0.50; |
| 147 | white-space: nowrap; |
| 148 | } |
| 149 | |
| 150 | .mwai-avatar { |
| 151 | margin-right: 10px; |
| 152 | width: 40px; |
| 153 | height: 40px; |
| 154 | display: flex; |
| 155 | align-items: center; |
| 156 | justify-content: center; |
| 157 | border-radius: 5px; |
| 158 | overflow: hidden; |
| 159 | |
| 160 | img { |
| 161 | max-width: 100%; |
| 162 | max-height: 100%; |
| 163 | } |
| 164 | |
| 165 | &.mwai-svg img { |
| 166 | width: 28px; |
| 167 | height: 28px; |
| 168 | filter: brightness(0) invert(1); |
| 169 | } |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | .mwai-user { |
| 174 | |
| 175 | .mwai-name { |
| 176 | |
| 177 | .mwai-avatar { |
| 178 | background: var(--mwai-userAvatarBackgroundColor); |
| 179 | } |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | .mwai-text { |
| 184 | flex: auto; |
| 185 | |
| 186 | *:first-child { |
| 187 | margin-top: 0; |
| 188 | } |
| 189 | |
| 190 | *:last-child { |
| 191 | margin-bottom: 0; |
| 192 | } |
| 193 | |
| 194 | a { |
| 195 | color: #2196f3; |
| 196 | } |
| 197 | |
| 198 | h1 { |
| 199 | font-size: 200%; |
| 200 | } |
| 201 | |
| 202 | h2 { |
| 203 | font-size: 160%; |
| 204 | } |
| 205 | |
| 206 | h3 { |
| 207 | font-size: 140%; |
| 208 | } |
| 209 | |
| 210 | h4 { |
| 211 | font-size: 120%; |
| 212 | } |
| 213 | |
| 214 | p { |
| 215 | font-size: var(--mwai-fontSize); |
| 216 | line-height: var(--mwai-lineHeight); |
| 217 | |
| 218 | code { |
| 219 | background: var(--mwai-backgroundSecondaryColor); |
| 220 | padding: 2px 6px; |
| 221 | border-radius: 8px; |
| 222 | font-size: 90%; |
| 223 | font-family: system-ui; |
| 224 | } |
| 225 | } |
| 226 | |
| 227 | pre { |
| 228 | color: var(--mwai-fontColor); |
| 229 | border-radius: var(--mwai-borderRadius); |
| 230 | padding: calc(var(--mwai-spacing) * 2 / 3) var(--mwai-spacing); |
| 231 | break-after: auto; |
| 232 | font-size: 95%; |
| 233 | max-width: 100%; |
| 234 | width: 100%; |
| 235 | font-family: system-ui; |
| 236 | background: #343541; |
| 237 | |
| 238 | code { |
| 239 | padding: 0 !important; |
| 240 | font-family: system-ui; |
| 241 | background: #343541; |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | ol { |
| 246 | padding: 0; |
| 247 | margin: 0 0 0 20px; |
| 248 | } |
| 249 | |
| 250 | table { |
| 251 | width: 100%; |
| 252 | border: 2px solid var(--mwai-backgroundSecondaryColor); |
| 253 | border-collapse: collapse |
| 254 | } |
| 255 | |
| 256 | thead { |
| 257 | background: var(--mwai-backgroundSecondaryColor); |
| 258 | } |
| 259 | |
| 260 | tr, td { |
| 261 | padding: 2px 5px; |
| 262 | } |
| 263 | |
| 264 | td { |
| 265 | border: 2px solid var(--mwai-backgroundSecondaryColor); |
| 266 | } |
| 267 | |
| 268 | .mwai-typewriter { |
| 269 | display: inline-block; |
| 270 | |
| 271 | > :first-child { |
| 272 | margin-top: 0; |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | >* { |
| 277 | &:first-child { |
| 278 | margin-top: 0; |
| 279 | |
| 280 | } |
| 281 | &:last-child { |
| 282 | margin-bottom: 0; |
| 283 | } |
| 284 | } |
| 285 | } |
| 286 | |
| 287 | .mwai-system .mwai-name { |
| 288 | display: none; |
| 289 | } |
| 290 | |
| 291 | .mwai-input { |
| 292 | display: flex; |
| 293 | padding: var(--mwai-spacing); |
| 294 | border-top: 1px solid var(--mwai-backgroundPrimaryColor); |
| 295 | |
| 296 | textarea { |
| 297 | background: var(--mwai-backgroundPrimaryColor); |
| 298 | color: var(--mwai-fontColor); |
| 299 | flex: auto; |
| 300 | padding: calc(var(--mwai-spacing) / 2) var(--mwai-spacing); |
| 301 | border: none; |
| 302 | border-radius: 5px; |
| 303 | font-size: var(--mwai-fontSize); |
| 304 | resize: none; |
| 305 | font-family: inherit; |
| 306 | line-height: calc(var(--mwai-spacing) * 2); |
| 307 | margin: 0; |
| 308 | overflow: hidden; |
| 309 | |
| 310 | &:focus { |
| 311 | outline: none; |
| 312 | } |
| 313 | |
| 314 | &::placeholder { |
| 315 | color: var(--mwai-fontColor); |
| 316 | opacity: 0.5; |
| 317 | } |
| 318 | } |
| 319 | } |
| 320 | |
| 321 | .mwai-compliance { |
| 322 | opacity: 0.50; |
| 323 | margin-top: calc( -1 * var(--mwai-spacing)); |
| 324 | padding: calc(var(--mwai-spacing) / 1.5) var(--mwai-spacing); |
| 325 | font-size: smaller; |
| 326 | color: var(--mwai-fontColor); |
| 327 | text-align: left; |
| 328 | } |
| 329 | |
| 330 | button { |
| 331 | background: none; |
| 332 | color: var(--mwai-fontColor); |
| 333 | background-color: var(--mwai-backgroundSecondaryColor); |
| 334 | border: 1px solid var(--mwai-backgroundPrimaryColor); |
| 335 | margin-left: var(--mwai-spacing); |
| 336 | width: 90px; |
| 337 | border-radius: 5px; |
| 338 | cursor: pointer; |
| 339 | transition: all 0.2s ease-out; |
| 340 | display: flex; |
| 341 | align-items: center; |
| 342 | justify-content: center; |
| 343 | font-size: 90%; |
| 344 | |
| 345 | .mwai-timer { |
| 346 | margin-left: 5px; |
| 347 | margin-right: 5px; |
| 348 | font-size: 11px; |
| 349 | } |
| 350 | |
| 351 | &:hover { |
| 352 | background: var(--mwai-backgroundPrimaryColor); |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | button { |
| 357 | position: relative; |
| 358 | } |
| 359 | |
| 360 | button[disabled]] { |
| 361 | |
| 362 | span { |
| 363 | display: none; |
| 364 | } |
| 365 | |
| 366 | &::before { |
| 367 | content: ''; |
| 368 | width: 18px; |
| 369 | height: 18px; |
| 370 | margin: auto; |
| 371 | border: 3px solid transparent; |
| 372 | border-top-color: var(--mwai-fontColor); |
| 373 | border-radius: 50%; |
| 374 | animation: mwai-button-spinner 1s ease infinite; |
| 375 | } |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | .mwai-chat.mwai-window { |
| 380 | position: fixed; |
| 381 | right: 30px; |
| 382 | bottom: 30px; |
| 383 | width: var(--mwai-width); |
| 384 | z-index: 9999; |
| 385 | |
| 386 | .mwai-header { |
| 387 | display: none; |
| 388 | justify-content: flex-end; |
| 389 | align-items: center; |
| 390 | |
| 391 | .mwai-buttons { |
| 392 | display: flex; |
| 393 | align-items: center; |
| 394 | margin-bottom: 5px; |
| 395 | |
| 396 | .mwai-resize-button { |
| 397 | justify-content: center; |
| 398 | height: 32px; |
| 399 | width: 33px; |
| 400 | cursor: pointer; |
| 401 | display: flex; |
| 402 | justify-content: center; |
| 403 | align-items: center; |
| 404 | background-color: var(--mwai-backgroundSecondaryColor); |
| 405 | border-radius: var(--mwai-borderRadius); |
| 406 | |
| 407 | &:before { |
| 408 | transition: all 0.2s ease-out; |
| 409 | content: ' '; |
| 410 | cursor: pointer; |
| 411 | position: absolute; |
| 412 | height: 13px; |
| 413 | width: 13px; |
| 414 | opacity: 0.75; |
| 415 | border: 2px solid var(--mwai-headerButtonsColor); |
| 416 | } |
| 417 | |
| 418 | &:hover:before { |
| 419 | width: 16px; |
| 420 | height: 16px; |
| 421 | } |
| 422 | } |
| 423 | |
| 424 | .mwai-close-button { |
| 425 | margin-left: 5px; |
| 426 | justify-content: center; |
| 427 | height: 32px; |
| 428 | width: 33px; |
| 429 | cursor: pointer; |
| 430 | background-color: var(--mwai-backgroundSecondaryColor); |
| 431 | border-radius: var(--mwai-borderRadius); |
| 432 | |
| 433 | &:before { |
| 434 | transition: all 0.2s ease-out; |
| 435 | transform: translate(16px, 5px) rotate(45deg); |
| 436 | } |
| 437 | &:after { |
| 438 | transition: all 0.2s ease-out; |
| 439 | transform: translate(16px, 5px) rotate(-45deg); |
| 440 | } |
| 441 | } |
| 442 | |
| 443 | .mwai-close-button:before, .mwai-close-button:after { |
| 444 | content: ' '; |
| 445 | cursor: pointer; |
| 446 | position: absolute; |
| 447 | height: 22px; |
| 448 | width: 2px; |
| 449 | background-color: var(--mwai-headerButtonsColor); |
| 450 | opacity: 0.75; |
| 451 | } |
| 452 | |
| 453 | .mwai-close-button:hover { |
| 454 | &:before { |
| 455 | opacity: 1; |
| 456 | transform: translate(16px, 5px) rotate(135deg); |
| 457 | } |
| 458 | &:after { |
| 459 | opacity: 1; |
| 460 | transform: translate(16px, 5px) rotate(45deg); |
| 461 | } |
| 462 | } |
| 463 | |
| 464 | } |
| 465 | } |
| 466 | |
| 467 | .mwai-content { |
| 468 | display: none; |
| 469 | opacity: 0; |
| 470 | max-height: var(--mwai-maxHeight); |
| 471 | } |
| 472 | |
| 473 | &.mwai-bottom-left { |
| 474 | bottom: 30px; |
| 475 | right: inherit; |
| 476 | left: 30px; |
| 477 | |
| 478 | .mwai-open-button { |
| 479 | right: inherit; |
| 480 | left: 0; |
| 481 | } |
| 482 | } |
| 483 | |
| 484 | &.mwai-top-right { |
| 485 | top: 30px; |
| 486 | bottom: inherit; |
| 487 | right: 30px; |
| 488 | |
| 489 | .mwai-open-button { |
| 490 | top: 0; |
| 491 | bottom: inherit; |
| 492 | } |
| 493 | } |
| 494 | |
| 495 | &.mwai-top-left { |
| 496 | top: 30px; |
| 497 | bottom: inherit; |
| 498 | right: inherit; |
| 499 | left: 30px; |
| 500 | |
| 501 | .mwai-open-button { |
| 502 | top: 0; |
| 503 | bottom: inherit; |
| 504 | right: inherit; |
| 505 | left: 0; |
| 506 | } |
| 507 | } |
| 508 | } |
| 509 | |
| 510 | // GALLERY |
| 511 | |
| 512 | .mwai-chat .mwai-gallery { |
| 513 | display: grid; |
| 514 | grid-template-columns: repeat(3, 1fr); |
| 515 | grid-gap: 5px; |
| 516 | |
| 517 | img { |
| 518 | width: 100%; |
| 519 | } |
| 520 | } |
| 521 | |
| 522 | // FULLSCREEN & WINDOW |
| 523 | |
| 524 | .mwai-chat.mwai-window.mwai-fullscreen { |
| 525 | |
| 526 | .mwai-header { |
| 527 | |
| 528 | .mwai-buttons { |
| 529 | margin-bottom: 0px; |
| 530 | |
| 531 | .mwai-resize-button { |
| 532 | &:before { |
| 533 | width: 16px; |
| 534 | height: 16px; |
| 535 | } |
| 536 | |
| 537 | &:hover:before { |
| 538 | width: 13px; |
| 539 | height: 13px; |
| 540 | } |
| 541 | } |
| 542 | |
| 543 | .mwai-close-button { |
| 544 | margin-left: -5px; |
| 545 | } |
| 546 | } |
| 547 | } |
| 548 | } |
| 549 | |
| 550 | .mwai-chat.mwai-fullscreen:not(.mwai-window), .mwai-chat.mwai-fullscreen.mwai-window.mwai-open { |
| 551 | position: fixed; |
| 552 | left: 0 !important; |
| 553 | right: 0 !important; |
| 554 | bottom: 0 !important; |
| 555 | top: 0 !important; |
| 556 | width: inherit; |
| 557 | height: inherit; |
| 558 | max-height: inherit; |
| 559 | max-width: inherit; |
| 560 | display: flex; |
| 561 | flex-direction: column; |
| 562 | margin: 0; |
| 563 | z-index: 999999; |
| 564 | background-color: var(--mwai-backgroundSecondaryColor); |
| 565 | |
| 566 | .mwai-content { |
| 567 | height: 100%; |
| 568 | max-height: inherit; |
| 569 | border-radius: inherit; |
| 570 | |
| 571 | .mwai-conversation { |
| 572 | flex: auto; |
| 573 | } |
| 574 | } |
| 575 | } |
| 576 | |
| 577 | .mwai-chat.mwai-window.mwai-open { |
| 578 | |
| 579 | .mwai-header { |
| 580 | display: flex; |
| 581 | } |
| 582 | |
| 583 | .mwai-content { |
| 584 | display: flex; |
| 585 | transition: opacity 200ms ease-in-out 0s; |
| 586 | opacity: 1; |
| 587 | } |
| 588 | |
| 589 | .mwai-open-button { |
| 590 | display: none; |
| 591 | } |
| 592 | } |
| 593 | |
| 594 | @media (max-width: 760px) { |
| 595 | |
| 596 | .mwai-chat { |
| 597 | |
| 598 | &.mwai-window { |
| 599 | left: 10px; |
| 600 | right: 10px; |
| 601 | bottom: 10px; |
| 602 | width: calc(100% - 20px); |
| 603 | z-index: 9999999999; |
| 604 | } |
| 605 | |
| 606 | .mwai-reply { |
| 607 | flex-direction: column; |
| 608 | } |
| 609 | |
| 610 | .mwai-input { |
| 611 | flex-direction: column; |
| 612 | |
| 613 | button { |
| 614 | margin: 15px 0 0 0; |
| 615 | height: 40px; |
| 616 | width: inherit; |
| 617 | } |
| 618 | } |
| 619 | |
| 620 | .mwai-name { |
| 621 | margin-right: 0; |
| 622 | max-width: inherit; |
| 623 | } |
| 624 | } |
| 625 | } |
| 626 | |
| 627 | @keyframes mwai-button-spinner { |
| 628 | |
| 629 | from { |
| 630 | transform: rotate(0turn); |
| 631 | } |
| 632 | to { |
| 633 | transform: rotate(1turn); |
| 634 | } |
| 635 | } |
| 636 | |
| 637 | // WordPress Admin Bar |
| 638 | |
| 639 | .admin-bar .mwai-chat.mwai-fullscreen:not(.mwai-window), |
| 640 | .admin-bar .mwai-chat.mwai-fullscreen.mwai-window.mwai-open { |
| 641 | top: 32px; |
| 642 | } |
| 643 |