/* xiunox_kefu 客服中心样式 */
.xiunox-kefu-wrapper {
    position: fixed;
    right: 0;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.xiunox-kefu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-height: 120px;
    background-color: var(--xiunox-kefu-bg, #114977);
    color: #fff;
    cursor: pointer;
    border-radius: 6px 0 0 6px;
    box-shadow: -2px 0 8px rgba(0,0,0,0.15);
    padding: 10px 0;
    transition: width 0.2s ease;
    user-select: none;
}

.xiunox-kefu-toggle i {
    font-size: 20px;
    margin-bottom: 6px;
}

.xiunox-kefu-toggle span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 2px;
    font-size: 13px;
}

.xiunox-kefu-panel {
    display: none;
    width: 260px;
    background: #fff;
    border-radius: 8px 0 0 8px;
    box-shadow: -4px 4px 16px rgba(0,0,0,0.15);
    overflow: hidden;
    border: 1px solid #e6e6e6;
    border-right: none;
}

.xiunox-kefu-panel.xiunox-kefu-open {
    display: block;
}

/* 面板展开时隐藏折叠入口：纯 CSS 状态判断（:has），不依赖 JS 状态类，旧缓存的 JS 也能生效 */
.xiunox-kefu-wrapper:has(.xiunox-kefu-panel.xiunox-kefu-open) .xiunox-kefu-toggle {
    display: none;
}

/* 兜底：JS 给 wrapper 加的状态类（兼容不支持 :has() 的旧浏览器） */
.xiunox-kefu-wrapper.xiunox-kefu-active .xiunox-kefu-toggle {
    display: none;
}

.xiunox-kefu-header {
    background-color: var(--xiunox-kefu-bg, #114977);
    color: #fff;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.xiunox-kefu-header .xiunox-kefu-close {
    color: #fff;
    opacity: 0.8;
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    background: none;
    border: none;
}

.xiunox-kefu-header .xiunox-kefu-close:hover {
    opacity: 1;
}

.xiunox-kefu-body {
    padding: 16px;
}

.xiunox-kefu-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: #333;
}

.xiunox-kefu-item:last-child {
    margin-bottom: 0;
}

.xiunox-kefu-item i {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--xiunox-kefu-bg, #114977);
    color: #fff;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 14px;
    flex-shrink: 0;
}

.xiunox-kefu-item .xiunox-kefu-label {
    color: #888;
    margin-right: 6px;
    font-size: 13px;
}

.xiunox-kefu-item a {
    color: var(--xiunox-kefu-bg, #114977);
    text-decoration: none;
}

.xiunox-kefu-item a:hover {
    text-decoration: underline;
}

.xiunox-kefu-wechat {
    text-align: center;
    padding: 12px 0;
}

.xiunox-kefu-wechat img {
    max-width: 140px;
    max-height: 140px;
    border: 1px solid #eee;
    border-radius: 6px;
}

.xiunox-kefu-wechat p {
    margin-top: 8px;
    color: #888;
    font-size: 12px;
}

.xiunox-kefu-custom {
    border-top: 1px dashed #e6e6e6;
    padding-top: 12px;
    margin-top: 12px;
    font-size: 13px;
    color: #555;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .xiunox-kefu-wrapper {
        z-index: 9999;
    }

    .xiunox-kefu-toggle {
        width: 36px;
        min-height: 90px;
        padding: 8px 0;
    }

    .xiunox-kefu-toggle i {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .xiunox-kefu-toggle span {
        font-size: 11px;
        letter-spacing: 1px;
    }

    .xiunox-kefu-panel {
        width: 230px;
    }
}
