/* Layout, sizes and colors ported from Dianchezhi's ShareComponent.vue. */
.article-share-dock {
  position: fixed;
  z-index: 1000;
  right: 40px;
  bottom: 160px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 15px;
  font-family: Arial, sans-serif;
}

.article-share-dock .article-share-trigger,
.article-share-dock .article-share-action {
  appearance: none;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  min-width: 0;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f4f5f7;
  color: #555;
  cursor: pointer;
  transition: background-color .3s, transform .2s;
}

.article-share-dock .article-share-trigger {
  box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
}

.article-share-dock .article-share-trigger:hover,
.article-share-dock .article-share-action:hover {
  background: #e4e6eb;
  transform: scale(1.05);
}

.article-share-dock button:focus-visible {
  outline: 2px solid #555;
  outline-offset: 3px;
}

.article-share-dock .article-share-icon {
  display: block;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 0;
  border-radius: 0;
  pointer-events: none;
}

.article-share-dock .article-share-trigger .article-share-icon {
  width: 22px;
  height: 22px;
}

.article-share-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 40px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity .3s ease-in-out, transform .3s ease-in-out, visibility .3s;
}

.article-share-dock.is-open .article-share-panel {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.article-share-wechat {
  position: relative;
}

.article-share-qr {
  display: none;
  box-sizing: border-box;
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  width: 200px;
  padding: 12px;
  border: 1px solid #ebeef5;
  border-radius: 4px;
  background: #fff;
  color: #606266;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .1);
  text-align: center;
  transform: translateY(-50%);
}

.article-share-qr::before {
  content: "";
  position: absolute;
  top: 0;
  right: -13px;
  width: 13px;
  height: 100%;
}

.article-share-qr::after {
  content: "";
  position: absolute;
  top: calc(50% - 6px);
  right: -7px;
  width: 12px;
  height: 12px;
  border-top: 1px solid #ebeef5;
  border-right: 1px solid #ebeef5;
  background: #fff;
  transform: rotate(45deg);
}

.article-share-dock.is-open .article-share-qr.is-visible {
  display: block;
}

.article-share-dock .article-share-qr h4 {
  margin: 0 0 10px;
  color: #606266;
  font: 700 16px/1.4 Arial, sans-serif;
}

.article-share-qr__canvas {
  display: inline-block;
  width: 130px;
  min-height: 130px;
  line-height: 0;
}

.article-share-dock .article-share-qr__canvas img,
.article-share-dock .article-share-qr__canvas canvas {
  max-width: 130px;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.article-share-dock .article-share-qr p {
  margin: 10px 0 0;
  color: #666;
  font: 12px/1.5 Arial, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  .article-share-dock .article-share-trigger,
  .article-share-dock .article-share-action,
  .article-share-panel {
    transition: none;
  }
}
