/* 浮动客服样式 */
.float-service {
  position: fixed;
  right: 20px;
  bottom: 40%; /* 调整位置避免遮挡其他元素 */
  z-index: 1001; /* 确保在最上层 */
  width: 52px;
}

.float-service a {
  display: block;
  width: 52px;
  height: 52px;
  margin-bottom: 1px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 2px; /* 减小圆角以匹配网站风格 */
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  text-align: center;
  color: #666;
  text-decoration: none;
  transition: all 0.2s ease;
}

.float-service a:hover {
  background: #c72721;
  color: #fff;
  border-color: #c72721;
}

.float-service i {
  display: block;
  font-size: 22px;
  margin: 4px 0 2px;
}

.float-service span {
  display: block;
  font-size: 12px;
  line-height: 1.2;
  margin-top: 2px;
}

/* 弹出框基础样式 */
.float-service .qrcode-popup,
.float-service .phone-popup {
  display: none;
  position: absolute;
  right: 62px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 二维码弹出框 - 调整位置 */
.float-service .qrcode-popup {
  bottom: 60px; /* 调整垂直位置使其居中对齐 */
  padding: 10px;
}

.float-service .qrcode-popup img {
  width: 120px;
  height: 120px;
  display: block;
}

/* 电话弹出框 - 调整位置 */
.float-service .phone-popup {
  bottom: 37px; /* 垂直居中对齐 */
  transform: translateY(-50%); /* 确保完全居中 */
  padding: 0 15px;
  height: 36px;
  line-height: 36px;
  white-space: nowrap;
  color: #c72721;
  font-size: 16px;
  font-weight: bold;
}

/* 箭头样式 */
.float-service .qrcode-popup:after,
.float-service .phone-popup:after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  margin-top: -6px;
  border-left: 6px solid #fff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.float-service .qrcode-popup:before,
.float-service .phone-popup:before {
  content: '';
  position: absolute;
  right: -7px;
  top: 50%;
  margin-top: -7px;
  border-left: 7px solid #e5e5e5;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

/* 留言框样式 */
.message-popup {
  display: none;
  position: fixed;
  right: 80px;
  bottom: 150px;
  width: 300px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 1001;
}

.message-header {
  padding: 0 15px;
  height: 42px;
  line-height: 42px;
  background: #c72721;
  border-radius: 2px 2px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.message-header h3 {
  color: #fff;
  font-size: 15px;
  font-weight: normal;
  margin: 0;
}

.close-message {
  color: rgba(255,255,255,0.8);
  font-size: 20px;
  cursor: pointer;
  padding: 0 5px;
}

.message-body {
  padding: 15px;
}

.form-group {
  margin-bottom: 10px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e5e5e5;
  border-radius: 2px;
  font-size: 14px;
  line-height: 1.5;
  box-sizing: border-box;
}

.form-group textarea {
  height: 90px;
  resize: none;
}

.message-popup button {
  width: 100%;
  height: 36px;
  line-height: 36px;
  background: #c72721;
  border: none;
  border-radius: 2px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.message-popup button:hover {
  background: #b51610;
}

/* 遮罩层 */
.message-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
  .float-service {
    right: 10px;
    bottom: 50%;
    width: 45px;
  }
  
  .float-service a {
    width: 45px;
    height: 45px;
  }
  
  .float-service i {
    font-size: 18px;
    margin: 4px 0 1px;
  }
  
  .float-service span {
    font-size: 11px;
  }
  
  .message-popup {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    margin: 10px;
    max-width: calc(100% - 20px);
  }
  
  .float-service .qrcode-popup,
  .float-service .phone-popup {
    right: 55px;
  }
  
  .float-service .qrcode-popup {
    bottom: 50px;
  }
  
  .float-service .qrcode-popup img {
    width: 100px;
    height: 100px;
  }
  
  .float-service .phone-popup {
    font-size: 14px;
    height: 32px;
    line-height: 32px;
  }
} 

/* 添加全局错误提示样式 */
.global-error {
  background: #fff2f0;
  border: 1px solid #ffccc7;
  border-radius: 2px;
  color: #ff4d4f;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 14px;
  text-align: center;
} 

.footer-qrcode-container {
  display: none;
  bottom: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 10px 0;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.footer-qrcode img {
  width: 100%;
  height: auto;
}
.footer-qrcode span {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

/* Ensure the footer QR code is only visible on mobile devices */
@media screen and (max-width: 768px) {
  .footer-qrcode-container {
    display: block; /* Initially hidden */
  }
}
