/* ==========================================================================
   统一分享菜单（商户详情页）
   --------------------------------------------------------------------------
   - 底部弹层 .share-menu-*：几何/动效镜像私信分享的 .pm-share-* 底部弹层，
     复用站点 token（--c-* / --pm-*），缺失时均有兜底值。
   - 与 wechat-share.css / pm-share.css 同属「按需加载」，不污染全局。
   ========================================================================== */

.share-menu-mask {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.share-menu-mask.show {
    opacity: 1;
    visibility: visible;
}

.share-menu-sheet {
    width: 100%;
    max-width: 560px;
    background: var(--c-surface, #fff);
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform .24s cubic-bezier(.22, .61, .36, 1);
}
.share-menu-mask.show .share-menu-sheet {
    transform: translateY(0);
}

.share-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--c-line, #eee);
}
.share-menu-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--c-text, #1a1a1a);
}
.share-menu-close {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: none;
    font-size: 22px;
    line-height: 1;
    color: var(--c-text-3, #999);
    cursor: pointer;
    padding: 0 4px;
}

.share-menu-list {
    list-style: none;
    margin: 0;
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
}

/* 弹层内容区：默认放渠道列表，点击「海报」后切换为海报画布槽位 */
.share-menu-body {
    display: flex;
    flex-direction: column;
    max-height: 70vh;
    overflow-y: auto;
}
.share-menu-poster-slot {
    padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
}

/* 取消按钮：底部安全区适配 */
.share-menu-cancel {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    border-top: 1px solid var(--c-line, #eee);
    background: var(--c-surface, #fff);
    color: var(--c-text-2, #555);
    font-size: 16px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    cursor: pointer;
    text-align: center;
}
.share-menu-cancel:active { background: var(--c-bg, #f7f8fa); }
.share-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 8px;
    border-radius: 12px;
    cursor: pointer;
}
.share-menu-item:active {
    background: var(--c-bg, #f7f8fa);
}

.share-menu-ico {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.share-menu-ico svg {
    width: 24px;
    height: 24px;
}
.share-menu-ico-wx {
    background: #07c160; /* 微信绿 */
}
.share-menu-ico-pm {
    background: var(--c-primary, #2e8bff);
}

.share-menu-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.share-menu-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--c-text, #1a1a1a);
}
.share-menu-desc {
    font-size: 12px;
    color: var(--c-text-3, #999);
}

@media (prefers-reduced-motion: reduce) {
    .share-menu-mask,
    .share-menu-sheet {
        transition: none;
    }
}
