@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

/* Ventana fija en la parte inferior */
#chat-container {
  position: fixed;
  bottom: 0;  
  right: 0px;
  width: 590px;
  max-height: 450px;
  background: white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  border-radius: 10px 10px 0 0;
  display: none; /* oculto al inicio */
  flex-direction: column;
  overflow: hidden;
  font-size: 14px;
  z-index: 9999;
  
}

#chat-header {
  background: #a7f039;
  color: #233746;
  text-align: center;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

#chat-header .cerrar-btn {
  background: #a7f039;
  border: none;
  color:#a7f039;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  
 
}

#chat-body {
  overflow-y: auto;
  padding: 3px;
  background: #fff;
  flex: 1;
}

.mensaje {
  margin-bottom: 12px;
  max-width: 75%;
  line-height: 1.4;
  padding: 10px 15px;
  border-radius: 18px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
  position: relative;
  word-wrap: break-word;
  font-size: 0.9rem;
}

.cliente {
  background: #a7f039;
  color: #233746;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.admin {
  background: #233746;
  color: #fff;
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

.mensaje strong {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 0.8rem;
  opacity: 0.85;
}

#chat-form {
  padding: 12px 16px;
  border-top: 1px solid #ddd;
  display: flex;
  gap: 8px;
  background: white;
}

#chat-form input[type="text"] {
  flex: 1;
  padding: 10px 15px;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 30px;
  transition: border-color 0.3s ease;
}

#chat-form input[type="text"]:focus {
  outline: none;
  border-color: #004182;
  box-shadow: 0 0 8px rgba(0, 65, 130, 0.3);
}

#chat-form button {
  background: #233746;
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

/* Mensaje aviso horario */
#aviso-horario {
  text-align: center;
  color: #b30000;
  font-weight: bold;
  padding: 10px;
  background: #ffe1e1;
  border-radius: 6px;
  margin-bottom: 10px;
  display: none;
  font-size: 0.9rem;
}

#nuevo-chat-btn {
  position: fixed;
  bottom: 70px; 
  right: 10px;
  background: #233746;
  color: white;
  border: none;
  border-radius: 30px;
  padding: 10px 20px;
  font-size: 18px;
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: background 0.3s ease;
}

#nuevo-chat-btn i {
  font-size: 20px;
}

@media (max-width: 768px) {
  #chat-container {
    width: 115px;
    left: .1%;
    max-height: 115vh;
    height: auto;
    border-radius: 10px 10px 0 0;
  }

  #chat-header {
    font-size: 1rem;
    padding: 10px 14px;
  }

  #chat-form {
    padding: 10px 14px;
  }

  .mensaje {
    font-size: 0.85rem;
  }

  #nuevo-chat-btn {
    bottom: 10px;
    right: 20px;
    font-size: 16px;
    padding: 8px 16px;
  }
}

