/* Share Menu — trigger button + popup with multiple share options.
   Styled to sit alongside the Explorez look (JetBrains Mono labels, #6b1419
   brand red, Fraunces is not used here on purpose — controls stay mono). */

/* ── Trigger ──────────────────────────────────────────────────────────
   The .exp-share root IS the clickable trigger button, so that Bricks' native
   element styling (#brxe-<id>) targets the button directly. The popup lives
   inside it (absolutely positioned). */
.exp-share {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 18px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 999px;
    background: #fff;
    color: #1a1a1a;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.exp-share:hover,
.exp-share[aria-expanded="true"] {
    background: #6b1419;
    border-color: #6b1419;
    color: #fff;
}

.exp-share__trigger-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}
.exp-share__trigger-icon svg { width: 100%; height: 100%; }

/* Icon-only trigger (no label) → circular icon button */
.exp-share.is-icon {
    padding: 0;
    width: 42px;
    height: 42px;
    gap: 0;
    justify-content: center;
    border-radius: 50%;
}
.exp-share.is-icon .exp-share__trigger-icon {
    width: 17px;
    height: 17px;
}

/* ── Popup panel ─────────────────────────────────────────────────────── */
.exp-share__panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 50;
    width: 300px;
    max-width: calc(100vw - 32px);
    padding: 18px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.35);
    /* Reset text styles inherited from the trigger root */
    color: #333;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    cursor: auto;
    /* enter animation */
    transform-origin: top left;
    animation: exp-share-pop 0.16s ease-out;
}

.exp-share.is-right .exp-share__panel {
    left: auto;
    right: 0;
    transform-origin: top right;
}

.exp-share__panel[hidden] { display: none; }

@keyframes exp-share-pop {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.exp-share__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.exp-share__title {
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #6b1419;
}

.exp-share__close {
    border: 0;
    background: transparent;
    color: #888;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.2s;
}
.exp-share__close:hover { color: #111; }

/* ── Network grid ────────────────────────────────────────────────────── */
.exp-share__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.exp-share__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #555;
}

.exp-share__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f2f2f2;
    color: #333;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}
.exp-share__ico svg { width: 20px; height: 20px; }

.exp-share__btn:hover .exp-share__ico {
    background: var(--brand, #6b1419);
    color: #fff;
    transform: translateY(-2px);
}

.exp-share__btn-label {
    font-size: 9.5px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #777;
    text-align: center;
}

/* ── Copy link row ───────────────────────────────────────────────────── */
.exp-share__copy {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.exp-share__copy-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 12px;
    height: 38px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    background: #fafafa;
    font-family: inherit;
    font-size: 11px;
    color: #444;
    text-overflow: ellipsis;
}
.exp-share__copy-input:focus { outline: none; border-color: #6b1419; }

.exp-share__copy-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: var(--brand, #6b1419);
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
}
.exp-share__copy-btn:hover { opacity: 0.9; }
.exp-share__copy-btn .exp-share__ico {
    width: 16px;
    height: 16px;
    background: transparent;
    color: inherit;
}
.exp-share__copy-btn .exp-share__ico svg { width: 16px; height: 16px; }

.exp-share__copy-btn.is-copied {
    background: #1c7c3f;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .exp-share__grid { grid-template-columns: repeat(3, 1fr); }
}
