/**
 * Uploaded media template — 5px radius on images, videos, and embeds.
 * Loaded last on public funnels and Brand Studio so existing pages pick it up.
 */
:root {
  --media-radius: 5px;
}

.clv2-hero__visual,
.clv2-hero__placeholder,
.clv2-hero .plf-slider,
.clv2-hero .plf-slide,
.clv2-hero__visual-wrap,
.plf-custom-block__media,
.plf-business-media__visual,
.clv2-bonus-embed__media,
.cl-hero-media,
.sw-hero-card,
.pco-media,
.pco-bump-v5__media,
.pco-ty-offer-page-hero-media,
.pco-ty-offer-page-hero-video,
.cbl-fs-bs-hero-media,
.cbl-fs-bs-hero-video,
.afp-video-embed,
.oto-ob-hero__media,
.oto-ob-showcase__media,
.cbl-image-stack__item,
.cbl-offer-image-preview,
.cbl-offer-saved-image,
[data-offer-hero-image-saved],
#cbl-img-preview,
.dp01s-hero-card__media,
.dp01-hero__media,
.dp01-hero__player,
.fx-offer-hero__media,
.dp-uploaded-hero-card,
.dp-hero-video-card,
.dp-hero-video-frame {
  border-radius: var(--media-radius, 5px);
}

.clv2-hero__visual img,
.clv2-hero__visual video,
.clv2-hero__visual iframe,
.clv2-hero__visual .afp-video-embed,
.clv2-hero .plf-slide img,
.clv2-hero .plf-slide video,
.clv2-hero .plf-slide iframe,
.clv2-hero .plf-slide .afp-video-embed,
.plf-custom-block__media img,
.plf-custom-block__media video,
.plf-custom-block__media iframe,
.plf-business-media__visual img,
.plf-business-media__visual video,
.plf-business-media__visual iframe,
.clv2-bonus-embed__media img,
.cl-hero-media img,
.cl-hero-media video,
.cl-hero-media iframe,
.sw-hero-card img,
.sw-hero-card video,
.sw-hero-card iframe,
.sw-bonus-card__img,
.plf-slide img,
.plf-slide video,
.plf-slide iframe,
.pco-media img,
.pco-media video,
.pco-media iframe,
.pco-bump-v5__media img,
.pco-bump-v5__media video,
.pco-ty-offer-page-hero-media img,
.pco-ty-offer-page-hero-media video,
.pco-ty-offer-page-hero-video iframe,
.cbl-fs-bs-hero-media img,
.cbl-fs-bs-hero-media video,
.cbl-fs-bs-hero-video iframe,
.oto-ob-hero__media img,
.oto-ob-hero__media video,
.oto-ob-hero__media iframe,
.oto-ob-showcase__media img,
.oto-ob-showcase__media video,
.cbl-image-stack__item img,
.cbl-offer-image-preview img,
.cbl-offer-saved-image img,
[data-offer-hero-image-saved] img,
#cbl-img-preview img,
#cbl-img-preview video,
.dp01s-hero-card__media img,
.dp01s-hero-card__media video,
.dp01s-hero-card__media iframe,
.dp01-hero__media > img,
.dp01-hero__media > video,
.dp01-hero__media > iframe,
.dp01-hero__player > img,
.dp01-hero__player > video,
.dp01-hero__player > iframe,
.fx-offer-hero__media img,
.fx-offer-hero__media video,
.fx-offer-hero__media iframe,
.dp-uploaded-hero-card img,
.dp-hero-video-frame iframe,
.dp-hero-video-frame video {
  border-radius: var(--media-radius, 5px) !important;
}

/* Product cutouts stay square — no forced media radius */
.dp-visual--cutout .dp-uploaded-hero-card,
.dp-visual--cutout .dp-uploaded-hero-card img {
  border-radius: 0 !important;
}

/*
 * Hero photos stay inside the recommended 1280×720 (16∶9) frame.
 * A taller or wider upload is cropped to that frame and cannot widen the page.
 */
.clv2-hero__media,
.clv2-hero .plf-gallery,
.clv2-hero .plf-slider,
.clv2-hero__visual,
.dp01s-hero-card__media.is-image,
.oto-ob-hero__media,
.pco-offer-page .oto-ob-hero__media,
.cbl-fs-bs-preview .oto-ob-hero__media {
  width: 100% !important;
  max-width: min(100%, 1280px) !important;
  min-width: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box;
}
.clv2-hero .plf-slide,
.clv2-hero__visual,
.dp01s-hero-card__media.is-image,
.oto-ob-hero__media,
.pco-offer-page .oto-ob-hero__media,
.cbl-fs-bs-preview .oto-ob-hero__media {
  position: relative !important;
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  max-height: none !important;
  border: 2px solid #cbd5e1 !important;
  border-radius: 8px !important;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
  background: #f8fafc;
}
.clv2-hero .plf-slide img,
.clv2-hero__visual img,
.clv2-hero .plf-slider img,
.dp01s-hero-card__media.is-image img,
.oto-ob-hero__media img,
.pco-offer-page .oto-ob-hero__media img,
.cbl-fs-bs-preview .oto-ob-hero__media img,
#cbl-img-preview img,
.cbl-gallery-thumb,
.cbl-thumb-preview img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
}
.clv2-hero .plf-slide img,
.clv2-hero__visual img,
.dp01s-hero-card__media.is-image img,
.oto-ob-hero__media img,
.pco-offer-page .oto-ob-hero__media img,
.cbl-fs-bs-preview .oto-ob-hero__media img {
  position: absolute !important;
  inset: 0 !important;
}
#cbl-img-preview,
.cbl-gallery-card,
.cbl-gallery-grid,
.cbl-thumb-preview,
.cbl-gallery-item {
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
#cbl-img-preview img,
.cbl-gallery-thumb,
.cbl-thumb-preview img {
  position: relative !important;
  inset: auto !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  max-height: 280px !important;
  border: 2px solid #cbd5e1 !important;
  border-radius: 8px !important;
  box-sizing: border-box;
}

/* Existing funnels — hero/showcase media tracks text column; full image, no banner overflow */
.oto-ob-hero__split {
  margin: 4px 0 0;
}
@media (min-width: 769px) {
  .oto-ob-hero__split {
    display: grid !important;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr) !important;
    gap: 24px 28px !important;
    align-items: stretch !important;
  }
  .oto-ob-hero__split-media {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-self: stretch;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
  }
  .oto-ob-hero__split-media .oto-ob-hero__media {
    flex: 1 1 auto;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    height: 100%;
    min-height: 100%;
    min-width: 0;
    overflow: hidden;
  }
  .oto-ob-hero__split-media .oto-ob-hero__media img,
  .pco-offer-page .pco-ty-oto-builder .oto-ob-hero__split-media .oto-ob-hero__media img,
  .pay-funnel-thanks-aligned .pco-ty-oto-builder .oto-ob-hero__split-media .oto-ob-hero__media img {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
  }
  .oto-ob-hero__split-copy {
    min-width: 0;
  }
}

/* Stacked offer hero uses the same 16∶9 frame as the main product hero. */
.oto-ob-hero:not(:has(.oto-ob-hero__split)) .oto-ob-hero__media,
.pco-offer-page .oto-ob-hero--stage .oto-ob-hero__media,
.pco-ty-offer-page-hero-media,
.cbl-fs-bs-hero-media {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: min(100%, 1280px) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  overflow: hidden !important;
}
.oto-ob-hero:not(:has(.oto-ob-hero__split)) .oto-ob-hero__media img,
.oto-ob-hero:not(:has(.oto-ob-hero__split)) .oto-ob-hero__media video,
.pco-offer-page .oto-ob-hero--stage .oto-ob-hero__media img,
.pco-offer-page .oto-ob-hero--stage .oto-ob-hero__media video,
.pco-ty-offer-page-hero-media img,
.pco-ty-offer-page-hero-media video,
.cbl-fs-bs-hero-media img,
.cbl-fs-bs-hero-media video {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
}

.oto-ob-showcase__grid,
.pco-ty-oto-builder .oto-ob-showcase__grid,
.pco-offer-page .oto-ob-showcase__grid {
  align-items: stretch;
}

.oto-ob-showcase__grid--dual .oto-ob-showcase__media-inner > img {
  object-fit: contain !important;
  object-position: center center !important;
}

@media (min-width: 769px) {
  .oto-ob-showcase__grid--copy:not(.oto-ob-showcase__grid--media-full) {
    align-items: stretch;
  }

  .oto-ob-showcase__grid--copy:not(.oto-ob-showcase__grid--media-full) .oto-ob-showcase__media {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
  }

  .oto-ob-showcase__grid--copy:not(.oto-ob-showcase__grid--media-full) .oto-ob-showcase__media-inner {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
  }

  .oto-ob-showcase__grid--copy:not(.oto-ob-showcase__grid--media-full) .oto-ob-showcase__media-inner > img,
  .oto-ob-showcase__grid--copy:not(.oto-ob-showcase__grid--media-full) .oto-ob-showcase__media > img,
  .oto-ob-showcase__grid--copy:not(.oto-ob-showcase__grid--media-full) .oto-ob-showcase__media img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
  }
}
