.chatbot-page {
  width: 100%;
  min-height: 100svh;
  box-sizing: border-box;
  background: #111111;
  color: #eeeeee;
  font-family: Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.chatbot-page *,
.chatbot-page *::before,
.chatbot-page *::after { box-sizing: border-box; }

.chatbot-page button,
.chatbot-page textarea { font-family: inherit; }

.chatbot-page button { cursor: pointer; }
.chatbot-page button:disabled { cursor: wait; opacity: .45; }
.chatbot-page button:focus-visible,
.chatbot-page a:focus-visible { outline: 2px solid #b8b8b8; outline-offset: 4px; }

.chatbot-page .chatbot-stage {
  width: min(844px, calc(100% - 48px));
  margin: 0 auto;
  padding: 124px 0 64px;
}

.chatbot-page .chatbot-welcome { text-align: center; }

.chatbot-page .chatbot-welcome h1 {
  margin: 0;
  color: #f7f7f7;
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -1.65px;
  line-height: 53px;
}

.chatbot-page .chatbot-suggestions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 19px;
}

.chatbot-page .chatbot-suggestion-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.chatbot-page .chatbot-suggestion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 5px 11px 5px 6px;
  border: 1px solid #2e2e2e;
  border-radius: 22px;
  background: #262626;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 3%), 0 1px 2px rgb(0 0 0 / 18%);
  color: #cecece;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -.45px;
  line-height: 20px;
  transition: background-color .15s, border-color .15s;
}

.chatbot-page .chatbot-suggestion:hover { background: #303030; border-color: #404040; }

.chatbot-page .chatbot-suggestion-icon {
  display: inline-flex;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #353535;
  color: #eeeeee;
}

.chatbot-page .chatbot-composer-region { margin-top: 57px; }

.chatbot-page .chatbot-composer {
  width: 100%;
  margin: 0;
  padding: 6px;
  border: 1px solid #303030;
  border-radius: 24px;
  background: #131313;
  box-shadow: 0 0 0 2px rgb(0 0 0 / 20%), inset 0 0 0 1px #191919;
}

.chatbot-page .chatbot-composer-inner {
  display: flex;
  min-height: 174px;
  flex-direction: column;
  gap: 14px;
  padding: 15px 14px 14px;
  border: 1px solid #3a3a3a;
  border-radius: 17px;
  background: #252525;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%);
}

.chatbot-page .chatbot-input {
  display: block;
  width: 100%;
  height: 99px;
  min-height: 99px;
  max-height: 260px;
  margin: 0;
  padding: 0;
  resize: none;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  box-shadow: none;
  color: #f0f0f0;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -.4px;
  line-height: 21px;
  scrollbar-color: #555 transparent;
}

.chatbot-page .chatbot-input::placeholder { color: #c6c6c6; opacity: 1; }
.chatbot-page .chatbot-composer:focus-within { border-color: #4a4a4a; }

.chatbot-page .chatbot-toolbar,
.chatbot-page .chatbot-toolbar-left,
.chatbot-page .chatbot-toolbar-right {
  display: flex;
  align-items: center;
}

.chatbot-page .chatbot-toolbar { min-height: 32px; justify-content: flex-end; gap: 10px; }
.chatbot-page .chatbot-toolbar-left { gap: 7px; }
.chatbot-page .chatbot-toolbar-right { gap: 8px; }
.chatbot-page .chatbot-add-control { position: relative; display: flex; }

.chatbot-page .chatbot-add,
.chatbot-page .chatbot-mode,
.chatbot-page .chatbot-voice,
.chatbot-page .chatbot-send {
  display: inline-flex;
  height: 32px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid #444444;
  border-radius: 20px;
  background: transparent;
  color: #d5d5d5;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  transition: background-color .15s, border-color .15s;
}

.chatbot-page .chatbot-add { width: 30px; height: 30px; }
.chatbot-page .chatbot-mode { gap: 6px; padding: 0 10px; }
.chatbot-page .chatbot-search { min-width: 83px; }
.chatbot-page .chatbot-study { min-width: 76px; }
.chatbot-page .chatbot-voice { min-width: 75px; gap: 7px; padding: 0 10px; border-color: #4b4b4b; background: #3e3e3e; }
.chatbot-page .chatbot-send { width: 32px; background: #e8e8e8; border-color: #e8e8e8; color: #191919; }
.chatbot-page .chatbot-send.is-stop { background: #404040; border-color: #666; color: #f2f2f2; }
.chatbot-page .chatbot-add:hover,
.chatbot-page .chatbot-mode:hover { background: #333; border-color: #666; }
.chatbot-page .chatbot-voice:hover { background: #4a4a4a; }
.chatbot-page .chatbot-send:hover { background: #fff; }
.chatbot-page .chatbot-send.is-stop:hover { background: #505050; }
.chatbot-page .chatbot-mode.is-active,
.chatbot-page .chatbot-add.is-active { color: #fff; border-color: #969696; background: #424242; }
.chatbot-page .chatbot-voice.is-listening { background: #624141; border-color: #a77777; color: #fff; }
.chatbot-page .chatbot-message-text p { margin: 0; }
.chatbot-page .chatbot-message-text p + p { margin-top: 10px; }
.chatbot-page .chatbot-message-text strong { font-weight: 650; }
.chatbot-page .chatbot-message-text em { font-style: italic; }
.chatbot-page .chatbot-message-text code { padding: 2px 5px; border-radius: 4px; background: rgba(255,255,255,.09); color: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; overflow-wrap: anywhere; }
.chatbot-page .chatbot-message-text ol,
.chatbot-page .chatbot-message-text ul { margin: 10px 0; padding-left: 25px; white-space: normal; }
.chatbot-page .chatbot-message-text ol { list-style-type: decimal; }
.chatbot-page .chatbot-message-text ul { list-style-type: disc; }
.chatbot-page .chatbot-message-text li { padding-left: 3px; white-space: pre-wrap; }
.chatbot-page .chatbot-message-text li + li { margin-top: 8px; }
.chatbot-page .chatbot-message-text li::marker { color: inherit; }

.chatbot-page .chatbot-attach-menu {
  position: absolute;
  z-index: 20;
  bottom: calc(100% + 12px);
  left: -5px;
  width: 244px;
  padding: 6px;
  border: 1px solid #444;
  border-radius: 13px;
  background: #292929;
  box-shadow: 0 12px 35px rgb(0 0 0 / 35%);
}

.chatbot-page .chatbot-attach-menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 11px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #eee;
  text-align: left;
  font-size: 13px;
}

.chatbot-page .chatbot-attach-menu button:hover { background: #3a3a3a; }
.chatbot-page .chatbot-attach-menu p { margin: 4px 9px 6px; color: #a6a6a6; font-size: 11px; }
.chatbot-page .chatbot-composer-status { padding: 10px 8px 0; color: #b7b7b7; font-size: 12px; line-height: 19px; overflow-wrap: anywhere; }

.chatbot-page .chatbot-attachments { display: flex; flex-wrap: wrap; gap: 8px; }
.chatbot-page .chatbot-attachment {
  display: flex;
  min-width: 0;
  max-width: min(100%, 250px);
  align-items: center;
  gap: 9px;
  padding: 7px 9px 7px 7px;
  border: 1px solid #4a4a4a;
  border-radius: 11px;
  background: #303030;
}

.chatbot-page .chatbot-attachment-preview,
.chatbot-page .chatbot-attachment-file { display: flex; width: 36px; height: 36px; flex: 0 0 36px; align-items: center; justify-content: center; border-radius: 6px; background: #444; object-fit: cover; }
.chatbot-page .chatbot-attachment-info { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.chatbot-page .chatbot-attachment-name { overflow: hidden; color: #e1e1e1; font-size: 12px; line-height: 17px; text-overflow: ellipsis; white-space: nowrap; }
.chatbot-page .chatbot-attachment-size { color: #aaa; font-size: 10px; line-height: 14px; }
.chatbot-page .chatbot-attachment-remove { display: inline-flex; width: 23px; height: 23px; flex: 0 0 23px; align-items: center; justify-content: center; margin-left: 2px; padding: 0; border: 0; border-radius: 50%; background: #454545; color: #eee; }
.chatbot-page .chatbot-attachment-remove:hover { background: #606060; }

.chatbot-page.is-conversation .chatbot-stage { padding-top: 32px; padding-bottom: 24px; }
.chatbot-page .chatbot-conversation-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; color: #dedede; font-size: 16px; font-weight: 500; }
.chatbot-page .chatbot-new-chat { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #404040; border-radius: 10px; background: #252525; color: #dedede; font-size: 12px; font-weight: 400; }
.chatbot-page .chatbot-new-chat:hover { background: #333; }
.chatbot-page .chatbot-messages { display: flex; min-height: 160px; flex-direction: column; gap: 22px; }
.chatbot-page .chatbot-message { width: 100%; padding: 18px 20px; border: 1px solid #333; border-radius: 16px; background: #1b1b1b; }
.chatbot-page .chatbot-message-user { align-self: flex-end; width: fit-content; min-width: min(210px, 100%); max-width: 88%; border-color: #3b3b3b; background: #282828; }
.chatbot-page .chatbot-message-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 10px; color: #aeaeae; font-size: 11px; font-weight: 500; }
.chatbot-page .chatbot-copy { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: #a5a5a5; font-size: 10px; font-weight: 400; }
.chatbot-page .chatbot-copy:hover { color: #fff; }
.chatbot-page .chatbot-message-text { color: #e7e7e7; font-size: 14px; font-weight: 400; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.chatbot-page .chatbot-message .chatbot-attachments { margin-top: 12px; }
.chatbot-page .chatbot-citation { border-radius: 3px; color: #b7d8ff; text-decoration: underline; text-underline-offset: 3px; }
.chatbot-page .chatbot-citation:hover { color: #e1efff; }
.chatbot-page .chatbot-loading { display: flex; align-items: center; gap: 12px; padding: 8px 2px 0; color: #a9a9a9; font-size: 12px; }
.chatbot-page .chatbot-loading-dots { display: inline-flex; align-items: center; gap: 4px; }
.chatbot-page .chatbot-loading-dots i { width: 5px; height: 5px; border-radius: 50%; background: #b6b6b6; animation: arthur-chatbot-pulse 1.2s ease-in-out infinite; }
.chatbot-page .chatbot-loading-dots i:nth-child(2) { animation-delay: .16s; }
.chatbot-page .chatbot-loading-dots i:nth-child(3) { animation-delay: .32s; }
.chatbot-page .chatbot-error { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 20px; padding: 13px 15px; border: 1px solid #674343; border-radius: 12px; background: #2b2020; color: #e6c5c5; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.chatbot-page .chatbot-error.is-stopped { border-color: #494949; background: #262626; color: #c7c7c7; }
.chatbot-page .chatbot-retry { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid #6a5151; border-radius: 8px; background: transparent; color: inherit; font-size: 12px; }
.chatbot-page .chatbot-retry:hover { background: rgb(255 255 255 / 6%); }
.chatbot-page.is-conversation .chatbot-composer-region { position: sticky; z-index: 5; bottom: 16px; margin-top: 30px; padding-top: 12px; background: linear-gradient(transparent, #111 12px); }
.chatbot-page .chatbot-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@keyframes arthur-chatbot-pulse { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

@media (max-width: 767px) {
  .chatbot-page { min-height: calc(100svh - 56px); }
  .chatbot-page .chatbot-stage { width: calc(100% - 32px); padding-top: 70px; padding-bottom: 36px; }
  .chatbot-page .chatbot-welcome h1 { font-size: clamp(27px, 7.6vw, 36px); letter-spacing: -1.2px; line-height: 1.25; }
  .chatbot-page .chatbot-suggestions { gap: 8px; margin-top: 23px; }
  .chatbot-page .chatbot-suggestion-row { gap: 8px; }
  .chatbot-page .chatbot-suggestion { gap: 5px; height: 34px; padding: 4px 9px 4px 5px; font-size: 12px; letter-spacing: -.3px; line-height: 18px; }
  .chatbot-page .chatbot-suggestion-icon { width: 23px; height: 23px; flex-basis: 23px; }
  .chatbot-page .chatbot-suggestion-icon svg { width: 14px; height: 14px; }
  .chatbot-page .chatbot-composer-region { margin-top: 36px; }
  .chatbot-page .chatbot-composer { padding: 5px; border-radius: 21px; }
  .chatbot-page .chatbot-composer-inner { gap: 12px; padding: 13px 10px 11px; border-radius: 15px; }
  .chatbot-page .chatbot-input { font-size: 14px; letter-spacing: -.35px; }
  .chatbot-page .chatbot-toolbar { gap: 6px; }
  .chatbot-page .chatbot-toolbar-left { gap: 5px; }
  .chatbot-page .chatbot-toolbar-right { gap: 5px; }
  .chatbot-page .chatbot-mode { gap: 4px; padding: 0 7px; font-size: 11px; }
  .chatbot-page .chatbot-search { min-width: 70px; }
  .chatbot-page .chatbot-study { min-width: 64px; }
  .chatbot-page .chatbot-voice { min-width: 63px; gap: 5px; padding: 0 7px; font-size: 11px; }
  .chatbot-page .chatbot-add { width: 28px; height: 28px; }
  .chatbot-page .chatbot-send { width: 30px; height: 30px; }
  .chatbot-page.is-conversation .chatbot-stage { padding-top: 22px; padding-bottom: 18px; }
  .chatbot-page .chatbot-conversation-header { margin-bottom: 22px; }
  .chatbot-page .chatbot-message { padding: 14px; }
  .chatbot-page .chatbot-message-user { max-width: 94%; }
  .chatbot-page .chatbot-message-text { font-size: 13px; }
  .chatbot-page .chatbot-error { flex-direction: column; align-items: flex-start; gap: 10px; }
  .chatbot-page.is-conversation .chatbot-composer-region { bottom: 8px; margin-top: 22px; }
}

@media (max-width: 359px) {
  .chatbot-page .chatbot-stage { width: calc(100% - 24px); }
  .chatbot-page .chatbot-toolbar { align-items: flex-start; flex-wrap: wrap; row-gap: 9px; }
  .chatbot-page .chatbot-toolbar-right { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .chatbot-page *, .chatbot-page *::before, .chatbot-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
