/*
 * straka.la share pill — discrete end-of-post share affordance
 *
 * One pill labeled "Share" with a small icon. Clicking opens a small
 * popover with: X, LinkedIn, Email, Copy link, plus a Native Share
 * button on devices that support `navigator.share`.
 *
 * The pill matches the audio-player aesthetic — same border treatment,
 * font, accent. Lives at the end of `.post-body`, before Related Reading.
 */

.share {
  display: flex;
  justify-content: flex-end;
  margin-top: 3rem;
  margin-bottom: 1rem;
  position: relative;
}

.share-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: transparent;
  border: 1px solid rgba(26, 24, 20, 0.15);
  border-radius: 999px;
  padding: .35rem .85rem .35rem .65rem;
  color: var(--muted);
  font-family: var(--fb);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.share-toggle:hover,
.share-toggle.is-open {
  color: var(--accent);
  border-color: rgba(193, 122, 62, 0.5);
}
.share-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.share-icon {
  width: 12px;
  height: 12px;
  fill: currentColor;
  flex-shrink: 0;
}

.share-popover {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: .6rem;
  background: #FFFFFF;
  border: 1px solid rgba(26, 24, 20, 0.1);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(26, 24, 20, 0.08);
  padding: .4rem;
  display: none;
  flex-direction: column;
  gap: .1rem;
  min-width: 180px;
  z-index: 50;
}
.share-popover.is-open {
  display: flex;
}

.share-option {
  display: flex;
  align-items: center;
  gap: .65rem;
  background: transparent;
  border: none;
  padding: .55rem .75rem;
  border-radius: 4px;
  font-family: var(--fb);
  font-size: .82rem;
  font-weight: 400;
  color: var(--dark);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.share-option:hover,
.share-option:focus-visible {
  background: rgba(193, 122, 62, 0.08);
  color: var(--accent);
  outline: none;
}
.share-option-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Brief toast for "Copied" feedback. Appears inside the popover,
   replacing the Copy row's label for ~1.5s. */
.share-option.is-copied {
  color: var(--accent);
}

@media (max-width: 540px) {
  .share-popover {
    right: 0;
    left: auto;
  }
  .share-option {
    font-size: .8rem;
  }
}
