#vestigium-chatbot {
  position: fixed !important;
  right: 20px !important;
  bottom: 20px !important;
  z-index: 2147483647 !important;
  font-family: Arial, sans-serif;
  pointer-events: none !important;
}

#vestigium-chatbot * {
  box-sizing: border-box;
}

#vestigium-chatbot-toggle,
#vestigium-chatbot-window,
#vestigium-chatbot-window * {
  pointer-events: auto !important;
}

#vestigium-chatbot-toggle {
  position: relative !important;
  z-index: 2147483647 !important;
  width: 62px;
  height: 62px;
  border: none;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#vestigium-chatbot-window {
  position: absolute !important;
  right: 0 !important;
  bottom: 78px !important;
  z-index: 2147483647 !important;
  width: 360px;
  max-width: calc(100vw - 24px);
  height: 520px;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
}

#vestigium-chatbot-window.hidden {
  display: none !important;
}

.vestigium-chatbot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  background: #111827;
  color: #fff;
}

.vestigium-chatbot-header .subtitle {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}

#vestigium-chatbot-close {
  background: transparent;
  color: #fff;
  border: none;
  font-size: 26px;
  cursor: pointer;
  position: relative;
  z-index: 2147483647;
}

#vestigium-chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vestigium-message {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.45;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.vestigium-message.user {
  align-self: flex-end;
  background: #0f172a;
  color: white;
  border-bottom-right-radius: 6px;
  padding: 12px 14px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.vestigium-message.bot {
  align-self: flex-start;
  background: #ffffff;
  color: #111827;
  border: 1px solid #e8eaee;
  border-bottom-left-radius: 6px;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
  padding: 14px 16px;
}

.vestigium-message.loading {
  font-style: italic;
  opacity: 0.8;
}

.vestigium-chatbot-input-wrap {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

#vestigium-chatbot-input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
  position: relative;
  z-index: 2147483647;
}

#vestigium-chatbot-input:focus {
  border-color: #111827;
}

#vestigium-chatbot-send {
  border: none;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  padding: 0 16px;
  cursor: pointer;
  font-size: 14px;
  position: relative;
  z-index: 2147483647;
}

@media (max-width: 640px) {
  #vestigium-chatbot {
    right: 12px;
    bottom: 12px;
  }

  #vestigium-chatbot-window {
    width: min(360px, calc(100vw - 24px));
    height: 70vh;
  }

  #vestigium-chatbot-toggle {
    width: 58px;
    height: 58px;
  }
}
.vestigium-message p {
  margin: 0 0 10px;
}

.vestigium-message p:last-child {
  margin-bottom: 0;
}

.vestigium-message strong {
  font-weight: 700;
}

.vestigium-message em {
  font-style: italic;
}

.vestigium-message ul {
  margin: 8px 0 10px 18px;
  padding: 0;
}

.vestigium-message li {
  margin: 0 0 6px;
}

.vestigium-message.bot {
  line-height: 1.55;
}

.vestigium-message.user {
  line-height: 1.4;
}