/* Legacy .share-popup geometry; link colours come from the selected theme. */

.share-content {
  position: absolute;
  top: 40px;
  right: 0;
  z-index: var(--theme-share-layer, 100);
  padding: 16px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 0 5px #00000038;
}

.share-content h3 {
  margin: 0 0 20px 0;
}

.share-content > a,
.share-content > button {
  display: flex;
  box-sizing: border-box;
  width: 100%;
  min-width: var(--wcag-target-preferred) !important;
  min-height: var(--wcag-target-preferred) !important;
  align-items: center;
  margin: 0 0 12px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--theme-share-link-color, #000);
  font: inherit;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.share-content > a:hover,
.share-content > button:hover {
  color: var(--theme-share-link-hover, #000);
}

.share-content > a:last-of-type {
  margin-bottom: 0;
}

.share-content img {
  flex: none;
  width: 24px !important;
  height: auto;
  margin-right: 10px;
}

.share-content__copy,
.share-content__copied {
  display: flex;
  align-items: center;
}

.share-content__copied,
.share-content.is-copied .share-content__copy {
  position: absolute;
  opacity: 0;
}

.share-content__copied {
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.share-content.is-copied .share-content__copied {
  visibility: visible;
  opacity: 1;
  color: #23b623;
}

.share-content.is-copied > button img {
  animation: share-copy-scale 0.3s linear forwards;
}

@keyframes share-copy-scale {
  0% {
    transform: none;
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: none;
  }
}

.share-content > [role="status"]:empty {
  display: none;
}

.share-content.is-copied > [role="status"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .share-content__copied {
    transition: none;
  }

  .share-content.is-copied > button img {
    animation: none;
  }
}
