.ChatbotRoot {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  z-index: 2147482000;
  font-family: "Segoe UI", system-ui, sans-serif;
  overflow: visible;
}

.ChatbotLauncher {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #3a7199 0%, #336388 100%);
  color: #ffffff;
  font-size: 24px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  box-shadow: 0 10px 26px rgba(74, 139, 181, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 5;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.ChatbotRoot:not(.ChatbotCollapsed) .ChatbotLauncher {
  cursor: grab;
}

.ChatbotLauncher.ChatbotLauncherDragging {
  cursor: grabbing;
  transition: none;
}

.ChatbotRoot.ChatbotRootPositioned {
  right: auto;
  bottom: auto;
}

.ChatbotLauncher i {
  font-size: 21px;
  line-height: 1;
}

.ChatbotLauncherFallback {
  display: none;
}

.ChatbotLauncher:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.ChatbotLauncher.ChatbotLauncherDragging,
.ChatbotLauncher.ChatbotLauncherDragging:hover {
  transform: none;
  filter: none;
}

.ChatbotRoot.ChatbotHidden {
  display: none;
}

.ChatbotRoot.ChatbotAuthHidden {
  display: none !important;
}

.ChatbotPanel {
  position: absolute;
  right: 0;
  bottom: calc(56px + 8px);
  z-index: 2;
  width: min(380px, calc(100vw - 24px));
  height: min(620px, calc(100vh - 24px));
  background: #ffffff;
  border: 1px solid #ded6ca;
  border-radius: 16px;
  box-shadow: 0 14px 42px rgba(74, 139, 181, 0.23);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(0) scale(1);
  opacity: 1;
  transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
  animation: ChatbotPanelIn 0.22s ease;
}

.ChatbotPanel.ChatbotMinimized {
  height: 54px;
  transform: translateY(2px) scale(0.995);
}

.ChatbotPanel.ChatbotMinimized .ChatbotHubView,
.ChatbotPanel.ChatbotMinimized .ChatbotChatView {
  display: none;
}

.ChatbotRoot.ChatbotCollapsed .ChatbotPanel {
  display: none;
  pointer-events: none;
}

.ChatbotHeader {
  background: linear-gradient(180deg, #3a7199 0%, #336388 50%, #2c5678 100%);
  color: #ffffff;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.ChatbotHeaderActions {
  display: flex;
  gap: 6px;
  cursor: default;
}

.ChatbotTitle {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}


.ChatbotHeaderButton {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.ChatbotHeaderButton:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.48);
}

.ChatbotHeaderTextButton {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  padding: 5px 8px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.ChatbotHeaderTextButton:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.48);
}

.ChatbotHubView {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: #eef3f7;
}

.ChatbotHubView[hidden] {
  display: none !important;
}

.ChatbotChatView {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.ChatbotChatView[hidden] {
  display: none !important;
}

.ChatbotHubIntro {
  padding: 14px 14px 10px;
}

.ChatbotHubNewBtn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #d4e3eb;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  color: #2c5678;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 4px 14px rgba(36, 95, 118, 0.08);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ChatbotHubNewBtn:hover {
  border-color: #3a7199;
  box-shadow: 0 8px 20px rgba(36, 95, 118, 0.12);
  transform: translateY(-1px);
}

.ChatbotHubNewBtnIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(180deg, #3a7199 0%, #336388 100%);
  color: #ffffff;
  flex-shrink: 0;
  font-size: 16px;
}

.ChatbotHubNewBtnCopy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.ChatbotHubNewBtnLabel {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #2c5678;
}

.ChatbotHubNewBtnHint {
  font-size: 12px;
  line-height: 1.35;
  color: #5a7184;
}

.ChatbotHubNewBtnArrow {
  color: #7a94a8;
  font-size: 12px;
  flex-shrink: 0;
}

.ChatbotHubSectionLabel {
  padding: 4px 16px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b8194;
}

.ChatbotChatNav {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  background: #ffffff;
  border-bottom: 1px solid #e3ebf1;
}

.ChatbotBackBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: #3a7199;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.ChatbotBackBtn:hover {
  background: #eef5f8;
  color: #2c5678;
}

.ChatbotBackBtn i {
  font-size: 12px;
}

.ChatbotConversationList {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #eef3f7;
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ChatbotConversationList[hidden] {
  display: none !important;
}

.ChatbotConversationListItem {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 1px solid #d4dee8;
  background: #ffffff;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.ChatbotConversationListItem:hover,
.ChatbotConversationListItem--active {
  border-color: #3a7199;
  background: #f7fbfd;
}

.ChatbotConversationListTitle {
  font-size: 12px;
  font-weight: 700;
  color: #2c5678;
}

.ChatbotConversationListPreview {
  font-size: 12px;
  color: #41586b;
  line-height: 1.35;
}

.ChatbotConversationListMeta {
  font-size: 11px;
  color: #6b8194;
}

.ChatbotConversationListEmpty,
.ChatbotConversationListLoading {
  font-size: 12px;
  color: #5a6578;
  padding: 6px 4px;
}

.ChatbotMessages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: #f7f9fb;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ChatbotMessage {
  display: flex;
  animation: ChatbotMsgIn 0.2s ease;
}

.ChatbotMessageAssistant {
  justify-content: flex-start;
  flex-direction: column;
  align-items: flex-start;
}

.ChatbotMessageUser {
  justify-content: flex-end;
}

.ChatbotBubble {
  max-width: 82%;
  border-radius: 12px;
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.ChatbotMessageAssistant .ChatbotBubble {
  background: #ffffff;
  border: 1px solid #dfe4ea;
  color: #233241;
  text-align: left;
}

.ChatbotBubble--responding {
  border-color: #4a8bb5 !important;
  box-shadow: 0 0 0 2px rgba(74, 139, 181, 0.2), 0 6px 20px rgba(74, 139, 181, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f4f9fc 100%) !important;
  animation: ChatbotRespondingPulse 1.4s ease-in-out infinite;
}

@keyframes ChatbotRespondingPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(74, 139, 181, 0.2), 0 6px 20px rgba(74, 139, 181, 0.12); }
  50% { box-shadow: 0 0 0 3px rgba(74, 139, 181, 0.35), 0 8px 24px rgba(74, 139, 181, 0.18); }
}

.ChatbotMessageUser .ChatbotBubble {
  background: #4a8bb5;
  color: #ffffff;
  text-align: right;
}

.ChatbotTyping {
  display: none;
  flex-direction: row;
  align-items: center;
  font-size: 12px;
  color: #3e5a72;
  padding: 6px 12px 8px;
  font-style: italic;
  gap: 8px;
  background: linear-gradient(90deg, rgba(74, 139, 181, 0.08), rgba(74, 139, 181, 0.02));
  border-left: 3px solid #4a8bb5;
}

.ChatbotTypingPulse {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4a8bb5;
  flex-shrink: 0;
  animation: ChatbotTypingDot 1s ease-in-out infinite;
}

@keyframes ChatbotTypingDot {
  0%, 100% { opacity: 0.35; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}

.ChatbotPanel--responding {
  box-shadow: 0 14px 48px rgba(74, 139, 181, 0.35);
}

.ChatbotTools {
  display: flex;
  gap: 6px;
  padding: 6px 12px 10px;
  justify-content: center;
  align-items: center;
}

.ChatbotToolsCenter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ChatbotToolButton {
  border: 1px solid #cdd6df;
  background: #ffffff;
  border-radius: 999px;
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.ChatbotToolButton:hover {
  background: #f3f7fb;
  border-color: #9fb0c2;
  transform: translateY(-1px);
}

.ChatbotToolIcon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.ChatbotFileInput {
  display: none;
}

.ChatbotQuickActions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 12px 10px;
  border-top: 1px solid #e8edf2;
  background: #f9fbfd;
}

.ChatbotQuickAction {
  border: 1px solid #cdd6df;
  background: #ffffff;
  border-radius: 999px;
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.ChatbotQuickAction:hover {
  background: #f3f7fb;
  border-color: #9fb0c2;
  transform: translateY(-1px);
}

.ChatbotComposer {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 10px 12px 12px;
  border-top: 1px solid #eceff3;
}

.ChatbotEmojiButton {
  border: 1px solid #cfd6de;
  background: #ffffff;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
  padding: 7px 8px;
  cursor: pointer;
}

.ChatbotEmojiPicker {
  display: none;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 12px 10px;
}

.ChatbotEmojiPicker.ChatbotEmojiPickerOpen {
  display: flex;
}

.ChatbotEmojiOption {
  border: 1px solid #cfd6de;
  background: #ffffff;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.ChatbotInput {
  flex: 1;
  border: 1px solid #cfd6de;
  border-radius: 10px;
  font-size: 13px;
  resize: none;
  padding: 8px 10px;
  outline: none;
}

.ChatbotSend {
  border: none;
  border-radius: 10px;
  background: #4a8bb5;
  color: #ffffff;
  padding: 9px 12px;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.ChatbotSend:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.ChatbotSuggestedArticles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 0 12px 8px;
}

.ChatbotSuggestedArticles[hidden] {
  display: none !important;
}

.ChatbotSuggestedLabel {
  font-size: 12px;
  color: #5a6578;
  margin-right: 4px;
}

.ChatbotSuggestedArticleBtn {
  border: 1px solid #cdd6df;
  background: #ffffff;
  color: #2d3748;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
}

.ChatbotSuggestedArticleBtn:hover {
  background: #f3f7fb;
  border-color: #9fb0c2;
}

.ChatbotMessage--escalated .ChatbotBubble {
  border-left: 3px solid #c05621;
}

.ChatbotHelpful--inline {
  width: 100%;
  max-width: 100%;
  margin-top: 12px;
  padding: 0;
  animation: ChatbotHelpfulIn 0.28s ease;
}

@keyframes ChatbotHelpfulIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ChatbotHelpfulCard {
  width: 100%;
  padding: 14px 14px 12px;
  border: 1px solid #d4e3eb;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: 0 4px 14px rgba(36, 95, 118, 0.08);
}

.ChatbotHelpfulHeader {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.ChatbotHelpfulIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(180deg, #3a7199 0%, #336388 100%);
  color: #ffffff;
  flex-shrink: 0;
  font-size: 15px;
  box-shadow: 0 4px 10px rgba(36, 95, 118, 0.18);
}

.ChatbotHelpfulCopy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ChatbotHelpfulQuestion {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #2c5678;
  line-height: 1.35;
}

.ChatbotHelpfulHint {
  font-size: 12px;
  line-height: 1.4;
  color: #5a7184;
}

.ChatbotHelpfulActions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.ChatbotHelpfulBtn {
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid #cdd6df;
  background: #ffffff;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 10px;
  cursor: pointer;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.ChatbotHelpfulBtn--yes {
  border-color: #3a7199;
  background: linear-gradient(180deg, #3a7199 0%, #336388 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(36, 95, 118, 0.2);
}

.ChatbotHelpfulBtn--no {
  color: #2c5678;
  background: #ffffff;
}

.ChatbotHelpfulBtn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.ChatbotHelpfulBtn--yes:hover:not(:disabled) {
  filter: brightness(1.05);
  box-shadow: 0 6px 16px rgba(36, 95, 118, 0.24);
}

.ChatbotHelpfulBtn--no:hover:not(:disabled) {
  background: #f3f7fb;
  border-color: #9fb0c2;
}

.ChatbotHelpfulBtn:disabled {
  cursor: default;
  opacity: 0.72;
  transform: none;
}

.ChatbotHelpful--answered .ChatbotHelpfulCard {
  opacity: 0.88;
}

.ChatbotMessageAssistant .ChatbotReplyActions {
  width: 100%;
  max-width: 100%;
  margin-top: 10px;
  gap: 8px;
  padding-left: 0;
}

.ChatbotReplyActions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  margin-top: 6px;
  width: 100%;
  max-width: 100%;
  padding-left: 0;
}

.ChatbotReplyActionBtn {
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid #cdd6df;
  background: #ffffff;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 8px;
  cursor: pointer;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

.ChatbotReplyActionBtn:hover {
  background: #f3f7fb;
  border-color: #9fb0c2;
}

.ChatbotAdminWrap {
  display: none;
  border-top: 1px solid #eceff3;
  padding: 8px 12px 12px;
  background: #fbfcfe;
}

.ChatbotAdminTitle {
  font-size: 12px;
  font-weight: 700;
  color: #2c3340;
  margin-bottom: 4px;
}

.ChatbotAdminBody {
  font-size: 12px;
  color: #3e4d5c;
}

@media screen and (max-width: 767px) {
  .ChatbotRoot:not(.ChatbotRootPositioned) {
    right: 10px;
    bottom: 10px;
    left: auto;
    width: 56px;
    height: 56px;
  }

  .ChatbotPanel {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    height: min(76vh, 560px);
    border-radius: 14px 14px 0 0;
  }
}

@keyframes ChatbotPanelIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ChatbotMsgIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
