/* 统一父容器：控制整体定位和动画 */
.customer-container {
    z-index: 998;
    position: fixed;
    right: 232px;
    top: 50%;
    transform: translate(345px, -45%);
    transition: 0.3s;
}

/* 侧边客服栏：相对于父容器定位，初始隐藏在右侧 */
.dark .customer-sidebar {
    background: var(--card-dark-bg);
    border: 2px solid #313131;
    border-radius: 8px;
    padding: 15px 10px;
    margin-right: 0;
    transform: translateX(72px);
    /* 初始隐藏 */
    transition: transform 0.3s ease-in-out;
    width: 185px;
    max-height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.light .customer-sidebar {
    background: var(--card-light-bg);
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    padding: 15px 10px;
    margin-right: 0;
    transform: translateX(72px);
    /* 初始隐藏 */
    transition: transform 0.3s ease-in-out;
    width: 185px;
    max-height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

/* 客服栏显示状态：滑入可视区域 */
.customer-container.show {
    transform: translate(155px, -45%);
}


/* 触发按钮 */
.customer-trigger {
    position: absolute;
    top: 0;
    right: 118px;
    width: 35px;
    height: 160px;
    background: var(--Enterprise-text);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--dark-text);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 10;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
    opacity: 1 !important;
    visibility: visible !important;
    margin-left: -6px;
}

.trigger-text {
    font-size: 16px;
    text-align: center;
}

.trigger-text.enText {
    display: inline-block;
    font-size: 18px;
    text-align: center;
    margin-top: 45px;
    transform: rotate(90deg);
    white-space: nowrap;
    /* 防止文本换行 */
}

.dark .customer-trigger:hover {
    transform: translateX(-5px);
    cursor: pointer;
}

.light .customer-trigger:hover {
    transform: translateX(-5px);
    cursor: pointer;
}


/* 折叠相关样式 */
.customer-sidebar .box .region-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.dark .customer-sidebar .box .region-title strong {
    margin-bottom: 0;
    font-size: 15px;
    color: var(--dark-text);
}

.light .customer-sidebar .box .region-title strong {
    margin-bottom: 0;
    font-size: 15px;
    color: var(--light-text);
}

.customer-sidebar .box .collapse-btn {
    font-size: 12px;
    color: #999;
    transition: transform 0.2s ease;
}

.customer-sidebar .box .collapse-btn.expanded {
    transform: rotate(180deg);
}

.customer-sidebar .box .area-list-wrap {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.customer-sidebar .box .area-list-wrap.expanded {
    max-height: 500px;
    margin-top: 8px;
}

/* 客服栏基础样式 */
.customer-sidebar .box {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #888;
}

.customer-sidebar .box:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.dark .customer-sidebar .box h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    color: var(--dark-text);
}

.light .customer-sidebar .box h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    color: var(--light-text);
}

.customer-sidebar .box .tel {
    font-size: 14px;
    font-weight: 600;
    color: var(--Enterprise-text);
}

.customer-sidebar .box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.customer-sidebar .box ul li {
    display: inline-block;
    margin: 0 2px 5px;
}

.customer-sidebar .box ul li a {
    color: #888;
    text-decoration: none !important;
    cursor: pointer;
}

.customer-sidebar .box ul li a:hover {
    color: var(--Enterprise-text);
    text-decoration: underline;
}

/* 二维码弹窗样式 */
.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
}

.qr-modal-mask {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.dark .qr-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-dark-bg);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.light .qr-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-light-bg);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}


.dark .qr-modal-close {
    position: absolute;
    top: 260px;
    right: 50%;
    transform: translateX(50%);
    width: 36px;
    height: 36px;
    background: var(--card-dark-bg);
    border-radius: 36px;
    text-align: center;
    line-height: 36px;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--dark-text);
}

.light .qr-modal-close {
    position: absolute;
    top: 260px;
    right: 50%;
    transform: translateX(50%);
    width: 36px;
    height: 36px;
    background: var(--card-light-bg);
    border-radius: 36px;
    text-align: center;
    line-height: 36px;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--light-text);
}

.qr-modal-close:hover {
    background-color: var(--Enterprise-text);
    color: #fff;
}

.qr-img {
    width: 200px;
    height: 200px;
    display: block;
    margin: 0 auto 10px;
}

.qr-desc {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.customer-trigger i {
    margin-top: 4px;
}

@media(max-width: 500px) {
    .customer-trigger {
        height: 35px;
        padding: 9px 8px 0;
    }

    .customer-trigger i {
        margin-top: 0;
        font-size: 18px;
    }

    .trigger-text {
        display: none !important;
    }
}