.tab-btn {
  color: #000;
  background: none;
  border: none; 
  padding: 0; 
  font-size: 14px; 
  cursor: pointer; 
  transition: color 0.3s ease; 
}

.tab-btn:hover {
  color: #ff6e00;
}

.tab-btn.active {
  color: #ff6e00; 
}

/* Default background gradasi */
#chat-box {
  background: linear-gradient(to bottom, #ff6e00 30%, #ffffff 70%);
  transform-origin: bottom right; 
  transform: scale(0);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Saat aktif (muncul keluar) */
#chat-box.show {
  transform: scale(1);
  opacity: 1;
}

/* Saat menutup (masuk kembali) */
#chat-box.hide {
  transform: scale(0);
  opacity: 0;
}

/* Background solid untuk tab "Chat" */
#chat-box.chat-active {
  background: #ffffff !important;
}

#chat-header.chat-active {
  background: #ff6e00 !important; 
}

#chat-header img {
  max-height: 40px; 
  object-fit: contain;
}

/* Tambahkan garis pembatas dotted antara dropdown FAQ */
#qna-tab ul li {
  border-bottom: 1px dotted #ddd; 
  padding-bottom: 10px;
  margin-bottom: 10px;
}

/* Hapus garis pembatas pada item terakhir */
#qna-tab ul li:last-child {
  border-bottom: none;
}

#backToChatBtn:hover {
  background-color: #e65c00 !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Efek Rotasi Biasa */
#chat-bubble.rotate {
  animation: rotate-icon 0.3s ease-in-out forwards;
}

/* Efek Rotasi Berlawanan */
#chat-bubble.reverse-rotate {
  animation: reverse-rotate-icon 0.3s ease-in-out forwards;
}

/* Animasi Rotasi ke Arah Biasa */
@keyframes rotate-icon {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Animasi Rotasi ke Arah Berlawanan */
@keyframes reverse-rotate-icon {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

/* Efek Fade In */
.fade {
  animation: fade-in 0.3s ease-in-out;
}

/* Animasi Fade In */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Tambahkan animasi rotasi hanya untuk ikon */
.tab-btn img {
  transition: transform 0.3s ease-in-out;
}

.tab-btn:hover img {
  transform: translateY(-5px);
}

/* Animasi khusus untuk ikon tab yang aktif */
.tab-btn.active img {
  animation: bounce-rotate 3s ease-in-out infinite;
}

/* Keyframes untuk efek naik, rotasi cepat di atas, dan turun */
@keyframes bounce-rotate {
  0% {
    transform: translateY(0) rotate(0deg); 
  }
  10% {
    transform: translateY(-10px) rotate(0deg); 
  }
  20% {
    transform: translateY(-10px) rotate(360deg);
  }
  30% {
    transform: translateY(-10px) rotate(360deg);
  }
  40% {
    transform: translateY(0) rotate(360deg);
  }
  100% {
    transform: translateY(0) rotate(360deg); 
  }
}

#emojiPicker span {
  margin: 5px;
  display: inline-block;
  cursor: pointer;
}

#emojiPicker span:hover {
  transform: scale(1.2);
  transition: transform 0.2s ease-in-out;
}

#emojiButton {
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; 
  height: 40px;
  border-radius: 50%; 
}

#emojiButton img {
  width: 24px;
  height: 24px;
  pointer-events: none;
}

.cs-avatars {
  display: flex;
  align-items: center;
  margin-left: 10px;
}

.cs-avatars img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 2px solid #ff6e00;
  margin-left: -8px;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.cs-avatars img:first-child {
  margin-left: 0;
}

.cs-avatars img:hover {
  transform: scale(1.1);
  z-index: 2;
}

input#inputName,
input#inputInstansi,
input#inputKota,
input#inputPesan {
  margin-bottom: 0px !important;
}

#chat-box:not(.show):not(.hide) {
  transition: none !important;
  transform: scale(0) !important;
  opacity: 0 !important;
}
