/* ===============================
   JaFir Assistant Chatbot CSS
   =============================== */

#jafir-chatbot {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Floating Button */
#jafir-chat-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #bfa046;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* Chat Window */
#jafir-chat-window {
  width: 320px;
  max-height: 420px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  overflow: hidden;
}

.hidden {
  display: none !important;
}


/* Header */
.jafir-chat-header {
  background: #bfa046;
  color: #ffffff;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.jafir-chat-header small {
  opacity: 0.85;
}

#jafir-chat-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
}

/* Messages */
#jafir-chat-messages {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
  background: #f8f9fa;
}

.bot-message,
.user-message {
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.4;
}

.bot-message {
  background: #e6f4ef;
  color: #0f3d2e;
}

.user-message {
  background: #bfa046;
  color: #ffffff;
  text-align: right;
}

/* Input */
.jafir-chat-input {
  display: flex;
  border-top: 1px solid #ddd;
}

#jafir-chat-text {
  flex: 1;
  padding: 10px;
  border: none;
  font-size: 14px;
}

#jafir-chat-text:focus {
  outline: none;
}

#jafir-chat-send {
  padding: 0 14px;
  background: #bfa046;
  color: #ffffff;
  border: none;
  cursor: pointer;
}

/* Buttons inside chat (Form / WA) */
.jafir-action-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 8px 12px;
  background: #198754;
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  #jafir-chat-window {
    width: 90vw;
    max-height: 70vh;
  }
}

.chat-label {
  position: absolute;
  right: 64px;          /* RAPAT ke tombol */
  bottom: 14px;
  background: linear-gradient(135deg, #FFD88A, #C9A441);
  color: #4a3b0f;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(191, 160, 70, 0.45);
  white-space: nowrap;
  animation: floatIn .25s ease;
}

/* Panah kecil ke tombol (opsional tapi cakep) */
.chat-label::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent #C9A441;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateX(6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.jafir-typing {
  font-style: italic;
  opacity: 0.7;
  animation: blink 1.4s infinite;
}

@keyframes blink {
  0% { opacity: 0.3; }
  50% { opacity: 0.8; }
  100% { opacity: 0.3; }
}


