/* チャットトグルボタン */
#chat-toggle {
  position: fixed;
  bottom: 15px;
  right: 75px;
  width: 60px;
  height: 60px;
  background-color: transparent;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 900;
  overflow: hidden;
  padding: 0;
}

#chat-toggle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* チャットウィンドウ */
#chat-container {
  position: fixed;
  bottom: 76px;
  right: 75px;
  width: 75vw;
  height:70vh;
  max-width: 500px;
  min-width: 100px;
  max-height: 650px;
  min-height: 100px;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

#chat-container.hidden {
  display: none;
}

#chat-header {
  background: linear-gradient(100deg, #00aaff 0%, #007bff 100%);
  color: white;
  padding: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  position: relative;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

#chat-header .header-title {
  flex-grow: 1;
  text-align: center;
  user-select: none;
}

#minimize-btn {
  width: 30px;
  height: 30px;
  background-color: white;
  border: none;
  border-radius: 50%;
  color: #007bff;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.minimized #chat-box {
  display: none;
}

#chat-box {
  flex-grow: 1;
  padding: 10px;
  overflow-y: auto;
  background-color: #f9f9f9;
  font-size: 14px;
  display: flex;
  flex-direction: column;
}

#chat-box div {
  margin: 6px 0;
}

#chat-input-area {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ccc;
}

#chat-input {
  flex-grow: 1;
  padding: 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

#chat-send {
  margin-left: 8px;
  padding: 8px 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.chat-message {
  max-width: 85%;
  padding: 12px 16px;
  margin: 8px 0;
  border-radius: 12px;
  word-wrap: break-word;
  line-height: 1.5;
  font-size: 14px;
}

.chat-message.user {
  background-color: #007bff;
  color: white;
  align-self: flex-end;
  margin-left: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.chat-message.bot {
  display: flex;
  align-items: flex-start;
  margin: 10px 0;
}

.bot-icon-outside {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
  margin-left: -15px
}

.bot-bubble {
  background-color: #fff;
  font-size: 14px
  color: #333;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  max-width: 80%;
  word-break: break-word;
  font-size: 14px;
}

.bot-bubble strong {
  font-weight: bold;
  margin-left: 0;
  font-size: 14px;
}

#chat-toggle-bubble {
  position: fixed;
  bottom: 85px;
  right: 75px;
  max-width: 250px;
  background-color: #fff;
  color: #000;
  padding: 6px 15px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  font-size: 13px;
  z-index: 950;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid #007bff;
}

#chat-toggle-bubble::before {
  content: "";
  position: absolute;
  bottom: -10px;
  right: 25px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #007bff;
  z-index: 949;
}

#chat-toggle-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 25px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 11px solid #fff;
  z-index: 950;
}

#chat-toggle-bubble button.close-btn {
  background: transparent;
  border: none;
  color: #007bff;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  user-select: none;
  margin-top: 3px;
}