/* Shared consultation rail: reserve edge space while keeping the common content max-width. */
.cw-widget {
  --cw-blue: #345bff;
  --cw-ink: #192942;
  --cw-muted: #6e7e96;
  --cw-line: #dfe7f5;
  font-family: inherit;
  color: var(--cw-ink);
}
.cw-widget :where(h2,p,figure) { margin: 0; }
.cw-widget :where(a,button,input,select,textarea):focus-visible { outline: 3px solid #93adff; outline-offset: 3px; }
.cw-widget .cw-rail {
  position: fixed;
  z-index: 52;
  right: 24px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  display: grid;
  gap: 10px;
  width: 94px;
  max-height: calc(100dvh - 32px);
}
.cw-widget .cw-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  min-height: 94px;
  padding: 13px 5px;
  border: 1px solid #4c6aff;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(150deg, #365bff, #2d4bea);
  box-shadow: 0 9px 26px #345bff35;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: color .18s, background .18s, border-color .18s, box-shadow .18s, transform .18s;
  -webkit-tap-highlight-color: transparent;
}
.cw-widget .cw-action svg { display: block; width: 30px; height: 30px; flex: 0 0 auto; color: #fff; }
.cw-widget .cw-action > span { display: block; max-width: 100%; overflow-wrap: normal; }
.cw-widget .cw-action:focus-visible { color: #fff; border-color: #2345dc; background: #2345dc; }
.cw-widget .cw-action:focus-visible svg { color: #fff; }
@media (hover:hover) and (pointer:fine) {
  .cw-widget .cw-action:hover { color: #fff; border-color: #2345dc; background: #2345dc; box-shadow: 0 11px 28px #345bff45; transform: translateY(-2px); }
  .cw-widget .cw-action:hover svg { color: #fff; }
}

/* Native modal presentation and scroll lock are independent of other site dialogs. */
body.cw-modal-open { overflow: hidden; }
/* The shared utility replaces legacy fixed rails, not page content or forms. */
body.has-contact-widget .mobile-cta,
body.has-contact-widget .floating-tools { display: none !important; }
.cw-widget .cw-dialog {
  width: min(660px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #dce5f8;
  border-radius: 18px;
  color: var(--cw-ink);
  background: #fff;
  box-shadow: 0 24px 100px #17274a30;
  scrollbar-gutter: stable;
}
.cw-widget .cw-dialog::backdrop { background: #15233f80; backdrop-filter: blur(4px); }
.cw-widget .cw-dialog:not([open]) { display: none; }
.cw-widget .cw-dialog-card { position: relative; min-width: 0; padding: 32px; }
.cw-widget .cw-dialog-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 17px; border: 1px solid #dce5ff; border-radius: 12px; color: var(--cw-blue); background: #f2f6ff; }
.cw-widget .cw-dialog-icon svg { display: block; width: 23px; height: 23px; }
.cw-widget .cw-dialog [data-cw-close] {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #7a8aa2;
  background: #f5f7fc;
  font: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.cw-widget .cw-dialog [data-cw-close]:hover { color: #345bff; border-color: #d5e0ff; background: #edf3ff; }
.cw-widget .cw-dialog h2 { margin-right: 30px; color: #1e3455; font-size: 26px; font-weight: 750; line-height: 1.4; letter-spacing: -.025em; white-space: normal; }
.cw-widget .cw-dialog h2 + p { margin-top: 10px; color: var(--cw-muted); font-size: 14px; line-height: 1.85; }
.cw-widget #cw-wechat-dialog { width: min(396px, calc(100vw - 32px)); }
.cw-widget #cw-wechat-dialog .cw-dialog-card { padding: 37px 30px 30px; text-align: center; }
.cw-widget #cw-wechat-dialog h2 { margin-inline: 0; }
.cw-widget #cw-wechat-description { padding-inline: 5px; }
.cw-widget .cw-qr { display: block; width: min(246px, 100%); height: auto; margin: 23px auto 0; border: 1px solid #e6ebf5; border-radius: 10px; padding: 8px; background: #fff; object-fit: contain; }
.cw-widget .cw-qr-note { margin-top: 17px; color: #8491a8; font-size: 12px; line-height: 1.8; }
.cw-widget .cw-qr-note a { color: var(--cw-blue); text-underline-offset: 3px; }
.cw-widget .cw-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px 18px; margin-top: 25px; }
.cw-widget .cw-field { display: flex; flex-direction: column; min-width: 0; gap: 7px; }
.cw-widget .cw-field-full { grid-column: 1 / -1; }
.cw-widget .cw-field label { color: #455d7f; font-size: 13px; font-weight: 600; line-height: 1.7; }
.cw-widget .cw-field :is(input,select,textarea) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #dbe3f1;
  border-radius: 7px;
  color: #253c5d;
  background: #f9fbff;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
}
.cw-widget .cw-field :is(input,textarea)::placeholder { color: #9aa7ba; }
.cw-widget .cw-field :is(input,select,textarea):focus { outline: 2px solid #b6c7ff; outline-offset: 1px; border-color: #8ba7ff; background: #fff; }
.cw-widget .cw-field textarea { min-height: 92px; resize: vertical; }
.cw-widget .cw-field :is(input,select,textarea):disabled { color: #7b8ba3; background: #f3f5fa; }
.cw-widget .cw-code-row { display: flex; align-items: stretch; gap: 9px; min-width: 0; }
.cw-widget .cw-code-row input { flex: 1 1 0; }
.cw-widget [data-cw-send-code] { flex: 0 0 auto; min-width: 105px; padding: 9px 11px; border: 1px solid #d3dfff; border-radius: 7px; color: var(--cw-blue); background: #eff4ff; font: inherit; font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; cursor: pointer; }
.cw-widget [data-cw-send-code]:hover:not(:disabled) { background: #e5edff; border-color: #b1c4ff; }
.cw-widget .cw-consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 18px; color: #74839b; font-size: 12px; line-height: 1.85; cursor: pointer; }
.cw-widget .cw-consent input { flex: 0 0 auto; width: 15px; height: 15px; margin: 4px 0 0; accent-color: var(--cw-blue); }
.cw-widget .cw-consent a { color: var(--cw-blue); text-decoration: none; }
.cw-widget .cw-consent a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cw-widget :is([data-cw-submit],[data-cw-done]) { display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 46px; margin-top: 18px; padding: 11px 22px; border: 1px solid var(--cw-blue); border-radius: 7px; color: #fff; background: var(--cw-blue); font: inherit; font-size: 14px; font-weight: 650; line-height: 1.6; cursor: pointer; }
.cw-widget [data-cw-submit] { width: 100%; }
.cw-widget :is([data-cw-submit],[data-cw-done]):hover:not(:disabled) { border-color: #244be6; background: #244be6; }
.cw-widget :is([data-cw-send-code],[data-cw-submit]):disabled { cursor: default; opacity: .55; }
.cw-widget [data-cw-output] { display: none; margin-top: 14px; padding: 10px 12px; border: 1px solid #dce5f6; border-radius: 7px; color: #547299; background: #f4f7fd; font-size: 12px; line-height: 1.85; overflow-wrap: anywhere; }
.cw-widget [data-cw-output]:not(:empty) { display: block; }
.cw-widget [data-cw-output][data-state="error"] { border-color: #f0c6c7; color: #a33d44; background: #fff5f5; }
.cw-widget [data-cw-output][data-state="success"] { border-color: #c7e7dc; color: #28735d; background: #f0faf6; }
.cw-widget .cw-form-note { margin-top: 13px; color: #8a98ae; font-size: 11px; line-height: 1.8; }
.cw-widget [data-cw-success] { padding: 26px 8px 10px; text-align: center; }
.cw-widget [data-cw-success] h2 { margin-inline: 0; }
.cw-widget [data-cw-success] > p { margin-top: 15px; color: #74859f; font-size: 14px; line-height: 1.9; }
.cw-widget .cw-success-icon { display: inline-grid; place-items: center; width: 68px; height: 68px; margin-bottom: 23px; border: 1px solid #d4dfff; border-radius: 50%; color: var(--cw-blue); background: #f1f5ff; font-size: 30px; line-height: 1; }
.cw-widget .cw-success-icon svg { width: 33px; height: 33px; }
.cw-widget [hidden] { display: none !important; }

@media (min-width:821px) and (max-width:1839px) {
  .cw-widget .cw-rail { right: 8px; width: 84px; gap: 9px; }
  .cw-widget .cw-action { min-height: 84px; gap: 7px; padding: 10px 4px; border-radius: 12px; font-size: 13px; }
  .cw-widget .cw-action svg { width: 28px; height: 28px; }
}
@media (min-width:821px) and (max-width:1839px) {
  body.has-contact-widget { --site-content-gutter: 208px; }
  body.has-contact-widget:has(.cw-widget[data-site="lims"]) { --page-gutter: 108px; }
}
@media (min-width:821px) and (max-width:1279px) {
  body.has-contact-widget { --site-content-gutter: 164px; }
  .cw-widget .cw-rail { right: 8px; width: 70px; }
  .cw-widget .cw-action { min-height: 76px; font-size: 12px; }
  .cw-widget .cw-action svg { width: 26px; height: 26px; }
}
@media (min-width:821px) and (max-height:520px) {
  .cw-widget .cw-rail { gap: 6px; }
  .cw-widget .cw-action { min-height: 64px; gap: 5px; padding-block: 7px; font-size: 12px; }
  .cw-widget .cw-action svg { width: 25px; height: 25px; }
}
@media (max-width:820px) {
  body.has-contact-widget { padding-bottom: calc(65px + env(safe-area-inset-bottom, 0px)); }
  .cw-widget .cw-rail { top: auto; right: 0; bottom: 0; left: 0; transform: none; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; width: auto; max-height: none; min-height: 65px; padding: 0 7px env(safe-area-inset-bottom, 0px); border-top: 1px solid #e1e7f3; background: #fffffffa; box-shadow: 0 -5px 23px #233f740b; backdrop-filter: blur(14px); }
  .cw-widget .cw-action { gap: 4px; min-height: 64px; padding: 7px 2px 6px; border: 0; border-radius: 0; box-shadow: none; color: #5e718f; background: transparent; font-size: 11px; font-weight: 600; }
  .cw-widget .cw-action svg { width: 22px; height: 22px; color: var(--cw-blue); }
  .cw-widget .cw-action:focus-visible { color: var(--cw-blue); background: #f0f4ff; }
  .cw-widget .cw-action:focus-visible svg { color: var(--cw-blue); }
  .cw-widget .cw-dialog { width: min(600px, calc(100vw - 24px)); max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); border-radius: 14px; }
  .cw-widget .cw-dialog-card { padding: 28px 23px; }
  .cw-widget .cw-dialog h2 { font-size: 24px; }
  .cw-widget .cw-dialog h2 + p { font-size: 13px; }
  .cw-widget .cw-form-grid { gap: 15px; }
}
@media (max-width:479px) {
  .cw-widget .cw-form-grid { grid-template-columns: minmax(0,1fr); gap: 14px; margin-top: 21px; }
  .cw-widget .cw-dialog-card { padding: 28px 20px 23px; }
  .cw-widget .cw-dialog [data-cw-close] { top: 11px; right: 11px; width: 33px; height: 33px; }
  .cw-widget .cw-dialog h2 { font-size: 23px; }
  .cw-widget #cw-wechat-dialog .cw-dialog-card { padding: 36px 24px 27px; }
  .cw-widget [data-cw-send-code] { min-width: 108px; }
}
@media (prefers-reduced-motion:reduce) {
  .cw-widget .cw-action { transition: none; }
}
@media print {
  body.has-contact-widget { padding-bottom: 0; }
  .cw-widget { display: none !important; }
}
