.pfs-chatbot-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2147483000;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  pointer-events: none;
}

.pfs-chatbot-root * {
  pointer-events: auto;
}

.pfs-chatbot-launcher,
.pfs-chatbot-icon-btn,
.pfs-chatbot-send {
  appearance: none;
  border: 0;
  cursor: pointer;
}

.pfs-chatbot-launcher {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #7C3AED;
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pfs-chatbot-launcher-icon {
  width: 26px;
  height: 26px;
  display: block;
}

.pfs-chatbot-launcher:focus-visible,
.pfs-chatbot-icon-btn:focus-visible,
.pfs-chatbot-send:focus-visible,
.pfs-chatbot-prompt:focus-visible,
.pfs-chatbot-input:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.pfs-chatbot-panel[hidden],
.pfs-chatbot-launcher[hidden] {
  display: none !important;
}

.pfs-chatbot-panel {
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 32px));
  background: #0b1726;
  color: #e8eef6;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pfs-chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pfs-chatbot-title {
  font-size: 14px;
  font-weight: 650;
}

.pfs-chatbot-header-actions {
  display: flex;
  gap: 4px;
}

.pfs-chatbot-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  color: #e8eef6;
}

.pfs-chatbot-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.pfs-chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pfs-chatbot-bubble {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.pfs-chatbot-bubble.user {
  align-self: flex-end;
  background: #7C3AED;
  color: #fff;
}

.pfs-chatbot-bubble.assistant {
  align-self: flex-start;
  background: #132337;
}

.pfs-chatbot-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pfs-chatbot-prompt {
  background: #132337;
  color: #e8eef6;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.pfs-chatbot-sources {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.pfs-chatbot-sources a {
  color: #7dd3fc;
  font-size: 12px;
}

.pfs-chatbot-feedback {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.pfs-chatbot-feedback button {
  background: transparent;
  color: #9fb3c8;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}

.pfs-chatbot-contact {
  display: inline-block;
  margin-top: 8px;
  color: #7dd3fc;
  font-size: 13px;
}

.pfs-chatbot-composer {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pfs-chatbot-input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #08121f;
  color: #e8eef6;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.pfs-chatbot-send {
  background: #7C3AED;
  color: #fff;
  border-radius: 10px;
  padding: 0 14px;
  font-weight: 650;
}

.pfs-chatbot-send:disabled,
.pfs-chatbot-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 420px) {
  .pfs-chatbot-root {
    right: 12px;
    bottom: 12px;
  }

  .pfs-chatbot-panel {
    width: calc(100vw - 24px);
    height: min(70vh, calc(100vh - 88px));
  }
}
