chat.css 8.5 KB

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