#rk-top-chat {
  --rkchat-ink: #17382e;
  --rkchat-green: #0f5344;
  --rkchat-cream: #fff9ee;
  --rkchat-border: #d2e4da;
  --rkchat-focus: #157765;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
#rk-top-chat *,
#rk-top-chat *::before,
#rk-top-chat *::after {
  box-sizing: border-box;
}
#rk-top-chat :where(a, button, input, textarea):focus-visible {
  outline: 3px solid var(--rkchat-focus);
  outline-offset: 3px;
}
#rk-top-chat-launch {
  position: fixed;
  right: max(82px, calc(env(safe-area-inset-right) + 70px));
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 20px));
  z-index: 9001;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  max-width: calc(100vw - 104px);
  margin: 0;
  padding: 5px 14px 5px 6px;
  border: 1px solid #b6d4c6;
  border-radius: 28px;
  background: #fff;
  color: var(--rkchat-green);
  box-shadow: 0 5px 20px #15392c30;
  font: 700 15px/1.35 system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}
#rk-top-chat-launch[hidden] {
  display: none !important;
}
#rk-top-chat-launch:hover {
  background: #edf6ef;
  border-color: var(--rkchat-green);
}
#rk-top-chat :is(.rkchat-launch-avatar, .rkchat-head-avatar) {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  overflow: hidden;
  border-radius: 50%;
  background: #fff4d9;
}
#rk-top-chat :is(.rkchat-launch-avatar, .rkchat-head-avatar) img {
  display: block;
  width: 39px;
  height: 39px;
  object-fit: contain;
  object-position: center 30%;
}
#rk-top-chat-dialog {
  position: fixed;
  inset: auto max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) auto;
  width: min(412px, calc(100vw - 32px));
  max-width: none;
  max-height: min(720px, calc(100vh - 32px));
  max-height: min(720px, calc(100dvh - 32px));
  margin: 0;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--rkchat-border);
  border-radius: 20px;
  background: #fbfdfb;
  color: var(--rkchat-ink);
  box-shadow: 0 15px 50px #0d291940;
  font: 400 15px/1.55 system-ui, sans-serif;
  text-align: left;
}
#rk-top-chat-dialog[open] {
  display: flex;
  flex-direction: column;
}
#rk-top-chat-dialog::backdrop {
  background: #15392c52;
}
#rk-top-chat .rkchat-head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: var(--rkchat-green);
  color: white;
}
#rk-top-chat .rkchat-head :is(.rkchat-title, .rkchat-subtitle) {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: white;
  text-align: left;
}
#rk-top-chat .rkchat-title {
  font: 700 16px/1.4 system-ui, sans-serif;
}
#rk-top-chat .rkchat-subtitle {
  font: 400 12px/1.4 system-ui, sans-serif;
}
#rk-top-chat-close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0 0 0 auto;
  padding: 0;
  border: 1px solid #8bb9a6;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font: 600 20px/1 system-ui, sans-serif;
  cursor: pointer;
}
#rk-top-chat-close:hover {
  background: #ffffff24;
}
#rk-top-chat-close:focus-visible {
  outline-color: #ffdc9e;
}
#rk-top-chat-messages {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 9px;
  min-height: 125px;
  max-height: 340px;
  max-height: min(340px, 45dvh);
  margin: 0;
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
#rk-top-chat .rkchat-message {
  align-self: start;
  width: fit-content;
  max-width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--rkchat-border);
  border-radius: 5px 14px 14px;
  background: #eff7f0;
  overflow-wrap: anywhere;
}
#rk-top-chat .rkchat-message > p {
  margin: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  white-space: pre-wrap;
}
#rk-top-chat .rkchat-message--visitor {
  align-self: end;
  border-color: #ecd6aa;
  border-radius: 14px 5px 14px 14px;
  background: var(--rkchat-cream);
}
#rk-top-chat .rkchat-quicklinks {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
#rk-top-chat .rkchat-quicklinks li {
  margin: 0;
  padding: 0;
}
#rk-top-chat .rkchat-quicklinks a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid #b7d4c6;
  border-radius: 7px;
  background: #fff;
  color: var(--rkchat-green);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .17em;
}
#rk-top-chat .rkchat-quicklinks a:hover {
  border-color: var(--rkchat-green);
  background: #f8fff8;
}
#rk-top-chat-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: 0 0 auto;
  gap: 6px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--rkchat-border);
  background: #fff;
}
#rk-top-chat .rkchat-choice {
  min-height: 42px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #bfd7ca;
  border-radius: 8px;
  background: #f4fbf5;
  color: var(--rkchat-green);
  font: 700 13px/1.35 system-ui, sans-serif;
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
}
#rk-top-chat .rkchat-choice:last-child {
  border-color: #ebd7af;
  background: var(--rkchat-cream);
}
#rk-top-chat .rkchat-choice:hover {
  border-color: var(--rkchat-green);
  background: #e2f4e9;
}
#rk-top-chat-form[hidden] {
  display: none !important;
}
#rk-top-chat-form {
  display: flex;
  flex: 0 0 auto;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--rkchat-border);
  background: #fff;
}
#rk-top-chat-form :is(label, small, .rkchat-privacy) {
  display: block;
  flex-basis: 100%;
  width: 100%;
  margin: 0;
  color: var(--rkchat-ink);
  font-size: 13px;
}
#rk-top-chat-form .rkchat-privacy {
  font-size: 12px;
  line-height: 1.55;
}
#rk-top-chat nav.rkchat-quicklinks {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 7px 12px;
  border-top: 1px solid var(--rkchat-border);
  background: #f5faf6;
}
#rk-top-chat nav.rkchat-quicklinks a {
  flex: 1 1 auto;
  justify-content: center;
  min-height: 44px;
  padding: 5px 7px;
  font-size: 12px;
  text-align: center;
}
#rk-top-chat-input {
  flex: 1 1 170px;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 8px;
  border: 1px solid #a7c7b9;
  border-radius: 7px;
  background: #fff;
  color: var(--rkchat-ink);
  font: 400 16px/1.45 system-ui, sans-serif;
}
#rk-top-chat-form [type="submit"] {
  flex: 0 0 auto;
  min-height: 44px;
  margin: 0;
  padding: 7px 14px;
  border: 1px solid var(--rkchat-green);
  border-radius: 7px;
  background: var(--rkchat-green);
  color: #fff;
  font: 700 15px/1.35 system-ui, sans-serif;
  cursor: pointer;
}
#rk-top-chat-form [type="submit"]:disabled {
  opacity: .65;
  cursor: wait;
}
@media (max-width: 960px) {
  #rk-top-chat-launch {
    /* Leave the theme's fixed phone/mail bar and back-to-top button accessible. */
    right: max(calc(12.1875vw + 8px), calc(env(safe-area-inset-right) + 54px));
    bottom: max(calc(15vw + 8px), calc(env(safe-area-inset-bottom) + 38px));
  }
}
@media (max-width: 420px) {
  #rk-top-chat-dialog {
    inset: auto max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) auto;
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }
}
