/* ==========================================================================
   工具页广告位 · 2026-11-07
   - 只有后台配置了代码的广告位才会由 JS 取消 hidden；
   - 横向容器居中，固定尺寸素材由 JS 等比缩放；
   - 老浏览器只用 flex + 固定宽高，不用 gap / aspect-ratio。
   ========================================================================== */

.zx-ad-slot {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 100%;
  margin: 0 0 14px;
  overflow: hidden;
}

.zx-ad-slot[hidden],
.zx-ad-layout[hidden] {
  display: none !important;
}

.zx-ad-layout {
  margin-bottom: 14px;
}

.zx-ad-frame {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  background: transparent;
}

.zx-ad-iframe {
  display: block;
  border: 0;
  background: transparent;
  overflow: hidden;
}

/* 工具介绍上方的广告：和上方工具面板留一点距离，但不额外造出大块空白 */
#view-tool > .main > .zx-ad-slot {
  margin-top: 0;
}

@media screen and (max-width: 900px) {
  .zx-ad-slot {
    margin-bottom: 12px;
  }
  .zx-ad-layout {
    margin-bottom: 12px;
  }
}
