chat.scss 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. .zammad-chat {
  2. color: black;
  3. position: fixed;
  4. right: 30px;
  5. bottom: 0;
  6. font-size: 12px;
  7. width: 33em;
  8. height: 30em;
  9. box-shadow: 0 3px 10px rgba(0,0,0,.3);
  10. border-radius: 5px 5px 0 0;
  11. will-change: bottom;
  12. display: none;
  13. flex-direction: column;
  14. &.is-fullscreen {
  15. right: 0;
  16. width: 100%;
  17. height: 100vh;
  18. border-radius: 0 !important;
  19. }
  20. @media only screen and (max-width: 768px) {
  21. right: 0;
  22. width: 100%;
  23. height: 100vh;
  24. border-radius: 0 !important;
  25. }
  26. }
  27. .zammad-chat.zammad-chat-is-shown {
  28. display: flex;
  29. }
  30. .zammad-chat-icon {
  31. height: 2em;
  32. fill: currentColor;
  33. vertical-align: top;
  34. margin-right: 5px;
  35. margin-top: 4px;
  36. }
  37. .zammad-chat-header {
  38. padding: 0.5em 2.5em 0.5em 1em;
  39. background: hsl(203,67%,53%);
  40. color: white;
  41. line-height: 2.5em;
  42. box-shadow:
  43. 0 -1px rgba(0,0,0,.1),
  44. 0 1px rgba(255,255,255,.3) inset,
  45. 0 -1px rgba(0,0,0,.1) inset,
  46. 0 1px 1px rgba(0,0,0,.13);
  47. position: relative;
  48. border-radius: 5px 5px 0 0;
  49. overflow: hidden;
  50. cursor: pointer;
  51. @media only screen and (max-width: 768px) {
  52. border-radius: 0 !important;
  53. }
  54. }
  55. .zammad-chat.is-fullscreen .zammad-chat-header {
  56. border-radius: 0 !important;
  57. }
  58. .zammad-chat.zammad-chat-is-open .zammad-chat-header {
  59. cursor: default;
  60. }
  61. .zammad-chat-welcome-text {
  62. font-size: 1.2em;
  63. }
  64. .zammad-chat-header-icon {
  65. position: absolute;
  66. right: 0;
  67. top: 0;
  68. height: 100%;
  69. width: 3.4em;
  70. text-align: center;
  71. line-height: 3.5em;
  72. cursor: pointer;
  73. }
  74. .zammad-chat-header-icon-open,
  75. .zammad-chat-header-icon-close {
  76. fill: currentColor;
  77. width: 1.6em;
  78. vertical-align: middle;
  79. }
  80. .zammad-chat-header-icon-close {
  81. width: 1.3em;
  82. }
  83. .zammad-chat-header-icon-close,
  84. .zammad-chat.zammad-chat-is-open .zammad-chat-header-icon-open {
  85. display: none;
  86. }
  87. .zammad-chat.zammad-chat-is-open .zammad-chat-header-icon-close {
  88. display: inline;
  89. }
  90. .zammad-chat-agent {
  91. float: left;
  92. }
  93. .zammad-chat-header-controls {
  94. float: right;
  95. }
  96. .zammad-chat-agent-avatar {
  97. border-radius: 100%;
  98. margin-right: 0.6em;
  99. float: left;
  100. width: 2.5em;
  101. }
  102. .zammad-chat-agent-name {
  103. font-weight: bold;
  104. }
  105. .zammad-chat-agent-status {
  106. margin: 0 1em;
  107. display: inline-block;
  108. line-height: 2em;
  109. padding: 0 .7em;
  110. border-radius: 1em;
  111. background: rgba(0,0,0,.1);
  112. box-shadow: 0 0 0 1px rgba(0,0,0,.04) inset;
  113. }
  114. .zammad-chat-agent-status:before {
  115. content: "";
  116. background: hsl(19,90%,51%);
  117. display: inline-block;
  118. height: 0.9em;
  119. width: 0.9em;
  120. border-radius: 100%;
  121. position: relative;
  122. margin-right: 0.3em;
  123. vertical-align: middle;
  124. box-shadow: 0 0 0 1px rgba(0,0,0,.04) inset;
  125. }
  126. .zammad-chat-agent-status[data-status="online"]:before {
  127. background: hsl(145,51%,55%);
  128. }
  129. .zammad-chat-agent-status[data-status="connecting"]:before {
  130. animation: linear connect-fade 600ms infinite alternate;
  131. background: hsl(41,100%,49%);
  132. }
  133. @keyframes connect-fade {
  134. from { opacity: .5; transform: scale(0.6); }
  135. to { opacity: 1; transform: scale(1); }
  136. }
  137. .zammad-chat-modal {
  138. position: absolute;
  139. left: 0;
  140. right: 0;
  141. bottom: 0;
  142. top: 3.5em;
  143. margin-top: 1px;
  144. text-align: center;
  145. background: white;
  146. z-index: 1;
  147. padding: 20px;
  148. display: flex;
  149. align-items: center;
  150. justify-content: center;
  151. }
  152. .zammad-chat-modal-text {
  153. font-size: 1.3em;
  154. line-height: 1.45;
  155. .zammad-chat-loading-animation {
  156. font-size: 0.7em;
  157. }
  158. .zammad-chat-button {
  159. margin-top: 1em;
  160. font-size: 0.8em;
  161. }
  162. }
  163. .zammad-chat-modal .zammad-chat-loading-animation {
  164. margin-right: 8px;
  165. vertical-align: middle;
  166. }
  167. .zammad-chat-body {
  168. padding: 0.5em 1em;
  169. overflow: auto;
  170. background: white;
  171. flex: 1;
  172. @media only screen and (max-width: 768px) {
  173. height: auto;
  174. flex: 1;
  175. }
  176. }
  177. .zammad-chat-timestamp {
  178. text-align: center;
  179. color: hsl(0,0%,60%);
  180. font-size: 0.9em;
  181. margin: 1em 0;
  182. }
  183. .zammad-chat-message {
  184. margin: 0.5em 0;
  185. }
  186. .zammad-chat-status,
  187. .zammad-chat-message-body {
  188. padding: 0.5em 1em;
  189. line-height: 1.4;
  190. border-radius: 1em;
  191. background: hsl(0,0%,93%);
  192. display: inline-block;
  193. max-width: 70%;
  194. white-space: pre-line;
  195. word-wrap: break-word;
  196. box-shadow:
  197. 0 2px rgba(255,255,255,.15) inset,
  198. 0 0 0 1px rgba(0,0,0,.08) inset,
  199. 0 1px rgba(0,0,0,.02);
  200. }
  201. .zammad-chat-status {
  202. display: inline-block;
  203. position: relative;
  204. left: 50%;
  205. transform: translateX(-50%);
  206. margin: 1em 0;
  207. background: #eee;
  208. }
  209. .zammad-chat-message--customer {
  210. text-align: right;
  211. }
  212. .zammad-chat-message--customer + .zammad-chat-message--agent,
  213. .zammad-chat-message--agent + .zammad-chat-message--customer {
  214. margin-top: 1em;
  215. }
  216. .zammad-chat-message--customer .zammad-chat-message-body {
  217. background: hsl(203,67%,53%);
  218. color: white;
  219. }
  220. .zammad-chat-message--unread {
  221. font-weight: bold;
  222. }
  223. .zammad-chat-message--typing .zammad-chat-message-body {
  224. white-space: normal;
  225. }
  226. .zammad-chat-loading-animation {
  227. display: inline-block;
  228. }
  229. .zammad-chat-loading-circle {
  230. background: hsl(0,0%, 85%);
  231. border-radius: 100%;
  232. height: 0.72em;
  233. width: 0.72em;
  234. display: inline-block;
  235. animation: ease-in-out load-fade 600ms infinite alternate;
  236. }
  237. .zammad-chat-loading-circle + .zammad-chat-loading-circle {
  238. animation-delay: .13s;
  239. }
  240. .zammad-chat-loading-circle + .zammad-chat-loading-circle + .zammad-chat-loading-circle {
  241. animation-delay: .26s;
  242. }
  243. @keyframes load-fade {
  244. from { opacity: .5; transform: scale(0.6); }
  245. 67% { opacity: 1; transform: scale(1); }
  246. }
  247. .zammad-chat-controls {
  248. overflow: hidden;
  249. display: flex;
  250. align-items: flex-start;
  251. border-top: 1px solid hsl(0,0%,93%);
  252. padding: 0;
  253. line-height: 1.4em;
  254. box-shadow:
  255. 0 1px rgba(0,0,0,.01),
  256. 0 -1px rgba(0,0,0,.02);
  257. position: relative;
  258. background: white;
  259. }
  260. .zammad-chat-input {
  261. margin: 0;
  262. padding: 0;
  263. float: left;
  264. width: auto;
  265. height: auto;
  266. font-family: inherit;
  267. line-height: inherit;
  268. font-size: inherit;
  269. appearance: none;
  270. border: none !important;
  271. background: none;
  272. box-shadow: none;
  273. padding: 1em 2em;
  274. outline: none;
  275. resize: none;
  276. flex: 1;
  277. max-height: 6em;
  278. box-shadow: none !important;
  279. }
  280. .zammad-chat-input::-webkit-input-placeholder {
  281. color: hsl(0,0%,85%);
  282. }
  283. .zammad-chat-button {
  284. appearance: none;
  285. font-family: inherit;
  286. font-size: inherit;
  287. line-height: initial;
  288. background: hsl(203,67%,53%);
  289. color: white;
  290. padding: 0.6em 1.2em;
  291. margin: 0.5em 1em 0.5em;
  292. cursor: pointer;
  293. border: none;
  294. border-radius: 1.5em;
  295. box-shadow:
  296. 0 2px rgba(255,255,255,.25) inset,
  297. 0 0 0 1px rgba(0,0,0,.1) inset,
  298. 0 1px rgba(0,0,0,.1);
  299. outline: none;
  300. display: inline-block;
  301. }
  302. .zammad-chat-send {
  303. float: right;
  304. }
  305. .zammad-chat-is-hidden {
  306. display: none;
  307. }
  308. .zammad-chat-is-visible {
  309. display: block;
  310. }
  311. /*
  312. # Flat Design
  313. */
  314. .zammad-chat--flat .zammad-chat-header,
  315. .zammad-chat--flat .zammad-chat-body {
  316. border: none;
  317. }
  318. .zammad-chat--flat .zammad-chat-header {
  319. box-shadow: none;
  320. }
  321. .zammad-chat--flat .zammad-chat-message-body {
  322. box-shadow: none;
  323. }
  324. .zammad-chat--flat .zammad-chat-agent-status,
  325. .zammad-chat--flat .zammad-chat-button,
  326. .zammad-chat--flat .zammad-chat-status {
  327. box-shadow: none;
  328. }