chat.css 8.6 KB

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