/* Conteneur principal */
.chat-container {
  display: flex;
  width: 100%;
  height: 80vh;
  border: 1px solid #ccc;
  border-radius: 10px;
  overflow: hidden;
}

/* Barre latérale */
.chat-sidebar {
  background: #fff;
  overflow-y: auto;
  border-right: 1px solid #ccc;
  height: 100%;
}

.chat-sidebar h3 {
  margin-bottom: 10px;
  text-align: center;
}

.chat-user {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
  transition: background 0.3s;
}

.chat-user:hover {
  background: #ddd;
}

/* Zone de chat */
.chat-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.chat-header {
  background: #fff;
  color: #333;
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid #ccc;
  /* display: grid;
  align-items: center;
  grid-template-columns: 100%; */
}

.chat-header.active {
  grid-template-columns: 20% 80%;
}

.chat-messages {
  flex-grow: 1;
  padding: 15px;
  overflow-y: auto;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
}

.chat-messages ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.chat-messages li {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 10px;
  max-width: 60%;
  display: inline-block;
}

.sender {
  background: #fff;
  align-self: flex-start;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

.reply {
  background: #007bff;
  color: white;
  align-self: flex-end;
  text-align: right;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

.time {
  display: block;
  font-size: 12px;
  margin-top: 5px;
  text-align: right;
}

/* Zone de saisie */
.chat-input {
  display: none;
  padding: 15px;
  background: #fff;
  border-top: 1px solid #ccc;
}

.chat-input.active {
  display: flex;
}

.chat-input input {
  flex-grow: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-right: 10px;
}

.chat-input button {
  background: var(--color-blue);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

.chat-input button:hover {
  background: #0056b3;
}

/* Style de l'indicateur "En train d'écrire..." */
#typing-indicator {
  font-style: italic;
  color: gray;
  padding-left: 10px;
  font-size: 14px;
}

.chat-user {
  display: grid;
  grid-template-columns: 30% 55% 15%;
  align-items: center;
  gap: 0.3rem;
}

.chat-user img {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  object-fit: cover;
}
.chat-user p {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 0;
  font-weight: 500;
}

.unread-badge {
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-blue);
  color: #fff;
  font-size: 12px;
}

#chat-user-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: none;
}

#chat-user-photo.active {
  display: block;
}

.chat-header .infos {
  display: flex;
  /* flex-direction: column; */
  /* justify-content: center; */
  align-items: center;
}

.chat-header .infos .icons-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.chat-header .infos .icons-actions a svg,
.chat-header .infos .icons-actions p svg {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  border-radius: 50%;
  background-color: #dedede;
  transition: 0.3s ease-in-out;
}

.chat-header .infos .icons-actions a svg:hover,
.chat-header .infos .icons-actions p svg:hover {
  transform: scale(0.9);
}

.unread-bubble {
  background-color: red;
  color: white;
  border-radius: 50%;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: bold;
  min-width: 25px;
  height: 25px;
  left: 0;
  bottom: 0;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
}

.icons-actions .col-md-4 .rounded {
  padding: 0.3rem 0.5rem;
}

.large-swal-popup {
  width: 600px !important; /* ou 700px, 800px selon besoin */
  max-width: 90vw; /* adaptatif */
}

@media (max-width: 992px) {
  .icons-actions {
    padding-bottom: 0 !important;
  }
  .icons-actions .col-md-4 {
    max-width: 33%;
    padding-bottom: 0 !important;
  }
  .icons-actions .col-md-4 a span,
  .icons-actions .col-md-4 p span,
  .icons-actions .col-md-4 div span {
    display: none;
  }
}
