/* 微信客服插件样式 - 透明玻璃风格 */

/* 底部固定客服栏 - 透明玻璃效果 */
.cs-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
    z-index: 9998;
    padding: 8px 16px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.cs-container {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* 按钮样式 - 玻璃拟态 */
.cs-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 24px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    max-width: 170px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cs-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.cs-btn:active {
    transform: translateY(0);
}

/* 电话按钮 - 蓝色渐变 */
.cs-btn.cs-phone {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cs-btn.cs-phone:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* 微信按钮 - 绿色渐变 */
.cs-btn.cs-wechat {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.cs-btn.cs-wechat:hover {
    background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
}

/* 图标容器 */
.cs-icon-wrap {
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cs-icon {
    font-size: 13px;
    line-height: 1;
}

/* 按钮内容区 */
.cs-btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

/* 主标题 */
.cs-text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

/* 副标题 - 显示号码/微信号 */
.cs-number,
.cs-hint {
    font-size: 10px;
    opacity: 0.9;
    font-weight: 400;
    line-height: 1.2;
}

/* 电话号码/微信号 - 放大居中 */
.cs-number {
    font-size: 15px;
    font-weight: 600;
    opacity: 1;
}

/* 提示文字 - 放大加粗 */
.cs-hint {
    font-size: 13px;
    font-weight: 700;
}

/* 分割线 */
.cs-divider {
    width: 1px;
    height: 26px;
    background: rgba(0, 0, 0, 0.1);
}

/* 右侧悬浮微信按钮 */
.cs-float-wechat {
    position: fixed;
    right: 12px;
    bottom: 85px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    animation: cs-bounce 2s ease-in-out infinite;
}

@keyframes cs-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.cs-float-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.35);
    transition: all 0.3s ease;
}

.cs-float-svg {
    width: 28px;
    height: 28px;
    display: block;
}

.cs-float-wechat:hover .cs-float-icon {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.45);
}

.cs-float-text {
    margin-top: 6px;
    font-size: 11px;
    color: #11998e;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.9);
    padding: 3px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
}

/* 脉冲动画 */
.cs-float-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(17, 153, 142, 0.25);
    animation: cs-pulse 2s ease-out infinite;
    z-index: -1;
}

@keyframes cs-pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

/* 微信二维码弹窗 - 玻璃效果 */
.cs-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.cs-modal.active {
    display: flex;
}

.cs-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
}

.cs-modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 24px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    animation: cs-modal-in 0.3s ease;
    box-shadow: 0 50px 80px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

@keyframes cs-modal-in {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.cs-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 24px;
    color: #bbb;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 50%;
}

.cs-modal-close:hover {
    color: #666;
    background: rgba(0, 0, 0, 0.05);
}

.cs-modal-header h3 {
    margin: 0 0 6px;
    font-size: 17px;
    color: #333;
    font-weight: 600;
}

.cs-modal-header p {
    margin: 0;
    font-size: 13px;
    color: #888;
}

.cs-qrcode-box {
    margin: 18px 0;
    padding: 14px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cs-qrcode-box img {
    max-width: 100%;
    width: 100%;
    border-radius: 8px;
    display: block;
}

.cs-wechat-id {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

.cs-wechat-id strong {
    color: #11998e;
    font-size: 16px;
    font-weight: 600;
}

.cs-copy-btn {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(17, 153, 142, 0.3);
}

.cs-copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.4);
}

.cs-copy-btn.copied {
    background: #52c41a;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .cs-container {
        gap: 10px;
    }

    .cs-btn {
        padding: 9px 16px;
        gap: 6px;
    }

    .cs-icon-wrap {
        width: 24px;
        height: 24px;
    }

    .cs-icon {
        font-size: 12px;
    }

    .cs-text {
        font-size: 12px;
    }

    .cs-number,
    .cs-hint {
        font-size: 9px;
    }

    .cs-number {
        font-size: 13px;
    }

    .cs-hint {
        font-size: 12px;
        font-weight: 700;
    }

    .cs-divider {
        height: 22px;
    }

    .cs-float-wechat {
        right: 10px;
        bottom: 75px;
    }

    .cs-float-icon {
        width: 44px;
        height: 44px;
    }

    .cs-float-svg {
        width: 26px;
        height: 26px;
    }

    .cs-float-text {
        font-size: 10px;
        padding: 2px 8px;
    }

    .cs-modal-content {
        padding: 50px;
        max-width: 380px;
    }

    .cs-qrcode-box {
        padding: 12px;
    }

    .cs-modal-header h3 {
        font-size: 16px;
    }

    .cs-wechat-id {
        font-size: 13px;
    }

    .cs-wechat-id strong {
        font-size: 15px;
    }
}

/* 隐藏底部栏 */
.cs-bottom-bar.hidden {
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

/* 页面内容padding */
body.has-cs-bottom-bar {
    padding-bottom: 60px;
}

@media (max-width: 480px) {
    body.has-cs-bottom-bar {
        padding-bottom: 56px;
    }
}
