/* «Поделиться» button in the page header (include/background/default.php), module nevaseasons.shortlink. */
.ns-share {
  position: absolute;
  top: 14px;
  right: 4px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--PRIMARY, #11a0db);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.ns-share:hover {
  background: #fff;
}

.ns-share:focus-visible {
  outline: 2px solid var(--PRIMARY, #11a0db);
  outline-offset: 2px;
}

.ns-share[aria-busy='true'] {
  cursor: progress;
}

.ns-share__status,
.ns-share__popover {
  position: absolute;
  top: 56px;
  right: 4px;
  z-index: 11;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
}

.ns-share__status {
  padding: 4px 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.75);
  white-space: nowrap;
  pointer-events: none;
}

/* Empty status stays in the accessibility tree (a live region must exist before its text appears). */
.ns-share__status:empty {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  background: transparent;
}

.ns-share__popover {
  width: min(320px, calc(100vw - 32px));
  padding: 10px 12px;
  color: #212529;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.ns-share__popover label {
  display: block;
  margin: 0;
}

.ns-share__popover input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
}

/* On narrow screens the header also shows the favorites heart right before the button
   (.favorite-add--badge: right 10px, 33px wide, top 20px): move left of it. Pages without it keep the corner. */
@media (max-width: 1200px) {
  .favorite-add--badge ~ .ns-share,
  .favorite-add--badge ~ .ns-share__status,
  .favorite-add--badge ~ .ns-share__popover {
    right: 52px;
  }

  .favorite-add--badge ~ .ns-share {
    top: 17px;
  }
}
