/* =========================================================
   Awin.css
   .awin-ad-box (UNIVERSAL — ONLY SHRINK, NEVER UPSCALE)
   - Caps any ad to 90vw (scales down only)
   - Keeps small ads at natural size (no upscaling)
   - Rounded corners with proper clipping
   ========================================================= */

.awin-ad-box{
  margin: 16px auto;
  text-align: center;          /* centers inline-block children */
  background: transparent;
}

.awin-ad-box-no-border-centered{
  max-width: 90vw;
  margin: 16px auto;
  border-radius: 18px;
  overflow: hidden;
  background: transparent;

  display: flex;
  justify-content: center;      /* center horizontally */
  align-items: center;          /* center vertically (if box gets taller) */

 }

/* Preferred: Awin snippet is wrapped by an <a> */
.awin-ad-box > a{
  display: inline-block;       /* shrink-wrap to intrinsic ad size */
  max-width: 90vw;             /* but never exceed 90% of viewport */
  border-radius: 18px;
  overflow: hidden;            /* REQUIRED for rounded clipping */
  line-height: 0;
  background: transparent;
}

/* If Awin ever gives you media directly (no <a> wrapper) */
.awin-ad-box > img,
.awin-ad-box > iframe,
.awin-ad-box > object,
.awin-ad-box > embed{
  display: inline-block;
  max-width: 90vw;
  border-radius: 18px;
  overflow: hidden;
}

/* Media rules (works for <img> and most <iframe>-style creatives) */
.awin-ad-box > a > img,
.awin-ad-box > a > iframe,
.awin-ad-box > a > object,
.awin-ad-box > a > embed,
.awin-ad-box > img,
.awin-ad-box > iframe,
.awin-ad-box > object,
.awin-ad-box > embed{
  display: block;
  width: auto !important;      /* prevents upscaling */
  max-width: 100% !important;  /* allows downscaling to fit the capped wrapper */
  height: auto !important;     /* images keep ratio; iframes ignore safely */
  border: 0;
  background: transparent;
}

@media (max-width: 520px){
  .awin-ad-box > a{ border-radius: 14px; }
}

/* Turn off dotted border just for your ad containers */
.awin-ad-box a,
.image_max_90 a,
.your-other-image-wrapper a{
  border-bottom: none !important;
}