
.chat-header {
  display: flex;
  align-items: center;
  padding: 42px 16px 12px 16px; /* 🔥 60px arriba por el menú + 12px del padding original */
  background-color: #1c1c1c;
  border-bottom: 1px solid #2a2a2a;
  box-sizing: border-box;
}


.chat-header .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-right: 10px;
}

.chat-header .chat-info h3 {
  font-size: 1rem;
  margin: 0;
  color: #fff;
}

.chat-header .status {
  font-size: 0.65rem;
  color: #4caf50;
}

.chat-container {
  height: calc(100vh - 25px); /* 100vh menos la altura del menú */
  margin-top: 4%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #1c1c1c;
  border-radius: 4px;
  box-shadow:
    inset 2px 2px 5px rgba(0, 0, 0, 0.7),
    inset -2px -2px 5px rgba(255, 255, 255, 0.08),
    0 6px 18px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
}



.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #1c1c1c;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #555 #1c1c1c;
  border-top: 1px solid #2a2a2a;
  border-bottom: 1px solid #2a2a2a;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}


.chat-input {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  border-top: 1px solid #2a2a2a;
  background: #121212;
  flex-shrink: 0; /* 👈 Evita que se reduzca o se mueva */

}


.message {
  max-width: 70%;
  padding: 10px 15px;
  margin-bottom: 10px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #fff;
}

.incoming {
  background: #2e2e2e;
  align-self: flex-start;
  border-top-left-radius: 0;
}

.outgoing {
  background: #3eaf7c;
  align-self: flex-end;
  border-top-right-radius: 0;
  margin-left: auto;
  color: #fff;
}


.chat-input input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 15px;
  border-radius: 25px;
  background: #2a2a2a;
  color: #fff;
  font-size: 1rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.chat-input input::placeholder {
  color: #bbb;
}

.chat-input button {
  background: none;
  border: none;
  margin-left: 10px;
  cursor: pointer;
}

.chat-input img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  /* 🔥 Para íconos oscuros */
}

@media screen and (max-width: 768px) {
  .chat-container {
    margin-top: 0%;
  }


  #modalChatMovil {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh; /* antes 100vh o auto */
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    z-index: 10000;
  }

  #modalChatMovil.show {
    display: flex;
  }

  .chat-modal {
    width: 100%;
    height: 100dvh; /* antes 100vh */
    display: flex;
    flex-direction: column;
  }
  

  .chat-modal .chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .chat-modal .chat-header {
    padding: 12px;
    background-color: #222;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #333;
  }

  .chat-modal .chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 12px;
    background-color: #111;
  }

  .chat-modal .chat-input {
    display: flex;
    align-items: center;
    padding: 8px;
    background-color: #222;
    border-top: 1px solid #333;
  }

  .chat-modal .chat-input input {
    flex-grow: 1;
    padding: 8px;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    background-color: #333;
    color: white;
    margin-right: 8px;
  }

  .chat-modal .chat-input button {
    background: none;
    border: none;
    cursor: pointer;
  }

  .chat-modal .chat-input img {
    width: 24px;
    height: 24px;
  }

  .close-modal {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    color: white;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10001;
  }
}
