icons
2 years ago
sass
2 years ago
ChatGPT.module.css
2 years ago
ChatGPT.module.scss
2 years ago
Messages.module.css
2 years ago
Messages.module.scss
2 years ago
_codeDark.scss
3 years ago
_codeLight.scss
3 years ago
_common.scss
2 years ago
_copybutton.scss
3 years ago
chatgpt.css
2 years ago
messages.css
2 years ago
_common.scss
304 lines
| 1 | // main: ChatGPT.module.scss,Messages.module.scss |
| 2 | |
| 3 | .mwai-text { |
| 4 | |
| 5 | img { |
| 6 | max-width: 100%; |
| 7 | } |
| 8 | |
| 9 | div { |
| 10 | p:first-child { |
| 11 | margin-top: 0; |
| 12 | } |
| 13 | p:last-child { |
| 14 | margin-bottom: 0; |
| 15 | } |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | // The icon when the chat window is closed. |
| 20 | |
| 21 | .mwai-open-button { |
| 22 | position: absolute; |
| 23 | right: 0; |
| 24 | bottom: 0; |
| 25 | transition: all 0.2s ease-out; |
| 26 | z-index: 9999; |
| 27 | display: flex; |
| 28 | flex-direction: column; |
| 29 | align-items: end; |
| 30 | |
| 31 | .mwai-icon-text { |
| 32 | background: var(--mwai-iconTextBackgroundColor); |
| 33 | color: var(--mwai-iconTextColor); |
| 34 | max-width: 200px; |
| 35 | font-size: 13px; |
| 36 | margin-bottom: 15px; |
| 37 | padding: 5px 10px; |
| 38 | border-radius: 8px; |
| 39 | } |
| 40 | |
| 41 | img { |
| 42 | filter: drop-shadow(0px 0px 15px rgba(0, 0, 0, 0.15)); |
| 43 | } |
| 44 | |
| 45 | &:hover { |
| 46 | cursor: pointer; |
| 47 | filter: saturate(2.5) hue-rotate(5deg); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | // Handle the chat window and fullscreen. |
| 52 | // Let's keep this common for all themes. |
| 53 | |
| 54 | .mwai-window { |
| 55 | position: fixed; |
| 56 | right: 30px; |
| 57 | bottom: 30px; |
| 58 | width: var(--mwai-width); |
| 59 | z-index: 9999; |
| 60 | |
| 61 | .mwai-header { |
| 62 | display: none; |
| 63 | justify-content: flex-end; |
| 64 | align-items: center; |
| 65 | border-radius: var(--mwai-borderRadius) var(--mwai-borderRadius) 0 0; |
| 66 | background: var(--mwai-backgroundHeaderColor); |
| 67 | |
| 68 | .mwai-buttons { |
| 69 | display: flex; |
| 70 | align-items: center; |
| 71 | |
| 72 | .mwai-resize-button { |
| 73 | justify-content: center; |
| 74 | height: 32px; |
| 75 | width: 22px; |
| 76 | cursor: pointer; |
| 77 | display: flex; |
| 78 | justify-content: center; |
| 79 | align-items: center; |
| 80 | |
| 81 | &:before { |
| 82 | transition: all 0.2s ease-out; |
| 83 | content: ' '; |
| 84 | cursor: pointer; |
| 85 | position: absolute; |
| 86 | height: 13px; |
| 87 | width: 13px; |
| 88 | border: 1px solid var(--mwai-headerButtonsColor); |
| 89 | } |
| 90 | |
| 91 | &:hover:before { |
| 92 | width: 16px; |
| 93 | height: 16px; |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | .mwai-close-button { |
| 98 | justify-content: center; |
| 99 | height: 32px; |
| 100 | width: 33px; |
| 101 | cursor: pointer; |
| 102 | border-radius: var(--mwai-borderRadius); |
| 103 | |
| 104 | &:before { |
| 105 | transition: all 0.2s ease-out; |
| 106 | transform: translate(16px, 5px) rotate(45deg); |
| 107 | } |
| 108 | &:after { |
| 109 | transition: all 0.2s ease-out; |
| 110 | transform: translate(16px, 5px) rotate(-45deg); |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | .mwai-close-button:before, .mwai-close-button:after { |
| 115 | content: ' '; |
| 116 | cursor: pointer; |
| 117 | position: absolute; |
| 118 | height: 22px; |
| 119 | width: 1px; |
| 120 | background-color: var(--mwai-headerButtonsColor); |
| 121 | } |
| 122 | |
| 123 | .mwai-close-button:hover { |
| 124 | &:before { |
| 125 | opacity: 1; |
| 126 | transform: translate(16px, 5px) rotate(135deg); |
| 127 | } |
| 128 | &:after { |
| 129 | opacity: 1; |
| 130 | transform: translate(16px, 5px) rotate(45deg); |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | .mwai-content { |
| 138 | display: none; |
| 139 | opacity: 0; |
| 140 | max-height: var(--mwai-maxHeight); |
| 141 | border-radius: 0 0 var(--mwai-borderRadius) var(--mwai-borderRadius); |
| 142 | overflow: hidden; |
| 143 | } |
| 144 | |
| 145 | &.mwai-bottom-left { |
| 146 | bottom: 30px; |
| 147 | right: inherit; |
| 148 | left: 30px; |
| 149 | |
| 150 | .mwai-open-button { |
| 151 | right: inherit; |
| 152 | left: 0; |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | &.mwai-top-right { |
| 157 | top: 30px; |
| 158 | bottom: inherit; |
| 159 | right: 30px; |
| 160 | |
| 161 | .mwai-open-button { |
| 162 | top: 0; |
| 163 | bottom: inherit; |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | &.mwai-top-left { |
| 168 | top: 30px; |
| 169 | bottom: inherit; |
| 170 | right: inherit; |
| 171 | left: 30px; |
| 172 | |
| 173 | .mwai-open-button { |
| 174 | top: 0; |
| 175 | bottom: inherit; |
| 176 | right: inherit; |
| 177 | left: 0; |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | &.mwai-top-left, &.mwai-bottom-left { |
| 182 | |
| 183 | .mwai-open-button { |
| 184 | align-items: flex-start; |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | &.mwai-top-right, &.mwai-top-left { |
| 189 | |
| 190 | .mwai-open-button { |
| 191 | flex-direction: column-reverse; |
| 192 | |
| 193 | .mwai-icon-text { |
| 194 | margin-bottom: 0; |
| 195 | margin-top: 15px; |
| 196 | } |
| 197 | } |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | // Popup chat is fullscreen |
| 202 | |
| 203 | .mwai-window.mwai-fullscreen { |
| 204 | |
| 205 | .mwai-header { |
| 206 | |
| 207 | .mwai-buttons { |
| 208 | margin-bottom: 0px; |
| 209 | |
| 210 | .mwai-resize-button { |
| 211 | &:before { |
| 212 | width: 16px; |
| 213 | height: 16px; |
| 214 | } |
| 215 | |
| 216 | &:hover:before { |
| 217 | width: 13px; |
| 218 | height: 13px; |
| 219 | } |
| 220 | } |
| 221 | } |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | // Standard chat is fullscreen |
| 226 | |
| 227 | .mwai-fullscreen:not(.mwai-window), .mwai-fullscreen.mwai-window.mwai-open { |
| 228 | position: fixed; |
| 229 | left: 0 !important; |
| 230 | right: 0 !important; |
| 231 | bottom: 0 !important; |
| 232 | top: 0 !important; |
| 233 | width: inherit; |
| 234 | height: inherit; |
| 235 | max-height: inherit; |
| 236 | max-width: inherit; |
| 237 | display: flex; |
| 238 | flex-direction: column; |
| 239 | margin: 0; |
| 240 | z-index: 999999; |
| 241 | background-color: var(--mwai-backgroundSecondaryColor); |
| 242 | |
| 243 | .mwai-content { |
| 244 | height: 100%; |
| 245 | max-height: inherit; |
| 246 | |
| 247 | .mwai-conversation { |
| 248 | flex: auto; |
| 249 | max-height: none; |
| 250 | } |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | // Popup chat is open |
| 255 | |
| 256 | .mwai-window.mwai-open { |
| 257 | |
| 258 | .mwai-header { |
| 259 | display: flex; |
| 260 | } |
| 261 | |
| 262 | .mwai-content { |
| 263 | display: flex; |
| 264 | transition: opacity 200ms ease-in-out 0s; |
| 265 | opacity: 1; |
| 266 | } |
| 267 | |
| 268 | .mwai-open-button { |
| 269 | display: none; |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | .mwai-error { |
| 274 | margin: var(--mwai-spacing); |
| 275 | color: white; |
| 276 | background: rgba(180, 55, 55, 0.55); |
| 277 | padding: var(--mwai-spacing); |
| 278 | border-radius: var(--mwai-borderRadius); |
| 279 | |
| 280 | &:hover { |
| 281 | cursor: pointer; |
| 282 | background: rgba(180, 44, 44, 0.85); |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | // Keyframes for buttons |
| 287 | |
| 288 | @keyframes mwai-button-spinner { |
| 289 | |
| 290 | from { |
| 291 | transform: rotate(0turn); |
| 292 | } |
| 293 | to { |
| 294 | transform: rotate(1turn); |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | // WordPress Admin Bar |
| 299 | |
| 300 | .admin-bar .mwai-fullscreen:not(.mwai-window), |
| 301 | .admin-bar .mwai-fullscreen.mwai-window.mwai-open { |
| 302 | top: 32px; |
| 303 | } |
| 304 |