/**
 * IDEEDA Tech — Social Share Bar
 * 共享样式：博客 / 产品 / 案例 / 配件 / 方案 / 视频详情页
 * 依赖 style.css 的 CSS 变量（--color-primary 等），缺失时有硬编码兜底。
 */

/* ── 基础 ── */
.ideeda-share {
  display: flex;
  align-items: center;
  gap: 12px 16px;
  flex-wrap: wrap;
  font-family: inherit;
}

.ideeda-share__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #0F2C4C;
  letter-spacing: .01em;
  white-space: nowrap;
}

.ideeda-share__btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ideeda-share__btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
  padding: 0;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.ideeda-share__btn:hover,
.ideeda-share__btn:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.08);
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 44, 76, .18);
}

.ideeda-share__btn:focus-visible {
  outline: 2px solid #0095DA;
  outline-offset: 2px;
}

.ideeda-share__btn svg { display: block; pointer-events: none; }

/* 品牌色 */
.ideeda-share__btn.is-li { background: #0A66C2; }
.ideeda-share__btn.is-x  { background: #0F1419; }
.ideeda-share__btn.is-fb { background: #1877F2; }
.ideeda-share__btn.is-wa { background: #25D366; }
.ideeda-share__btn.is-em { background: #475569; }
.ideeda-share__btn.is-cp { background: #64748B; }

/* 复制成功态 */
.ideeda-share__btn.is-cp .ic-done { display: none; }
.ideeda-share__btn.is-cp.is-done { background: #16A34A; }
.ideeda-share__btn.is-cp.is-done .ic-copy { display: none; }
.ideeda-share__btn.is-cp.is-done .ic-done { display: block; }

/* ── card 变体：独立卡片（详情页正文后） ── */
.ideeda-share--card {
  justify-content: space-between;
  margin: 28px 0 4px;
  padding: 16px 20px;
  background: #F8FAFC;
  border: 1px solid #E6ECF2;
  border-radius: 14px;
}

/* ── inline 变体：嵌在作者卡 / 侧栏等窄容器里 ── */
.ideeda-share--inline {
  gap: 8px;
  justify-content: flex-end;
}

.ideeda-share--inline .ideeda-share__label {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.ideeda-share--inline .ideeda-share__label svg { width: 13px; height: 13px; }

.ideeda-share--inline .ideeda-share__btns { gap: 6px; }

.ideeda-share--inline .ideeda-share__btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.ideeda-share--inline .ideeda-share__btn svg { width: 15px; height: 15px; }

/* ── 响应式 ── */
@media (max-width: 768px) {
  .ideeda-share--card { padding: 14px 16px; }
  .ideeda-share--card .ideeda-share__btns { width: 100%; }
}

@media (max-width: 560px) {
  .ideeda-share--inline { justify-content: flex-start; }
  .ideeda-share--inline .ideeda-share__label { display: none; }
  .ideeda-share__btn { width: 38px; height: 38px; }
}

/* 触控设备：放大到 44px 命中区 */
@media (hover: none) and (pointer: coarse) {
  .ideeda-share__btn { min-width: 44px; min-height: 44px; }
}

/* ── Round 12：图标随容器自适应（不再写死 16/18px） ── */
.ideeda-share .ideeda-share__btn {
  width: clamp(34px, 2.6vw + 16px, 44px);
  height: clamp(34px, 2.6vw + 16px, 44px);
  border-radius: clamp(8px, .6vw, 11px);
}
.ideeda-share .ideeda-share__btn svg.ic {
  width: 52%;
  height: 52%;
  max-width: 24px;
  max-height: 24px;
}
.ideeda-share__label > svg.ic { width: clamp(13px, 1vw + 9px, 17px); height: auto; }

/* 产品页 quick-actions 内的分享条：与原有下载按钮同一行 */
.quick-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 18px;
}
.quick-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid #D8E2EC;
  border-radius: 10px;
  background: #fff;
  color: #0F2C4C;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.quick-action:hover { border-color: #0095DA; box-shadow: 0 3px 12px rgba(15,44,76,.10); transform: translateY(-1px); }
.quick-action svg { width: clamp(14px, 1vw + 10px, 18px); height: auto; flex: none; }

.ideeda-share.is-quick {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  gap: 8px;
}
.ideeda-share.is-quick .ideeda-share__label { display: none; }
.ideeda-share.is-quick .ideeda-share__btns { gap: 6px; }
.ideeda-share.is-quick .ideeda-share__btn {
  width: clamp(32px, 2.4vw, 40px);
  height: clamp(32px, 2.4vw, 40px);
  border-radius: 9px;
}
@media (max-width: 560px) {
  .quick-actions { gap: 8px; }
  .quick-action { width: 100%; justify-content: center; }
  .ideeda-share.is-quick { width: 100%; }
  .ideeda-share.is-quick .ideeda-share__btns { width: 100%; justify-content: space-between; }
}
