.rv-chatbot {
  --rv-chat-navy: #004859;
  --rv-chat-turquoise: #37cbd4;
  --rv-chat-sky: #dffbfc;
  --rv-chat-ink: #25282a;
  --rv-chat-muted: #5f696d;
  --rv-chat-line: #cfe0e2;
  --rv-chat-paper: #ffffff;
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 999999;
  color: var(--rv-chat-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.65;
}

.rv-chatbot *, .rv-chatbot *::before, .rv-chatbot *::after { box-sizing: border-box; }
.rv-chatbot button, .rv-chatbot input { font: inherit; }
.rv-chatbot button, .rv-chatbot a { -webkit-tap-highlight-color: transparent; }
.rv-chatbot [hidden] { display: none !important; }
.rv-chatbot :focus-visible { outline: 3px solid #f1b63b; outline-offset: 3px; }

.rv-chatbot__launcher {
  min-height: 62px;
  border: 0;
  border-radius: 999px;
  padding: 8px 22px 8px 10px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--rv-chat-navy);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 34px rgba(0, 56, 69, .28);
  cursor: pointer;
}

.rv-chatbot__launcher:hover { background: #003846; }
.rv-chatbot__launcher-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--rv-chat-turquoise);
  color: var(--rv-chat-navy);
  font-size: 22px;
  font-weight: 900;
}

.rv-chatbot__panel {
  width: min(398px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid rgba(0, 72, 89, .18);
  border-radius: 20px;
  background: #f7fbfb;
  box-shadow: 0 22px 64px rgba(0, 45, 56, .24);
}

.rv-chatbot__header {
  min-height: 82px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--rv-chat-navy);
  color: #fff;
}

.rv-chatbot__avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--rv-chat-turquoise);
  color: var(--rv-chat-navy);
  font-size: 23px;
  font-weight: 900;
}

.rv-chatbot__heading { flex: 1; min-width: 0; }
.rv-chatbot__heading strong { display: block; font-size: 15px; line-height: 1.45; }
.rv-chatbot__heading small { display: flex; align-items: center; gap: 6px; font-size: 11px; opacity: .9; }
.rv-chatbot__heading i { width: 7px; height: 7px; border-radius: 50%; background: #bdf06f; }

.rv-chatbot__close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}
.rv-chatbot__close:hover { background: rgba(255,255,255,.12); }

.rv-chatbot__body {
  max-height: min(405px, calc(100dvh - 280px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 17px;
}

.rv-chatbot__messages { display: grid; gap: 9px; }
.rv-chatbot__message {
  width: fit-content;
  max-width: 92%;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.65;
}
.rv-chatbot__message--bot { background: #fff; border: 1px solid #e0ebec; }
.rv-chatbot__message--user { justify-self: end; background: var(--rv-chat-sky); border: 1px solid #bcecef; }

.rv-chatbot__quick-label { margin: 16px 0 8px; color: var(--rv-chat-muted); font-size: 11px; font-weight: 700; }
.rv-chatbot__quick { display: grid; gap: 7px; }
.rv-chatbot__quick button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--rv-chat-line);
  border-radius: 11px;
  padding: 8px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  color: var(--rv-chat-ink);
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.rv-chatbot__quick button:hover { border-color: var(--rv-chat-turquoise); background: #f2feff; }
.rv-chatbot__quick button span { color: var(--rv-chat-navy); font-size: 20px; line-height: 1; }

.rv-chatbot__form {
  margin: 0;
  padding: 11px 13px 8px;
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--rv-chat-line);
  background: #fff;
}
.rv-chatbot__form input {
  min-width: 0;
  height: 43px;
  flex: 1;
  border: 1px solid #bcced1;
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  color: var(--rv-chat-ink);
  font-size: 13px;
}
.rv-chatbot__form button {
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: var(--rv-chat-turquoise);
  color: var(--rv-chat-navy);
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}

.rv-chatbot__links {
  padding: 1px 13px 8px;
  display: flex;
  justify-content: center;
  gap: 7px;
  background: #fff;
}
.rv-chatbot__links a {
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--rv-chat-navy);
  background: var(--rv-chat-sky);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.rv-chatbot__links a:hover { text-decoration: underline; }
.rv-chatbot__note { margin: 0; padding: 0 14px 10px; background: #fff; color: var(--rv-chat-muted); text-align: center; font-size: 9px; }
.rv-chatbot__sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 600px) {
  .rv-chatbot { right: 10px; bottom: 10px; }
  .rv-chatbot__panel { width: calc(100vw - 20px); border-radius: 17px; }
  .rv-chatbot__header { min-height: 72px; }
  .rv-chatbot__body { max-height: calc(100dvh - 262px); padding: 14px; }
  .rv-chatbot__launcher { min-height: 58px; padding-right: 18px; }
  .rv-chatbot__launcher-icon { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .rv-chatbot * { scroll-behavior: auto !important; }
}
