/* ── StellarGuide share UI ──────────────────────────────────────────────────
   Drop-in share button + popover menu.

   - .sg-share-btn is a small icon button you place on any tile / article.
   - .sg-share-menu is a floating popover with network links + copy.
   - Designed to inherit the parent card's accent color via --sc2, --cc, --kc.
   ------------------------------------------------------------------------- */

.sg-share-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    width: 32px; height: 32px;
    border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1;
}
.sg-share-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
    color: #fff;
}
.sg-share-btn:active { transform: scale(0.94); }
.sg-share-btn svg {
    width: 14px; height: 14px; stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* Small wrapper so share buttons can be absolute-positioned in card corners */
.sg-share-anchor {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
}

/* ── Popover menu ──────────────────────────────────────────────────────── */
.sg-share-menu {
    position: fixed;
    z-index: 10000;
    background: rgba(12, 12, 24, 0.96);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    padding: 8px;
    min-width: 220px;
    animation: sg-share-pop 0.14s ease-out;
    display: flex; flex-direction: column; gap: 2px;
}
@keyframes sg-share-pop {
    from { opacity: 0; transform: translateY(-4px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.sg-share-menu button,
.sg-share-menu a {
    appearance: none;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.82);
    font: inherit;
    font-size: 0.88rem;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}
.sg-share-menu button:hover,
.sg-share-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.sg-share-menu .sg-share-ic {
    width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.sg-share-menu .sg-share-header {
    padding: 8px 12px 4px;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}
.sg-share-menu .sg-share-divider {
    height: 1px;
    margin: 4px 6px;
    background: rgba(255, 255, 255, 0.08);
}

/* Toast */
.sg-share-toast {
    position: fixed;
    bottom: 32px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(20, 20, 36, 0.96);
    color: #e8e8ff;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.88rem;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.22s, transform 0.22s;
    pointer-events: none;
}
.sg-share-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* When card hover hides the share button (optional) */
@media (hover: hover) {
    .sg-share-anchor.on-hover { opacity: 0; transition: opacity 0.18s; }
    .know-card:hover .sg-share-anchor.on-hover,
    .star-card:hover .sg-share-anchor.on-hover,
    .const-card:hover .sg-share-anchor.on-hover {
        opacity: 1;
    }
}

/* Mobile: slightly larger tap target */
@media (max-width: 640px) {
    .sg-share-btn { width: 36px; height: 36px; }
    .sg-share-menu { min-width: 240px; }
}
