.site-ad[hidden],
.site-ad[data-state="queued"] .site-ad-frame {
  display: none;
}

.site-ad-frame {
  position: relative;
  max-width: 1000px;
  margin: 26px auto 38px;
  padding: 20px 10px 10px;
  border: 1px solid var(--line, #dce4ed);
  border-radius: 16px;
  background: var(--surface, #f6f9fc);
}

.site-ad-label {
  visibility: hidden;
  position: absolute;
  inset: 3px auto auto 12px;
  font-size: 11px;
  line-height: 15px;
  color: var(--muted, #637185);
}

.site-ad[data-state="rendered"] .site-ad-label {
  visibility: visible;
}

.site-ad-banner {
  width: 100%;
  height: 250px;
  max-height: 250px;
}

.privacy-settings {
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.privacy-settings #privacy-settings-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.privacy-settings > a {
  display: inline-block;
  margin: 6px 0 12px;
  font-size: 13px;
}

.privacy-settings .privacy-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-block: 7px;
  cursor: pointer;
}

.privacy-option input {
  flex: 0 0 auto;
  margin: 4px 0 0;
  accent-color: #5271ff;
}

.privacy-option strong,
.privacy-option small {
  display: block;
}

.privacy-option strong {
  font-size: 14px;
  line-height: 1.3;
}

.privacy-option small {
  color: var(--muted, #637185);
  font-size: 12px;
  line-height: 1.35;
}

.privacy-settings .privacy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.privacy-settings .privacy-actions button {
  margin: 0;
  font-size: 14px;
}

.privacy-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.privacy-notice p {
  flex: 1 1 260px;
  margin: 0;
  font-size: 14px;
}

.privacy-notice .privacy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.privacy-notice .privacy-actions button {
  margin: 0;
  padding: 7px 12px;
  font-size: 13px;
}

@media (max-width: 650px) {
  .site-ad-frame {
    margin-block: 18px 28px;
    padding-inline: 4px;
    border-radius: 12px;
  }

  .site-ad-banner {
    height: 100px;
    max-height: 100px;
  }
}

.hero-media {
  min-width: 0;
}

.hero-ad .site-ad-frame {
  box-sizing: border-box;
  margin: 0 0 16px;
  padding: 19px 6px 6px;
}

.hero-ad[data-state="loading"] .site-ad-frame {
  border-color: transparent;
  background: transparent;
}

.hero-ad .site-ad-banner {
  height: 90px;
  max-height: 90px;
}

.hero-ad-disclosure .privacy-notice {
  position: static;
  max-width: 100%;
  margin: 0 0 20px;
  padding: 10px 15px;
  border-color: var(--line);
  border-radius: 12px;
  box-shadow: none;
}

.hero-ad-disclosure .privacy-notice p {
  color: var(--muted);
}

@media (min-width: 851px) and (max-width: 1899px) {
  .hero.hero-with-ad {
    padding-top: 48px;
  }

  .hero-with-ad .hero-copy,
  .hero-media {
    align-self: start;
  }

  .hero-media {
    display: grid;
    grid-template-rows: 119px auto;
  }

  .hero-ad .site-ad-frame {
    margin: 0;
  }

  .hero-media .product {
    grid-row: 2;
  }
}

@media (min-width: 1900px) {
  .hero.hero-with-ad {
    position: relative;
  }

  .hero-ad {
    position: absolute;
    top: 75px;
    left: calc(100% + 32px);
    width: 254px;
  }

  .hero-ad .site-ad-banner {
    height: 400px;
    max-height: 400px;
  }
}

@media (min-width: 1900px) and (min-height: 900px) {
  .hero-ad .site-ad-banner {
    height: 600px;
    max-height: 600px;
  }
}

@media (min-width: 2048px) {
  .hero-ad {
    width: 334px;
  }
}

@media (min-width: 651px) {
  .site-ad-compact .site-ad-banner {
    height: 120px;
    max-height: 120px;
  }
}

@media (max-width: 850px) {
  .hero-ad {
    max-width: 420px;
    margin-inline: auto;
  }

  .hero-ad .site-ad-banner {
    height: 50px;
    max-height: 50px;
  }
}

@media (max-width: 560px) {
  .hero.hero-with-ad {
    gap: 20px;
    padding-top: 28px;
  }

  .hero-with-ad .eyebrow {
    margin-bottom: 18px;
  }

  .hero-with-ad h1 {
    font-size: clamp(35px, 11.5vw, 45px);
  }

  .hero-with-ad .hero-description {
    margin-bottom: 20px;
  }

  .hero-with-ad .download-options {
    gap: 10px;
  }
}

/* The VK placement is 240x400; it shares the existing desktop Adfox container. */
@media (min-width: 1900px) {
  .hero-ad[data-vk-hb="true"] .site-ad-banner {
    width: 240px;
    height: 400px;
    max-height: 400px;
    margin-inline: auto;
  }
}
