@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;  
  background: #ccc;
  position: relative;
}

.background-green {
  position: absolute;
  top: 0;
  width: 100%;
  height: 20%;
  background-color: #009688;
  z-index: -1;
}

.main-container {
  position: relative;
  width: 1000px;
  max-width: 100%;
  height: calc(100vh - 40px); 
  background: #fff;
  display: flex;
  box-shadow: 0px 1px 1px  0 rgba(0,0,0,0.5), 0px 2px 5px 0 rgba(0,0,0,0.6);  
}

/* Left Container (Sidebar) */
.main-container .left-container {
  position:relative;
  width: 30%;
  height:100%;
  flex: 30%;
  background: #fff;
  display: flex;
  flex-direction: column;
}

/* Header na Sidebar */
.left-container .header {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 60px;
  background: #ededed;
  padding: 0 15px;
}

.left-container .user-img {
  position:relative;
  width: 40px;
  height: 40px;
  overflow:hidden;
  border-radius: 50%; 
}

.left-container .dp {
  position:absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.left-container .nav-icons { 
  display:flex;
  justify-content: flex-end;
  padding-left: 110px;
}

.left-container .nav-icons li {
  list-style: none;
  display: flex;
  cursor: pointer;
  color: #51585c;
  margin-left: 22px;
  font-size: 18px;
}

.left-container .nav-icons li:hover {
  color: #000;
}

/* Notificação na Sidebar */
.left-container .notif-box {
  position: relative;
  display: flex;
  width: 100%;
  height: 70px;
  background: #76daff;
  align-items: center;
  font-size: 0.8em;
  text-decoration: none;
  padding: 0 15px;
}

.left-container .notif-box i {
  position:relative;
  left: 13px;
  background:#fff;
  padding:10px;
  width: 42px;
  height: auto;
  font-size: 20px;
  border-radius: 50%;
  cursor: pointer;
  color:#76daff;
}

.left-container .notif-box .notif-text {
  margin: 0 15px;
  flex: 1;
}

.left-container .notif-box .notif-text p {
  margin-bottom: 5px;
}

.left-container .notif-box .notif-text a {
  text-decoration: none;
  color: #333;
  font-size: 0.9em;
}

.left-container .notif-box .fa-xmark {
  position: absolute;
  right: 15px;
  text-align:center;
  background:#76daff;
  color: #fff;
  border-radius: 50%;
  padding: 5px;
  cursor: pointer;
}

.left-container .notif-box .fa-xmark:hover {
  background: #128C7E;
}

/* Barra de Pesquisa na Sidebar */
.left-container .search-container {
  position:relative;
  width: 100%;
  height: 40px;
  background: #f6f6f6;
  display: flex;
  align-items: center;
  padding: 0 15px;
}

.left-container .search-container .input {
  position: relative;
  flex: 1;
}

.left-container .search-container .input input {
  width: 100%;
  outline: none;
  border: none;
  background: #fff;
  padding: 5px 10px 5px 35px;
  height: 30px;
  border-radius: 10px;
  font-size: 12px;
}

.left-container .search-container .input i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color:#bbb;
  font-size: 0.8em;
}

.left-container .search-container i.fa-bars-filter {
  margin-left: 10px;
  color: #51585c;
  font-size: 1.2em;
  cursor: pointer;
}

.left-container .search-container i.fa-bars-filter:hover {
  color: #000;
}

/* Lista de Chats na Sidebar */
.left-container .chat-list {
  position: relative;
  height: calc(100% - 170px);
  overflow-y: auto;
  
  /* Ocultar a barra de rolagem */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE e Edge */
}

.left-container .chat-list::-webkit-scrollbar {
  display: none; /* Chrome, Safari e Opera */
}

.left-container .chat-list .chat-box {
  position: relative;
  width: 100%;
  display:flex;
  align-items:center;
  cursor: pointer;
  padding: 15px;
  border-bottom: 1px solid #eee;  
  transition: background 0.3s;
}

.left-container .chat-list .chat-box:hover {
  background: #f5f5f5;
}

.left-container .chat-list .chat-box.active {
  background: #ebebeb;
}

.left-container .chat-list .chat-box .img-box {
  position:relative;
  width: 55px;
  height:45px;
  overflow:hidden;
  border-radius: 50%;
  flex-shrink: 0;
}

.left-container .chat-list .chat-box .img-box .img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.left-container .chat-list .chat-box .chat-details {
  width: 100%;  
  margin-left: 10px;
  display: flex;
  flex-direction: column;
}

.left-container .chat-list .chat-box .chat-details .text-head {
  display:flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom:2px;
}

.left-container .chat-list .chat-box .chat-details .text-head h4 {
  font-size: 1.1em;
  font-weight: 600;
  color: #000;
}

.left-container .chat-list .chat-box .chat-details .text-head .time {
  font-size: 0.8em;
  color: #aaa;
}

.left-container .chat-list .chat-box .chat-details .text-message {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.left-container .chat-list .chat-box .chat-details .text-message p {
  color: #aaa;
  font-size: 0.9em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.left-container .chat-list .chat-box .chat-details .text-message b {
  background: #06e744;
  color: #fff;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.8em;
  font-weight: 400;
  display:flex;
  justify-content:center;
  align-items:center;
}

.left-container .chat-list .chat-box .chat-details .text-message b:hover {
  background: #128C7E;
}

/* Right Container (Chat Area) */
.main-container .right-container {
  position: relative;
  width: 70%;
  height: 100%;
  flex: 70%;
  background: #e5ddd5;
  display: flex;
  flex-direction: column;
}

/* Header no Chat Area */
.right-container .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ededed;
  padding: 0 15px;
  height: 60px;
}

.right-container .img-text {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.right-container .img-text .user-img {
  position:relative;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 50%; 
  margin-right: 15px;
}

.right-container .img-text .dp {
  position:absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.right-container .img-text h4 {
  font-weight: 500;
  line-height: 1.2em;
  color: #000;
}

.right-container .img-text h4 span {
  font-size: 0.8em;
  color: #555;
}

.right-container .nav-icons {
  display: flex;
  align-items: center;
}

.right-container .nav-icons li {
  list-style: none;
  display: flex;
  cursor: pointer;
  color: #51585c;
  margin-left: 22px;
  font-size: 18px;
}

.right-container .nav-icons li:hover {
  color: #000;
}

/* Campo de Busca na Área de Chat */
.chat-search-container {
    display: none; /* Escondido por padrão */
    width: 100%;
    padding: 10px 15px;
    background: #f6f6f6;
    border-bottom: 1px solid #ccc;
    position: relative;
    align-items: center;
}

.chat-search-container.active {
    display: flex; /* Exibe o contêiner quando ativo */
}

.chat-search-container input {
    width: 100%;
    padding: 8px 35px 8px 10px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
}

.chat-search-container .clear-search {
    position: absolute;
    right: 25px;
    cursor: pointer;
    color: #999;
    display: none; /* Escondido por padrão */
}

.chat-search-container .clear-search.active {
    display: block; /* Exibe o ícone de limpar quando há texto */
}

.right-container .header .search-icon {
    cursor: pointer;
    color: #51585c;
}

.right-container .header .search-icon:hover {
    color: #000;
}

/* Container das Mensagens */
.right-container .chat-container {
  position:relative;
  width: 100%;
  height: calc(100% - 120px);  /*60+60*/
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  
  /* Ocultar a barra de rolagem */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE e Edge */
}

.right-container .chat-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari e Opera */
}

/* Divisor de Data */
.date-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.date-divider span {
  background: #e5ddd5;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8em;
  color: #555;
}

/* Mensagens */
.message-box {
  display: flex;
  margin: 5px 0;
}

.message-box p {
  position: relative;
  display: inline-block;
  padding: 10px 15px;
  border-radius: 20px;
  max-width: 70%;
  word-wrap: break-word;
}

.my-message {
  justify-content: flex-start; /* Alinha à esquerda */
}

.my-message p {
  background: #fff; /* Cor branca para suas mensagens */
  align-self: flex-start;
  color: #333;
}

.friend-message {
  justify-content: flex-end; /* Alinha à direita */
}

.friend-message p {
  background: #dcf8c6; /* Cor verde para mensagens do contato */
  align-self: flex-end;
  color: #333;
}

/* Setas nas mensagens */
.message-box.my-message p::before {
  content : '';
  position: absolute;
  top: 0;
  left: -12px;
  width: 20px;
  height: 20px;
  background: linear-gradient(225deg, #fff 0%, #fff 50%, transparent 50%, transparent);  
}

.message-box.friend-message p::before {
  content : '';
  position: absolute;
  top: 0;
  right: -12px;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #dcf8c6 0%, #dcf8c6 50%, transparent 50%, transparent);
}

/* Horário das mensagens */
.message-box p span {
  display: block;
  margin-top: 5px;
  font-size: 0.8em;
  opacity: 0.5;
}

/* Estilização do nome do remetente dentro do message box */
.message-box p strong {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
}

/* Imagens nas mensagens */
.message-image {
  max-width: 200px;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 5px;
}

/* Vídeos nas mensagens */
.message-video {
  max-width: 300px;
  border-radius: 10px;
  margin-top: 5px;
}

/* Anexos - Removido o botão de download e o nome do arquivo */
.attachment-link {
  text-decoration: none;
  color: #555;
  font-size: 1.2em;
}

.attachment-icon {
  font-size: 1.5em;
  color: #555;
  transition: color 0.3s;
}

.attachment-link:hover .attachment-icon {
  color: #000;
}

/* Input de Mensagem */
.right-container .chatbox-input {
  position:relative;
  width: 100%;
  height: 60px;
  background: #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
}

.right-container .chatbox-input i {
  cursor: pointer;
  font-size: 1.8em;
  color: #515855;
}

.right-container .chatbox-input i:first-child {
  margin: 0 10px;
}

.right-container .chatbox-input i:last-child {
  margin-right: 10px;
}

.right-container .chatbox-input input {
  flex: 1;
  margin: 0 10px;
  padding: 10px 20px;
  border-radius:10px;
  font-size: 1em;
  border:none;
  outline:none;
  background: #fff;
}

/* Scrollbar Styling - Removido para ocultar barras de rolagem */

/* Scrollbar para .chat-list já está oculto nas regras acima */

/* Scrollbar para .chat-container já está oculto nas regras acima */

/* Outros estilos existentes permanecem inalterados */

/* Exemplo de ocultação completa de todas as barras de rolagem (opcional) */
.hidden-scrollbar {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE e Edge */
}

.hidden-scrollbar::-webkit-scrollbar {
    display: none; /* Chrome, Safari e Opera */
}
