chat.css 8.5 KB

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