/* iframe嵌入适配样式 */
/* 确保在iframe中页面能够正确适配 */

/* 基础容器适配 */
html, body {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  -webkit-overflow-scrolling: touch;
}

/* 主应用容器适配 */
#app {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  max-height: 100% !important;
  position: relative !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* 子视图容器适配 */
.child-view {
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  box-sizing: border-box !important;
}

/* pageBox容器适配 */
.pageBox {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  position: relative !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* customerService页面适配 */
.pageBox.customerService {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  width: 100% !important;
}

/* header-top适配 */
.pageBox.customerService .header-top {
  flex-shrink: 0 !important;
  width: 100% !important;
}

/* top-welcome适配 */
.pageBox.customerService .top-welcome {
  flex-shrink: 0 !important;
  width: 100% !important;
}

/* iframe容器适配 - 填充剩余空间 */
.pageBox.customerService iframe {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  display: block !important;
}

/* content容器适配 */
.pageBox.customerService .content {
  flex-shrink: 0 !important;
  width: 100% !important;
}

/* 响应式适配 - 确保在不同尺寸的iframe中都能正常显示 */
@media screen and (max-width: 768px) {
  html {
    font-size: 62.5% !important;
  }
}

/* 确保所有页面容器都填充满 */
.container {
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

/* 防止页面缩放导致的问题 */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

/* 确保图片和媒体元素不会超出容器 */
img, video, iframe {
  max-width: 100% !important;
  height: auto !important;
}

/* 针对移动端iframe的额外适配 */
@media screen and (max-device-width: 480px) {
  html {
    -webkit-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
  }
  
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

