/**
 * 百度网盘企业客服组件样式
 */

/* 客服组件容器 */
.customer-service-container {
  position: relative;
  z-index: 99999;
}

/* 悬浮按钮 */
.cs-float-btn {
  position: fixed;
  bottom: 120px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00a1ff 0%, #0066cc 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
  transition: all 0.3s ease;
  z-index: 99999;
  animation: cs-breathe 2s ease-in-out infinite;
  padding: 0;
}

.cs-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 102, 204, 0.6);
}

.cs-float-btn:active {
  transform: scale(0.95);
}

/* 悬浮按钮图标 */
.cs-icon {
  width: 32px;
  height: 32px;
  color: white;
  transition: transform 0.3s ease;
}

.cs-float-btn:hover .cs-icon {
  transform: scale(1.1);
}

/* 呼吸动画 */
@keyframes cs-breathe {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 102, 204, 0.6);
  }
}

/* 弹窗 */
.cs-modal {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 590px;
  height: 628.5px;
  background: white;
  border-radius: 12px 0 0 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  /*overflow: hidden;*/
  z-index: 99999;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s ease;
  pointer-events: none;
}

/* 弹窗打开状态 */
.cs-modal.cs-modal-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* 加载状态 - 隐藏iframe，显示加载动画 */
.cs-modal.cs-modal-loading .cs-iframe {
  opacity: 0;
}

.cs-modal.cs-modal-loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0066cc;
  border-radius: 50%;
  animation: cs-spin 1s linear infinite;
  z-index: 1;
}

.cs-modal.cs-modal-loading::after {
  content: '加载中...';
  position: absolute;
  top: calc(50% + 30px);
  left: 50%;
  transform: translateX(-50%);
  color: #666;
  font-size: 14px;
  z-index: 1;
}

/* 加载动画 */
@keyframes cs-spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* 悬浮按钮隐藏状态 */
.cs-float-btn.cs-hidden {
  display: none;
}

/* 关闭按钮 */
.cs-close-btn {
  position: absolute;
  top: -34px;
  right: 5px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  transition: all 0.2s ease;
}

.cs-close-btn:hover {
  background: #ff5252;
  transform: rotate(90deg);
}

/* iframe */
.cs-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;border-radius: 8px;
}

/* 响应式适配 */
/*@media (max-width: 1200px) {*/
/*  .cs-modal {*/
/*    width: 834px;*/
/*    height: 628.5px;*/
/*    right: 0;*/
/*    bottom: 0;*/
/*    border-radius: 12px 0 0 0;*/
/*  }*/
/*}*/

@media (max-width: 768px) {
  .cs-float-btn {
    bottom: 120px;
    right: 20px;
    width: 50px;
    height: 50px;
  }

  .cs-icon {
    width: 28px;
    height: 28px;
  }

  .cs-modal {
    width: 100%;
    height: 90%;
    right: 0;
    bottom: 0;
    border-radius: 12px 12px 0 0;
  }

  .cs-close-btn {
    width: 28px;
    height: 28px;
    top: -35px;
    right: 5px;
  }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
  .cs-modal {
    background: #1a1a1a;
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.3);
  }
}

/* 打印时隐藏 */
@media print {
  .cs-float-btn,
  .cs-modal {
    display: none !important;
  }
}