/* 右侧快捷栏 + 弹层 */

.ac-float-dock {

  position: fixed;

  right: 16px;

  top: 50%;

  transform: translateY(-50%);

  z-index: 1200;

  pointer-events: auto;

  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;

}

/* 默认窄条：图标 + 竖排文字，悬停展开 */
.ac-float-dock.is-collapsed .ac-float-dock-inner {
  padding: 6px 4px;
  gap: 3px;
  border-radius: 12px;
}
.ac-float-dock.is-collapsed .ac-float-btn {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 52px;
  min-height: 52px;
  padding: 5px 3px;
  gap: 3px;
}
.ac-float-dock.is-collapsed .ac-float-ico {
  width: 18px;
  height: 18px;
}
.ac-float-dock.is-collapsed .ac-float-ico svg {
  width: 16px;
  height: 16px;
}
.ac-float-dock.is-collapsed .ac-float-btn-text {
  display: block;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  max-width: 46px;
  word-break: break-all;
}
.ac-float-dock.is-collapsed .ac-float-sep {
  margin: 1px 6px;
}
.ac-float-dock.is-collapsed:hover .ac-float-dock-inner,
.ac-float-dock.is-collapsed:focus-within .ac-float-dock-inner {
  padding: 8px;
  gap: 4px;
}
.ac-float-dock.is-collapsed:hover .ac-float-btn,
.ac-float-dock.is-collapsed:focus-within .ac-float-btn {
  flex-direction: row;
  width: 100%;
  min-width: 132px;
  min-height: 40px;
  padding: 0 12px 0 10px;
}
.ac-float-dock.is-collapsed:hover .ac-float-btn-text,
.ac-float-dock.is-collapsed:focus-within .ac-float-btn-text {
  font-size: 13px;
  max-width: none;
  white-space: nowrap;
}

.ac-float-dock-left { display: none !important; }



.ac-float-dock-inner {

  display: flex;

  flex-direction: column;

  gap: 4px;

  padding: 8px;

  border-radius: 14px;

  background: #fff;

  border: 1px solid #e2e8f0;

  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);

  pointer-events: auto;

}



.ac-float-sep {

  display: block;

  height: 1px;

  margin: 2px 4px;

  background: #e2e8f0;

}



.ac-float-btn {

  display: flex;

  align-items: center;

  gap: 8px;

  width: 100%;

  min-width: 132px;

  min-height: 40px;

  padding: 0 12px 0 10px;

  border: 0;

  border-radius: 10px;

  background: transparent;

  color: #334155;

  cursor: pointer;

  text-decoration: none;

  transition: background 0.15s ease;

  text-align: left;

  font: inherit;

  pointer-events: auto;

  -webkit-tap-highlight-color: transparent;

  touch-action: manipulation;

}

.ac-float-btn:hover { background: #f1f5f9; color: #0f172a; }

.ac-float-btn-social {

  background: #eff6ff;

  color: #1d4ed8;

  font-weight: 600;

}

.ac-float-btn-social:hover { background: #dbeafe; }

.ac-float-btn-primary { color: #2563eb; }

.ac-float-btn-primary:hover { background: #eff6ff; }

.ac-float-btn-accent { color: #b45309; }

.ac-float-btn-accent:hover { background: #fffbeb; }



.ac-float-ico {

  width: 20px;

  height: 20px;

  flex-shrink: 0;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  pointer-events: none;

}

.ac-float-ico svg { width: 18px; height: 18px; display: block; }

.ac-float-btn-text {

  font-size: 13px;

  font-weight: 600;

  white-space: nowrap;

  pointer-events: none;

}



/* 弹层（兼容微信 / 旧浏览器，不用 dialog） */

.ac-dock-overlay {

  position: fixed;

  inset: 0;

  z-index: 2000;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 16px;

  background: rgba(15, 23, 42, 0.45);

  box-sizing: border-box;

}

.ac-dock-overlay[hidden] {

  display: none !important;

}

body.ac-dock-open {

  overflow: hidden;

}

.ac-dock-sheet {

  width: min(360px, calc(100vw - 32px));

  max-height: min(80vh, 560px);

  background: #fff;

  border: 1px solid #e2e8f0;

  border-radius: 16px;

  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);

  overflow: hidden;

  display: flex;

  flex-direction: column;

  outline: none;

}

.ac-dock-sheet-head {

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 14px 16px;

  border-bottom: 1px solid #eef2f7;

  background: #f8fafc;

  flex-shrink: 0;

}

.ac-dock-sheet-head h2 {

  margin: 0;

  font-size: 16px;

  font-weight: 700;

  color: #0f172a;

}

.ac-dock-sheet-close {

  width: 32px;

  height: 32px;

  border: 0;

  border-radius: 8px;

  background: transparent;

  color: #64748b;

  font-size: 22px;

  line-height: 1;

  cursor: pointer;

}

.ac-dock-sheet-close:hover { background: #e2e8f0; color: #0f172a; }

.ac-dock-sheet-body {

  padding: 16px;

  overflow-y: auto;

  -webkit-overflow-scrolling: touch;

}



.ac-float-panel-tip { margin: 0 0 8px; font-size: 13px; color: #64748b; line-height: 1.5; }

.ac-float-qr-row { display: flex; gap: 10px; justify-content: center; margin-bottom: 8px; }

.ac-float-qr-row figure { margin: 0; text-align: center; }

.ac-float-qr-row figcaption { margin-top: 4px; font-size: 11px; color: #64748b; font-weight: 600; }

.ac-float-qr {

  display: block;

  width: 120px;

  height: 120px;

  margin: 0 auto;

  border-radius: 10px;

  background: #f8fafc;

  object-fit: contain;

}

.ac-float-meta { margin: 0; padding: 0; list-style: none; font-size: 13px; color: #475569; line-height: 1.7; }

.ac-float-panel-link { display: inline-flex; margin-top: 8px; color: #2563eb; font-size: 13px; font-weight: 600; text-decoration: none; }

.ac-float-share { padding-bottom: 8px; border-bottom: 1px dashed #e2e8f0; margin-bottom: 8px; }

.ac-float-social-list { display: flex; flex-direction: column; gap: 6px; }

.ac-float-social-item {

  display: flex; align-items: center; gap: 8px; padding: 10px 12px;

  border-radius: 10px; background: #f8fafc; color: #0f172a; text-decoration: none;

  font-size: 13px; font-weight: 600; border: 1px solid #e2e8f0;

}

.ac-float-social-item:hover { background: #eff6ff; border-color: #bfdbfe; }

.ac-float-social-icon { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

.ac-float-social-icon svg, .ac-float-social-icon img { width: 16px; height: 16px; display: block; }



html.ac-has-unified-dock .ac-left-rail,

html.ac-has-unified-dock .ac-cs-rail,

html.ac-has-unified-dock .ac-social-side,

html.ac-has-unified-dock .ac-share-side,

html.ac-has-unified-dock .ac-fb-launch {

  display: none !important;

}



body.page-chat .ac-float-dock,

body.page-chat .ac-dock-overlay {

  display: none !important;

}



@media (max-width: 960px) {

  .ac-float-dock {

    right: 10px;

    top: auto;

    bottom: calc(68px + env(safe-area-inset-bottom, 0px));

    transform: none;

    z-index: 1200;

  }

  .ac-float-dock:not(.is-collapsed) .ac-float-btn {

    min-width: 48px;

    width: 48px;

    min-height: 48px;

    padding: 0;

    justify-content: center;

  }

  .ac-float-dock:not(.is-collapsed) .ac-float-btn-text { display: none; }

  .ac-dock-overlay {

    padding: 12px;

    align-items: flex-end;

    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));

  }

  .ac-dock-sheet {

    width: 100%;

    max-height: min(75vh, 520px);

  }

}
