#box_agent {
  flex: 1;
  height: 323px;
  min-width: 340px;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 32px;
}

#box_agent h5 {
  font-size: 16px;
}

#chat_messages {
  flex: 1;
  overflow-y: auto;
  font-size: 14px;
}

#ai_thinking {
  display: flex;
  gap: 4px;
  padding-top: 12px;
}

#ai_thinking span {
  width: 6px;
  height: 6px;
  background: var(--color-black);
  border-radius: 50%;
  animation: blink 1.4s infinite both;
}

#ai_thinking span:nth-child(2) {
  animation-delay: 0.2s;
}

#ai_thinking span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
}

#box_agent #chat_input_container {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#box_agent #chat_input {
  height: 100%;
  flex: 1;
  padding: 8px 16px;
  border-radius: 8px;
  border: 0px;
  font-size: 14px;
  min-width: 0;
  background-color: var(--color-greyLight);
  color: var(--color-black);
}

#box_agent #chat_input::placeholder {
  color: var(--color-greyDark);
}

#box_agent #chat_send_btn {
  width: 36px; /* 固定寬度 */
  height: 36px; /* 固定高度 */
  border: none;
  background-color: var(--color-black);
  color: var(--color-white);
  border-radius: 50%; /* 完全圓形 */
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 1300px) {
  #box_agent {
    height: 291px;
    padding: 16px;
  }
}

@media (max-width: 768px) {
  #box_agent {
    height: 360px;
    margin-bottom: 24px;
    font-size: 12px;
  }
}

body.dark-mode #box_agent {
  background-color: var(--color-black);
}

body.dark-mode #ai_thinking span {
  background: var(--color-white);
}

body.dark-mode #box_agent #chat_input {
  background-color: var(--color-greyDark);
  color: var(--color-white);
}

body.dark-mode #box_agent #chat_input::placeholder {
  color: var(--color-greyLight);
}

body.dark-mode #box_agent #chat_send_btn {
  background-color: var(--color-greyDark);
}
