
.center {
  align-items: center;
}

.chat {
  max-width: 800px;
  align-items: center;
}

.chatheader {
  padding: 20px;
  background-color: #9956bd;
  color: white;
  text-align: center;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.chatheader img {
  max-width: 100px;
  margin-bottom: 2px;
}

.chatbotcontainer {
  padding-left: 100px;
  padding-right: 100px;
}

.chat-history {
  min-height: 300px;
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  border: 1px solid #ddd;
  background-color: #f9f9f9;
  border-bottom-right-radius: 16px;
  border-bottom-left-radius: 16px;
  margin-bottom: 15px;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.message {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
}

.user,
.response {
  padding: 12px;
  border-radius: 8px;
  max-width: 70%;
  word-wrap: break-word;
  margin-bottom: 8px;
}

.user {
  background-color: #e7e7e7;
  margin-left: auto;
  text-align: right;
}

.userchat {
  max-width: 70%;
  margin-left: auto;
  text-align: right;
  word-wrap: break-word;
}

.response {
  background-color: #f1f1f1;
  margin-right: auto;
  text-align: left;
}

.question-form {
  display: flex;
  padding: 15px;
  align-items: center;
  background-color: #fff;
  border-top: 1px solid #ddd;
}

.question-form input[type="text"] {
  flex: 1;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 16px;
  margin-right: 10px;
}

.icon-btn {
  max-width: 40px;
  padding: 10px;
  font-size: 18px;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  background-color: #ddd;
  color: #333;
}

.icon-btn:hover {
  background-color: #888;
}

.loading {
  font-size: 16px;
  color: #888;
  text-align: center;
  margin-top: 10px;
}

h1 {
  color: #fff;
}

p {
  color: #fff;
}

/* Styling untuk loader yang menutupi seluruh layar */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  /* Pastikan berada di atas konten lain */
}

/* Gambar dan teks loader */
.loader-image {
  width: 150px;
  height: 150px;
  margin-right: 10px;
}

.loader-text {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.chatbot-image {
  width: 40px;
  /* Sesuaikan ukuran gambar */
  height: 40px;
  border-radius: 50%;
  /* Membuat gambar menjadi bentuk bulat */
  margin-right: 10px;
  /* Memberikan ruang antara gambar dan teks */
}

.speech-controls {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.icon-btn {
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
  color: #666;
  transition: color 0.3s ease;
}

.icon-btn:hover {
  color: #333;
}

.play-btn,
.pause-btn,
.stop-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .container {
    min-height: 100%;
  }

  .chat-history {
    min-height: 200px;
  }

  .header {
    padding: 15px;
  }

  .question-form input[type="text"] {
    padding: 10px;
    font-size: 14px;
  }

  .message {
    margin: 8px 0;
  }

  .user,
  .response {
    font-size: 14px;
    padding: 10px;
    border-radius: 6px;
  }

  .icon-btn {
    font-size: 16px;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .icon-btn {
    max-width: 35px;
    font-size: 14px;
    padding: 8px;
  }

  .question-form input[type="text"] {
    font-size: 12px;
  }

  .header h1 {
    font-size: 18px;
  }

  .message {
    margin: 5px 0;
  }

  .user,
  .response {
    font-size: 12px;
    padding: 6px;
  }

  .chat-history {
    min-height: 180px;
  }
}
