/* style.css */

/* Reset e Fontes */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(
    #009688 0%,
    #009688 130px,
    #d9dbd5 130px,
    #d9dbd5 100%
  );
}

.container {
  position: relative;
  width: 1298px;
  max-width: 100%;
  height: calc(100vh - 40px);
  background: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06), 0 2px 5px 0 rgba(0, 0, 0, 0.06);
  display: flex;
}

.leftSide {
  position: relative;
  flex: 30%;
  background: #fff;
  border-right: 1px solid rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.rightSide {
  position: relative;
  flex: 70%;
  background: #e5ddd5;
}

.rightSide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("images/pattern.png");
  opacity: 0.06;
}

/* Sidebar */
.sidebar {
  padding: 20px;
  background-color: #075e54;
  color: #fff;
}

.sidebar h3 {
  margin-top: 0;
  color: #fff;
}

.folder-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.folder-list li {
  margin-bottom: 10px;
}

.folder-link {
  text-decoration: none;
  color: #fff;
  padding: 10px;
  display: block;
  border-radius: 5px;
  background-color: #128c7e;
  transition: background-color 0.3s;
}

.folder-link:hover,
.folder-link.active {
  background-color: #075e54;
}

/* Chat List */
.chatlist {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.block {
  display: flex;
  margin-bottom: 15px;
  cursor: pointer;
  transition: background-color 0.3s;
  padding: 10px;
  border-radius: 5px;
}

.block:hover {
  background-color: #f1f1f1;
}

.block.active {
  background-color: #d1f2eb;
}

.imgBox {
  flex: 0 0 50px;
  margin-right: 15px;
}

.imgBox img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.details {
  flex: 1;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.listHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.listHead h4 {
  margin: 0;
  font-size: 16px;
  color: #333;
}

.listHead .time {
  font-size: 12px;
  color: #999;
}

.chatlist .block.unread .details .listHead .time {
  color: #06d755;
}

.message_p {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.message_p p {
  color: #aaa;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  font-size: 0.9em;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message_p b {
  background: #06d755;
  color: #fff;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.75rem;
}

/* ImgText */
.imgText {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.imgText h4 {
  font-weight: 500;
  line-height: 1.2em;
  margin-left: 15px;
}

.imgText h4 span {
  font-size: 0.8em;
  color: #555;
}

/* CHAT BOX */
.chatbox {
  position: relative;
  width: 100%;
  height: calc(100% - 120px);
  padding: 20px;
  overflow-y: auto;
  background-image: url('images/background.png'); /* Adicione um background se desejar */
  background-size: cover;
}

/* Data Divider */
.date-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.date-divider span {
  background-color: #fff;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  color: #555;
  position: relative;
  z-index: 1;
}

.date-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: #ccc;
  z-index: 0;
}

/* Mensagens */
.message {
  max-width: 60%;
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 10px;
  position: relative;
  clear: both;
}

.my_msg {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 15px;
}

.my_msg p {
  background: #dcf8c6; /* Verde claro */
  text-align: right;
  position: relative;
  padding: 10px;
  border-radius: 10px;
  max-width: 60%;
  color: #333;
}

.my_msg p::before {
  content: "";
  position: absolute;
  top: 0;
  right: -12px;
  width: 20px;
  height: 20px;
  background: linear-gradient(
    135deg,
    #dcf8c6 0%,
    #dcf8c6 50%,
    transparent 50%,
    transparent
  );
}

.my_msg p .time {
  margin-top: 5px;
  font-size: 0.85em;
  opacity: 0.5;
  align-self: flex-end;
}

.friend_msg {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 15px;
}

.friend_msg p {
  background: #fff; /* Branco */
  text-align: left;
  position: relative;
  padding: 10px;
  border-radius: 10px;
  max-width: 60%;
  color: #333;
}

.friend_msg p::before {
  content: "";
  position: absolute;
  top: 0;
  left: -12px;
  width: 20px;
  height: 20px;
  background: linear-gradient(
    225deg,
    #fff 0%,
    #fff 50%,
    transparent 50%,
    transparent
  );
}

.friend_msg p .time {
  margin-top: 5px;
  font-size: 0.85em;
  opacity: 0.5;
  align-self: flex-start;
}

/* Estilização das mensagens */
.message p {
  display: flex;
  flex-direction: column;
}

/* Estilização das anotações e anexos */
.attachment, .message-image {
  max-width: 200px;
  margin-top: 5px;
}

.attachment .download-button {
  display: inline-block;
  margin-top: 5px;
  padding: 5px 10px;
  background-color: #25d366;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  font-size: 12px;
}

.attachment .download-button:hover {
  background-color: #128c7e;
}

.message-image {
  width: 100%;
  border-radius: 10px;
  cursor: pointer;
}

/* CHAT INPUT */
.chat_input {
  position: relative;
  width: 100%;
  height: 60px;
  background: #f0f0f0;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat_input ion-icon {
  cursor: pointer;
  font-size: 1.8em;
  color: #51585c;
}

.chat_input ion-icon:nth-child(1) {
  margin-right: 15px;
}

.chat_input input {
  position: relative;
  width: 90%;
  margin: 0 20px;
  padding: 10px 20px;
  border: none;
  outline: none;
  border-radius: 30px;
  font-size: 1em;
}
