/* 慧设方圆 · 分享组件样式（分享面板 + 海报弹窗 + toast + 全景页分享入口按钮）
 * 配套 static/js/kr/share_poster.js，2026-11
 * 注意：入口按钮刻意不用 .img_desc_container_min 命名，
 * 以绕开 main_edit.js hideShareAndFootmarkBtn() 的 eq() 索引隐藏（移动端需可见） */

/* ---- 遮罩 ---- */
.hsfy-mask {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(15, 15, 18, 0.58);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    -webkit-transition: opacity .22s ease, visibility .22s;
    transition: opacity .22s ease, visibility .22s;
}
.hsfy-mask.show {
    opacity: 1;
    visibility: visible;
}

/* ---- 分享面板：移动端底部抽屉，桌面居中卡片 ---- */
.hsfy-sheet {
    background: #fff;
    width: 100%;
    max-width: 420px;
    border-radius: 18px 18px 0 0;
    padding: 26px 20px calc(20px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    -webkit-transform: translateY(100%);
    transform: translateY(100%);
    -webkit-transition: -webkit-transform .25s ease;
    transition: transform .25s ease;
}
.hsfy-mask.show .hsfy-sheet {
    -webkit-transform: translateY(0);
    transform: translateY(0);
}
@media (min-width: 768px) {
    .hsfy-sheet {
        border-radius: 18px;
        width: 400px;
        -webkit-transform: translateY(16px) scale(.96);
        transform: translateY(16px) scale(.96);
        opacity: 0;
        transition: transform .22s ease, opacity .22s ease;
    }
    .hsfy-mask.show .hsfy-sheet {
        -webkit-transform: translateY(0) scale(1);
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}
.hsfy-sheet-title {
    text-align: center;
    font-size: 13px;
    color: #9aa0a8;
    letter-spacing: 2px;
    margin-bottom: 22px;
}
.hsfy-tiles {
    display: flex;
    justify-content: center;
    gap: 46px;
}
.hsfy-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.hsfy-tile-ico {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(160deg, #FBF6EC, #F4EAD6);
    border: 1px solid #EADDC0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(176, 141, 70, 0.12);
    -webkit-transition: -webkit-transform .15s ease;
    transition: transform .15s ease;
}
.hsfy-tile:active .hsfy-tile-ico {
    -webkit-transform: scale(0.92);
    transform: scale(0.92);
}
.hsfy-tile-txt {
    margin-top: 11px;
    font-size: 14px;
    color: #4a4c50;
}
.hsfy-sheet-cancel {
    margin-top: 24px;
    padding: 12px 0;
    text-align: center;
    font-size: 15px;
    color: #7c8188;
    background: #F5F6F7;
    border-radius: 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* ---- 海报弹窗 ---- */
.hsfy-poster-wrap {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 16px 16px 18px;
    max-width: 86vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
    -webkit-transform: scale(.92);
    transform: scale(.92);
    opacity: 0;
    -webkit-transition: -webkit-transform .22s ease, opacity .22s ease;
    transition: transform .22s ease, opacity .22s ease;
}
.hsfy-mask.show .hsfy-poster-wrap {
    -webkit-transform: scale(1);
    transform: scale(1);
    opacity: 1;
}
.hsfy-poster-close {
    position: absolute;
    right: -52px;
    top: -6px;
    width: 38px;
    height: 38px;
    line-height: 36px;
    text-align: center;
    font-size: 30px;
    color: #fff;
    background: rgba(120, 120, 125, 0.5);
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
}
@media (max-width: 767px) {
    .hsfy-poster-close {
        right: 0;
        top: -46px;
    }
}
.hsfy-poster-stage {
    min-width: 240px;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hsfy-poster-img {
    display: block;
    max-height: 62vh;
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(80, 60, 10, 0.16);
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: default; /* 允许长按存图 */
}
.hsfy-poster-hint {
    margin-top: 14px;
    font-size: 13px;
    color: #9aa0a8;
    letter-spacing: 1px;
}
.hsfy-poster-btns {
    margin-top: 12px;
}
.hsfy-btn-gold {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    outline: none;
    padding: 11px 44px;
    font-size: 15px;
    letter-spacing: 2px;
    color: #fff;
    background: linear-gradient(135deg, #C9A561, #B08D4F);
    border-radius: 22px;
    cursor: pointer;
    box-shadow: 0 5px 16px rgba(176, 141, 79, 0.35);
}
.hsfy-btn-gold:active {
    opacity: 0.85;
}
.hsfy-err {
    font-size: 14px;
    color: #b0b4bb;
}

/* ---- 加载 spinner ---- */
.hsfy-spin {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid #E9E2D2;
    border-top-color: #C0A05F;
    -webkit-animation: hsfyRotate 0.9s linear infinite;
    animation: hsfyRotate 0.9s linear infinite;
}
@-webkit-keyframes hsfyRotate { to { -webkit-transform: rotate(360deg); } }
@keyframes hsfyRotate { to { transform: rotate(360deg); } }

/* ---- toast ---- */
#hsfyToast {
    position: fixed;
    left: 50%;
    bottom: 18vh;
    -webkit-transform: translateX(-50%) translateY(8px);
    transform: translateX(-50%) translateY(8px);
    background: rgba(30, 30, 34, 0.88);
    color: #fff;
    font-size: 14px;
    padding: 10px 22px;
    border-radius: 22px;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    -webkit-transition: opacity .2s ease, visibility .2s, -webkit-transform .2s;
    transition: opacity .2s ease, visibility .2s, transform .2s;
    pointer-events: none;
}
#hsfyToast.show {
    opacity: 1;
    visibility: visible;
    -webkit-transform: translateX(-50%) translateY(0);
    transform: translateX(-50%) translateY(0);
}

/* ---- 全景页右下角分享入口（桌面+移动一致可见，与相邻按钮严格对齐） ---- */
.share_entry_btn {
    display: inline-block;
    vertical-align: bottom;
    width: 46px;
    margin: 0;
    padding: 2px 0;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.share_entry_btn img {
    width: 34px;
    height: 34px;
    display: block;
    margin: 0 auto 4px;
    border-radius: 50%;
}
.share_entry_label {
    width: 100%;
    height: 15px;
    line-height: 15px;
    text-align: center;
    font-size: 11px;
    color: rgba(245, 245, 247, 0.92);
    text-shadow: none;
}
@media screen and (max-width: 480px) {
    .share_entry_btn {
        width: 40px;
    }
    .share_entry_btn img {
        width: 30px;
        height: 30px;
    }
    .share_entry_label {
        font-size: 10px;
    }
}
