/* ========================= */
/* Ask Rifqi AI */
/* ========================= */

.ai-chat-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #149ddd, #0d6efd);
  color: white;
  font-size: 28px;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  transition: 0.3s;
}

.ai-chat-btn:hover {
  transform: scale(1.08);
}

.ai-chatbox {
  position: fixed;
  right: 20px;
  bottom: 100px;
  width: 360px;
  height: 550px;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  z-index: 9999;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}

.ai-header {
  background: linear-gradient(135deg, #149ddd, #0d6efd);
  color: white;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-subtitle {
  margin: 0;
  font-size: 12px;
  opacity: 0.8;
}

.close-ai-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  background: #f7f9fc;
}

.ai-message {
  padding: 12px 15px;
  border-radius: 15px;
  margin-bottom: 15px;
  max-width: 85%;
  line-height: 1.5;
  margin-top: 15px;
}

.ai-message.bot {
  background: white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.ai-message.user {
  background: #149ddd;
  color: white;
  margin-left: auto;
}

.ai-input-area {
  display: flex;
  border-top: 1px solid #ddd;
  background: white;
}

.ai-input-area input {
  flex: 1;
  border: none;
  padding: 15px;
  outline: none;
}

.ai-input-area button {
  width: 60px;
  border: none;
  background: #149ddd;
  color: white;
}

.suggested-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.suggest-btn {
  border: none;
  padding: 8px 12px;
  border-radius: 20px;
  background: white;
  font-size: 13px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: 0.3s;
}

.suggest-btn:hover {
  background: #149ddd;
  color: white;
}

.typing {
  display: inline-block;
}

.typing::after {
  content: '...';
  animation: dots 1s infinite;
}

@keyframes dots {
  0% { content: '.'; }
  33% { content: '..'; }
  66% { content: '...'; }
}

@media (max-width: 768px) {

  .ai-chatbox {
    width: calc(100% - 20px);
    right: 10px;
    left: 10px;
    bottom: 90px;
    height: 80vh;
  }

}