/* ===========================================================
   右侧固定悬浮工具条 + 在线咨询/回电弹窗
   高级蓝白填充质感（按钮始终可见、带背景色）
   =========================================================== */

/* ---------- 右侧固定悬浮条 ---------- */
.side-float {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  filter: drop-shadow(0 10px 32px rgba(30, 58, 138, .22));
}
.sf-item:first-child { border-radius: 18px 18px 0 0; }
.sf-item:last-child { border-radius: 0 0 18px 18px; }

.sf-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  padding: 0;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.sf-item:last-child { border-bottom: none; }
.sf-item:hover {
  filter: brightness(1.08);
  transform: scale(1.04);
  box-shadow: 0 0 20px rgba(37, 99, 235, .45);
  z-index: 2;
}
.sf-item:active { transform: scale(.98); }

/* 热线按钮：品牌蓝绿 */
.sf-item.sf-hot { background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%); }
/* 返回顶部按钮：深蓝灰 */
.sf-item.sf-top { background: linear-gradient(180deg, #475569 0%, #334155 100%); }

.sf-icon { width: 26px; height: 26px; display: block; margin-bottom: 4px; }
.sf-icon svg { width: 100%; height: 100%; display: block; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sf-label { font-size: 12px; font-weight: 700; letter-spacing: .6px; line-height: 1; color: #fff; }

/* 热线气泡 */
.sf-hotline-pop {
  position: absolute;
  right: 86px;
  top: 50%;
  transform: translateY(-50%) scale(.92);
  background: #fff;
  border: 1px solid rgba(59, 130, 246, .22);
  border-radius: 16px;
  padding: 18px 24px;
  box-shadow: 0 14px 40px rgba(30, 58, 138, .22);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
}
.sf-hotline-pop.show { opacity: 1; visibility: visible; transform: translateY(-50%) scale(1); pointer-events: auto; }
.sf-pop-title { font-size: 13px; color: #64748b; margin-bottom: 6px; font-weight: 500; }
.sf-pop-phone {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: #1e40af;
  text-decoration: none;
  letter-spacing: 1px;
  line-height: 1.1;
}
.sf-pop-phone:hover { color: #2563eb; }
.sf-pop-copy {
  margin-top: 12px;
  border: none;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #fff;
  font-size: 13px;
  padding: 8px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: filter .2s ease;
}
.sf-pop-copy:hover { filter: brightness(1.1); }
.sf-pop-toast {
  margin-top: 8px;
  font-size: 12px;
  color: #16a34a;
  font-weight: 600;
  min-height: 16px;
}

/* ---------- 在线咨询弹窗 ---------- */
.consult-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(81, 87, 101, .5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.consult-overlay.open { display: flex; }

.consult-box {
  position: relative;
  width: min(520px, calc(100vw - 48px));
  max-width: none;
  background: linear-gradient(160deg, #ffffff 0%, #f4f8ff 100%);
  border: 1px solid rgba(59, 130, 246, .18);
  border-radius: 24px;
  padding: 24px 28px 26px;
  box-shadow: 0 24px 60px rgba(30, 58, 138, .28);
  animation: consultPop .3s ease;
  max-height: min(680px, 90vh);
  overflow-y: auto;
}
@keyframes consultPop {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.consult-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(30, 58, 138, .06);
  color: #1e3a8a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.consult-close:hover { background: rgba(30, 58, 138, .14); transform: rotate(90deg); }

.consult-head { text-align: center; margin-bottom: 12px; }
.consult-head-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 8px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .18);
}
.consult-head-icon svg { width: 24px; height: 24px; }
.consult-title { font-size: 1.25rem; font-weight: 800; color: #1e3a8a; margin: 0 0 2px; letter-spacing: .5px; }
.consult-sub { font-size: .8rem; color: #64748b; margin: 0; }
.consult-box p { margin: 0; }

/* Tab 切换 */
.consult-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  background: rgba(30, 58, 138, .06);
  border-radius: 10px;
  padding: 3px;
}
.consult-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: #475569;
  font-size: .88rem;
  font-weight: 700;
  padding: 9px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.consult-tab.active {
  background: #fff;
  color: #1e40af;
  box-shadow: 0 2px 8px rgba(30, 58, 138, .12);
}

.consult-form { display: flex; flex-direction: column; gap: 12px; }
.consult-field { display: flex; flex-direction: column; gap: 5px; }
.consult-field label { font-size: .8rem; font-weight: 600; color: #334155; }
.consult-field input,
.consult-field textarea {
  width: 100%;
  border: 1px solid #d7e0f0;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: .88rem;
  color: #1e293b;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
  font-family: inherit;
  box-sizing: border-box;
  resize: vertical;
}
.consult-field input:focus,
.consult-field textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}
.consult-field input::placeholder,
.consult-field textarea::placeholder { color: #94a3b8; }

.consult-submit {
  margin-top: 2px;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(37, 99, 235, .34);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.consult-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37, 99, 235, .44); }
.consult-submit:disabled { filter: grayscale(.4) brightness(.95); cursor: not-allowed; transform: none; }

.consult-tip { margin: 2px 0 0; font-size: .85rem; text-align: center; min-height: 18px; }
.consult-tip.ok { color: #16a34a; font-weight: 600; }
.consult-tip.err { color: #dc2626; font-weight: 600; }

/* 回电专属提示 */
.callback-hint {
  text-align: center;
  font-size: .78rem;
  color: #64748b;
  line-height: 1.5;
  margin-top: 2px;
}
.callback-hint strong { color: #1e40af; }

/* ---------- 响应式：移动端 ---------- */
@media (max-width: 768px) {
  .side-float { right: 10px; border-radius: 16px; }
  .sf-item { width: 60px; height: 60px; }
  .sf-icon { width: 22px; height: 22px; margin-bottom: 3px; }
  .sf-label { font-size: 11px; }
  .sf-hotline-pop {
    right: 72px;
    padding: 14px 18px;
    border-radius: 14px;
  }
  .sf-pop-phone { font-size: 22px; }
  .sf-pop-copy { padding: 7px 16px; font-size: 12px; }

  .consult-overlay { padding: 12px; }
  .consult-box { padding: 18px 14px 18px; border-radius: 18px; width: 100%; max-height: min(640px, 92vh); }
  .consult-head { margin-bottom: 8px; }
  .consult-head-icon { width: 40px; height: 40px; border-radius: 10px; margin-bottom: 6px; }
  .consult-head-icon svg { width: 20px; height: 20px; }
  .consult-title { font-size: 1.12rem; }
  .consult-sub { font-size: .74rem; }
  .consult-tabs { margin-bottom: 10px; padding: 2px; border-radius: 8px; }
  .consult-tab { font-size: .82rem; padding: 7px 5px; border-radius: 6px; }
  .consult-form { gap: 10px; }
  .consult-field { gap: 4px; }
  .consult-field label { font-size: .78rem; }
  .consult-field input,
  .consult-field textarea { padding: 9px 11px; font-size: .86rem; }
  .consult-submit { padding: 11px; font-size: .9rem; }
  .consult-tip { font-size: .8rem; min-height: 16px; }
  .callback-hint { font-size: .74rem; line-height: 1.35; }
}

@media (max-width: 360px) {
  .sf-item { width: 56px; height: 56px; }
  .sf-icon { width: 20px; height: 20px; }
  .sf-label { font-size: 10px; }
}
