/*----- 因應網站色系與位置套用調整部分-----*/
.btn-chat{
  width: 48px;
  height: 48px;
  line-height: 46px;
  right: 30px;
  bottom: 36px;
  background-color: #E8E9E8;
  color: #777777;
}
.btn-chat:hover{
  background-color: #E8E9E8;
  color: #555555;
}
.chat-content{
  height: 500px;
  width: 400px;
  bottom: 80px;
  right: 80px;
}
@media screen and (max-width: 991.9px) {
  .btn-chat{
    width: 40px;
    height: 40px;
    line-height: 40px;
    right: 30px;
    bottom: 80px;
    background-color: #E8E9E8;
    color: #777777;
  }
}
@media screen and (max-width: 524.9px) {
  .chat-content{
    width: calc(100% - 60px);
    bottom: 140px;
    right: 30px;
  }
}
/* 
---------------------------------------------
AI對話視窗樣式
--------------------------------------------- 
*/

.hidden{ display:none;}
.btn-chat{
  position: fixed; 
  padding: 0px; 
  text-align: center;  
  z-index: 99;
  border-radius: 50%;
}
.chat-content{
  max-height: 100%;
  max-width: 100%; 
  background-color: #fff;
  position: fixed; 
  z-index: 999;
  border-radius: 10px;
  box-shadow: 0px 0px 12px rgba(119, 119, 119, 0.4);
}
.chat-box{
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: space-between;
}
/* ----- 對話框header ----- */
.chat-box .chat-header{
  display: flex;
  align-items: center;
  color: #777777;
  font-size: 16px;
  letter-spacing: 2px;
  font-weight: 500;
  height: 60px;
  background: #F9FBFF;
  padding: 8px 10px;
  border-radius: 10px 10px 0 0;
  border-bottom: 1px solid #eaeaea;
}
.chat-box .chat-header .chat-avatar{
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background: linear-gradient(to bottom left, #79C7C5 20%, #A1E2D9 100%);
  border-radius: 50%;
}
.chat-box .chat-header .chat-title{
  flex-grow: 1;
  margin: 0 8px;
  line-height: 14px;  /*字變多的調整*/
  width: 70%;  /*字變多的調整*/
}
.chat-box .chat-header .chat-dropdown .dropdown-toggle{ color:#777777; }
.chat-box .chat-header .chat-dropdown .dropdown-toggle:after{ display: none;}
.chat-box .chat-header .chat-dropdown .dropdown-menu{
  border: 1px solid #dadada;
}
.chat-box .chat-header .chat-dropdown .dropdown-item{
  font-size: 15px;
  color: #777777;
  padding: 8px 12px;
}
.chat-box .chat-header .chat-dropdown .dropdown-item:hover{
  background-color: #f4f4f4;
  color: #555555;
}
.chat-box .chat-header small{
  font-size:9px;
}
/* ----- 對話框body ----- */
.chat-box .chat-body{
  flex-grow: 1;
  background: #F1F1F1;
  padding: 15px;
  height: 385px;
  overflow-y: auto;
}
.chat-box .chat-body::-webkit-scrollbar{
  width: 5px;
  height: 5px;
  background-color: rgba(255,255,255,0);
}
.chat-box .chat-body::-webkit-scrollbar-thumb{
  border-radius: 5px;
  background-color: rgba(0,0,0,0.2);
  position: absolute;
}
.chat-box .chat-body .chat-date{
  text-align: center;
  font-size: 13px;
  color: #aaaaaa;
  letter-spacing: 2px;
  margin: 0px 0px 20px;
}
/*AI*/
.chat-box .chat-body .chat-staff{
  margin: 12px 15% 12px 10px;
  font-size: 15px;
}
.chat-box .chat-body .chat-staff .chat-bubble{
  display: inline-block;
  color: #4d4d4d;
  background-color: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  position: relative;
  filter: drop-shadow(0px 0px 1px #00000015);
  word-break: break-all;
}
.chat-box .chat-body .chat-staff .chat-bubble::after{
  width: 10px;
  height: 20px;
  content: "";
  background: transparent url("../images/bubble_L.png") no-repeat 0 0 / auto 20px;
  position: absolute;
  left: -10px;
  top: 0px;
  filter: drop-shadow(-1px -1px 1px #00000010);
}
.chat-box .chat-body .chat-staff .chat-time{
  font-size: 12px;
  color: #cccccc;
  margin-top: 2px;
}
/*訪客*/
.chat-box .chat-body .chat-guest{
  margin: 12px 10px 12px 15%;
  font-size: 15px;
  text-align: right;
}
.chat-box .chat-body .chat-guest .chat-bubble{
  display: inline-block;
  color: #4d4d4d;
  background-color: #dbe4ee;
  padding: 8px 12px;
  border-radius: 8px;
  position: relative;
  filter: drop-shadow(0px 0px 1px #00000015);
  text-align: left;
  word-break: break-all;
  white-space: pre-wrap;  //讓文字的/n會換行
}
.chat-box .chat-body .chat-guest .chat-bubble::after{
  width: 10px;
  height: 20px;
  content: "";
  background: transparent url("../images/bubble_R.png") no-repeat 0 0 / auto 20px;
  position: absolute;
  right: -10px;
  top: 0px;
  filter: drop-shadow(1px -1px 1px #00000010);
}
.chat-box .chat-body .chat-guest .chat-time{
  font-size: 12px;
  color: #cccccc;
  margin-top: 2px;
}
/* ----- 對話框footer ----- */
.chat-box .chat-footer{
  height: 55px;
  background: #F9FBFF;
  border-radius: 0 0 10px 10px;
  border-top: 1px solid #eaeaea;
  padding: 8px 15px;
  display: flex;
  align-items: center;
  color: #777777;
  font-size: 16px;
  letter-spacing: 2px;
  font-weight: 500;
}
.chat-box .chat-footer .msg-input{
  font-size: 15px;
  border-width: 0px;
}
.chat-box .chat-footer .btn-appendix{
  height: 36px;
  line-height: 36px;
  border: 0px;
  border-radius: 4px;
  flex: 0 0 40px;
  background-color: #E7E8E8;
  color: #777777;
}
.chat-box .chat-footer .btn-appendix:hover{
  color: #555555;
}
.chat-box .chat-footer .btn-send{
  height: 36px;
  line-height: 36px;
  border: 0px;
  border-radius: 4px;
  margin-left: 10px;
  flex: 0 0 60px;
  background-color: #00539C;
  color: #ffffff;
  font-size: 15px;
}
.chat-box .chat-footer .btn-send:hover{
  background-color: #194376;
  color: #ffffff;
}
/* 等待AI回話的動畫 */
.ellipsis {
  margin:2px; /*把js和樣式套一起後球會擠在一起的關係而增加此設定*/
  width: 5px;
  height: 5px;
  display: inline-block;
  background: #b7b7b7;
  border-radius: 50%;
  animation: bounce 1.5s linear infinite;
}
.ellipsis.one{ animation-delay: 0.6s;}
.ellipsis.two{ animation-delay: 0.5s;}
.ellipsis.three{ animation-delay: 0.8s;}
@keyframes bounce {
  30% { transform: translateY(-2px);}
  60% { transform: translateY(0px);}
  80% { transform: translateY(2px);}
  100%{ transform: translateY(0px); opacity: 0.5;}
}
