.ephyon-contact-rail {
  position: fixed;
  top: var(--ephyon-rail-top, 50%);
  right: var(--ephyon-rail-right, 12px);
  z-index: 999;
  display: grid;
  align-content: start;
  gap: var(--ephyon-rail-gap, 8px);
  direction: ltr;
}

.ephyon-contact-rail[hidden] { display: none; }
.ephyon-contact-replaced { visibility: hidden !important; }

.ephyon-contact-icon, .ephyon-contact-copy, .ephyon-contact-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #070a3d;
  border: 1px solid #b8bfd0;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}

.ephyon-contact-icon {
  box-sizing: border-box;
  width: var(--ephyon-rail-size, 52px);
  height: var(--ephyon-rail-size, 52px);
}

.ephyon-contact-icon img { width: 26px; height: 26px; object-fit: contain; }
.ephyon-contact-close { width: 44px; height: 44px; font-size: 22px; }

.ephyon-contact-panel {
  position: absolute;
  top: 50%;
  right: calc(100% + 8px);
  transform: translateY(-50%);
  width: min(315px, calc(100vw - 120px));
  max-height: min(480px, calc(100dvh - 110px));
  overflow: auto;
  box-sizing: border-box;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #c9ceda;
  background: #fff;
  box-shadow: 0 10px 24px #01002820;
}

.ephyon-contact-card { display: grid; gap: 9px; color: #070a3d; min-width: 0; }
.ephyon-contact-title { font-size: 15px; overflow-wrap: anywhere; }
.ephyon-contact-value-row { display: flex; gap: 7px; min-width: 0; }
.ephyon-contact-value-row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding-inline: 8px;
  border: 1px solid #d5d9e1;
  border-radius: 7px;
  background: #f6f7fa;
  color: inherit;
  font: inherit;
  font-size: 16px;
  user-select: text;
}
.ephyon-contact-copy, .ephyon-contact-action {
  min-height: 44px;
  padding: 7px 9px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}
.ephyon-contact-action {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #070a3d;
  border: 1px solid transparent;
  border-radius: 7px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.ephyon-contact-action:hover { color: #fff; text-decoration: underline; }
.ephyon-contact-status, .ephyon-contact-hint { margin: 0; color: #3d465b; font-size: 14px; line-height: 1.45; }
.ephyon-contact-status:empty { position: absolute; }
.ephyon-contact-qr { display: block; width: 152px; height: 152px; object-fit: contain; margin: 0 auto; }
.ephyon-contact-qr-wrap summary { min-height: 44px; padding-block: 9px; cursor: pointer; }
.ephyon-contact-rail :is(button, a, input):focus-visible,
.ephyon-contact-dialog :is(button, a, input, summary):focus-visible {
  outline: 2px solid #007f94;
  outline-offset: 2px;
}
.ephyon-contact-dialog {
  width: min(480px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 16px;
  color: #070a3d;
  background: #fff;
}
.ephyon-contact-dialog::backdrop { background: #01002888; }
.ephyon-contact-dialog-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #d5d9e1;
}
.ephyon-contact-dialog-body { display: grid; gap: 16px; padding: 16px; }
.ephyon-contact-dialog-body section + section { border-top: 1px solid #d5d9e1; padding-top: 12px; }

/* The inquiry form loads on first open. Style only its native placeholder. */
[class*="WeChatFloatButton_wechatFloatButton__"]:has(button[aria-label="Toggle Contact panel"][aria-expanded="true"])
  > [class*="WeChatFloatButton_qrCodeContainer__"]:has(> [class*="WeChatFloatButton_popupInner__"] > [role="status"]) {
  min-width: 0;
  padding: 12px 16px;
  animation: ephyon-contact-show-loading 140ms step-end both;
}

[class*="WeChatFloatButton_wechatFloatButton__"]:has(button[aria-label="Toggle Contact panel"][aria-expanded="true"])
  > [class*="WeChatFloatButton_qrCodeContainer__"]
  > [class*="WeChatFloatButton_popupInner__"] > [role="status"] {
  min-height: 0 !important;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3d465b;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
}

[class*="WeChatFloatButton_wechatFloatButton__"]:has(button[aria-label="Toggle Contact panel"][aria-expanded="true"])
  > [class*="WeChatFloatButton_qrCodeContainer__"]
  > [class*="WeChatFloatButton_popupInner__"] > [role="status"]::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid #d5d9e1;
  border-top-color: #070a3d;
  border-radius: 50%;
}

@keyframes ephyon-contact-show-loading {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  [class*="WeChatFloatButton_wechatFloatButton__"]:has(button[aria-label="Toggle Contact panel"][aria-expanded="true"])
    > [class*="WeChatFloatButton_qrCodeContainer__"]
    > [class*="WeChatFloatButton_popupInner__"] > [role="status"]::before {
    animation: ephyon-contact-spin 650ms linear infinite;
  }
}

@keyframes ephyon-contact-spin {
  to { transform: rotate(1turn); }
}

@media (max-width: 768px) {
  .ephyon-contact-rail { display: none; }
  .ephyon-contact-replaced { visibility: visible !important; }
}
@media (max-width: 350px) {
  .ephyon-contact-value-row { flex-wrap: wrap; }
  .ephyon-contact-value-row input { box-sizing: border-box; flex: 1 0 100%; }
}
