/* body { */
/*   background: lightblue; */
/* } */
div#container div {
  /*   border: 1px solid red; */
  
}

.hideRoomTimes {
  display: None;
}

div#openRoom,div#showChatRoom {
  position: fixed;
  right: 20px;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  padding: 15px;
  /*   width: 100px; */
  /*   height: 50px; */
  border-radius: 10px 10px 0 0;
  background: #F26F71;
  color: white;
  /* alertify z-index=5000 */
  z-index: 4999;
  cursor: pointer;
}

div#chatRoom {
  z-index: 9999;
  position: fixed;
  right: 20px;
  bottom: 0;
  /*   width: 100px; */
  /*   height: 50px; */
  /*   text-align: center; */ background : #F6F6F6;
  /*   color: #fff; */
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .25);
  border-radius: 8px 8px 0 0;
  /*   cursor: pointer; */
  display: flex;
  background: #F6F6F6
}

div#roomList {
  width: 13rem;
  border-right: 1px solid gray;
  overflow: auto;
}

div#roomList .store {
  padding: 0 10px;
  border-bottom: 1px solid gray;
  cursor: pointer;
}

div.chatHeader {
  background: #F26F71;
  text-align: center;
  line-height: 2rem;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
}

div#chatContent a {
  color: black;
}

div#chatContent {
  width: 430px;
  height: 316px;
  border-bottom: 1px solid gray;
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
}

div#roomTyping {
  width: 430px;
  height: 80px;
}

div.chatBubble {
  margin: .5rem 0;
  padding: 0 10px;
}

div.chatBubble.to {
  text-align: right;
}

div.chatBubble.from {
  text-align: left;
}

div.chatMsg {
  display: inline-block; /* 自適應寬度 */
  line-height: 1.2rem;
  padding: 5px 10px;
  /*   box-shadow: 0 1px 1px rgba(0,0,0,.1); */
  word-wrap: break-word;
  background: white;
  border-radius: 10px;
}

div.chatBubble.to div.chatMsg {
  background: #F26F71;
  color: white;
  word-break: break-word;
  text-align: left;
}

div.timestamp {
  color: #999;
  font-size: 10px;
  padding: 0 10px;
  line-height: 3rem;
  margin-top: -10px;
}

div#hideChatRoom {
  /*   width: 50px; */
  /*   position: absolute; */
  /*   right: 0; */
  /*   top: 0; */
  cursor: pointer;
}

span.notice {
  display: inline-block;
  font-size: .8em;
  color: white;
  text-align: center;
  vertical-align: super;
  border-radius: 100rem;
  background: red;
  width: 1rem;
  line-height: 1rem;
}

.chatHeader input[type=text] {
  height: 1.5rem;
  width: 8rem;
  margin: .25rem 0;
}

#chatSubmit, #addOrder {
  border: solid 2px #F18C80;
  border-radius: 1.65em;
  width: 3em;
  padding: 0.2em 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

#chatSubmit {
  background: #F18C80;
  color: #FFF;
}

#addOrder {
  background: #FFF;
  color: #F18C80;
}

#chatRoom .productInfo {
  display: flex;
}

.chatBubble div {
  margin-left: 1em !important;
}

.chatBubble img {
  height: 5rem;
}

.chatBubble div span {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  width: 18em;
}

.fa-arrow-left {
  display: none;
}

.room-link, .fa-minus, .fa-arrow-left {
  cursor: pointer;
}

#chatTyping {
  width: 70%;
  border: none;
  background: none;
  box-shadow: none;
  outline: none;
}

.chatmember {
  display: none;
}

@media screen and (max-width: 800px) {
  div#chatRoom {
    width: 100%;
    height: 100%;
    right: 0;
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: 5em auto;
    grid-template-areas: "roomList" "roomRight";
  }
  #roomList {
    grid-area: roomList;
    width: 100% !important;
    height: 580px !important;
  }
  #roomRight {
    width: 100% !important;
    grid-area: roomRight;
    height: 30em !important;
  }
  #chatContent {
    width: 100% !important;
    height: 30em;
  }
  div#roomTyping {
    margin: 0 auto;
    text-align: center;
    width: 100% !important;
  }
  .chatMsg {
    word-break: break-all;
  }
  #chatRoom .productInfo {
    display: flex;
  }
}

.productInfo img {
  width: 5rem;
}

#roomItems {
  overflow-y: scroll;
  height: 400px;
}

.roomItem {
  margin: 1rem 1rem;
}

@media screen and (max-width: 420px) {
  .hideRoomTimes {
    display: block;
    cursor: pointer;
  }
  #roomList {
    margin-top: 5rem;
  }
  #roomRight {
    display: none;
  }
  .fa-arrow-left {
    display: block;
  }
  .room-link {
    display: none;
  }
  .chatmember {
    display: inline-block !important;
  }
  .chatBubble img {
    height: 5rem;
  }
}