.share-button {
  display: block;
  position: relative;
}

.share-button details {
  width: fit-content;
}

.share-button__button {
  font-size: 1.4rem;
  display: flex;
  min-height: 2.4rem;
  align-items: center;
  color: rgba(var(--color-link), var(--alpha-link));
  margin-left: 0;
  padding-left: 0;
}

.share-button_copy-wrapper{
  display: flex;
  width: 100%;
  background: rgba(0,0,0,0.05);
  margin: 5px;
}

.social-sharing-icons {
  margin: 8px 8px 0;
}

.social-sharing-icons .sharing-icons-label{
  line-height: 1;
  margin-bottom: 8px;
  text-align: left;
}

.social-sharing-icons .share-icon-button{
  text-decoration: none;
  color: var(--color-base-text);
  margin: 0 5px;
}

.social-sharing-icons .share-icon-button svg{
  width: 2.5rem;
  height: 2.5rem;
}

.share-button__button:hover,
details[open] > .share-button__button {
  color: rgb(var(--color-link));
}

details[open] > .share-button__fallback {
  animation: animateMenuOpen var(--duration-default) ease;
}

.share-button__button:hover {
  text-decoration: underline;
  text-underline-offset: 0.3rem;
}

.share-button__button,
.share-button__fallback button {
  cursor: pointer;
  background-color: transparent;
  border: none;
}

.share-button__button .icon-share {
  margin-right: 1rem;
}

.share-button__fallback {
  background: rgb(var(--color-background));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  position: absolute;
  top: 3rem;
  left: 0.1rem;
  z-index: 6;
  width: 100%;
  min-width: 31rem;
  max-width: 50rem;
  box-shadow: 0 0 0 0.1rem rgba(var(--color-foreground), 0.55);
}

.share-button__fallback button {
  width: 4.4rem;
  height: 4.4rem;
  padding: 0;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.share-button__fallback button:hover {
  color: rgba(var(--color-foreground), 0.75);
}

.share-button__fallback button:hover svg {
  transform: scale(1.07);
}

.share-button__close:not(.hidden) + .share-button__copy {
  display: none;
}

.share-button__close,
.share-button__copy {
  background-color: transparent;
  color: rgb(var(--color-foreground));
}

.share-button__fallback .field__input {
  box-shadow: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.share-button__fallback .icon {
  width: 1.5rem;
  height: 1.5rem;
}

.share-button__message:not(:empty) {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  margin-top: 0;
  padding: 0.8rem 0 0.8rem 1.5rem;
}

.share-button__message:not(:empty):not(.hidden) ~ * {
  display: none;
}

/* The fallback popup's URL input relies on the base form layer we don't ship —
   give it a scoped baseline so it doesn't render as a bare browser control. */
.share-button__fallback .field {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-width: 0;
}
.share-button__fallback .field__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 4.4rem;
  padding: 0 1rem;
  border: none;
  background: transparent;
  font-size: 1.3rem;
  color: rgb(var(--color-foreground));
}
.share-button__fallback .field__label { display: none; }
