/* ===========================================================
   联系我们侧边栏 - 兰凯官网
   作用域限定在 .contact-sidebar，不污染 templatemo 原有样式
   =========================================================== */
.contact-sidebar * { box-sizing: border-box; }

.contact-sidebar {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;  /* 按钮高度由自身内容决定，不被面板拉伸 */
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 收起态：点击按钮后整个侧边栏向右滑出，仅按钮左 12px 留在屏幕边缘作为唤起 */
.contact-sidebar.collapsed { right: -26px; }

/* 收起态下禁止面板展开（避免与"隐藏"语义冲突） */
.contact-sidebar:not(.collapsed):hover .sidebar-panel { width: 280px; }

/* 触发按钮（折叠态） */
.sidebar-trigger {
  width: 38px;
  background: linear-gradient(180deg, #5b8fc4 0%, #3a6896 100%);
  color: #fff;
  border-radius: 8px 0 0 8px;
  box-shadow: -2px 2px 8px rgba(0,0,0,0.12);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  user-select: none;
  transition: background 0.25s ease;
}
.sidebar-trigger:hover { background: linear-gradient(180deg, #6b9fd4 0%, #4a7aae 100%); }

.sidebar-trigger .qq-icon {
  width: 30px;
  height: 30px;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  position: relative;
}
.sidebar-trigger .qq-icon svg { width: 26px; height: 26px; }

.sidebar-trigger .label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 13px;
  letter-spacing: 1px;
  line-height: 1.3;
  font-weight: 500;
}

.sidebar-trigger .arrow {
  margin-top: 10px;
  width: 14px;
  height: 14px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  opacity: 0.85;
  transition: transform 0.3s ease;
}
/* hover 时翻转箭头：视觉提示 */
.contact-sidebar:not(.collapsed):hover .sidebar-trigger .arrow { transform: rotate(-135deg); }

/* 弹出面板（展开态） */
.sidebar-panel {
  width: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 8px 0 0 8px;
  box-shadow: -4px 4px 16px rgba(0,0,0,0.12);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

/* 面板内滚动区 */
.panel-inner {
  width: 280px;
  padding: 18px 20px 20px;
  overflow-y: auto;
  flex: 1;
}

/* 顶部 商家信息条 */
.merchant {
  padding: 4px 0 14px;
  margin-bottom: 4px;
  text-align: center;
}
.merchant .name {
  font-size: 13px;
  color: #333;
  font-weight: 500;
  line-height: 1.35;
}

/* 信息段 */
.info-block { margin-bottom: 18px; }
.info-block .title {
  font-size: 14px;
  color: #333;
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}
.info-block .content {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}
.info-block .content strong {
  color: #222;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* 二维码 */
.qrcode {
  width: 180px;
  height: 180px;
  margin: 6px auto 10px;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  padding: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qrcode img { width: 100%; height: 100%; display: block; }

.qr-tip {
  text-align: center;
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
}

/* 响应式：小屏隐藏面板（可按需调整） */
@media (max-width: 768px) {
  .contact-sidebar { display: none; }
}
