/* Profile Page Styling */
#profile {
  display: flex;
  flex-direction: column;
  height: 0dvh;
  overflow: hidden;
}
.profile-page > #profile {
  height: 90dvh;
  transition: all 0.5s linear;
}
.dark-mode.profile-page > #profile {
 background-color: #121212;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
#profile * {
  font-family: "Roboto", sans-serif;
  margin: 0;
  padding: 0;
}

#profile header {
  background-color: #4a4a4a;
  color: white;
  padding: 10px;
  display: flex;
  position: relative;
  align-items: center;
  /* flex-direction: row;
  justify-content:flex-start; */
  border-radius: 10px 10px 0 0;
}

#profile header button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  margin-right: 15px;
}
#profile header #exitButton {
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 12px;
  display: flex;
  align-items: center;
  padding: 5px;
  border-radius: 50%;
  transition: background-color 0.2s;
}
#exitButton:hover {
  background-color: rgba(255, 255, 255, 0.1);
}
#profile header button:hover {
  color: #8d8888;
}
#profile header #status {
  margin-left: auto;
}

header #photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 12px;
  background: #8d8888;
  padding: 3px;
}

header #photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: display 1s;
  border-radius: 50%;
}
header #photo:hover {
  background-color: #8d8888;
  filter: opacity(0.5);
}

#div-custom-name {
  font-weight: bold;
  font-size: 16px;
  margin-right: auto;
}
#status {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-right: 12px;
}
#serch,
#menu {
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  padding: 8px;
  margin-left: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

#serch svg {
  width: 20px;
  height: 20px;
}

#serch:hover,
#menu:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

#menu {
  font-size: 16px;
  letter-spacing: 1px;
}

/* Search container */
#serch-container {
  display: none;
  position: fixed;
  top: 60px; 
   z-index: 100;
  left:70%;
  transform: translateX(-50%);
}
#serch-container.active {
  display: flex;


}
body #profile #serch-container {
  display: none;
  width: 95%;
  max-width: 500px;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  overflow: hidden;
}

body #profile #serch-container.active {
  display: flex;
  border: 1px solid #3498db;
}
body.dark-mode #profile #serch-container.active {
  background-color: #1e1e1e;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
body.dark-mode #profile #serch-container.active input {
  background-color: #1e1e1e;
  color: #fff;
}
#serch-container button {
  width: 10%;
  background-color: #3498db;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 8px 0;
  transition: background-color 0.3s;
}

#serch-container button:hover {
  background-color: #2980b9;
}

#serch-container input{
  width: 80%;
  height: 60px;
  padding: 10px 15px;
  border: none;
  outline: none;
  font-size: 16px;
}










/*  */
/* 
#profile header h1 {
    font-size: 1rem;
    flex-grow: 1;
}

#profile header h2 {
    font-size: 0.9rem;
    color: #b0b0b0;
} */

#profile #profile-main {
  display: flex;
  flex-direction: column;
  height: calc(100% - 60px);
}

#profile #msgs {
  flex: 1; /* Ocupa todo o espaço disponível */
  overflow-y: auto;
  padding: 15px;
  margin: 0; /* Removendo margens para ocupar 100% do espaço */
  background-color: #ffffff;
  min-height: 0; /* Evita problemas com flexbox em alguns navegadores */
}

#profile #profile-main #msg {
  display: flex;
  padding: 15px;
  position: sticky;
  background-color: #f0f2f5;
}

#msg-input {
  flex-grow: 1;
  padding: 10px;
  align-self: flex-start;
  border: 1px solid #ddd;

  border-radius: 5px 0 0 5px;
}

#send {
  padding: 10px 15px;
  background-color: #25d366;
  color: white;
  border: none;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
}
#profile #sender-msg,
#user-msg,
#system-msg {
  max-width: 70%;
  margin: 0.5px;
  padding: 0.8rem;
  border-radius: 1rem;
  word-wrap: break-word;
  padding: 10px;
  margin-bottom: 15px;
  line-height: 1.4;
}

#profile #sender-msg {
  background-color: #e8eaed;
  align-self: flex-start;
  border-bottom-left-radius: 0.25rem;
  color: black;
}

#profile #user-msg {
  background-color: #2c3e50;
  color: white;
  align-self: flex-end;

  border-bottom-right-radius: 0.25rem;
}

/* #user-msg {
  background-color: #f5f5f5;

  border-radius: 8px;
 
  max-width: 80%;
 
} */

#profile #system-msg {
  background-color: #f1c40f;
  align-self: center;
  border-radius: 0.5rem;
  color: #2c3e50;
  max-width: 60%;
  text-align: center;
}

#profile span.time {
  font-size: 12px;
  color: #888888;
  font-style: italic;
  display: block;
  margin-top: 5px;
  font-family: Arial, sans-serif;
}

/* #profile footer {
    background-color: #f0f2f5;
    text-align: center;
    padding: 10px;
    font-size: 0.8rem;
    color: #888;
}

#profile footer a {
    color: #25D366;
    text-decoration: none;
} */
@media screen and (max-width: 768px) {
  #msg-input {
    flex-grow: 1;
    padding: 10px;
    align-self: flex-start;
    border: 1px solid #ddd;

    border-radius: 5px 0 0 5px;
  }
  #profile #profile-main #msg {
    display: flex;
    padding: 15px;
    margin-bottom: 5px;
    position: sticky;
    background-color: #f0f2f5;
    height: 40px;
  }
  /* Search container */
#serch-container {
  display: none;
  position: fixed;
  top: 60px; 
   z-index: 100;
  left:50%;
  transform: translateX(-50%);
}
}
