.faq-chatbot {
  bottom: 20px;
  color: #132421;
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  position: fixed;
  right: 20px;
  z-index: 3000;
}

.faq-chatbot--nav {
  bottom: auto;
  left: auto;
  right: max(20px, calc((100vw - 1280px) / 2 + 24px));
  top: 100px;
}

.faq-chatbot--bottom-right,
.faq-chatbot--bottom-left {
  bottom: calc(20px + var(--faq-chatbot-workflow-offset, 0px));
  top: auto;
}

.faq-chatbot--top-right,
.faq-chatbot--top-left {
  bottom: auto;
  top: 100px;
}

.faq-chatbot--bottom-left,
.faq-chatbot--top-left {
  left: 20px;
  right: auto;
}

.faq-chatbot--bottom-right,
.faq-chatbot--top-right {
  left: auto;
  right: 20px;
}

.faq-chatbot[hidden],
.faq-chatbot [hidden] {
  display: none !important;
}

.faq-chatbot__sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.faq-chatbot__controls {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.faq-chatbot__position {
  align-items: center;
  background: #ffffff;
  border: 1px solid #8ca5a0;
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(15, 70, 63, 0.16);
  color: #0f5f55;
  cursor: pointer;
  display: inline-flex;
  font-size: 20px;
  font-weight: 800;
  height: 46px;
  justify-content: center;
  padding: 0;
  width: 46px;
}

.faq-chatbot__position:hover,
.faq-chatbot__position:focus-visible {
  background: #edf8f4;
  border-color: #0f5f55;
  outline: 0;
}

.faq-chatbot__launcher {
  align-items: center;
  background: #0f5f55;
  border: 1px solid #0f5f55;
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(15, 70, 63, 0.24);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: var(--font-support, 14px);
  font-weight: 800;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px 0 12px;
}

.faq-chatbot__launcher:hover,
.faq-chatbot__launcher:focus-visible {
  background: #0a463f;
  border-color: #0a463f;
}

.faq-chatbot__launcher-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  display: inline-flex;
  font-size: 14px;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.faq-chatbot__panel {
  background: #ffffff;
  border: 1px solid #cbd8d6;
  border-radius: 8px;
  bottom: 0;
  box-shadow: 0 22px 54px rgba(19, 36, 33, 0.2);
  display: flex;
  flex-direction: column;
  height: min(620px, calc(100vh - 128px));
  height: min(620px, calc(100dvh - 128px));
  overflow: hidden;
  position: absolute;
  right: 0;
  width: min(380px, calc(100vw - 40px));
}

.faq-chatbot--nav .faq-chatbot__panel {
  bottom: auto;
  left: auto;
  right: 0;
  top: 0;
}

.faq-chatbot--bottom-left .faq-chatbot__panel,
.faq-chatbot--top-left .faq-chatbot__panel {
  left: 0;
  right: auto;
}

.faq-chatbot--top-left .faq-chatbot__panel,
.faq-chatbot--top-right .faq-chatbot__panel {
  bottom: auto;
  top: 0;
}

.faq-chatbot__header {
  align-items: center;
  background: #123d31;
  color: #ffffff;
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  min-height: 66px;
  padding: 12px 14px 12px 18px;
}

.faq-chatbot__heading {
  min-width: 0;
}

.faq-chatbot__heading strong,
.faq-chatbot__heading span {
  display: block;
}

.faq-chatbot__heading strong {
  font-size: var(--font-body, 16px);
  letter-spacing: 0;
}

.faq-chatbot__heading span {
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--font-caption, 12px);
  margin-top: 2px;
}

.faq-chatbot__close {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 25px;
  height: 36px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 36px;
}

.faq-chatbot__close:hover,
.faq-chatbot__close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.faq-chatbot__messages {
  background: #f4f7f7;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  scrollbar-gutter: stable;
}

.faq-chatbot__message {
  display: flex;
  flex-direction: column;
  max-width: 88%;
}

.faq-chatbot__message--assistant {
  align-self: flex-start;
}

.faq-chatbot__message--user {
  align-self: flex-end;
}

.faq-chatbot__bubble {
  border: 1px solid #d6e0df;
  border-radius: 8px;
  font-size: var(--font-support, 14px);
  line-height: 1.65;
  padding: 11px 12px;
  white-space: pre-line;
}

.faq-chatbot__message--assistant .faq-chatbot__bubble {
  background: #ffffff;
}

.faq-chatbot__message--user .faq-chatbot__bubble {
  background: #0f5f55;
  border-color: #0f5f55;
  color: #ffffff;
}

.faq-chatbot__suggestions {
  background: #ffffff;
  border-top: 1px solid #e0e8e7;
  display: grid;
  flex: 0 0 auto;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
  padding: 10px 12px;
}

.faq-chatbot__suggestion {
  background: #f7faf9;
  border: 1px solid #d6e0df;
  border-radius: 6px;
  color: #24413c;
  cursor: pointer;
  font-size: var(--font-support, 14px);
  font-weight: 700;
  line-height: 1.4;
  min-height: 34px;
  padding: 7px 10px;
  text-align: left;
}

.faq-chatbot__suggestion:hover,
.faq-chatbot__suggestion:focus-visible {
  background: #edf8f4;
  border-color: #83bfaa;
  color: #0f5f55;
}

.faq-chatbot__handoff {
  align-items: center;
  background: #fff3bf;
  border: 1px solid #e8cf57;
  border-radius: 6px;
  color: #3d3200;
  display: inline-flex;
  font-size: var(--font-support, 14px);
  font-weight: 800;
  margin-top: 7px;
  min-height: 34px;
  padding: 7px 10px;
  text-decoration: none;
  width: max-content;
}

.faq-chatbot__handoff-hours {
  color: #64736f;
  font-size: var(--font-caption, 12px);
  line-height: 1.45;
  margin: 5px 2px 0;
}

.faq-chatbot__handoff-hours strong {
  color: #0f5f55;
}

.faq-chatbot__form {
  align-items: center;
  background: #ffffff;
  border-top: 1px solid #d6e0df;
  display: grid;
  flex: 0 0 auto;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 11px 12px 8px;
}

.faq-chatbot__input {
  background: #ffffff;
  border: 1px solid #b7c6c4;
  border-radius: 6px;
  color: #132421;
  font-size: var(--font-support, 14px);
  height: 40px;
  min-width: 0;
  padding: 0 11px;
  width: 100%;
}

.faq-chatbot__input:focus {
  border-color: #0f5f55;
  box-shadow: 0 0 0 2px rgba(15, 95, 85, 0.12);
  outline: 0;
}

.faq-chatbot__send {
  background: #0f5f55;
  border: 1px solid #0f5f55;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font-size: var(--font-support, 14px);
  font-weight: 800;
  height: 40px;
  padding: 0 13px;
}

.faq-chatbot__send:hover,
.faq-chatbot__send:focus-visible {
  background: #0a463f;
}

.faq-chatbot__send:disabled,
.faq-chatbot__input:disabled {
  cursor: wait;
  opacity: 0.6;
}

.faq-chatbot__notice {
  background: #ffffff;
  color: #657370;
  flex: 0 0 auto;
  font-size: 10px;
  line-height: 1.4;
  margin: 0;
  padding: 0 12px 10px;
}

@media (max-width: 640px) {
  html.faq-chatbot-is-open,
  body.faq-chatbot-is-open {
    overflow: hidden !important;
  }

  .faq-chatbot--nav {
    bottom: 0;
    left: 0;
    pointer-events: none;
    right: auto;
    top: 0;
  }

  .faq-chatbot--bottom-right,
  .faq-chatbot--bottom-left {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px) + var(--faq-chatbot-workflow-offset, 0px));
  }

  .faq-chatbot--top-right,
  .faq-chatbot--top-left {
    top: calc(84px + env(safe-area-inset-top, 0px));
  }

  .faq-chatbot--bottom-left,
  .faq-chatbot--top-left {
    left: 12px;
  }

  .faq-chatbot--bottom-right,
  .faq-chatbot--top-right {
    right: 12px;
  }

  .faq-chatbot__position {
    height: 44px;
    width: 44px;
  }

  .faq-chatbot__launcher {
    min-height: 44px;
    padding-right: 13px;
  }

  .faq-chatbot__panel {
    border: 0;
    border-radius: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    left: 0;
    max-height: none;
    pointer-events: auto;
    position: fixed;
    right: auto;
    top: 0;
    width: 100vw;
  }

  .faq-chatbot__header {
    min-height: calc(66px + env(safe-area-inset-top, 0px));
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }

  .faq-chatbot__notice {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .faq-chatbot__messages {
    padding: 13px;
  }

  .faq-chatbot__message {
    max-width: 92%;
  }
}

@media print {
  .faq-chatbot {
    display: none !important;
  }
}
