/* Compact footer and persistent contact entry. */
.contact.section {
  min-height: 100vh;
  min-height: 100svh;
  padding: 80px 24px;
}

.contact .eyebrow { margin-bottom: 24px; }
.contact h2 { margin-bottom: 0; }

.contact-footer-qr {
  width: 184px;
  height: 184px;
  margin-top: 32px;
  padding: 8px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .14);
}

.contact-footer-qr img {
  display: block;
  width: 168px;
  height: 168px;
  object-fit: contain;
}

.contact-float {
  position: fixed;
  z-index: 35;
  right: 24px;
  bottom: 28px;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 12px;
  font-family: "Noto Sans SC", sans-serif;
}

.contact-float.hide-top-control .contact-float-top { display: none; }

.contact-float-actions {
  width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.contact-float-trigger,
.contact-float-round {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 48px;
  border: 1px solid rgba(255, 255, 255, .24);
  color: #fff;
  background: rgba(255, 255, 255, .17);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .26), 0 8px 20px rgba(0, 0, 0, .12);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  cursor: pointer;
  text-decoration: none;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.contact-float-trigger::after,
.contact-float-round::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(115deg, transparent 18%, rgba(255,255,255,.18) 48%, transparent 78%);
  transform: translateX(-120%);
  transition: transform .45s ease;
}

.contact-float-trigger {
  height: 130px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 24px;
}

.contact-float-round {
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  text-decoration: none;
}

.contact-float-trigger:hover,
.contact-float-trigger:focus-visible,
.contact-float-round:hover,
.contact-float-round:focus-visible {
  border-color: rgba(255, 255, 255, .42);
  background: rgba(255, 255, 255, .25);
  box-shadow: inset 0 1px 2px rgba(255,255,255,.32), 0 12px 24px rgba(0,0,0,.16);
}

.contact-float-trigger:hover::after,
.contact-float-trigger:focus-visible::after,
.contact-float-round:hover::after,
.contact-float-round:focus-visible::after { transform: translateX(120%); }

.contact-float-trigger:focus-visible,
.contact-float-round:focus-visible {
  outline: 2px solid #3d7f38;
  outline-offset: 3px;
}

.contact-float-label {
  height: auto;
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  writing-mode: vertical-rl;
  letter-spacing: 0;
}

.contact-float-icon { width: 21px; height: 21px; display: block; flex: none; background: currentColor; }
.contact-float-trigger .contact-float-icon-wechat { width: 22px; height: 22px; }
.contact-float-top .contact-float-icon { width: 22px; height: 22px; }
.contact-float-icon-wechat { -webkit-mask: url('assets/contact-wechat.svg') center/contain no-repeat; mask: url('assets/contact-wechat.svg') center/contain no-repeat; }
.contact-float-icon-telephone { -webkit-mask: url('assets/contact-telephone.svg') center/contain no-repeat; mask: url('assets/contact-telephone.svg') center/contain no-repeat; }
.contact-float-icon-pin { -webkit-mask: url('assets/contact-pin.svg') center/contain no-repeat; mask: url('assets/contact-pin.svg') center/contain no-repeat; }

/* Match the dark-mode navigation download button's glass treatment. */
.contact-float:not(.light-theme) .contact-float-trigger,
.contact-float:not(.light-theme) .contact-float-round {
  color: #fff;
  border-color: rgba(255, 255, 255, .42);
  background: linear-gradient(145deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .16) 38%, rgba(255, 255, 255, .09) 100%);
  box-shadow: inset 1px 1px 1px rgba(255, 255, 255, .7), inset -1px -1px 1px rgba(255, 255, 255, .12);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
}

.contact-float:not(.light-theme) .contact-float-trigger:hover,
.contact-float:not(.light-theme) .contact-float-trigger:focus-visible,
.contact-float:not(.light-theme) .contact-float-round:hover,
.contact-float:not(.light-theme) .contact-float-round:focus-visible {
  border-color: rgba(255, 255, 255, .6);
  background: linear-gradient(145deg, rgba(255, 255, 255, .4) 0%, rgba(255, 255, 255, .2) 42%, rgba(255, 255, 255, .12) 100%);
  box-shadow: inset 1px 1px 2px rgba(255, 255, 255, .82), inset -1px -1px 1px rgba(255, 255, 255, .18);
}

.contact-float.light-theme .contact-float-trigger,
.contact-float.light-theme .contact-float-round {
  color: #252627;
  border-color: rgba(0, 0, 0, .16);
  background: rgba(255, 255, 255, .72);
  box-shadow: inset 0 1px 1px rgba(255,255,255,1), inset 0 -1px 4px rgba(0,0,0,.06), 0 8px 20px rgba(0,0,0,.08);
}

.contact-float.light-theme .contact-float-trigger:hover,
.contact-float.light-theme .contact-float-trigger:focus-visible,
.contact-float.light-theme .contact-float-round:hover,
.contact-float.light-theme .contact-float-round:focus-visible {
  border-color: rgba(0, 0, 0, .28);
  background: #f8f9fa;
  box-shadow: inset 0 1px 2px rgba(255,255,255,1), inset 0 -2px 6px rgba(0,0,0,.07), 0 12px 24px rgba(0,0,0,.12);
}

.contact-float-panel {
  position: absolute;
  top: -8px;
  right: 57px;
  width: 142px;
  height: 172px;
  padding: 12px;
  display: grid;
  justify-items: center;
  color: #252627;
  background: #fff;
  border: 1px solid #eaedf1;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

.contact-float-panel::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 66px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-top: 1px solid #eaedf1;
  border-right: 1px solid #eaedf1;
  transform: rotate(45deg);
}

.contact-float-panel[hidden],
.contact-float-panel-content[hidden] { display: none; }
.contact-float-panel-content { width: 100%; display: grid; justify-items: center; gap: 8px; }
.contact-float-heading { margin: 0; color: #252627; font-size: 14px; font-weight: 500; line-height: 1.3; white-space: nowrap; }
.contact-float-panel img { display: block; width: 107px; height: 107px; object-fit: contain; }

.contact-float-panel[data-mode="phone"] {
  top: 130px;
  width: 176px;
  height: 70px;
  padding: 12px 10px;
}
.contact-float-panel[data-mode="phone"]::after { top: 28px; }
.contact-float-phone-content { grid-template-columns: 38px 1fr; align-items: center; justify-items: stretch; gap: 8px; }
.contact-float-phone-badge { width: 38px; height: 38px; display: grid; place-items: center; color: #252627; background: #f1f3f5; border-radius: 50%; }
.contact-float-phone-badge .contact-float-icon { width: 17px; height: 17px; }
.contact-float-phone-copy { display: grid; gap: 1px; text-align: left; }
.contact-float-phone-number { color: rgba(37, 38, 39, .68); font-size: 12px; font-weight: 500; line-height: 1.3; white-space: nowrap; }

@media (max-width: 800px) {
  .contact.section { min-height: 100vh; min-height: 100svh; padding: 70px 20px; }
  .contact-footer-qr { width: 164px; height: 164px; margin-top: 24px; }
  .contact-footer-qr img { width: 148px; height: 148px; }
  .contact-float { right: 12px; bottom: 18px; gap: 8px; }
  .contact-float-panel[data-mode="phone"] { width: min(176px, calc(100vw - 76px)); }
}

@media (prefers-reduced-motion: reduce) {
  .contact-float-trigger,
  .contact-float-round,
  .contact-float-trigger::after,
  .contact-float-round::after { transition: none; }
}
