/* ============================================================
   GGF Share controls  (assets/css/share.css)
   Loaded site-wide via partials/footer.php (and directly on the
   member feed, which doesn't use that include).
   Powers: per-post / per-card / per-video share buttons + the
   shared share menu + copy-link toast. Self-contained — does not
   rely on theme variables so it renders the same on every page.
   ============================================================ */

/* --- Trigger button (cards, posts, bars) -------------------- */
.ggf-share-btn {
    align-items: center;
    background: rgba(0, 217, 255, 0.10);
    border: 1px solid rgba(0, 217, 255, 0.40);
    border-radius: 999px;
    color: #bfeaff;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 6px;
    font: inherit;
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1;
    min-height: 38px;
    padding: 8px 12px;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.ggf-share-btn:hover,
.ggf-share-btn[aria-expanded="true"] {
    background: rgba(0, 217, 255, 0.22);
    border-color: rgba(0, 217, 255, 0.85);
    color: #eafcff;
    transform: translateY(-1px);
}

.ggf-share-btn svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
}

/* Icon-only variant (catalog cards) hides the text label. */
.ggf-share-btn.ggf-share-btn-icon {
    padding: 8px;
    min-height: 36px;
}
.ggf-share-btn.ggf-share-btn-icon .ggf-share-btn-label {
    display: none;
}

/* --- Standalone share bar (tool & video pages) -------------- */
.ggf-share-bar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 4px;
}
.ggf-share-bar .ggf-share-bar-label {
    color: #9fb3c8;
    font-size: 0.9em;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

/* --- Share menu (popover) ----------------------------------- */
.ggf-share-menu {
    position: fixed;
    z-index: 2147483000;
    min-width: 232px;
    max-width: calc(100vw - 24px);
    padding: 8px;
    background: #11132a;
    border: 1px solid rgba(0, 217, 255, 0.32);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .12s ease, transform .12s ease;
}
.ggf-share-menu.is-open {
    opacity: 1;
    transform: translateY(0);
}

.ggf-share-menu-title {
    color: #8aa0b6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 6px 10px 8px;
}

.ggf-share-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.ggf-share-opt {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #dbe7f4;
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    gap: 9px;
    padding: 9px 10px;
    text-align: left;
    text-decoration: none;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
    width: 100%;
}
.ggf-share-opt:hover,
.ggf-share-opt:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    outline: none;
}

.ggf-share-opt svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: currentColor;
}

/* Full-width rows (copy link, native share) span both columns. */
.ggf-share-opt.ggf-share-opt-wide {
    grid-column: 1 / -1;
}

.ggf-share-menu-sep {
    grid-column: 1 / -1;
    height: 1px;
    margin: 4px 2px;
    background: rgba(255, 255, 255, 0.09);
}

/* Brand accents on hover. */
.ggf-share-opt[data-net="x"]:hover         { color: #fff; }
.ggf-share-opt[data-net="facebook"]:hover  { color: #4d90ff; }
.ggf-share-opt[data-net="reddit"]:hover    { color: #ff6314; }
.ggf-share-opt[data-net="linkedin"]:hover  { color: #4aa3e8; }
.ggf-share-opt[data-net="whatsapp"]:hover  { color: #2bd573; }
.ggf-share-opt[data-net="telegram"]:hover  { color: #36aae6; }
.ggf-share-opt[data-net="email"]:hover     { color: #8fd0ff; }
.ggf-share-opt[data-net="copy"]:hover,
.ggf-share-opt[data-net="native"]:hover    { color: #00e5ff; }

/* --- Copy confirmation toast -------------------------------- */
.ggf-share-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 16px);
    z-index: 2147483001;
    background: #0b1f1a;
    border: 1px solid rgba(0, 229, 153, 0.55);
    border-radius: 999px;
    color: #aaffdd;
    font-size: 14px;
    font-weight: 600;
    padding: 11px 20px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}
.ggf-share-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
    .ggf-share-btn,
    .ggf-share-menu,
    .ggf-share-toast { transition: none; }
}
