/* ==========================================================================
   KK: 前台左侧社交入口（桌面竖条 / 移动底栏）
   --------------------------------------------------------------------------
   只做一件事：让社交入口「进入页面即见」，不再滚到整页最底部才看得到。
   页脚那组社交图标不做任何改动，保持厂商原样（本文件不涉及 .foot_sns）。
   不改厂商模板，只新增输出；平台清单由 zz-social-entry.php 提供。
   ========================================================================== */

/* ==========================================================================
   1. 桌面：左边缘固定竖条
   --------------------------------------------------------------------------
   贴左边缘、垂直居中，收起时固定 46px 宽。宽度写在 <a> 上而不是容器上 ——
   容器宽度恒定，悬停某一条时不会把整片正文压暗。
   放左侧是因为右侧已被厂商的 .right_nav 联系方式胶囊占用。
   ========================================================================== */
.kk-sr{
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9000;                              /* 与 .right_nav 同层，低于联系面板(99990) */
    width: 46px;
    padding: 8px 0;
    border-radius: 0 14px 14px 0;
    background: rgba(20, 22, 26, .34);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 26px rgba(15, 17, 21, .18);
}

/* 竖排的 FOLLOW 标签：只在桌面出现，用来解释这一条是什么 */
.kk-sr-tab{
    display: block;
    writing-mode: vertical-rl;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .72);
    padding: 6px 0 8px 15px;
    -webkit-user-select: none;
    user-select: none;
}

.kk-sr-list{ margin: 0; padding: 0; list-style: none; }

.kk-sr-i{
    display: flex;
    align-items: center;
    width: 46px;
    height: 44px;
    padding-left: 8px;
    overflow: hidden;                           /* 收起的文字被裁掉 */
    border-radius: 0 999px 999px 0;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    transition: width .28s cubic-bezier(.32, .72, 0, 1), background .2s ease;
}
.kk-sr-ic{
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    display: block;
}
.kk-sr-tx{
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .01em;
    padding: 0 16px 0 11px;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity .18s ease, transform .28s ease;
}

/* 展开态：只在真指针设备上挂 hover，触屏不粘 */
@media (hover: hover) and (pointer: fine){
    .kk-sr-i:hover{
        width: 140px;
        background: rgba(20, 22, 26, .86);
        box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
    }
    .kk-sr-i:hover .kk-sr-tx{ opacity: 1; transform: none; }
}
/* 键盘 Tab 到也能看到平台名（不能只靠 hover） */
.kk-sr-i:focus-visible{
    width: 140px;
    background: rgba(20, 22, 26, .86);
    outline: 2px solid #e5011a;
    outline-offset: -2px;
}
.kk-sr-i:focus-visible .kk-sr-tx{ opacity: 1; transform: none; }

/* ==========================================================================
   2. 移动端：底部固定条
   ========================================================================== */
@media (max-width: 768px){
    .kk-sr{
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        width: auto;
        padding: 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);   /* 避开 iPhone 底部横条 */
        border-radius: 0;
        background: rgba(20, 22, 26, .90);
        box-shadow: 0 -8px 26px rgba(15, 17, 21, .24);
        transition: transform .28s ease;
    }
    .kk-sr.kk-sr-hide{ transform: translateY(110%); }

    .kk-sr-tab{ display: none; }

    .kk-sr-list{ display: flex; }
    .kk-sr-list li{ flex: 1 1 0; min-width: 0; }

    .kk-sr-i{
        width: auto;
        height: auto;
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        padding: 7px 2px 6px;
        border-radius: 0;
    }
    .kk-sr-ic{ width: 24px; height: 24px; flex: 0 0 24px; }
    .kk-sr-tx{
        width: 100%;
        padding: 0;
        text-align: center;
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        opacity: 1;
        transform: none;
    }
}

/* 无障碍：尊重系统「减少动效」设置 */
@media (prefers-reduced-motion: reduce){
    .kk-sr, .kk-sr-i, .kk-sr-tx{ transition-duration: .01ms !important; }
}