@charset "utf-8";

#chat-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #fda0c2;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 9999;
}

#chat-box {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 320px;
  height: 520px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 10px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
}

#chat-header {
  background: #fda0c2;
  color: white;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  position: relative;
}

#chat, #history-view {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  font-size: 14px;
}

#chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#chat-note {
  font-size: 11px;
  color: #888;
  padding: 6px 10px;
  border-top: 1px solid #eee;
  background: #fafafa;
  line-height: 1.4;
  background: #fff7f7;
color: #cc6666;
}
#history-view {
  display: none;
  flex-direction: column;
}

.message {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 10px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.message p {
  margin: 0 0 10px;
  line-height: 1.6;
}
.message p:last-child {
  margin-bottom: 0;
}

.user {
  align-self: flex-end;
  background: #fda0c2;
  color: white;
}

.ai {
  align-self: flex-start;
  background: #f1f1f1;
}

.loading::after {
  content: "・・・";
  animation: dots 1.2s steps(3, end) infinite;
}

@keyframes dots {
  0% { content: "・"; }
  33% { content: "・・"; }
  66% { content: "・・・"; }
}

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

#chat-input input {
  flex: 1;
  padding: 8px;
  border: none;
}

#chat-input button {
  padding: 8px;
  border: none;
  background: #fda0c2;
  color: white;
}

#chat-header span {
  font-size: 22px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}

#chat-header span:hover {
  background: rgba(255,255,255,0.2);
}

#menu-dropdown {
  position: absolute;
  top: 40px;
  right: 10px;
  background: #fff;
  border: 1px solid #ccc;
  display: none;
  flex-direction: column;

}

.menu-item {
  padding: 10px;
  cursor: pointer;
  background-color:pink;
}
.menu-item:hover {
  background: #f5f5f5;
  color:pink;
}

.history-item {
  padding: 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}
.history-item:hover {
  background: #f5f5f5;
}
