.rmsc-widget, .rmsc-widget * { box-sizing: border-box; }
.rmsc-widget {
  --rmsc-navy: #071b2d;
  --rmsc-paper: #f4f7f8;
  --rmsc-line: #dce4e7;
  position: fixed;
  z-index: 99998;
  right: 22px;
  bottom: 22px;
  color: var(--rmsc-navy);
  font: 400 14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.rmsc-widget button, .rmsc-widget input { font: inherit; }
.rmsc-widget button { cursor: pointer; }
.rmsc-launcher {
  position: relative;
  display: grid;
  width: 62px;
  height: 62px;
  padding: 0;
  place-items: center;
  color: #fff;
  background: var(--rmsc-navy);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 16px 42px rgba(7,27,45,.3);
  transition: transform .2s ease, background .2s ease;
}
.rmsc-launcher:hover, .rmsc-launcher:focus-visible { background: var(--rmsc-accent); transform: translateY(-2px); }
.rmsc-launcher svg { width: 29px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.rmsc-launcher-close { display: none; font-size: 31px; line-height: 1; }
.rmsc-open .rmsc-chat-icon, .rmsc-open .rmsc-online { display: none; }
.rmsc-open .rmsc-launcher-close { display: block; }
.rmsc-online {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: #39d98a;
  border: 3px solid #fff;
  border-radius: 50%;
}
.rmsc-teaser {
  position: absolute;
  right: 0;
  bottom: 75px;
  width: max-content;
  max-width: 280px;
  padding: 11px 15px;
  color: var(--rmsc-navy);
  background: #fff;
  border: 1px solid var(--rmsc-line);
  border-radius: 13px;
  box-shadow: 0 12px 35px rgba(7,27,45,.18);
  animation: rmsc-rise .35s ease 1.5s both;
}
.rmsc-teaser[hidden] { display: none; }
.rmsc-panel {
  position: absolute;
  right: 0;
  bottom: 77px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  width: min(378px, calc(100vw - 24px));
  height: min(590px, calc(100vh - 125px));
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--rmsc-line);
  border-radius: 20px;
  box-shadow: 0 24px 65px rgba(7,27,45,.28);
  animation: rmsc-rise .2s ease both;
}
.rmsc-panel[hidden] { display: none; }
.rmsc-header { display: flex; align-items: center; gap: 11px; padding: 15px 16px; color: #fff; background: var(--rmsc-navy); }
.rmsc-avatar { display: grid; width: 36px; height: 36px; place-items: center; color: var(--rmsc-navy); background: #fff; border-radius: 10px; }
.rmsc-avatar svg { width: 23px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.6; }
.rmsc-heading { display: grid; flex: 1; }
.rmsc-heading strong { color: #fff; font-size: 14px; }
.rmsc-heading small { display: flex; align-items: center; gap: 6px; color: #c9d7df; font-size: 11px; }
.rmsc-heading i { width: 6px; height: 6px; background: #39d98a; border-radius: 50%; }
.rmsc-close { padding: 4px 7px; color: #fff; background: transparent; border: 0; font-size: 26px; line-height: 1; }
.rmsc-messages { display: flex; flex-direction: column; gap: 11px; overflow-y: auto; padding: 17px; background: var(--rmsc-paper); }
.rmsc-message { max-width: 86%; padding: 10px 13px; white-space: pre-wrap; overflow-wrap: anywhere; border-radius: 14px; animation: rmsc-rise .18s ease both; }
.rmsc-bot { align-self: flex-start; background: #fff; border: 1px solid var(--rmsc-line); border-bottom-left-radius: 4px; }
.rmsc-user { align-self: flex-end; color: #fff; background: var(--rmsc-navy); border-bottom-right-radius: 4px; }
.rmsc-typing { display: flex; align-items: center; gap: 4px; padding: 14px; }
.rmsc-typing i { width: 5px; height: 5px; background: var(--rmsc-navy); border-radius: 50%; animation: rmsc-blink 1.1s infinite; }
.rmsc-typing i:nth-child(2) { animation-delay: .15s; }
.rmsc-typing i:nth-child(3) { animation-delay: .3s; }
.rmsc-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 5px; }
.rmsc-quick[hidden] { display: none; }
.rmsc-quick button { padding: 6px 10px; color: #395367; background: #fff; border: 1px solid var(--rmsc-line); border-radius: 999px; font-size: 11.5px; }
.rmsc-quick button:hover, .rmsc-quick button:focus-visible { color: var(--rmsc-accent); border-color: var(--rmsc-accent); }
.rmsc-form { display: flex; gap: 8px; padding: 10px 12px; }
.rmsc-form input { min-width: 0; flex: 1; padding: 10px 12px; color: var(--rmsc-navy); background: #fff; border: 1px solid var(--rmsc-line); border-radius: 10px; outline: 0; }
.rmsc-form input:focus { border-color: var(--rmsc-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rmsc-accent) 18%, transparent); }
.rmsc-form button { display: grid; width: 42px; padding: 0; place-items: center; color: #fff; background: var(--rmsc-accent); border: 0; border-radius: 10px; }
.rmsc-form button:disabled { cursor: wait; opacity: .55; }
.rmsc-form svg { width: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.rmsc-lead-form { max-height: 315px; overflow-y: auto; padding: 13px; background: #fff; border-top: 1px solid var(--rmsc-line); }
.rmsc-lead-form[hidden] { display: none; }
.rmsc-lead-form > strong { display: block; margin-bottom: 9px; }
.rmsc-lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rmsc-lead-form label { display: grid; gap: 3px; color: #395367; font-size: 11.5px; }
.rmsc-lead-form input:not([type="checkbox"]), .rmsc-lead-form textarea { width: 100%; padding: 8px 9px; color: var(--rmsc-navy); background: #fff; border: 1px solid var(--rmsc-line); border-radius: 8px; font-size: 13px; }
.rmsc-lead-form input:focus, .rmsc-lead-form textarea:focus { border-color: var(--rmsc-accent); outline: 2px solid color-mix(in srgb, var(--rmsc-accent) 18%, transparent); }
.rmsc-lead-question { margin-top: 8px; }
.rmsc-lead-consent { display: flex !important; grid-template-columns: auto 1fr; align-items: start; gap: 7px !important; margin: 9px 0; line-height: 1.35; }
.rmsc-lead-consent input { margin-top: 2px; }
.rmsc-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.rmsc-lead-form > button { padding: 8px 13px; color: #fff; background: var(--rmsc-accent); border: 0; border-radius: 8px; font-weight: 700; }
.rmsc-lead-form > button:disabled { opacity: .6; }
.rmsc-lead-status { margin: 7px 0 0; color: #395367; font-size: 11.5px; }
.rmsc-disclaimer { margin: 0; padding: 0 13px 12px; color: #627380; font-size: 10.5px; line-height: 1.35; }
.rmsc-disclaimer a { color: inherit; text-decoration: underline; }
@keyframes rmsc-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rmsc-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (max-width: 480px) {
  .rmsc-widget { right: 12px; bottom: 12px; }
  .rmsc-panel { right: 0; bottom: 72px; width: min(378px, calc(100vw - 40px)); height: min(620px, calc(100dvh - 96px)); }
  .rmsc-lead-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .rmsc-widget *, .rmsc-widget *::before, .rmsc-widget *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
