/* Share controls. This file sets no shared token. */

.jslc-share-control {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 28px;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--r-control, 5px);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

/* On cards the airplane is the grey accent; it darkens on hover. It never stretches across its host. */
.jslc-share-card {
  max-width: max-content;
  justify-self: end;
  color: var(--muted, #6b7280);
}

/* Compact on a mouse, a 44px target on touch and on a phone (owner: "stop making buttons gratuitously large"). */
@media (pointer: coarse), (max-width: 700px) {
  html .jslc-share-control.jslc-share-control {
    min-width: 44px;
    min-height: 44px;
  }
}

.jslc-share-control:hover {
  background: var(--accent-subtle, color-mix(in srgb, currentColor 10%, transparent));
}

.jslc-share-card:hover {
  color: var(--ink, currentColor);
}

.jslc-share-control:focus-visible {
  outline: 2px solid var(--accent, currentColor);
  outline-offset: -2px;
}

.jslc-share-control svg {
  width: 16px;
  height: 16px;
  display: block;
}

.jslc-share-control .btn-icon {
  display: inline-flex;
}

/* The share control is the paper airplane alone: no words beside it. */
.jslc-share-control .btn-label {
  display: none;
}

/* Shell rail and node-panel Share rows: icon only, grey, the same 44px touch target. */
.cb-btn:is([data-cb-share], [data-cb-share-node]) {
  min-width: 32px;
  justify-content: center;
  padding: 0 8px;
  background: transparent;
  color: inherit;
}
.cb-btn:is([data-cb-share], [data-cb-share-node]):hover {
  background: var(--accent-subtle, color-mix(in srgb, currentColor 10%, transparent));
}
.cb-btn:is([data-cb-share], [data-cb-share-node]) > span:not(.btn-icon) {
  display: none;
}
@media (pointer: coarse), (max-width: 700px) {
  .cb-btn:is([data-cb-share], [data-cb-share-node]) {
    min-width: 44px;
    min-height: 44px;
  }
}

.jslc-share-offscreen {
  position: fixed;
  top: 0;
  left: -9999px;
  opacity: 0;
}

.jslc-share-toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  transform: translateX(-50%);
  z-index: 1200;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--r-card, 8px);
  /* Translucent grey glass, readable over light and dark pages. */
  background: rgba(38, 42, 50, .72);
  color: #f3f4f6;
  font: 700 12.5px/1.3 Arial, Helvetica, sans-serif;
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  pointer-events: none;
}

.jslc-share-toast[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .jslc-share-toast {
    transition: none;
  }
}

[data-share-current] {
  outline: 2px solid var(--accent, currentColor);
  outline-offset: 2px;
}
