@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --avatar-size: 120px;
  --border-radius: 24px;
  --pannel-color: #ededed;
  --pannel-back-color: #e5ddd5;
  --pannel-front-color: white;
  --rim-color: white;
  --inner-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.25) inset;
  --outer-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.25);
  --down-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.1);
  --back-color: #6294a2;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--back-color);
  overflow: hidden;
}

#control {
  position: absolute;
  top: 8px;
  left: 24px;
  color: white;
  font-size: 18px;
}

#canvas {
  width: var(--avatar-size);
  height: var(--avatar-size);
}

.main-container {
  position: relative;
  width: 1024px;
  max-width: 100%;
  height: calc(100vh - 40px);
  background: #fff;
  display: flex;
  box-shadow: var(--outer-shadow);
  border-radius: var(--border-radius);
}

.main-container .left-container {
  position: relative;
  width: 30%;
  height: 100%;
  flex: 30%;
  background: #fff;
  border-top-left-radius: var(--border-radius);
  border-bottom-left-radius: var(--border-radius);
  overflow: hidden;
}

.main-container .right-container {
  display: grid;
  grid-template-rows: calc(24px*4) calc(var(--avatar-size) + 48px) auto 60px;
  height: 100%;
  min-width: calc(24px * 30);
  background: #e5ddd5;
  border-top-right-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
}

.left-container .header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  width: 100%;
  height: calc(var(--avatar-size) + 12px);
  background: #ededed;
  padding: 0 15px;
  border-top-left-radius: var(--border-radius);
}

.left-container .header .avatar-container {
  width: calc(var(--avatar-size)*0.8);
  height: calc(var(--avatar-size)*0.8);
  border-radius: 100%;
  border: 2px solid white;
  overflow: hidden;
  position: relative;
  box-shadow: var(--outer-shadow);
  border: 2px solid var(--rim-color);
}

.left-container .header form {
  background: none;
  height: auto;
  box-shadow: none;
  padding: 0;
}

.nav-icons {
  display: flex;
  justify-content: flex-start;
  padding-left: 0px;
}

.nav-icons li {
  list-style: none;
  display: flex;
  cursor: pointer;
  color: #51585c;
  margin-left: 8px;
  font-size: 16px;
}

.notif-box {
  position: relative;
  display: flex;
  width: 100%;
  height: 70px;
  background: #76daff;
  align-items: center;
  font-size: 0.8em;
  text-decoration: none;
}

.notif-box i {
  position: relative;
  left: 13px;
  background: #fff;
  padding: 10px;
  width: 42px;
  height: auto;
  font-size: 20px;
  border-radius: 55%;
  cursor: pointer;
  color: #76daff;
}

.notif-box .fa-xmark {
  position: absolute;
  left: 260px;
  text-align: center;
  background: #76daff;
  color: #fff;
}

.notif-text {
  margin: 25px;
}

.notif-text a {
  text-decoration: none;
  color: #333;
  font-size: 0.9em;
}

.search-container {
  position: relative;
  width: 100% - 24px;
  height: 52px;
  background: var(--pannel-color);
  display: flex;
  /*   justify-content: center; */
  align-items: center;
}

.search-container .input input {
  width: 115%;
  outline: none;
  border: none;
  background: #fff;
  padding: 5px;
  height: 30x;
  border-radius: 10px;
  font-size: 12px;
  padding-left: 60px;
  margin: 10px;
  box-shadow: var(--inner-shadow);
  border-radius: var(--border-radius);
  border: 1px solid rgba(0, 0, 0, 0.25);
}

.search-container .input i {
  position: absolute;
  left: 26px;
  top: 20px;
  color: #bbb;
  font-size: 0.8em;
}

.chatrooms {
  position: relative;
  height: calc(100% - 170px);
  overflow-y: scroll;
  background-color: var(--pannel-back-color);
  box-shadow: var(--inner-shadow);
}

.chatrooms .chat-box {
  position: relative;
  width: calc(100% - 2px);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  padding: 12px;
  border-bottom: 1px solid #eee;
  background-color: var(--pannel-front-color);
  margin-top: 2px;
}

.chatrooms .chat-box .img-box {
  position: relative;
  width: 76px;
  height: 56px;
  overflow: hidden;
  border-radius: 100%;
  box-shadow: var(--inner-shadow);
}

.chatrooms .chat-box .chat-details {
  width: 100%;
  margin-left: 10px;
}

.chatrooms .chat-box .chat-details .text-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.chatrooms .chat-box .chat-details .text-head h4 {
  font-size: 1.1em;
  font-weight: 600;
  color: #000;
}

.chatrooms .chat-box .chat-details .text-head .time {
  font-size: 0.8em;
  color: #aaa;
}

.chatrooms .chat-box .chat-details .text-message {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatrooms .chat-box .chat-details .text-message p {
  color: #aaa;
  font-size: 0.9em;
}

img {
  width: 100%;
  object-fit: cover;
}

.chatrooms .chat-box .chat-details .text-message b {
  background: #06e744;
  color: #fff;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  /*   text-align: center; */
  font-size: 0.8em;
  font-weight: 400;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chatrooms .active {
  background: #ebebeb;
}

.chatrooms .chat-box:hover {
  background: #f5f5f5;
}

.chatrooms .chat-box .chat-details .text-head .unread {
  color: #06e744;
}

.avatar {
  width: var(--avatar-size);
  height: var(--avatar-size);
  box-shadow: var(--outer-shadow);
  border-radius: 100%;
  border: 2px solid white;
}

/* =============================== */
/*  ===     right-container   ===  */
/* =============================== */

.right-container .header {
  position: relative;
  display: flex;
  width: calc(100% - 2px);
  align-items: center;
  justify-content: space-between;
  margin-left: 2px;
  height: auto;
  background-color: var(--pannel-color);
  padding: 0 15px;
  border-left: 1px solid white;
  border-top-right-radius: var(--border-radius);
  z-index: 1;
}

.right-container .header .chat-info {
  display: flex;
  width: auto;
  height: 100px;
  justify-content: center;
  align-items: center;
}

.right-container .header .chat-info .chat-image-container {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 100%;
  overflow: hidden;
  box-shadow: var(--outer-shadow);
  transition-timing-function: ease-in-out;
  border: 2px solid var(--rim-color);
  z-index: 10;
}

.right-container .header .chat-info .chat-image-container .img-cover {
  position: absolute;
}

.right-container .header h4 {
  font-weight: 500;
  line-height: 0.6em;
  width: calc(24px * 10);
  background-color: var(--pannel-color);
  border-radius: var(--border-radius);
  padding: 12px;
}

.right-container .header h4 span {
  font-size: 0.8em;
  color: #555;
}

.right-container .header .nav-icons {
  position: relative;
  margin-right: 0px;
  /*   padding: 5px; */
}

.right-container .header .toggle-view-button {
  font-family: "Roboto", sans-serif;
  text-transform: uppercase;
  outline: 0;
  background: #4CAF50;
  width: 100%;
  border: 0;
  padding: 15px;
  color: #FFFFFF;
  font-size: 14px;
  -webkit-transition-duration: 0.4s;
  /* Safari */
  transition-duration: 0.4s;
  cursor: pointer;
  border-radius: 8px;
}


.right-container .header .nav-icons i {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100%;
  width: 2em;
  height: 2em;
}

.right-container .participants {
  margin-top: 2px;
  margin-left: 2px;
  height: calc(var(--avatar-size) + 48px);
  padding: 0 15px;
  background: #ededed;
  border-left: 1px solid white;
  box-shadow: var(--down-shadow);
  display: flex;
  align-items: center;
  justify-content: start;
  z-index: 1;
}

.right-container .main-chat-container {
  position: relative;
  width: 100%;
  overflow-y: hidden;
  z-index: 0;
}

.right-container .participants .avatar-container {
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: var(--outer-shadow);
  transition-timing-function: ease-in-out;
  border: 2px solid var(--rim-color);
  z-index: 10;
}

.chat-container {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  overflow: hidden;
  padding: 0px;
}

.fill-parent {
  position: absolute;
  width: 120px;
  height: 120px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  padding: 0px;
}

.message-container {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  padding: 0px;
  padding: 50px;
  overflow-y: scroll;
  overflow-x: hidden;
}

.business-container {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  padding: 50px;
  overflow: scroll;
}

.message-box {
  position: relative;
  display: flex;
  width: 100%;
  margin: 5px 0;
}

.message-box p {
  position: relative;
  right: 0;
  text-align: left;
  max-width: 65%;
  padding: 12px;
  background: #dcf8c6;
  border-radius: 10px;
  font-size: 0.9em;
  box-shadow: var(--outer-shadow);
}

.message-box.my-message p::after {
  content: '';
  position: absolute;
  top: 0;
  right: -12px;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #dcf8c6 0%, #dcf8c6 50%, transparent 50%, transparent);
}

.message-box .my-message p {
  z-index: 1;
  box-shadow: var(--outer-shadow);
}

.message-box p span {
  display: block;
  margin-top: 5px;
  font-size: 0.8em;
  opacity: 0.5;
}

.message-box iframe {
  position: relative;
  display: flex;
  width: calc(100% - 24px);
  height: 90%;
  /* Adjust width to fit in the chat container */
  margin: 10px 12px;
  /* Give some margin around the message */
  justify-content: center;
  /* Center the video in the chat */
  border-radius: 10px;
  box-shadow: var(--outer-shadow);
}

.my-message {
  justify-content: flex-end;
}

.friend-message p {
  background: #fff;
}

.friend-message {
  justify-content: flex-start;

}

.chat-container .my-message i {
  color: yellow;
}

.message-box.friend-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: -12px;
  width: 20px;
  height: 20px;
  background: linear-gradient(225deg, #fff 0%, #fff 50%, transparent 50%, transparent);
}

.chatbox-input {
  width: calc(100%-2px);
  margin-left: 2px;
  height: 60px;
  background: #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom-right-radius: var(--border-radius);
  border-left: 1px solid white;
}

.chatbox-input i {
  cursor: pointer;
  font-size: 1.8em;
  color: #515855;
}

.chatbox-input i:nth-child(1) {
  margin: 15px;
}

.chatbox-input i:last-child {
  margin-right: 25px;
}

.chatbox-input input {
  position: relative;
  width: 90%;
  margin: 0 20px;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  font-size: 1em;
  border: 1px solid rgba(0, 0, 0, 0.25);
  outline: none;
  box-shadow: var(--inner-shadow);
}

/* -------------------------- */

/* effects */
.pop {
  transition-timing-function: ease-in-out;
  transform: translateY(128px) translateX(128px);
}

.scale {
  transform: scale(2) translateX(calc(-0.25*var(--avatar-size)));
}