/* =========================================================
   Awin.css
   Responsive Awin ad container (no upscaling)
   - Container shrink-wraps to the ad image's intrinsic width
   - Will ONLY scale DOWN on small screens (max-width: 90vw)
   - Transparent background + rounded corners
   ========================================================= */

.awin-ad-box{
  /* Key change: do NOT set a fixed/viewport-based width */
  width: fit-content;       /* shrink-wrap to the ad content */
  max-width: 90vw;          /* but never exceed 90% of viewport */
  margin: 16px auto;        /* centered */
  border-radius: 18px;      /* rounded corners */
  background: transparent;  /* transparent container */
  overflow: hidden;         /* clip ad to rounded corners */
  line-height: 0;           /* remove inline image gap */
}

/* Fallback for older browsers that don't support fit-content well */
@supports not (width: fit-content){
  .awin-ad-box{ display: table; }  /* table shrink-wraps to content */
}

/* Make whatever Awin provides behave predictably */
.awin-ad-box a{
  display: block;
  background: transparent;
}

.awin-ad-box img{
  display: block;
  width: auto;              /* IMPORTANT: prevents upscaling */
  max-width: 100%;          /* allows downscaling to fit the box */
  height: auto;             /* preserves original aspect ratio */
  border: 0;                /* overrides legacy border="0" */
  background: transparent;
}

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