:root {
    --button-size: 50px;
    --window-width: 320px;
    --window-total-height: 450px;
    --window-visible-height: 475px;
    --hide-height: 6px;
}

/* 客服按钮 */
.cs-button {
    position: fixed;
    right: 20px;
    bottom: 25%;
    z-index: 1000;
    width: var(--button-size);
    height: var(--button-size);
    background: #007BFF;
    color: #fff;
    border: 2px solid #eee;
    border-radius: 50%;
    text-align: center;
    line-height: var(--button-size);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.cs-button:hover {
    transform: scale(1.1);
}

/* 脉冲动画效果 */
.cs-button::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
  animation: pulse 2s infinite;
  z-index: -1;
  opacity: 0;
}

/* 悬停时触发动画 */
.cs-button:hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid #2196F3;
  border-radius: 50%;
  animation: ripple 1.5s infinite;
}

/* 定义动画 */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes ripple {
  0% {
    transform: scale(0.9);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}









/* 客服窗口 */
.cs-window {
    position: fixed;
    display: none;
    right: 2px;
    bottom: calc(-115px + var(--button-size) + var(--hide-height));
    width: var(--window-width);
    height: var(--window-visible-height);
    background: #fff;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 10001; /* 修正层级 */
}

/* 渐变遮罩 */
.cs-window::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--hide-height) + 10px);
    background: linear-gradient(
        to top,
        rgba(255,255,255,1) 0%,
        rgba(255,255,255,1) var(--hide-height),
        rgba(255,255,255,0) 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* 关闭按钮 */
.cs-close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 30px;
    height: 30px;
    font-size: 30px;
    background: #ff4444;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    cursor: pointer;
    z-index: 3;
    transition: background 0.2s;
}

.cs-close:hover {
    background: #cc0000;
}

/* iframe容器 */
.cs-iframe {
    width: 100%;
    height: var(--window-total-height);
    border: none;
    margin: -5px 0 -10px 0;
    padding-bottom: var(--hide-height);
}

/* 方案1：通过CSS后代选择器精准控制 */
.cs-window.active .remarkCard {
    width: 100%; /* 充满弹窗容器 */
    max-width: 300px; /* 最大宽度限制 */
}