messages.css 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. .position-relative {
  2. position: relative;
  3. }
  4. .overflow-hidden {
  5. overflow: hidden;
  6. }
  7. .position-absolute {
  8. position: absolute;
  9. }
  10. .opacity-0x {
  11. opacity: 0;
  12. }
  13. .im-body {
  14. height: calc(60vh - 185px) !important;
  15. }
  16. .im-container {
  17. display: flex;
  18. align-items: stretch;
  19. }
  20. .im-container .im-lhs {
  21. min-width: 300px;
  22. border-right: 1px solid #ddd;
  23. padding: 0.5rem;
  24. overflow: auto;
  25. }
  26. .im-container .im-lhs .im-conversation {
  27. border-radius: 4px;
  28. padding: 0.5rem;
  29. border: 1px solid #ddd;
  30. background: white;
  31. cursor: pointer;
  32. }
  33. .im-container .im-lhs .im-conversation:hover {
  34. background: aliceblue;
  35. text-decoration: none;
  36. }
  37. .im-container .im-lhs .im-conversation.active {
  38. background: aliceblue;
  39. border-color: #307899;
  40. }
  41. .im-container .im-lhs .im-conversation:not(:last-child) {
  42. margin-bottom: 0.5rem;
  43. }
  44. .im-container .im-lhs .im-conversation .unread-conversation {
  45. position: absolute;
  46. right: 0;
  47. top: 0;
  48. }
  49. .im-container .im-rhs {
  50. flex-grow: 1;
  51. display: inline-flex;
  52. flex-direction: column;
  53. }
  54. .im-container .im-rhs .im-messages {
  55. flex-grow: 1;
  56. display: inline-flex;
  57. flex-direction: column;
  58. justify-content: flex-end;
  59. overflow: auto;
  60. margin-bottom: 1rem;
  61. }
  62. .im-container .im-message {
  63. margin-top: 0.5rem;
  64. padding: 0 0.5rem;
  65. text-align: left;
  66. }
  67. .im-container .im-message.sent {
  68. text-align: right;
  69. }
  70. .im-container .im-rhs .im-messages-header {
  71. padding-bottom: 0.5rem;
  72. border-bottom: 1px solid #eee;
  73. }
  74. .im-container .im-message .im-message-sender {
  75. display: flex;
  76. justify-content: flex-start;
  77. }
  78. .im-container .im-message .im-message-sender .unread-message {
  79. margin-bottom: -5px;
  80. margin-top: -5px;
  81. font-size: 16px;
  82. }
  83. .im-container .im-message .im-message-content {
  84. background: #eee;
  85. border-radius: 6px;
  86. padding: 0.5rem;
  87. margin-top: 0.25rem;
  88. /* white-space: pre-wrap; */
  89. word-break: break-word;
  90. text-align: left;
  91. display: inline-block;
  92. min-width: 150px;
  93. max-width: 75%;
  94. flex-grow: 0;
  95. margin-right: 5px;
  96. }
  97. .im-container .im-message.sent .im-message-sender {
  98. justify-content: flex-end;
  99. }
  100. .im-container .im-message.sent .im-message-content {
  101. margin-left: auto;
  102. background: #e4f9ff;
  103. }
  104. .im-container .im-rhs .im-messages {
  105. margin-bottom: 100px;
  106. }
  107. .im-container .im-rhs .im-input {
  108. position: absolute;
  109. left: 0;
  110. bottom: 0;
  111. width: 100%;
  112. }
  113. .im-container .im-rhs .im-input textarea {
  114. width: 100%;
  115. height: 35px;
  116. border:none;
  117. resize:none;
  118. padding: 0.3rem;
  119. box-shadow: none !important;
  120. }
  121. .im-container .im-rhs .im-input textarea:focus,
  122. .im-container .im-rhs .im-input textarea:active,
  123. .im-container .im-rhs .im-input textarea:focus-visible {
  124. border:none;
  125. outline: 0;
  126. }
  127. .im-container .im-rhs .im-input #selected-files .selected-file {
  128. background: #fff;
  129. border: 1px solid #ccc;
  130. border-radius: 5px;
  131. padding: 2px 20px 2px 5px;
  132. cursor: pointer;
  133. position: relative;
  134. margin-top: 6px;
  135. margin-right: 10px;
  136. font-size: 13px;
  137. }
  138. .im-container .im-rhs .im-input #selected-files .selected-file:hover {
  139. color: #b11313;
  140. }
  141. .im-container .im-rhs .im-input #selected-files .selected-file:after {
  142. position: absolute;
  143. content: '✕';
  144. right: 4px;
  145. color: #b11313;
  146. }
  147. .im-container .im-message.sent .header-item.text-sm {
  148. margin-right: 5px;
  149. }
  150. .im-container .im-message.sent .header-item {
  151. }
  152. .im-container .im-message.received .header-item {
  153. margin-right: 0.75rem;
  154. }
  155. .im-container .im-message.sent .attachment {
  156. margin-left: 0.75rem;
  157. }
  158. .im-container .im-message.received .attachment {
  159. margin-right: 0.75rem;
  160. }
  161. .im-container .im-rhs .im-video-container {
  162. max-width: 480px;
  163. display: inline-block;
  164. position: relative;
  165. margin-top: 4px;
  166. }
  167. .im-container .im-rhs .im-video-container video {
  168. max-width: 100%;
  169. }
  170. .im-container .im-rhs .im-video-container .vs-control {
  171. opacity: 0;
  172. transition: opacity 0.3s ease;
  173. position: absolute;
  174. margin: 0 !important;
  175. top: 0;
  176. right: 0;
  177. background: rgba(238, 238, 238, 0.75) !important;
  178. border: 0 !important;
  179. border-bottom-left-radius: 3px;
  180. text-align: right !important;
  181. width: auto !important;
  182. font-size: 11px !important;
  183. }
  184. .im-container .im-rhs .im-video-container:hover .vs-control {
  185. opacity: 1;
  186. background: rgba(238, 238, 238, 1) !important;
  187. }
  188. .im-container .im-rhs .im-video-container .vs-control select {
  189. width: auto !important;
  190. border: 0 !important;
  191. }
  192. .msg-header {
  193. background-color: #fefefe;
  194. color: #333;
  195. border-bottom: 1px solid #ccc;
  196. }
  197. .im-body .card-body {
  198. background-color: #fefefe;
  199. }
  200. .msg-input {
  201. border: 1px solid #eee;
  202. padding: 8px 10px;
  203. border-radius: 50px;
  204. background-color: #ffffff;
  205. width: 100%;
  206. display: flex;
  207. align-items: center;
  208. justify-content: space-between;
  209. }
  210. .msg-input textarea, .msg-input textarea:focus{
  211. outline:0;
  212. box-shadow: 0;
  213. border:none;
  214. width: 100%;
  215. }
  216. .btn-input, .btn-input:hover, .btn-input:focus {
  217. height: 40px;
  218. width: 40px;
  219. font-size: 18px;
  220. display: grid;
  221. place-items:center;
  222. border-radius: 100%;
  223. background: #0367b0;
  224. color: #fff;
  225. }
  226. .btn-input i {
  227. margin-left: -4px;
  228. }
  229. .plus, .plus:hover, .plus:focus {
  230. outline:0;
  231. border:0;
  232. background: 0;
  233. color: #aaa;
  234. margin-right: 5px;
  235. }
  236. .fabs {
  237. display: flex;
  238. gap: 5px;
  239. }
  240. .fabs .btn {
  241. margin-left: 0 !important;
  242. margin-bottom: 10px;
  243. height: 40px;
  244. width: 40px;
  245. border-radius: 100%;
  246. }
  247. .msg-list {
  248. height: calc(100vh - 185px) !important;
  249. overflow-y: auto;
  250. }
  251. .msg-list .msg-header {
  252. position: sticky;
  253. top: 0;
  254. }
  255. .pt {
  256. color: #000000;
  257. }
  258. .active-pt, .pt:hover {
  259. background-color: #c2efff;
  260. color: #000000;
  261. transition: .5s;
  262. }
  263. .im-container .im-message .im-message-sender {
  264. position: relative;
  265. }
  266. .im-container .im-message .delete,
  267. .im-container .im-message .edit {
  268. position: absolute;
  269. right: -14px;
  270. top: 0px;
  271. }
  272. .im-container .im-message .edit {
  273. top: 25px;
  274. }
  275. .im-container .im-message:hover .edit,
  276. .im-container .im-message:focus .edit,
  277. .im-container .im-message:hover .delete,
  278. .im-container .im-message:focus .delete {
  279. display: block;
  280. }
  281. @media screen and (max-width:500px) {
  282. .fabs {
  283. display: block;
  284. }
  285. }