/* Contact mode selector and single-purpose contact views. */
.contact-campus-select-wrap { display: grid; grid-template-columns: auto minmax(220px, 1fr); align-items: center; gap: 14px; margin: 23px 0 15px; padding: 14px 16px; border: 1px solid #d8e5f4; border-radius: 14px; background: #fff; }
.contact-campus-select-wrap label { color: #52657d; font-size: 10px; font-weight: 800; }
.contact-campus-select-wrap select { width: 100%; min-height: 44px; padding: 0 38px 0 13px; color: #18385f; border: 1px solid #cbdcf0; border-radius: 10px; outline: 0; background: #f7faff; font-size: 12px; font-weight: 800; cursor: pointer; }
.contact-campus-select-wrap select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,255,.12); }
.contact-mode-label { display: inline-flex; margin-bottom: 9px; padding: 4px 8px; color: var(--blue); border-radius: 6px; background: #eaf3ff; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.contact-single-view { max-width: 540px; margin: 0 auto; }
.contact-single-view .contact-wechat-card, .contact-single-view .contact-phone-card { min-height: 360px; justify-content: center; }
.contact-single-view .contact-phone-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.contact-single-view .contact-phone-card > a { font-size: clamp(29px, 5vw, 42px); }
.contact-general-card { display: grid; grid-template-columns: 78px 1fr; gap: 20px; padding: 27px; border: 1px solid #d7e4f4; border-radius: 18px; background: linear-gradient(145deg, #f8fbff, #edf5ff); }
.contact-general-icon { width: 78px; aspect-ratio: 1; display: grid; place-items: center; color: #fff; border-radius: 22px; background: linear-gradient(145deg, #1769ff, #35b9c4); font-size: 28px; font-weight: 900; }
.contact-general-card h4 { margin: 0 0 5px; font-size: 20px; }
.contact-general-card p { margin: 5px 0; color: #6e7f95; font-size: 11px; }
.contact-general-card b { color: #18385f; }
.contact-general-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 17px; }
.contact-general-actions button { min-height: 38px; padding: 0 13px; color: var(--blue); border: 1px solid #c7dbf6; border-radius: 9px; background: #fff; font-size: 9px; font-weight: 800; cursor: pointer; }

/* Desktop floating contact rail: hover/focus reveals campus-specific details. */
.floating-contact-item { position: relative; min-width: 0; }

.floating-contact-popover {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: calc(100% + 13px);
  width: min(370px, calc(100vw - 130px));
  padding: 18px;
  color: #18385f;
  border: 1px solid #d8e5f4;
  border-radius: 18px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 22px 60px rgba(26,68,132,.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(12px, -50%);
  transition: opacity .2s ease, visibility .2s ease, transform .24s ease;
}
.floating-contact-popover::before { position: absolute; top: calc(50% - 9px); right: -9px; width: 17px; height: 17px; content: ""; border-top: 1px solid #d8e5f4; border-right: 1px solid #d8e5f4; background: #fff; transform: rotate(45deg); }
.floating-contact-popover::after { position: absolute; top: 0; right: -15px; width: 15px; height: 100%; content: ""; }
.floating-contact-item:hover .floating-contact-popover, .floating-contact-item:focus-within .floating-contact-popover, .floating-contact-item.is-popover-open .floating-contact-popover { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(0, -50%); }
.floating-popover-kicker { display: block; margin-bottom: 4px; color: #287ce9; font-size: 8px; font-weight: 900; letter-spacing: .12em; }

.floating-online-popover { width: min(315px, calc(100vw - 130px)); padding: 21px; background: linear-gradient(145deg, #f8fbff, #eef6ff); }
.floating-online-popover::before { background: #f4f9ff; }
.floating-online-popover > strong { display: block; font-size: 20px; }
.floating-online-popover > p { margin: 7px 0 11px; color: #60728b; font-size: 11px; line-height: 1.7; }
.floating-online-popover > small { display: inline-flex; padding: 6px 9px; color: #60728b; border-radius: 8px; background: #fff; font-size: 8px; font-weight: 800; }
.floating-online-start { width: 100%; min-height: 40px; margin-top: 14px; border: 0; border-radius: 10px; background: linear-gradient(145deg, #1769ff, #2e8df7); color: #fff; font-size: 12px; font-weight: 800; cursor: pointer; transition: opacity .2s, transform .1s; }
.floating-online-start:hover { opacity: .9; }
.floating-online-start:active { transform: scale(.97); }

.floating-contact-list-popover { padding: 0; overflow: visible; }
.floating-contact-list-popover > header { position: relative; padding: 19px 20px 15px; border-bottom: 1px solid #e4ecf6; }
.floating-contact-list-popover > header strong { display: block; font-size: 18px; }
.floating-contact-list-popover > header small { display: block; margin-top: 3px; color: #8290a3; font-size: 9px; }
.floating-contact-list-popover > div { position: relative; overflow: hidden; border-radius: 0 0 18px 18px; }
.floating-contact-row { width: 100%; min-height: 66px; display: grid; grid-template-columns: minmax(100px, 1fr) auto 12px; align-items: center; gap: 10px; padding: 13px 18px; color: #152a45; border: 0; border-top: 1px solid #e8eef6; background: #fff; text-align: left; cursor: pointer; transition: color .18s ease, background .18s ease, padding .18s ease; }
.floating-contact-row:first-child { border-top: 0; }
.floating-contact-row strong { font-size: 13px; white-space: nowrap; }
.floating-contact-row span { color: #1769ff; font-size: 12px; font-weight: 800; text-align: right; white-space: nowrap; }
.floating-contact-row i { color: #9aabc0; font-size: 20px; font-style: normal; text-align: right; }
.floating-contact-row:hover, .floating-contact-row:focus-visible { color: #0c5bd5; background: #edf6ff; padding-left: 22px; outline: 0; }
.floating-contact-row:hover i, .floating-contact-row:focus-visible i { color: #1769ff; }
.floating-phone-popover .floating-contact-row span { font-size: 14px; letter-spacing: .01em; }

.floating-wechat-popover { width: min(315px, calc(100vw - 130px)); padding: 0; }
.floating-wechat-popover > header { padding: 18px 20px 14px; border-bottom: 1px solid #e4ecf6; }
.floating-wechat-popover > header strong { display: block; font-size: 18px; }
.floating-wechat-popover > header small { display: block; margin-top: 3px; color: #8290a3; font-size: 9px; }
.floating-wechat-quick { display: flex; flex-direction: column; align-items: center; padding: 16px 19px 19px; text-align: center; }
.floating-wechat-quick label { width: 100%; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 9px; color: #64768f; font-size: 9px; font-weight: 800; text-align: left; }
.floating-wechat-quick select { width: 100%; min-height: 38px; padding: 0 30px 0 10px; color: #18385f; border: 1px solid #ccdbed; border-radius: 9px; outline: 0; background: #f7faff; font-size: 10px; font-weight: 800; }
.floating-wechat-quick select:focus { border-color: #1769ff; box-shadow: 0 0 0 3px rgba(23,105,255,.12); }
.floating-wechat-qr { width: 200px; aspect-ratio: 1; display: grid; place-items: center; margin-top: 13px; padding: 7px; overflow: hidden; border: 1px solid #d5e3f2; border-radius: 13px; background: #fff; box-shadow: 0 10px 26px rgba(36,84,151,.12); }
.floating-wechat-qr svg { width: 100%; height: 100%; display: block; }
.floating-wechat-qr .qr-fallback { color: #8090a5; font-size: 9px; }
.floating-wechat-quick > strong { margin-top: 8px; color: #18385f; font-size: 11px; letter-spacing: .02em; }
.floating-wechat-quick > small { margin-top: 3px; color: #8390a2; font-size: 8px; }

@media (max-width: 680px) {
  .floating-contact-item { min-width: 0; }
  .floating-contact-item:first-child .floating-contact-trigger, .floating-contact-item:last-child .floating-contact-trigger { border-radius: 0; }
  .floating-contact-popover { position: fixed; top: auto; right: 10px; bottom: calc(74px + env(safe-area-inset-bottom)); left: 10px; width: auto; max-height: calc(100dvh - 100px); overflow-y: auto; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(12px); }
  .floating-contact-popover::before, .floating-contact-popover::after { display: none; }
  .floating-contact-item:hover .floating-contact-popover, .floating-contact-item:focus-within .floating-contact-popover { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(12px); }
  .floating-contact-item.is-popover-open .floating-contact-popover { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
  .floating-wechat-popover, .floating-online-popover { width: auto; }
  .floating-wechat-quick { padding-bottom: 16px; }
  .floating-wechat-qr { width: min(150px, 46vw); }
  .contact-campus-select-wrap { grid-template-columns: 1fr; gap: 6px; margin-top: 18px; }
  .contact-single-view .contact-wechat-card, .contact-single-view .contact-phone-card { min-height: 0; }
  .contact-general-card { grid-template-columns: 1fr; padding: 21px; }
  .contact-general-icon { width: 62px; border-radius: 18px; }
}


/* ===== 电话咨询弹出框 - 蓝色简约样式 ===== */
.floating-phone-popover {
  width: auto;
  min-width: 200px;
  padding: 12px 20px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #1769ff 0%, #0052d9 100%);
  box-shadow: 0 8px 24px rgba(23, 105, 255, 0.35);
}
.floating-phone-popover::before {
  border-top: 0;
  border-right: 0;
  background: linear-gradient(135deg, #1769ff 0%, #0052d9 100%);
}
.floating-phone-popover .phone-popover-link {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}
.floating-phone-popover .phone-popover-link:hover {
  opacity: 0.9;
}

/* ===== 企业微信二维码弹窗（全局） ===== */
.work-wechat-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.work-wechat-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.work-wechat-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}
.work-wechat-dialog {
  position: relative;
  width: 340px;
  max-width: calc(100vw - 40px);
  padding: 32px 28px 28px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  text-align: center;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s ease;
}
.work-wechat-modal.is-open .work-wechat-dialog {
  transform: translateY(0) scale(1);
}
.work-wechat-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f2f4f8;
  color: #666;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.work-wechat-close:hover {
  background: #e8ebf0;
  color: #333;
}
.work-wechat-title {
  margin: 0 0 8px;
  color: #1a1a1a;
  font-size: 20px;
  font-weight: 700;
}
.work-wechat-desc {
  margin: 0 0 20px;
  color: #888;
  font-size: 13px;
  line-height: 1.5;
}
.work-wechat-img {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
}
.work-wechat-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
