/* 全面的移动端横向滚动条修复方案 */

/* 1. 基础约束 */
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  margin: 0;
  padding: 0;
}

/* 2. 全局盒模型重置 */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 3. 响应式媒体元素 */
img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

/* 4. 主要容器修正 */
.page-wrapper,
.page-main,
.page-preview,
.page-content {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* 5. 业务卡片特定样式 */
.business-card-preview {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0;
  margin: 0;
}

.business-card-preview .card {
  width: 100%;
  max-width: 100%;
}

/* 6. 移动端特定样式 */
@media screen and (max-width: 768px) {
  /* 视图面板 */
  .ViewPanel {
    width: 100vw;
    padding: 0;
    margin: 0;
    transform: none;
  }
  
  /* 轮播组件 */
  .t-swiper,
  .t-swiper__container {
    width: 100% !important;
    overflow: hidden !important;
  }
  
  /* 自定义内容 */
  .CustomView-content {
    padding: 0 10px;
  }
  
  /* 绝对定位元素约束 */
  [class*="absolute"],
  [class*="fixed"] {
    max-width: 100vw;
    left: 0;
    right: 0;
  }
  
  /* 隐藏水平滚动条 */
  ::-webkit-scrollbar {
    display: none;
  }
  
  /* 防止文本换行问题 */
  .CustomView-value,
  .CustomView-label {
    white-space: normal !important;
  }
}

/* 7. 额外防护措施 */
body {
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

/* 8. 修复已知的特定组件问题 */
.ViewPanel-content-wrap {
  width: 100%;
  padding: 0 5px;
}

.CustomView-Btn {
  width: 100%;
  max-width: 100%;
}