/* ================================================================
   DataHints DS — Share Bar Component
   Requires: tokens.css
   ================================================================ */

  .dh-share-bar {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
  }

  /* ── "Поделиться" label ── */
  .share-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-3);
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Thin vertical separator */
  .share-divider {
    display: inline-block;
    width: 1px;
    height: 16px;
    background: var(--border-s);
    margin: 0 var(--sp-1);
    flex-shrink: 0;
  }

  /* ── Share button base ── */
  .dh-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    height: 32px;
    padding: 0 var(--sp-3);
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--fg-2);
    cursor: pointer;
    text-decoration: none;
    transition:
      border-color var(--ease-fast),
      background var(--ease-fast),
      color var(--ease-fast),
      box-shadow var(--ease-fast);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
  }

  .dh-share-btn:hover {
    border-color: var(--border-a);
    background: var(--bg-card-h);
    color: var(--fg);
    box-shadow: var(--shadow-sm);
  }

  .dh-share-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-color: var(--border-a);
  }

  .dh-share-btn:active {
    transform: translateY(1px);
    box-shadow: none;
  }

  .dh-share-btn svg.share-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  /* ── Button text label ── */
  .share-btn-text {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  /* ── Icon-only mode ── */
  .share-bar-icons-only .share-btn-text { display: none; }
  .share-bar-icons-only .dh-share-btn   { padding: 0; width: 32px; }

  /* ── Copy: success state ── */
  .dh-share-btn.is-copied {
    border-color: var(--mint);
    color: var(--mint);
    background: var(--mint-sub);
  }
  .dh-share-btn.is-copied:hover {
    border-color: var(--mint);
    background: var(--mint-sub);
    box-shadow: none;
  }

  /* ── Inline layout ── */
  .share-bar-inline {
    flex-wrap: wrap;
  }

  /* ── Fixed variant ── */
  .share-bar-fixed {
    display: inline-flex;
    flex-direction: column;
    gap: var(--sp-1);
    padding: var(--sp-2);
    background: var(--bg-card);
    border: 1px solid var(--border-s);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
    /* real fixed is handled with position:fixed + .is-visible */
  }

  /* Buttons inside fixed are icon-only, borderless */
  .share-bar-fixed .dh-share-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border-color: transparent;
    color: var(--fg-2);
    border-radius: var(--r-sm);
  }
  .share-bar-fixed .dh-share-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--border);
    box-shadow: none;
  }
  .share-bar-fixed .share-btn-text { display: none; }

  /* Real fixed positioning (when used live, not in preview) */
  .share-bar-fixed.share-bar-side {
    position: fixed;
    right: var(--sp-6);
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .share-bar-fixed.share-bar-side.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
  }
  @media (max-width: 1100px) {
    .share-bar-fixed.share-bar-side { display: none !important; }
  }

  /* ── Reduced motion ── */
  @media (prefers-reduced-motion: reduce) {
    .dh-share-btn { transition: none; }
    .dh-share-btn:active { transform: none; }
    .share-bar-fixed { transition: none; }
  }
