/* Public HRDI chatbot — highland green, RWD. Default: Side-listing (theme 2). */

:root {
  --hrdi-chat-green: #008641;
  --hrdi-chat-green-deep: #066b36;
  --hrdi-chat-green-ink: #0b3d24;
  --hrdi-chat-mist: #eef6f1;
  --hrdi-chat-leaf: #d7eadf;
  --hrdi-chat-gold: #b8892d;
  --hrdi-chat-focus: #0047b3;
  --hrdi-chat-line: #c9d9cf;
  --hrdi-chat-text: #1c2b22;
  --hrdi-chat-muted: #5b6d63;
}

#hrdiChatRoot:not(.hrdi-chat-page) {
  display: contents;
}

.hrdi-chat-fab {
  position: sticky;
  top: calc(100vh - 80px);
  float: right;
  clear: both;
  margin: 0 35px 12px auto;
  z-index: 10;
  display: block;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #050814;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 134, 65, 0.35);
  overflow: hidden;
  line-height: 0;
}

.hrdi-chat-fab img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
}

.hrdi-chat-fab:hover,
.hrdi-chat-fab:focus {
  background: #050814;
  outline: 2px solid var(--hrdi-chat-focus);
  outline-offset: 2px;
}

.hrdi-chat-fab[aria-expanded="true"] {
  visibility: hidden;
  pointer-events: none;
}

.hrdi-chat-panel {
  display: none;
  z-index: 4000;
  width: 380px;
  max-width: calc(100% - 32px);
  background: #fff;
  border: 1px solid var(--hrdi-chat-line);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(11, 61, 36, 0.16);
  overflow: hidden;
}

.hrdi-chat-panel.is-open {
  display: flex;
  flex-direction: column;
  position: fixed;
  right: 16px;
  bottom: 16px;
  top: auto;
  left: auto;
  float: none;
  clear: none;
  margin: 0;
  max-height: calc(100vh - 32px);
}

.hrdi-chat-panel.is-open.is-expanded {
  width: 90vw;
  max-width: 90vw;
  height: 90vh;
  max-height: 90vh;
  top: 5vh;
  right: 5vw;
  bottom: auto;
}

.hrdi-chat-panel.is-open .hrdi-chat-log {
  flex: 1 1 auto;
  min-height: 160px;
}

.hrdi-chat-panel.is-expanded .hrdi-chat-log {
  height: auto;
  max-height: none;
}

.hrdi-chat-panel.is-expanded .hrdi-chat-composer {
  flex: 0 0 auto;
}

.hrdi-chat-head {
  background: linear-gradient(135deg, var(--hrdi-chat-green) 0%, var(--hrdi-chat-green-deep) 100%);
  color: #fff;
  padding: 14px 16px;
  flex: 0 0 auto;
}

.hrdi-chat-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hrdi-chat-mark {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #050814;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  line-height: 0;
}

.hrdi-chat-mark img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.hrdi-chat-brand-text {
  min-width: 0;
}

.hrdi-chat-head h2,
#hrdiChatTitle {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  font-family: "IBM Plex Sans Thai", sans-serif;
  letter-spacing: 0.01em;
  color: #fff !important;
}

.hrdi-chat-head p {
  margin: 2px 0 0;
  font-size: 12px;
  opacity: 0.92;
  line-height: 1.4;
}

.hrdi-chat-head-actions {
  float: right;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hrdi-chat-expand,
.hrdi-chat-close {
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  color: #fff;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  border-radius: 8px;
  min-width: 32px;
  min-height: 32px;
}

.hrdi-chat-expand {
  font-size: 15px;
}

.hrdi-chat-close {
  font-size: 22px;
}

.hrdi-chat-expand:hover,
.hrdi-chat-close:hover,
.hrdi-chat-expand:focus,
.hrdi-chat-close:focus {
  background: rgba(255, 255, 255, 0.24);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.hrdi-chat-log {
  height: 280px;
  overflow-y: auto;
  padding: 16px 14px 8px;
  background:
    linear-gradient(180deg, rgba(238, 246, 241, 0.9) 0%, #f7faf8 100%);
  font-size: 14px;
  line-height: 1.55;
  color: var(--hrdi-chat-text);
  -webkit-overflow-scrolling: touch;
}

.hrdi-chat-msg {
  display: flex;
  margin: 0 0 12px;
  max-width: 92%;
}

.hrdi-chat-bubble {
  min-width: 0;
  position: relative;
}

.hrdi-chat-msg p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 16px;
  white-space: pre-wrap;
}

.hrdi-chat-msg.is-bot {
  align-items: flex-start;
}

.hrdi-chat-msg.is-bot .hrdi-chat-bubble {
  background: #fff;
  border: 1px solid var(--hrdi-chat-leaf);
  border-radius: 16px 16px 6px 16px;
  box-shadow: 0 1px 2px rgba(11, 61, 36, 0.04);
  overflow: hidden;
  width: 100%;
}

.hrdi-chat-msg.is-bot .hrdi-chat-bubble > p {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

.hrdi-chat-msg.is-bot.has-cites .hrdi-chat-bubble > p:first-child {
  border-bottom: 0;
  border-radius: 0;
}

.hrdi-chat-lead {
  color: var(--hrdi-chat-text);
}

.hrdi-chat-viewbar {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px 2px;
}

.hrdi-chat-viewbar button {
  margin: 0;
  padding: 5px 10px;
  border: 1px solid var(--hrdi-chat-line);
  border-radius: 999px;
  background: #fff;
  color: var(--hrdi-chat-green-ink);
  font-family: "IBM Plex Sans Thai", sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}

.hrdi-chat-viewbar button:hover,
.hrdi-chat-viewbar button:focus {
  border-color: var(--hrdi-chat-green);
  background: var(--hrdi-chat-mist);
  outline: none;
}

.hrdi-chat-viewbar button.is-on {
  background: var(--hrdi-chat-green-deep);
  border-color: var(--hrdi-chat-green-deep);
  color: #fff;
}

.hrdi-chat-reload {
  display: none;
  padding: 8px 10px 0;
}

.hrdi-chat-reload.is-on {
  display: block;
}

.hrdi-chat-reload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--hrdi-chat-line);
  border-radius: 999px;
  background: #fff;
  color: var(--hrdi-chat-green-ink);
  font-family: "IBM Plex Sans Thai", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}

.hrdi-chat-reload-btn:hover,
.hrdi-chat-reload-btn:focus {
  border-color: var(--hrdi-chat-green);
  background: #f3faf6;
  outline: none;
}

.hrdi-chat-reload-icon {
  font-size: 16px;
  line-height: 1;
}

.hrdi-chat-sections {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0 10px 10px;
  min-height: 160px;
  max-height: 360px;
}

.hrdi-chat-sections.is-stack {
  display: block;
  min-height: 0;
  max-height: none;
}

.hrdi-chat-sections.is-stack .hrdi-chat-sec-nav {
  display: none;
}

.hrdi-chat-sections.is-stack .hrdi-chat-sec-panes {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  max-height: none;
}

.hrdi-chat-sections.is-stack .hrdi-chat-sec {
  display: block;
  margin: 8px 0 0;
  border: 1px solid var(--hrdi-chat-line);
  border-radius: 10px;
  background: #fbfdfc;
  overflow: hidden;
}

.hrdi-chat-sections.is-stack .hrdi-chat-sec.is-closed {
  display: none;
}

.hrdi-chat-sections.is-side .hrdi-chat-sec-h {
  display: none !important;
}

.hrdi-chat-sections.is-side .hrdi-chat-sec-h + .hrdi-chat-sec-item {
  border-top: 0;
}

.hrdi-chat-sec-nav {
  flex: 0 0 34%;
  max-width: 220px;
  min-width: 112px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0 0;
  padding: 8px 6px;
  background: var(--hrdi-chat-green-deep);
  border-radius: 10px 0 0 10px;
  overflow-y: auto;
}

.hrdi-chat-sec-nav-item {
  display: flex;
  align-items: stretch;
  gap: 2px;
}

.hrdi-chat-sec-nav-item.is-closed {
  display: none;
}

.hrdi-chat-sec-tab {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-family: "IBM Plex Sans Thai", sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.hrdi-chat-sec-tab.is-on {
  background: #fff;
  color: var(--hrdi-chat-green-ink);
}

.hrdi-chat-sec-tab:hover,
.hrdi-chat-sec-tab:focus {
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.hrdi-chat-sec-tab.is-on:hover,
.hrdi-chat-sec-tab.is-on:focus {
  background: #fff;
}

.hrdi-chat-sec-panes {
  flex: 1 1 auto;
  min-width: 0;
  margin: 8px 0 0;
  border: 1px solid var(--hrdi-chat-line);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  background: #fbfdfc;
  overflow: auto;
  max-height: 352px;
}

.hrdi-chat-sec {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: none;
  overflow: visible;
}

.hrdi-chat-sec.is-on {
  display: block;
}

.hrdi-chat-sec-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 !important;
  padding: 8px 8px 8px 10px !important;
  background: var(--hrdi-chat-green-deep);
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  font-style: normal !important;
  letter-spacing: 0;
  font-family: "IBM Plex Sans Thai", sans-serif !important;
  line-height: 1.25 !important;
  text-transform: none !important;
  min-height: 0 !important;
  height: auto !important;
}

.hrdi-chat-sec-label {
  flex: 1 1 auto;
  min-width: 0;
}

.hrdi-chat-sec-x {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 26px;
  font-weight: 500;
  cursor: pointer;
}

.hrdi-chat-sec-x:hover,
.hrdi-chat-sec-x:focus {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

.hrdi-chat-sec.is-closed,
.hrdi-chat-sections.is-empty {
  display: none;
}

.hrdi-chat-sec-item {
  padding: 8px 12px 10px;
  border-top: 1px solid var(--hrdi-chat-leaf);
}

.hrdi-chat-sec-item:first-child {
  border-top: 0;
}

.hrdi-chat-sections.is-stack .hrdi-chat-sec-item:first-child {
  border-top: 1px solid var(--hrdi-chat-leaf);
}

.hrdi-chat-sec-title {
  display: block;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.45;
  color: var(--hrdi-chat-green-ink);
  text-decoration: none;
}

.hrdi-chat-sec-title:hover,
.hrdi-chat-sec-title:focus {
  color: var(--hrdi-chat-focus);
  text-decoration: underline;
}

.hrdi-chat-sec-n {
  display: inline-block;
  min-width: 1.4em;
  margin-right: 6px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--hrdi-chat-green);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.5;
}

.hrdi-chat-sec-body {
  margin: 4px 0 0;
  padding: 0 0 0 2.1em;
  font-size: 13px;
  line-height: 1.5;
  color: var(--hrdi-chat-muted);
  white-space: pre-wrap;
}

.hrdi-chat-msg.is-bot p.hrdi-chat-cites {
  margin: 0;
  padding: 4px 12px 10px;
  background: #fff;
  border: 1px solid var(--hrdi-chat-leaf);
  border-top: 1px dashed var(--hrdi-chat-line);
  border-radius: 0;
  font-size: 13px;
  line-height: 1.6;
  white-space: normal;
}

.hrdi-chat-cite {
  display: inline-block;
  margin: 0 2px;
  padding: 0 4px;
  color: var(--hrdi-chat-green-deep);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--hrdi-chat-green);
}

.hrdi-chat-cite:hover,
.hrdi-chat-cite:focus {
  color: var(--hrdi-chat-focus);
  border-bottom-color: var(--hrdi-chat-focus);
}

.hrdi-chat-msg.is-user {
  margin-left: auto;
  justify-content: flex-end;
}

.hrdi-chat-msg.is-user .hrdi-chat-bubble p {
  background: var(--hrdi-chat-green);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.hrdi-chat-msg.is-pending .hrdi-chat-bubble p {
  color: var(--hrdi-chat-muted);
  font-style: italic;
}

.hrdi-chat-sources-wrap {
  margin: 0;
  background: #fff;
  border: 1px solid var(--hrdi-chat-leaf);
  border-top: 0;
  border-radius: 0 0 16px 6px;
  overflow: hidden;
}

.hrdi-chat-sources-toggle {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--hrdi-chat-mist);
  border: 0;
  border-top: 1px solid var(--hrdi-chat-leaf);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--hrdi-chat-green-deep);
  cursor: pointer;
  font-family: inherit;
}

.hrdi-chat-sources-toggle:hover,
.hrdi-chat-sources-toggle:focus {
  background: var(--hrdi-chat-leaf);
  outline: 2px solid var(--hrdi-chat-focus);
  outline-offset: -2px;
}

.hrdi-chat-sources-toggle::before {
  content: "▸ ";
  display: inline-block;
  width: 1em;
}

.hrdi-chat-sources-wrap.is-open .hrdi-chat-sources-toggle::before {
  content: "▾ ";
}

.hrdi-chat-sources {
  margin: 0;
  padding: 8px 12px 10px 28px;
  font-size: 13px;
  background: #fff;
}

.hrdi-chat-sources[hidden] {
  display: none;
}

.hrdi-chat-sources a {
  color: var(--hrdi-chat-green-deep);
  text-decoration: none;
}

.hrdi-chat-sources a:hover,
.hrdi-chat-sources a:focus {
  text-decoration: underline;
  color: var(--hrdi-chat-focus);
}

.hrdi-chat-summarize {
  margin: 0;
  padding: 10px 12px 12px;
  background: #fff;
  border: 1px solid var(--hrdi-chat-leaf);
  border-top: 0;
}

.hrdi-chat-summarize-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--hrdi-chat-green);
  border-radius: 8px;
  background: #fff;
  color: var(--hrdi-chat-green-deep);
  font-family: "IBM Plex Sans Thai", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}

.hrdi-chat-summarize-btn:hover,
.hrdi-chat-summarize-btn:focus {
  background: var(--hrdi-chat-mist);
  outline: 2px solid var(--hrdi-chat-focus);
  outline-offset: 1px;
}

.hrdi-chat-summarize-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.hrdi-chat-fb {
  margin: 10px;
  padding: 12px 14px;
  background: var(--hrdi-chat-mist);
  border: 1px solid var(--hrdi-chat-line);
  border-radius: 10px;
}

.hrdi-chat-fb-q {
  margin: 0 0 10px !important;
  padding: 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--hrdi-chat-green-ink) !important;
  white-space: normal !important;
  background: transparent !important;
  border: 0 !important;
  line-height: 1.4 !important;
}

.hrdi-chat-fb-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hrdi-chat-fb-up,
.hrdi-chat-fb-down,
.hrdi-chat-fb-send {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.hrdi-chat-fb-up {
  background: var(--hrdi-chat-green);
  color: #fff;
  border: 0;
}

.hrdi-chat-fb-down {
  background: #fff;
  color: var(--hrdi-chat-green-ink);
  border: 1px solid var(--hrdi-chat-line);
}

.hrdi-chat-fb-down.is-on {
  border-color: var(--hrdi-chat-green);
  background: #fff;
}

.hrdi-chat-fb-up:disabled,
.hrdi-chat-fb-down:disabled {
  opacity: 0.7;
  cursor: default;
}

.hrdi-chat-fb-extra {
  margin-top: 10px;
}

.hrdi-chat-fb-note {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 64px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid var(--hrdi-chat-line);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.hrdi-chat-fb-send {
  background: var(--hrdi-chat-green-deep);
  color: #fff;
  border: 0;
}

.hrdi-chat-fb.is-done {
  padding: 12px 14px;
}

@media (max-width: 479px) {
  .hrdi-chat-fb-up,
  .hrdi-chat-fb-down {
    flex: 1 1 calc(50% - 8px);
  }
}

.hrdi-chat-composer {
  background: #fff;
  border-top: 1px solid var(--hrdi-chat-leaf);
  padding: 16px 14px 8px;
}

.hrdi-chat-chips-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 6px;
}

.hrdi-chat-chips-label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hrdi-chat-muted);
}

.hrdi-chat-shuffle {
  flex: 0 0 auto;
  margin: 0;
  background: #fff;
  border: 1px solid var(--hrdi-chat-green);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--hrdi-chat-green-deep);
  cursor: pointer;
  line-height: 1.3;
  white-space: nowrap;
}

.hrdi-chat-shuffle:hover,
.hrdi-chat-shuffle:focus {
  background: var(--hrdi-chat-mist);
  outline: 2px solid var(--hrdi-chat-focus);
  outline-offset: 1px;
}

.hrdi-chat-shuffle:disabled {
  opacity: 0.65;
  cursor: wait;
}

.hrdi-chat-clear {
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  background: #fff;
  border: 1px solid var(--hrdi-chat-line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--hrdi-chat-green-ink);
  cursor: pointer;
  line-height: 1.3;
  white-space: nowrap;
}

.hrdi-chat-clear:hover,
.hrdi-chat-clear:focus {
  background: var(--hrdi-chat-mist);
  border-color: var(--hrdi-chat-green);
  color: var(--hrdi-chat-green-deep);
  outline: 2px solid var(--hrdi-chat-focus);
  outline-offset: 1px;
}

.hrdi-chat-clear:disabled {
  opacity: 0.55;
  cursor: default;
}

.hrdi-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
  max-height: 4.8em;
  overflow: auto;
}

.hrdi-chat-chips button {
  margin: 0;
  max-width: 100%;
  background: var(--hrdi-chat-mist);
  border: 1px solid var(--hrdi-chat-line);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  line-height: 1.35;
  cursor: pointer;
  color: var(--hrdi-chat-green-ink);
  text-align: left;
}

.hrdi-chat-chips button:hover,
.hrdi-chat-chips button:focus {
  background: #fff;
  border-color: var(--hrdi-chat-green);
  color: var(--hrdi-chat-green-deep);
  outline: 2px solid var(--hrdi-chat-focus);
  outline-offset: 1px;
}

.hrdi-chat-form {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.hrdi-chat-form input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--hrdi-chat-line);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 16px;
  color: var(--hrdi-chat-text);
  background: var(--hrdi-chat-mist);
}

.hrdi-chat-form input:focus {
  background: #fff;
  border-color: var(--hrdi-chat-green);
  outline: 2px solid var(--hrdi-chat-focus);
  outline-offset: 1px;
}

.hrdi-chat-form button {
  flex: 0 0 auto;
  min-height: 44px;
  white-space: nowrap;
  margin: 0;
  background: var(--hrdi-chat-green);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
}

.hrdi-chat-form button:hover,
.hrdi-chat-form button:focus {
  background: var(--hrdi-chat-green-deep);
  outline: 2px solid var(--hrdi-chat-focus);
  outline-offset: 2px;
}

.hrdi-chat-form button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.hrdi-chat-page {
  max-width: 860px;
  margin: 36px auto;
}

.hrdi-chat-page .hrdi-chat-panel,
.hrdi-chat-page .hrdi-chat-panel.is-open {
  display: flex;
  flex-direction: column;
  position: static;
  float: none;
  right: auto;
  bottom: auto;
  top: auto;
  left: auto;
  width: 100%;
  max-width: 100%;
  max-height: none;
  margin: 0;
  min-height: 560px;
  z-index: auto;
}

.hrdi-chat-page .hrdi-chat-panel.is-expanded {
  position: sticky;
  top: 5vh;
  width: 90vw;
  max-width: 90vw;
  height: 90vh;
  max-height: 90vh;
  min-height: 0;
  margin: 0 auto;
  z-index: 12;
}

.hrdi-chat-page .hrdi-chat-msg.is-bot {
  max-width: 100%;
}

.hrdi-chat-page .hrdi-chat-log {
  flex: 1 1 auto;
  height: auto;
  min-height: 280px;
  max-height: min(68vh, 680px);
}

.hrdi-chat-page .hrdi-chat-panel.is-expanded .hrdi-chat-log {
  max-height: none;
}

.hrdi-chat-page-lead {
  margin: 0 0 16px;
  color: var(--hrdi-chat-muted);
  font-size: 15px;
  line-height: 1.65;
  text-align: right;
}

.hrdi-chat-page-foot {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--hrdi-chat-leaf);
  color: var(--hrdi-chat-muted);
  font-size: 14px;
}

@media (max-width: 767px) {
  .hrdi-chat-page .hrdi-chat-panel {
    border-radius: 14px;
    min-height: 0;
  }

  .hrdi-chat-page .hrdi-chat-log {
    min-height: 220px;
    max-height: 56vh;
  }

  .hrdi-chat-head {
    padding: 12px;
  }

  .hrdi-chat-chips {
    max-height: 6.4em;
  }

  .hrdi-chat-form button {
    padding: 8px 12px;
  }
}

@media (max-width: 479px) {
  .hrdi-chat-form {
    flex-wrap: wrap;
  }

  .hrdi-chat-form input {
    flex: 1 1 100%;
  }

  .hrdi-chat-form button {
    flex: 1 1 100%;
  }

  .hrdi-chat-page .hrdi-chat-log {
    max-height: 42vh;
  }
}

@media (max-width: 359px) {
  .hrdi-chat-fab.hide_max359px {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hrdi-chat-fab,
  .hrdi-chat-chips button,
  .hrdi-chat-form button {
    transition: none;
  }
}
