/* Ad layout only: keeps ads contained and prevents them from covering tool UI. */
.ad-container,
.ad-top-banner,
.ad-middle-box,
.ad-native,
.ad-social {
  position: relative;
  z-index: 1 !important;
  box-sizing: border-box;
}

.ad-container {
  min-height: 100px;
  margin: 16px 0;
  background: #f9f9f9;
  overflow: hidden;
}

.ad-top-banner {
  width: 100%;
  min-height: 90px;
  max-height: 90px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ad-middle-box {
  width: 300px;
  min-height: 250px;
  margin: 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ad-native {
  width: 100%;
  min-height: 100px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ad-label {
  width: 100%;
  margin: 0 0 6px;
  text-align: center;
  font-size: 10px;
  line-height: 14px;
  font-weight: 500;
  color: #71717a;
  letter-spacing: .02em;
}

.ad-top-banner,
.ad-native,
.ad-middle-box {
  flex-wrap: wrap;
}

.tool-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
  position: relative;
  z-index: 2;
}

.tool-main {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.tool-container {
  z-index: 10 !important;
  position: relative;
  background: white;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.ad-sidebar {
  width: 300px;
  min-height: 250px;
  position: sticky;
  top: 88px;
  z-index: 1 !important;
}

.ad-sidebar .ad-middle-box {
  margin: 0;
  min-height: 250px;
}

.ad-social {
  width: 100%;
  min-height: 1px;
  margin: 0;
  padding: 0;
  overflow: visible;
}

.ad-social .ad-label {
  margin-bottom: 4px;
}

@media (max-width: 767px) {
  .tool-layout {
    display: block;
  }

  .tool-main {
    max-width: 800px;
  }

  .ad-sidebar {
    display: none !important;
  }

  .ad-top-banner {
    min-height: 60px;
    max-height: 90px;
    margin: 10px 0 14px;
  }

  .ad-top-banner iframe,
  .ad-top-banner > *:not(.ad-label) {
    max-width: 100%;
  }

  .ad-native {
    min-height: 100px;
    margin: 16px 0;
  }
}
