#ps-chatbot-root {
  font-family: Arial, sans-serif;
}

.ps-chat-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: #111827;
  color: #fff;
  font-size: 24px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  z-index: 9999;
}

.ps-chat-window {
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 560px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.22);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  border: 1px solid #e5e7eb;
}

.ps-chat-window.open {
  display: flex;
}

.ps-chat-header {
  background: #111827;
  color: #fff;
  padding: 14px 16px;
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
}

.ps-chat-subheader {
  font-size: 12px;
  font-weight: normal;
  opacity: 0.85;
  margin-top: 4px;
}

.ps-chat-intro {
  padding: 14px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.ps-intro-card {
  margin-bottom: 10px;
}

.ps-chat-modebar {
  display: flex;
  gap: 8px;
}

.ps-mode-btn {
  flex: 1;
  border: 1px solid #d1d5db;
  background: #ffffff;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  font-size: 12px;
  color: #111827;
}

.ps-mode-btn.active {
  background: #111827;
  color: #ffffff;
}

.ps-chat-messages {
  flex: 1;
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
  background: #f9fafb;
}

.ps-msg {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
  color: #111;
}

.ps-msg.user {
  background: #dbeafe;
  margin-left: 40px;
}

.ps-msg.bot {
  background: #ffffff;
  margin-right: 40px;
  border: 1px solid #e5e7eb;
}

.ps-chat-input-wrap {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
}

.ps-chat-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
}

.ps-chat-send {
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  background: #111827;
  color: white;
  cursor: pointer;
}

.ps-chat-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ps-leave-form-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
}

.ps-leave-form-title {
  font-weight: bold;
  margin-bottom: 10px;
  color: #111827;
}

.ps-leave-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
}

.ps-leave-textarea {
  min-height: 70px;
  resize: vertical;
}

.ps-leave-submit {
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  background: #111827;
  color: white;
  cursor: pointer;
  width: 100%;
  margin-top: 4px;
}

.ps-leave-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ps-leave-result {
  font-size: 13px;
  line-height: 1.4;
  margin-top: 10px;
}

.ps-leave-success {
  color: #166534;
}

.ps-leave-error {
  color: #b91c1c;
}

.ps-msg-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ps-bullet {
  padding-left: 4px;
}

.ps-sources-wrap {
  margin-top: 10px;
  font-size: 12px;
}

.ps-sources-wrap summary {
  cursor: pointer;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 8px;
}

.ps-source-item {
  margin-top: 6px;
  padding: 8px;
  background: #f3f4f6;
  border-radius: 8px;
}

.ps-source-title {
  font-weight: bold;
  margin-bottom: 4px;
  color: #111827;
}

.ps-source-preview {
  color: #374151;
  line-height: 1.4;
}

.hidden {
  display: none !important;
}