/* ================================================================
   JDC SIDE V4 — 简洁悬浮侧边栏（对标腾讯云 / 麦速云）
   三个按钮：最新活动 / 联系客服 / 回到顶部
   白色圆底 · 品牌蓝图标 · hover 蓝渐变 + 左侧文字提示
   ================================================================ */
.jdc-side {
  position: fixed;
  right: 24px;
  bottom: 110px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* ===== 按钮 ===== */
.jdc-side-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e3ecf8;
  box-shadow: 0 8px 22px rgba(20, 60, 140, .12);
  color: #006fff;
  text-decoration: none;
  transition: background .3s ease, color .3s ease, border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.jdc-side-btn .jdc-side-ic {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.jdc-side-btn:hover {
  background: linear-gradient(135deg, #006fff, #38b6ff);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 111, 255, .35);
}

/* ===== 左侧文字提示 ===== */
.jdc-side-tip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 14px;
  white-space: nowrap;
  border-radius: 8px;
  background: #ffffff;
  color: #24344f;
  font-size: 12px;
  line-height: 1;
  border: 1px solid #e3ecf8;
  box-shadow: 0 8px 20px rgba(20, 60, 140, .14);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.jdc-side-tip::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: #ffffff;
}
.jdc-side-btn:hover .jdc-side-tip {
  opacity: 1;
  visibility: visible;
}

/* ===== 回到顶部：默认隐藏，滚动后显示 ===== */
.jdc-side-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}
.jdc-side-top-show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===== 移动端适配 ===== */
@media (max-width: 767px) {
  .jdc-side {
    right: 14px;
    bottom: 90px;
    gap: 10px;
  }
  .jdc-side-btn {
    width: 46px;
    height: 46px;
  }
  .jdc-side-btn .jdc-side-ic {
    width: 21px;
    height: 21px;
  }
}

/* ================================================================
   手机端增强：红色电话按钮并入侧边栏 + 最新活动 png 图片占位
   （原页脚 m-consultation 红色手机按钮已隐藏，功能移入侧边栏）
   ================================================================ */
.jdc-side-phone { display: none; }
/* 最新活动 png 图片占位：缩小留出渐变圆环，上传图片后自动显示 */
.jdc-side-png {
  width: 74%;
  height: 74%;
  object-fit: contain;
  display: block;
  transition: transform .3s ease;
}
@media (max-width: 767px) {
  .jdc-side-phone {
    display: flex;
    background: linear-gradient(135deg, #ff5a47, #ff2d55);
    border-color: transparent;
    color: #ffffff;
  }
  .jdc-side-phone:hover,
  .jdc-side-phone:active {
    background: linear-gradient(135deg, #e6483a, #e6224a);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(255, 45, 85, .35);
  }
  /* 呼吸光晕，提示可点击拨打 */
  .jdc-side-phone::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 45, 85, .5);
    animation: jdcPhonePulse 2.2s ease-out infinite;
    pointer-events: none;
  }
  /* 原页脚浮动红色手机按钮隐藏 */
  .m-consultation { display: none !important; }
}
@keyframes jdcPhonePulse {
  0%   { transform: scale(1);   opacity: .9; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ================================================================
   拨打电话：单一入口 + 号码选择面板（PC / 平板 / 手机通用）
   ================================================================ */
.jdc-side-call-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 号码选择面板：默认隐藏，点击拨号按钮展开 */
.jdc-side-call-panel {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) scale(.92);
  transform-origin: right center;
  min-width: 218px;
  padding: 10px;
  box-sizing: border-box;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e3ecf8;
  box-shadow: 0 16px 36px rgba(20, 60, 140, .18);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
  z-index: 10;
}
.jdc-side-call-panel::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: #ffffff;
  border-right: 1px solid #e3ecf8;
  border-top: 1px solid #e3ecf8;
  border-radius: 2px;
}
.jdc-side-call-wrap.open .jdc-side-call-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}
.jdc-side-call-tit {
  margin: 2px 2px 8px;
  color: #8a97ad;
  font-size: 11px;
  letter-spacing: 1px;
  text-align: left;
}
.jdc-side-call-num {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #24344f;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .3px;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.jdc-side-call-num + .jdc-side-call-num { margin-top: 2px; }
.jdc-side-call-num i {
  font-style: normal;
  margin-left: auto;
  color: #8a97ad;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1px;
}
.jdc-side-call-num:hover {
  background: linear-gradient(135deg, #2e7dff, #38d6ff);
  color: #ffffff;
}
.jdc-side-call-num:hover i { color: rgba(255, 255, 255, .85); }
.jdc-side-call-ic {
  width: 16px; height: 16px;
  flex: none;
  fill: none;
  stroke: #006fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .2s ease;
}
.jdc-side-call-num:hover .jdc-side-call-ic { stroke: #ffffff; }

/* ================================================================
   最新活动 / 拨打电话：默认渐变蓝底，交互切换为蓝紫渐变
   ================================================================ */
.jdc-side-png-btn,
.jdc-side-call {
  background: linear-gradient(135deg, #2e7dff 0%, #38d6ff 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(46, 125, 255, .28);
}
.jdc-side-png-btn:hover,
.jdc-side-call:hover,
.jdc-side-call-wrap.open .jdc-side-call {
  background: linear-gradient(135deg, #7c5cff 0%, #2e7dff 100%);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(124, 92, 255, .4);
}
.jdc-side-png-btn:hover .jdc-side-png { transform: scale(1.12); }
/* 拨打电话呼吸光晕，常驻提示可点击 */
.jdc-side-call::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(46, 125, 255, .55);
  animation: jdcCallPulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes jdcCallPulse {
  0%   { transform: scale(1);   opacity: .9; }
  100% { transform: scale(1.45); opacity: 0; }
}
/* 面板展开时隐藏按钮文字提示，避免与面板重叠 */
.jdc-side-call-wrap.open .jdc-side-tip {
  opacity: 0;
  visibility: hidden;
}

/* 手机端：面板改为按钮上方滑出，避免遮挡页面主体 */
@media (max-width: 767px) {
  .jdc-side-call-panel {
    right: auto;
    left: 50%;
    top: auto;
    bottom: calc(100% + 12px);
    transform: translateX(-50%) translateY(6px) scale(.95);
    transform-origin: center bottom;
    width: 250px;
    min-width: 250px;
  }
  .jdc-side-call-wrap.open .jdc-side-call-panel {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  .jdc-side-call-panel::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -6px;
    transform: translateX(-50%) rotate(45deg);
    border-right: none;
    border-top: 1px solid #e3ecf8;
    border-left: 1px solid #e3ecf8;
  }
}
