/* zjzjtest.cn additions on top of the zjzjtest.com stylesheet (no framework
   scripts): the .com header menu and service tabs with .cn content. */
.desktop-overflow-track > .nav-item[hidden], .desktop-overflow-more[hidden], .desktop-overflow-entry[hidden] { display: none !important; }
.mega-groups h3 a { color: inherit; text-decoration: none; }
.mega-groups h3 a:hover { color: var(--green-dark); }
.zjcn-service-tabs { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.service-showcase-grid.zjcn-grid-3, .service-showcase-grid.zjcn-grid-2, .service-showcase-grid.zjcn-grid-1 { grid-template-rows: minmax(0, 1fr); }
.service-showcase-grid.zjcn-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.service-showcase-grid.zjcn-grid-1 { grid-template-columns: minmax(0, 1fr); }
.service-showcase-grid.zjcn-grid-3 > .service-directory-link:last-child,
.service-showcase-grid.zjcn-grid-2 > .service-directory-link:last-child,
.service-showcase-grid.zjcn-grid-1 > .service-directory-link:last-child { border-radius: 0 25px 25px 0; }
.service-showcase-grid > .zjcn-directory-more { background: linear-gradient(155deg, #0b756a, var(--forest)); }
.site-header .nav-shell { position: relative; }

.zjcn-mobile-menu details { border-bottom: 1px solid #edf0ee; }
.zjcn-mobile-menu summary { font-weight: 600;
  min-height: 54px; padding: 11px 24px; display: flex; align-items: center;
  color: var(--forest); cursor: pointer; list-style: none;
}
.zjcn-mobile-menu details > div a { padding-left: 40px; min-height: 44px; font-size: 14px; }

/* Same look as the .com intro-card button. */
.service-intro-card > a.zjcn-intro-button {
  color: #fff; background: 0 0; border: 1px solid #ffffff5c; align-items: center; gap: 12px; width: fit-content;
  min-height: 44px; margin-top: 32px; padding: 0 15px; font-size: 13px; font-weight: 700; display: inline-flex;
  text-decoration: none;
}
.service-intro-card > a.zjcn-intro-button:hover { border-color: var(--green-bright); background: #ffffff14; }
.popular-searches > button[data-zjcn-search-term]:hover { color: var(--green-dark); border-bottom-color: currentColor; }
.service-showcase[hidden] { display: none !important; }

@media (min-width: 1321px) { .menu-button { display: none !important; } }
@media (max-width: 1320px) {
  .menu-button { display: grid !important; }
}

/* ---- Floating contact rail and live-support panel: zjzjtest.com's
   app/floating-contact-rail.css (2026-10-20) copied as is, then the few
   resets the older copy of the .com stylesheet in index.css needs. ---- */
.floating-contact-rail {
  position: fixed;
  z-index: 170;
  right: 18px;
  top: 50%;
  display: grid;
  overflow: hidden;
  padding: 5px;
  border: 1px solid rgba(57, 151, 133, .22);
  border-radius: 17px;
  background: rgba(251, 255, 254, .94);
  box-shadow: 0 16px 42px rgba(16, 78, 68, .14);
  transform: translateY(-42%);
  backdrop-filter: blur(18px);
}

.floating-contact-rail :is(button, a) {
  width: 76px;
  min-height: 69px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 7px 5px;
  border: 0;
  border-bottom: 1px solid rgba(38, 120, 105, .11);
  border-radius: 11px;
  background: transparent;
  color: #214c44;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.floating-contact-rail :is(button, a):last-child { border-bottom-color: transparent; }

.floating-contact-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #ccebe4;
  border-radius: 11px;
  background: #edf9f6;
  color: #168b77;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.floating-contact-label {
  font-size: 12px;
  font-weight: 680;
  line-height: 1.25;
  white-space: nowrap;
}

.floating-contact-rail :is(button, a):hover,
.floating-contact-rail :is(button, a):focus-visible {
  outline: none;
  background: #f0faf7;
  color: #0d6f60;
  transform: translateX(-2px);
}

.floating-contact-rail :is(button, a):focus-visible {
  box-shadow: inset 0 0 0 2px #168b77;
}

.floating-contact-rail :is(button, a):hover .floating-contact-icon,
.floating-contact-rail :is(button, a):focus-visible .floating-contact-icon {
  border-color: #9dd9cd;
  background: #dff5ef;
  color: #08725f;
}

@media (max-width: 1180px) and (min-width: 901px) {
  .floating-contact-rail { right: 8px; padding: 4px; }
  .floating-contact-rail :is(button, a) {
    width: 48px;
    min-height: 50px;
    padding: 5px 3px;
  }
  .floating-contact-icon { width: 31px; height: 31px; }
  .floating-contact-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 900px) {
  body:has(.floating-contact-rail) { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }

  body:has(.mobile-menu.open, .managed-mobile-menu.open, .directory-mobile-menu.open, .inner-mobile-menu.open) :is(.floating-contact-rail, .floating-support-chat) {
    display: none;
  }

  .floating-contact-rail {
    top: auto;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 5px;
    border-radius: 16px;
    box-shadow: 0 12px 34px rgba(16, 78, 68, .18);
    transform: none;
  }


  .floating-contact-rail :is(button, a) {
    width: auto;
    min-width: 0;
    min-height: 57px;
    gap: 3px;
    padding: 5px 2px;
    border-right: 1px solid rgba(38, 120, 105, .1);
    border-bottom: 0;
    border-radius: 10px;
  }

  .floating-contact-rail :is(button, a):last-child { border-right-color: transparent; }
  .floating-contact-icon { width: 29px; height: 29px; border-radius: 9px; }
  .floating-contact-icon svg { width: 18px; height: 18px; }
  .floating-contact-label { max-width: 100%; overflow: hidden; font-size: 10px; text-overflow: ellipsis; }

  .floating-contact-rail :is(button, a):hover,
  .floating-contact-rail :is(button, a):focus-visible { transform: none; }
}

@media (max-width: 390px) {
  .floating-contact-rail { right: 6px; bottom: calc(6px + env(safe-area-inset-bottom)); left: 6px; }
  .floating-contact-label { font-size: 9px; }
}


/* ILAC-MRA mark. Owner 2026-10-21 chose standard "A" for all three sites:
   desktop 26px, mobile 24px (the box sizes index.css already gives it; the
   roundel, 79% of the picture, then matches CMA and CNAS), no white backing
   square. cn-v8's 30px box with scale(1.26) made it larger than its
   neighbours and is withdrawn. */
.site-header .qualification-marks > img.ilac-mark { background: transparent; }

/* 微信询价 QR code shown on hover (desktop) next to the floating rail. */
.zjcn-wechat-pop {
  position: fixed; z-index: 180; width: 230px; padding: 14px 14px 12px; display: grid; gap: 8px; text-align: center;
  background: #fff; border: 1px solid rgba(57, 151, 133, .26); border-radius: 14px; box-shadow: 0 20px 48px rgba(8, 45, 40, .2);
}
.zjcn-wechat-pop[hidden] { display: none; }
.zjcn-wechat-pop strong { color: var(--forest); font-size: 15px; }
.zjcn-wechat-pop img { display: block; width: 100%; height: auto; }
.zjcn-wechat-pop span { color: var(--muted); font-size: 12px; line-height: 1.55; }

/* Live support since 2026-10-27 (/_zjcn/chat.js): the Beijing site's rules (hq-livechat
   site/src/styles.css), unchanged, over the shared .com panel in /_zjcn/com/index.css. */
/* Live support (site.js): our own chat from www.zjzjtest.com/kf inside the shared .com chat panel. The shared panel
   styles were made for the old third-party frame (fixed 438px stage, frame shifted up 54px); these undo that for
   our frame only, and style the leave-a-message panel shown when no operator is online. */
.floating-support-chat:not(.hq-chat-offline) .floating-support-chat-body { position: relative; overflow: hidden; }
.floating-support-chat .hq-chat-stage { position: absolute; inset: 0; min-width: 0; width: auto; height: auto; overflow: hidden; }
.floating-support-chat .hq-lhc-host { height: 100% !important; }
.floating-support-chat .hq-lhc-host iframe { position: static !important; top: auto !important; left: auto !important; width: 100% !important; height: 100% !important; min-height: 100% !important; max-height: 100% !important; }
.floating-support-chat.hq-chat-offline, .floating-support-chat.hq-chat-offline.is-minimized { height: auto; }
.hq-chat-offline .floating-support-chat-status { background: #c8d4cf; box-shadow: 0 0 0 4px rgba(200, 212, 207, .2); }
.hq-chat-pending .floating-support-chat-status { background: #9ef3ca; box-shadow: 0 0 0 4px rgba(158, 243, 202, .2); }
.hq-chat-message { padding: 22px 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.hq-chat-message p { margin: 0; color: #4f6359; font-size: 14px; line-height: 1.7; }
.hq-chat-message .hq-chat-hours { color: #163f38; font-weight: 700; }
.hq-chat-primary, .hq-chat-secondary { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px; font-size: 15px; font-weight: 700; text-decoration: none; }
.hq-chat-primary { background: #08765f; color: #fff; }
.hq-chat-primary:hover, .hq-chat-primary:focus-visible { background: #066451; color: #fff; }
.hq-chat-secondary { border: 1px solid #b9dacd; background: #f5faf8; color: #08725f; }
.hq-chat-message button.hq-chat-primary { width: 100%; border: 0; cursor: pointer; font: inherit; font-size: 15px; font-weight: 700; }
.hq-chat-stage[hidden] { display: none; }
/* Chat panel footer: 电话咨询 and 提交检测需求 as two even buttons (no 「客服无法打开？」). */
.floating-support-chat-backup:has(.hq-backup-btn) { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 12px; min-height: 0; }
.floating-support-chat-backup a.hq-backup-btn { display: flex; justify-content: center; align-items: center; gap: 6px; min-height: 38px; border: 1px solid #b9dacd; border-radius: 8px; background: #fff; font-size: 14px; text-decoration: none; }
.floating-support-chat-backup a.hq-backup-btn:hover { background: #edf9f6; border-color: #08765f; }
/* 邀请对话 (site.js showInvite): a small card next to the contact rail, in the chat panel's colours. */
.hq-chat-invite { position: fixed; right: 92px; bottom: 96px; z-index: 1001; width: min(330px, calc(100vw - 24px)); background: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(8, 45, 40, .22); overflow: hidden; animation: hq-invite-in .25s ease-out; }
.hq-chat-invite-head { display: flex; align-items: center; gap: 8px; padding: 11px 12px 11px 16px; background: #08765f; color: #fff; font-size: 14px; }
.hq-chat-invite-head strong { font-weight: 700; }
.hq-chat-invite-head span:not(.floating-support-chat-status) { opacity: .85; }
.hq-chat-invite-x { margin-left: auto; display: flex; border: 0; background: none; color: #fff; padding: 2px; cursor: pointer; }
.hq-chat-invite p { margin: 0; padding: 14px 16px 6px; color: #163f38; font-size: 15px; line-height: 1.7; }
.hq-chat-invite-actions { display: flex; gap: 10px; padding: 10px 16px 16px; }
.hq-chat-invite-actions button { flex: 1; min-height: 40px; border: 0; cursor: pointer; font: inherit; font-size: 15px; font-weight: 700; }
.hq-chat-invite-actions .hq-chat-secondary { border: 1px solid #b9dacd; }
/* Over the chat window's stage, which fills the panel body absolutely; ✕ closes it. The stage gets its own
   stacking context, because LHC gives its frame z-index 2147483640. */
.hq-chat-stage { isolation: isolate; z-index: 0; }
.hq-chat-invite-inline { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: flex-start; gap: 8px; padding: 10px 10px 10px 14px; background: #edf9f6; border-bottom: 1px solid #d5e6dd; box-shadow: 0 6px 16px rgba(8, 45, 40, .12); }
.hq-chat-invite-inline p { margin: 0; flex: 1; color: #163f38; font-size: 14px; line-height: 1.6; }
.hq-chat-invite-inline button { display: flex; border: 0; background: none; color: #6b8a80; padding: 2px; cursor: pointer; }
@keyframes hq-invite-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .hq-chat-invite { right: 12px; left: 12px; bottom: 92px; width: auto; } }
