chat.scss 7.6 KB

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