@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap"); html, body, h1, h2, h3, h4, h5, h6, p, ul, li, button { padding: 0; margin: 0; } body { color: #2f2f2f; font-family: Raleway, sans-serif; font-size: 16px; } /* Chat widget container */ .chat-widget-container { position: fixed; bottom: 20px; right: 20px; z-index: 1000; } /* Chat toggle button */ #chatToggleBtn { width: 60px; height: 60px; border-radius: 50%; background: white; border: none; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); cursor: pointer; position: relative; display: flex; align-items: center; justify-content: center; transition: box-shadow 0.3s ease; } #chatToggleBtn:hover { box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); } /* Notification badge */ .notification-badge { position: absolute; top: -5px; right: -5px; width: 20px; height: 20px; background-color: red; border-radius: 50%; color: white; font-size: 12px; display: flex; align-items: center; justify-content: center; } /* Chat box */ .chat-box { display: none; position: fixed; bottom: 100px; right: 20px; width: 22rem; height: 34rem; background-color: #fff; border-radius: 13px; box-shadow: 0 5px 8px rgba(0, 0, 0, 0.3); flex-direction: column; } .chat-box.active { display: flex; } /* Header styles */ .chat-box-header-main { display: flex; align-items: center; padding: 0 1.5rem; border-bottom: solid 1px #cfcfcf; box-sizing: border-box; font: "Montserrat"; } .chat-box-header { width: 100%; padding: 20px 15px; font: "Montserrat", "Helvetica Neue"; } .chat-box-header > h3 { font-weight: normal; font-family: "Montserrat", "Helvetica Neue"; } .green-circle { width: 0.6rem; height: 0.6rem; background-color: green; border-radius: 50%; display: inline-block; margin-left: 5px; } .logo-image { width: 6rem; height: 2rem; } /* Chat body */ .chat-box-body { height: 100%; display: flex; overflow: auto; flex-direction: column; background-image: url("/static/background.webp"); } #chat_messages { width: 100%; padding: 20px 15px; margin-top: auto; display: flex; flex-direction: column; box-sizing: border-box; } /* Message styles */ .message { width: 80%; padding: 20px 15px; margin: 2px 0; overflow: hidden; border-radius: 13px; } .my-message { color: #fff; background-color: #006ae3; align-self: flex-end; } .other-message { background-color: #e2e2e2; } /* Profile styles */ .profile { margin: 2px 0; display: flex; align-items: center; justify-content: flex-end; color: white; } .profile img { border-radius: 50%; margin-right: 8px; } /* Typing indicator */ #typing { color: #afafaf; width: 100%; height: 0; padding: 0 15px; overflow: hidden; box-sizing: border-box; opacity: 0; transition: 0.3s height ease-in-out, 0.3s opacity ease-in-out; } #typing.active { height: 80px; opacity: 1; } #typing span:not(.n) { background-color: #afafaf; width: 10px; height: 10px; margin-top: 20px; display: inline-block; border-radius: 50%; } /* Footer styles */ .chat-box-footer { width: 100%; padding: 20px 15px; border-top: solid 1px #cfcfcf; box-sizing: border-box; display: flex; } #chat_input { color: #2f2f2f; font-family: Raleway, sans-serif; font-size: 16px; background-color: #d2d2d2; width: 100%; height: 40px; max-height: 120px; border: none; padding: 10px 15px; resize: none; box-sizing: border-box; border-radius: 13px; transition: 0.3s background-color; } #chat_input:focus { background-color: #efefef; } #send { background: none; border: 2px solid #006ae3; border-radius: 50%; margin-left: 10px; padding: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s; } #send:hover { background-color: rgba(0, 106, 227, 0.1); } /* Message styles */ .message { width: 80%; padding: 20px 15px; margin: 2px 0; overflow: hidden; border-radius: 13px; } /* Other user's message */ .other-message { background-color: #e2e2e2; align-self: flex-start; } /* My message */ .my-message { color: #fff; background-color: #006ae3; align-self: flex-end; } /* Profile styles */ .profile { display: flex; align-items: center; margin: 2px 0; } .other-profile { justify-content: flex-start; text-align: left; } .my-profile { justify-content: flex-end; text-align: right; } .profile img { border-radius: 50%; margin-right: 8px; } .other-profile img { margin-right: 8px; /* Image on the left for others */ } .my-profile img { margin-left: 8px; /* Image on the right for mine */ } /* Animation for typing dots */ @keyframes typing { 0% { transform: translateY(0px); } 33.3333% { transform: translateY(-5px); } 66.6667% { transform: translateY(5px); } 100% { transform: translateY(0px); } } #typing span:not(.n):nth-child(1) { animation: typing 1.2s infinite; } #typing span:not(.n):nth-child(2) { animation: typing 1.2s infinite 0.1s; } #typing span:not(.n):nth-child(3) { animation: typing 1.2s infinite 0.2s; }