/* Style the existing phone and native TTKEFU launchers only. Provider display states remain authoritative. */
:root {
  --hl-contact-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  --hl-contact-right: max(16px, env(safe-area-inset-right, 0px));
  --hl-contact-width: 112px;
}

body.hl-contact-actions-ready #chat-call-button.chat-call-button,
body.hl-contact-actions-ready #ttkefuico.tool-box-components,
body.hl-contact-actions-ready #ttkefuico.ttkefuico,
body.hl-contact-actions-ready #ttkefu_Mb_MinWindow_TakingIcoDiv {
  box-sizing: border-box !important;
  position: fixed !important;
  top: auto !important;
  left: auto !important;
  right: var(--hl-contact-right, 16px) !important;
  width: var(--hl-contact-width, 112px) !important;
  min-width: var(--hl-contact-width, 112px) !important;
  max-width: var(--hl-contact-width, 112px) !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  border: 1px solid #1e6086 !important;
  border-radius: 6px !important;
  background: #22648a !important;
  color: #fff !important;
  box-shadow: 0 3px 12px rgb(16 54 74 / 16%) !important;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  cursor: pointer;
  transform: none !important;
  transition: background-color .15s ease, box-shadow .15s ease !important;
  z-index: 9996 !important;
  -webkit-tap-highlight-color: transparent;
}

/* The extra .chat-call-button specificity overrides the old left:196px!important directory offset. */
body.hl-contact-actions-ready #chat-call-button.chat-call-button {
  bottom: var(--hl-contact-bottom, 16px) !important;
  padding: 0 10px !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
body.hl-contact-actions-ready #chat-call-button .chat-call-icon {
  width: 18px;
  height: 20px;
  font-size: 15px;
  line-height: 20px;
}
body.hl-contact-actions-ready #ttkefuico.tool-box-components,
body.hl-contact-actions-ready #ttkefuico.ttkefuico,
body.hl-contact-actions-ready #ttkefu_Mb_MinWindow_TakingIcoDiv {
  bottom: calc(var(--hl-contact-bottom, 16px) + 50px) !important;
  overflow: visible !important;
}
body.hl-contact-actions-ready #ttkefuico::before { content: none !important; }

/* Desktop: the icon span and native clickable label are siblings. */
body.hl-contact-actions-ready #ttkefuico.tool-box-components > .tool-box-components-content:not(#ttkefu_back_top) {
  box-sizing: border-box;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: inherit;
  background: transparent !important;
  box-shadow: none !important;
}
body.hl-contact-actions-ready #ttkefuico.tool-box-components .tool-box-components-content-item {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100% !important;
  height: 42px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 8px !important;
  line-height: 1.4 !important;
}
body.hl-contact-actions-ready #ttkefuico.tool-box-components .tool-box-components-content-item > span[onclick] {
  display: inline-flex;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 42px;
  margin: 0;
  padding: 0;
}
body.hl-contact-actions-ready #ttkefuico.tool-box-components .tool-box-components-content-item > span[onclick] > img {
  display: block;
  width: 20px !important;
  height: 20px !important;
  max-width: none;
  margin: 0 !important;
  padding: 0;
  object-fit: contain;
}
body.hl-contact-actions-ready #ttkefuico.tool-box-components .tool-box-components-content-item > p.slide-title {
  display: flex !important;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: 42px;
  margin: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  white-space: nowrap;
}

/* Mobile default launcher: do not override display on the wrapper, root, or state-controlled label. */
body.hl-contact-actions-ready #ttkefuico.ttkefuico #ttkefu_Mb_Ele_0 {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 42px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 8px !important;
  color: #fff !important;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 42px !important;
  text-align: center !important;
  text-indent: 0 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
}

/* Mobile existing-session launcher: preserve its icon and live unread-count children. */
body.hl-contact-actions-ready #ttkefu_Mb_MinWindow_TakingIcoDivTxt {
  box-sizing: border-box !important;
  position: absolute !important;
  left: 13px !important;
  right: auto !important;
  top: 11px !important;
  bottom: auto !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  color: #fff !important;
  font-size: 13px !important;
  line-height: 20px !important;
  overflow: visible !important;
}
body.hl-contact-actions-ready #ttkefu_Mb_MinWindow_TakingIcoDivTxt::after {
  left: 0 !important;
  bottom: 0 !important;
  width: 20px !important;
  height: 20px !important;
  background-size: contain !important;
  background-position: center !important;
}
body.hl-contact-actions-ready #ttkefu_Mb_MinWindow_TakingIco_Num {
  box-sizing: border-box !important;
  top: -6px !important;
  right: -7px !important;
  min-width: 16px !important;
  width: auto !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 3px !important;
  border: 1px solid #fff !important;
  border-radius: 9px !important;
  background: #d13c37 !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 14px !important;
  text-align: center !important;
}
body.hl-contact-actions-ready #ttkefu_Mb_MinWindow_TakingIcoDiv > .hl-contact-label {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 40px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
  color: #fff;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
}

/* Keep the native back-to-top control beside the telephone, rather than below the chat root. */
body.hl-contact-actions-ready #ttkefuico.tool-box-components #ttkefu_back_top {
  box-sizing: border-box !important;
  position: fixed !important;
  top: auto !important;
  left: auto !important;
  right: calc(var(--hl-contact-right, 16px) + var(--hl-contact-width, 112px) + 8px) !important;
  bottom: var(--hl-contact-bottom, 16px) !important;
  width: 36px !important;
  height: 36px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #1e6086 !important;
  border-radius: 6px !important;
  background: #22648a !important;
  box-shadow: 0 3px 12px rgb(16 54 74 / 12%) !important;
}
body.hl-contact-actions-ready #ttkefuico.tool-box-components #ttkefu_top {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: inherit;
  background: transparent !important;
  line-height: 1 !important;
}
body.hl-contact-actions-ready #ttkefuico.tool-box-components #ttkefu_top > img {
  width: 17px !important;
  height: 17px !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain;
}

body.hl-contact-actions-ready #chat-call-button.chat-call-button:hover,
body.hl-contact-actions-ready #ttkefuico.tool-box-components:hover,
body.hl-contact-actions-ready #ttkefuico.ttkefuico:hover,
body.hl-contact-actions-ready #ttkefu_Mb_MinWindow_TakingIcoDiv:hover { background: #194f70 !important; }
body.hl-contact-actions-ready #chat-call-button:focus-visible,
body.hl-contact-actions-ready #ttkefuico:focus-visible,
body.hl-contact-actions-ready #ttkefuico .tool-box-components-content-item > [onclick]:focus-visible,
body.hl-contact-actions-ready #ttkefu_Mb_MinWindow_TakingIcoDiv:focus-visible,
body.hl-contact-actions-ready #ttkefu_top:focus-visible { outline: 3px solid #e9a453; outline-offset: 3px; }

/* Only the duplicate legacy floating enquiry pill is retired; its mobile CTA bar remains intact. */
body.hl-contact-actions-ready #hl-cta-fab { display: none !important; }
body.hl-contact-actions-ready .company-film.is-offscreen[data-state="playing"] .company-film__toggle {
  bottom: max(150px, calc(var(--hl-contact-bottom, 16px) + 110px)) !important;
}

@media (max-width: 720px) {
  :root {
    --hl-contact-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    --hl-contact-right: calc(12px + env(safe-area-inset-right, 0px));
    --hl-contact-width: 108px;
  }
  body.hl-contact-actions-ready .company-film.is-offscreen[data-state="playing"] .company-film__toggle {
    bottom: max(calc(90px + env(safe-area-inset-bottom, 0px)), calc(var(--hl-contact-bottom, 12px) + 110px)) !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.hl-contact-actions-ready #chat-call-button.chat-call-button,
  body.hl-contact-actions-ready #ttkefuico.tool-box-components,
  body.hl-contact-actions-ready #ttkefuico.ttkefuico,
  body.hl-contact-actions-ready #ttkefu_Mb_MinWindow_TakingIcoDiv { transition: none !important; }
}

/* Requested removal: only the floating film control and back-to-top arrow. */
body.hl-contact-actions-ready #ttkefuico.tool-box-components #ttkefu_back_top,
.company-film.is-offscreen[data-state="playing"] .company-film__toggle {
  display: none !important;
}
