/* 客服弹窗样式 */

/* Customer Service 样式 */

.cs-container {
    position: fixed;
    bottom: 1.25rem;
    right: 6.25rem;
    width: 23.75rem;
    height: 38.75rem;
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.15);
    display: none; /* 默认隐藏 */
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
}

.cs-container.active {
    display: flex; /* 激活时显示 */
}

.cs-header {
    background: #1A2233;
    color: white;
    padding: 0.75rem 1.0rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cs-header__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cs-header__title img {
    width: 1.6875rem; /* 27px ÷ 16 = 1.6875rem */
    height: 1.25rem; /* 20px ÷ 16 = 1.25rem */
}

.cs-header__controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.cs-header__btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.125rem;
    cursor: pointer;
    padding: 0;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.cs-content {
    flex: 1;
    padding: 1.0rem;
    overflow-y: auto;
    background: #f5f5f5;
}

.cs-message {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-bottom: 1.0rem;
}

.cs-message__avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: #0062FF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 1.125rem;
}

.cs-message__text {
    background: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #1A2233;
    margin: 0;
    flex: 1;
}

.cs-guess {
    background: white;
    border-radius: 0.5rem;
    margin-bottom: 1.0rem;
    overflow: hidden;
}

.cs-guess__title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.cs-guess__title::before {
    content: "🔥";
}

.cs-tabs {
    display: flex;
    padding: 0.5rem 0.0rem;
    gap: 0.5rem;
    border-bottom: 0.0625rem solid #f0f0f0;
}

.cs-tab {
    padding: 0.375rem 1.0rem;
    font-size: 0.75rem;
    cursor: pointer;
    color: #666;
    border-radius: 0.25rem;
    border: 0.0625rem solid #E9E9E9;
    border-radius: 1.25rem;
    background: white;
    transition: all 0.2s;
}

.cs-tab--active {
    color: #0062FF;
    border-color: #0062FF;
    background: #f0f7ff;
}


.cs-question {
    padding: 0.5625rem 0;
    font-size: 0.8125rem;
    color: #333;
    cursor: pointer;
    border-top: 1px #F4F6F9 solid;
    border-bottom: 1px #F4F6F9 solid;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    position: relative;
}

.cs-question:hover {
    background: #f9f9f9;
}

.cs-question::before {
    content: counter(question-num);
    counter-increment: question-num;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    color: #9EA7B2;
    font-size: 0.6875rem;
    margin-right: 0.625rem;
    flex-shrink: 0;
}

/* 前三个问题使用橙色 */
.cs-question:nth-child(1)::before,
.cs-question:nth-child(2)::before,
.cs-question:nth-child(3)::before {
    color: #FF7C06;
}

.cs-question::after {
    content: "›";
    color: #ccc;
    font-size: 1.125rem;
    font-weight: bold;
    position: absolute;
    right: 0;
}

.cs-questions {
    counter-reset: question-num;
}

.cs-info {
    text-align: center;
    padding: 0.75rem;
    font-size: 0.6875rem;
    color: #999;
}

.cs-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1.0rem;
    background: white;
    margin-bottom: 0.75rem;
    border-radius: 0.5rem;
}

.cs-status-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
}

.cs-status-item__avatar {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.cs-actions {
    display: flex;
    justify-content: start;
    align-items: center;
    gap: 1.25rem;
    background: #F5F5F5;
    padding: 0.75rem 1.0rem 0;
}

.cs-action-btn {
    background: #FFF !important;
    border-radius: 1.25rem;
    padding: 0.25rem 0.5rem;
    border: none;
    background: none;
    font-size: 0.75rem;
    color: #1A2233;
    cursor: pointer;
    transition: color 0.2s;
}

.cs-action-btn:hover {
    color: #333;
}

.cs-input-area {
    padding: 0.75rem 1.0rem;
    background: #F5F5F5;
}

.cs-input-container {
    position: relative;
    border: 0.0625rem solid #0062FF;
    border-radius: 1.25rem;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    background: #FFF;

}

.cs-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 0.8125rem;
    resize: none;
    font-family: inherit;
    padding: 0;
}

.cs-input::placeholder {
    color: #ccc;
}

.cs-input-buttons {
    position: absolute;
    bottom: 0.5rem;
    left: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.cs-input-btn {
    background: none;
    border: none;
    font-size: 1.125rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 0.9375rem;
    height: 0.9375rem;
    display: flex;
    align-items: center;
    margin-right: 0.375rem;
    justify-content: center;
}

.cs-send-btn {
    position: absolute;
    bottom: 0.5rem;
    right: 0.75rem;
    border: none;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.875rem;
}


.cs-support {
    text-align: center;
    font-size: 0.6875rem;
    color: #ccc;
}

.cs-sidebar {
    position: fixed;
    right: 1.25rem;
    top: 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    z-index: 1001;
    overflow: visible; /* 确保二维码不被裁剪 */
}

.cs-sidebar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.cs-sidebar-item__avatar {
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 0.5rem;
    background: #e8f4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.15);
    border: 0.125rem solid #fff;
}

.cs-sidebar-item__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cs-sidebar-item__label {
    font-size: 0.75rem;
    color: white;
    background: #2c3e50;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    white-space: nowrap;
}

.cs-sidebar-btn {
    position: relative;
    width: 4.0rem; /* 64px ÷ 16 = 4rem */
    height: 4.0rem; /* 64px ÷ 16 = 4rem */
    border-radius: 0.5rem;
    background: #B5D5FF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
    overflow: visible; /* 确保二维码不被裁剪 */
}

.cs-sidebar-btn:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
}

.cs-sidebar-btn__icon {
    object-fit: contain;
}

.cs-sidebar-btn--large {
    overflow: hidden;
}


.cs-sidebar-btn--large .cs-sidebar-btn__icon {
    width: 4.0rem; /* 64px ÷ 16 = 4rem */
    height: 4.0rem; /* 64px ÷ 16 = 4rem */
    object-fit: cover;
}

.cs-sidebar-btn--small .cs-sidebar-btn__icon {
    width: 1.75rem; /* 28px ÷ 16 = 1.75rem */
    height: 1.75rem; /* 28px ÷ 16 = 1.75rem */
}

.cs-sidebar-btn__text {
    font-size: 0.75rem; /* 12px ÷ 16 = 0.75rem */
    color: #1A2233;
    font-weight: 500;
}

.cs-sidebar-btn__text2 {
    font-size: 0.75rem;
    color: #FFF;
    background: #1A2233;
    text-align: center;
    height: 1.4375rem;
    line-height: 1.4375rem;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
}

.cs-sidebar-scroll {
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    background: #e8f4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
}

.cs-sidebar-scroll:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
}

.cs-sidebar-scroll__icon {
    font-size: 1.5rem;
    color: #2c3e50;
}


/* 返回顶部按钮 */
.cs-scroll-top {
    width: 2rem; /* 32px ÷ 16 = 2rem */
    height: 2rem; /* 32px ÷ 16 = 2rem */
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s;
}

.cs-scroll-top:hover {
    transform: translateY(-0.125rem);
}

/* 微信二维码 */
.cs-sidebar-btn--wechat {
    position: relative;
}

.cs-wechat-qrcode {
    position: absolute;
    right: calc(100% + 0.625rem); /* 在按钮左侧 10px 处 */
    top: 50%;
    transform: translateY(-50%);
    width: 10.625rem; /* 150px + 10px padding × 2 = 170px ÷ 16 = 10.625rem */
    background: #fff;
    padding: 0.625rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 10000;
}

.cs-wechat-qrcode img {
    width: 9.375rem; /* 150px ÷ 16 = 9.375rem */
    height: 9.375rem;
    display: block;
}

.cs-sidebar-btn--wechat:hover .cs-wechat-qrcode {
    opacity: 1;
    visibility: visible;
}
