/* ============================================================
   social-dock.css — 右下角社媒悬浮条
   五格：Facebook / Instagram / WhatsApp / LinkedIn / LINE
   配色走 V7 品牌蓝（#0E5A87），不做五个品牌色，避免整页花掉。
   桌面竖排贴右下角；手机横排一条，高度只有 36px。
   ============================================================ */

.soc-dock {
  position: fixed;
  z-index: 45;
  right: 20px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.soc-dock .soc {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0;
  border: 1px solid #E3EBF2;
  border-radius: 50%;
  background: #fff;
  color: #46596A;
  box-shadow: 0 6px 18px -10px rgba(10, 52, 80, .5);
  transition: background .18s cubic-bezier(.22, .61, .36, 1),
              color .18s cubic-bezier(.22, .61, .36, 1),
              border-color .18s cubic-bezier(.22, .61, .36, 1),
              transform .18s cubic-bezier(.22, .61, .36, 1);
}
.soc-dock .soc svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  pointer-events: none;
}

.soc-dock .soc:hover,
.soc-dock .soc:focus-visible {
  background: #0E5A87;
  border-color: #0E5A87;
  color: #fff;
  transform: translateY(-1px);
}
.soc-dock .soc:focus-visible { outline: 2px solid #0174EB; outline-offset: 2px; }

/* 图标名：只在能悬停的设备上出现，手机不弹 */
.soc-dock .soc::after {
  content: attr(data-tip);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 9px;
  border-radius: 3px;
  background: #0C1D2A;
  color: #fff;
  font-size: 11.5px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}
.soc-dock .soc:hover::after,
.soc-dock .soc:focus-visible::after { opacity: 1; }
@media (hover: none) { .soc-dock .soc::after { display: none; } }

/* 首页相册灯箱 / 移动端抽屉打开时让开，别盖在浮层上 */
body.is-locked .soc-dock,
body.menu-open .soc-dock { opacity: 0; pointer-events: none; }
.soc-dock { transition: opacity .2s ease; }

/* 逐个模板修正：ceiling 系列页右下角已有 floating-rfq 药丸，往左让一格 */
.floating-rfq { right: 86px; }

@media (max-width: 760px) {
  /* 手机上五个独立圆点散在内容上像碎片，收进一个胶囊里更像"一个控件" */
  .soc-dock {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    flex-direction: row;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 22px -12px rgba(10, 52, 80, .55);
  }
  .soc-dock .soc {
    width: 34px;
    height: 34px;
    border-color: transparent;
    box-shadow: none;
  }
  .soc-dock .soc svg { width: 16px; height: 16px; }
  .floating-rfq { right: 20px; bottom: 66px; }

  /* site-v2.js 会在每个 V2 页面注入 WhatsApp / Send RFQ / QR & Social 底栏
     （z-index 90、高 58px）。再叠一条社媒行会变成两条底栏抢位置、还压住正文，
     所以手机上让位给那条底栏——它第三个按钮就是 QR & Social。
     V1 产品页没有这条底栏，社媒条照常显示在右下角 */
  body:has(.mobile-contact-bar) .soc-dock { display: none; }
}

/* 窗口很扁时（横屏手机、小窗口），竖排会顶到导航下面，改成横排 */
@media (min-width: 761px) and (max-height: 560px) {
  .soc-dock { flex-direction: row; }
}

@media (prefers-reduced-motion: reduce) {
  .soc-dock .soc { transition: none; }
  .soc-dock .soc:hover { transform: none; }
}
