chat.css 10 KB

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