body { margin: 0; font-family: Arial, sans-serif; }

#miChatBtn{
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

#miChatWindow{
  position: fixed;
  right: 20px;
  bottom: 86px;
  width: 340px;
  height: 480px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hidden{ display: none !important; }

.miChatHeader{
  padding: 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
}

.miChatTitle{ font-weight: 700; font-size: 14px; }
.miChatSub{ font-size: 12px; opacity: .75; margin-top: 2px; }

#miCloseBtn{
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

#miChatBody{
  padding: 12px;
  flex: 1;
  overflow-y: auto;
  background: #fafafa;
}

.miMsg{
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 14px;
  margin: 8px 0;
  line-height: 1.35;
  white-space: pre-line;
  word-wrap: break-word;
}

.miUser{
  margin-left: auto;
  background: #0b57d0;
  color: #fff;
}

.miBot{
  margin-right: auto;
  background: #fff;
  border: 1px solid #eee;
}

.miChatFooter{
  padding: 10px;
  display: flex;
  gap: 8px;
  border-top: 1px solid #eee;
  background: #fff;
}

#miInput{
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  outline: none;
}

#miSendBtn{
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
}
