.share-widget {
  --share-accent: #0f766e;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.share-widget--inline {
  margin: 1rem 0 1.25rem;
}

.share-widget__inline-head {
  margin-bottom: 0.5rem;
}

.share-widget__inline-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.share-widget__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.share-widget__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.share-widget__btn:hover,
.share-widget__btn:focus-visible {
  border-color: var(--share-accent);
  color: var(--share-accent);
  outline: none;
}

.share-widget--icons .share-widget__btn {
  width: 2.5rem;
  padding: 0;
}

.share-widget--text .share-widget__btn i {
  display: none;
}

.share-widget--floating {
  position: fixed;
  z-index: 1035;
  bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
}

.share-widget--br {
  right: max(1rem, env(safe-area-inset-right, 0px));
}

.share-widget--bl {
  left: max(1rem, env(safe-area-inset-left, 0px));
}


body.cookie-banner-visible .share-widget--floating,
body.ld-cookie-banner-open .share-widget--floating {
  bottom: calc(4.25rem + var(--ld-cookie-banner-height, 5.5rem) + env(safe-area-inset-bottom, 0px));
}

.share-widget__fab {
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: var(--share-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
  cursor: pointer;
}

.share-widget__fab:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.share-widget__panel {
  position: absolute;
  bottom: calc(100% + 0.6rem);
  right: 0;
  min-width: 11rem;
  padding: 0.65rem;
  border-radius: 0.85rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.share-widget--bl .share-widget__panel {
  right: auto;
  left: 0;
}

.share-widget__panel-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.45rem;
}

.share-widget--floating .share-widget__list {
  flex-direction: column;
  align-items: stretch;
}

.share-widget--floating .share-widget__btn {
  justify-content: flex-start;
  width: 100%;
}

.share-widget--floating.share-widget--icons .share-widget__btn {
  /* В режиме floating + icons padding обнуляется,
     поэтому иконки в списке слипались с левым краем панели. */
  padding: 0.4rem 0.65rem;
}

.share-widget__toast {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.4rem);
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
  background: #0f172a;
  color: #fff;
  font-size: 0.75rem;
  pointer-events: none;
}

.share-widget--inline .share-widget__toast {
  left: 0;
  transform: none;
}
