chat.css 8.3 KB

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