chat.scss 7.2 KB

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