.public-bot {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2000;
  font-family: "Noto Sans JP", "Open Sans", sans-serif;
}

.public-bot__launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #1f1f1f;
  color: #fff;
  border: none;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.public-bot__launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.public-bot__launcher-icon {
  font-size: 18px;
}

.public-bot__panel {
  position: absolute;
  right: 0;
  bottom: 60px;
  width: 340px;
  max-height: 70vh;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(23, 23, 23, 0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #eef0f3;
}

.public-bot__panel.is-open {
  display: flex;
}

.public-bot__header {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f2f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #f5f6ff 0%, #ffffff 55%, #f8f9ff 100%);
}

.public-bot__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.public-bot__logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.public-bot__title {
  font-size: 14px;
  font-weight: 700;
  color: #1f1f1f;
}

.public-bot__subtitle {
  font-size: 12px;
  color: #6b6f76;
}

.public-bot__close {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: #6b6f76;
}

.public-bot__content {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  background: #fafbfc;
}

.public-bot__welcome {
  font-size: 13px;
  color: #1f1f1f;
  margin-bottom: 12px;
}

.public-bot__quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.public-bot__quick-action {
  border: 1px solid #e6e8ec;
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  color: #2b2f36;
  transition: background 0.2s ease, border 0.2s ease;
}

.public-bot__quick-action:hover {
  background: #f0f2ff;
  border-color: #d7dcff;
}

.public-bot__messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.public-bot__message {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 90%;
  white-space: normal;
}

.public-bot__message--user {
  align-self: flex-end;
  background: #1f1f1f;
  color: #fff;
  white-space: pre-wrap;
}

.public-bot__message--bot {
  align-self: flex-start;
  background: #ffffff;
  color: #1f1f1f;
  border: 1px solid #e9ecf2;
}

.public-bot__message--bot p {
  margin: 0 0 6px;
}

.public-bot__message--bot p:last-child {
  margin-bottom: 0;
}

.public-bot__message--bot ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

.public-bot__message--bot li {
  margin: 4px 0;
}

.public-bot__message--bot strong {
  font-weight: 700;
}

.public-bot__sources {
  margin-top: 6px;
  font-size: 11px;
  color: #6b6f76;
}

.public-bot__sources a {
  color: #4b5cff;
  text-decoration: none;
}

.public-bot__composer {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #eef0f3;
  background: #fff;
}

.public-bot__input {
  flex: 1;
  border: 1px solid #e1e5ea;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  resize: none;
  min-height: 36px;
  max-height: 120px;
}

.public-bot__send {
  border: none;
  background: #4b5cff;
  color: #fff;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.public-bot__footer-links {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px 14px;
  background: #fff;
  border-top: 1px solid #f3f4f6;
  font-size: 12px;
}

.public-bot__footer-links a {
  color: #4b5cff;
  text-decoration: none;
}

.public-bot__typing {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #e9ecf2;
  background: #ffffff;
  font-size: 12px;
  color: #6b6f76;
}

.public-bot__typing-dots {
  display: inline-flex;
  gap: 4px;
}

.public-bot__typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9aa3b2;
  animation: public-bot-dot 1.2s infinite ease-in-out;
}

.public-bot__typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.public-bot__typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes public-bot-dot {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .public-bot {
    right: 16px;
    bottom: 16px;
  }

  .public-bot__panel {
    width: 90vw;
    right: 0;
  }
}
