.cotr-article-ad-slot {
    width: 100%;
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
    text-align: center;
    clear: both;
    position: relative;
    z-index: 1;
}
/* Standard placements are intentionally never height-clipped. Third-party ad
   scripts can reserve or resize their own space without being cropped. */
.cotr-article-ad-slot:not(.cotr-article-ad-slot--feed-top),
.cotr-article-ad-slot:not(.cotr-article-ad-slot--feed-top) .cotr-article-ad-inner {
    overflow: visible !important;
    max-height: none !important;
}
.aa-shell > .cotr-article-ad-slot--nav-bottom {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 10px 20px 16px;
    background: #07080b;
    position: relative;
    z-index: 2;
}
.aa-shell > .cotr-article-ad-slot--nav-bottom .cotr-article-ad-inner {
    width: min(1440px, 100%);
    margin: 0 auto;
}
.cotr-article-ad-slot--above-title { margin-top: 18px; margin-bottom: 24px; }
.cotr-article-ad-slot--below-share { margin-top: 14px; margin-bottom: 28px; }
.cotr-article-ad-slot--after-paragraph-3,
.cotr-article-ad-slot--after-paragraph-6,
.cotr-article-ad-slot--after-paragraph-9,
.cotr-article-ad-slot--after-paragraph-12,
.cotr-article-ad-slot--after-paragraph-15 { margin-top: 30px; margin-bottom: 30px; padding-left: 0; padding-right: 0; }
.cotr-article-ad-slot--before-comments { margin-top: 38px; margin-bottom: 38px; }
.cotr-article-ad-slot--after-comments { margin-top: 38px; margin-bottom: 38px; }
.cotr-article-ad-inner {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: visible;
    text-align: center;
}
.cotr-article-ad-inner > iframe,
.cotr-article-ad-inner > img,
.cotr-article-ad-inner > video,
.cotr-article-ad-inner ins,
.cotr-article-ad-inner embed,
.cotr-article-ad-inner object {
    max-width: 100% !important;
}
.cotr-article-ad-inner iframe { display: inline-block; }
@media (max-width: 767px) {
    .cotr-article-ad-slot { padding-left: 14px; padding-right: 14px; }
    .cotr-article-ad-slot--above-title { margin-top: 12px; margin-bottom: 18px; }
    .cotr-article-ad-slot--below-share,
    .cotr-article-ad-slot--before-comments,
    .cotr-article-ad-slot--after-comments { margin-top: 24px; margin-bottom: 24px; }
    .cotr-article-ad-slot--after-paragraph-3,
    .cotr-article-ad-slot--after-paragraph-6,
    .cotr-article-ad-slot--after-paragraph-9,
    .cotr-article-ad-slot--after-paragraph-12,
    .cotr-article-ad-slot--after-paragraph-15 { margin-top: 24px; margin-bottom: 24px; }
    .aa-shell > .cotr-article-ad-slot--nav-bottom { padding: 8px 14px 12px; }
}

/* Sidebar-specific placements live inside the sidebar column but outside
   the sticky Trending Now card, so the ads themselves do not become sticky. */
.aaee-sidebar-100 > .cotr-article-ad-slot--sidebar-above,
.aaee-sidebar-100 > .cotr-article-ad-slot--sidebar-below {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}
.aaee-sidebar-100 > .cotr-article-ad-slot--sidebar-above {
    margin-top: 0;
    margin-bottom: 24px;
}
.aaee-sidebar-100 > .cotr-article-ad-slot--sidebar-below {
    margin-top: 24px;
    margin-bottom: 0;
}
@media (max-width: 860px) {
    .aaee-sidebar-100 > .cotr-article-ad-slot--sidebar-above {
        margin-top: 0;
        margin-bottom: 20px;
    }
    .aaee-sidebar-100 > .cotr-article-ad-slot--sidebar-below {
        margin-top: 20px;
        margin-bottom: 0;
    }
}

/* v1.2.0: dedicated immersive-feed ad treatment. */
body.cotr-aap-immersive-post,
body.cotr-aap-immersive-post #page,
body.cotr-aap-immersive-post .site,
body.cotr-aap-immersive-post .site-content,
body.cotr-aap-immersive-post .content-area,
body.cotr-aap-immersive-post main,
body.cotr-aap-immersive-post article,
body.cotr-aap-immersive-post .entry-content {
    background: #05060a !important;
}
body.cotr-aap-immersive-post .cotr-article-ad-slot--feed-top {
    width: 100%;
    max-width: none;
    padding: 14px 18px 10px;
    margin: 0;
    background: #05060a;
    line-height: 0;
    overflow: hidden;
}
body.cotr-aap-immersive-post .cotr-article-ad-slot--feed-top .cotr-article-ad-inner {
    width: min(100%, var(--cotr-feed-ad-max-width, 980px));
    margin: 0 auto;
    max-height: min(38vh, 430px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #05060a;
}
body.cotr-aap-immersive-post .cotr-article-ad-slot--feed-top .cotr-article-ad-inner > *,
body.cotr-aap-immersive-post .cotr-article-ad-slot--feed-top .cotr-article-ad-inner a {
    max-width: 100% !important;
    max-height: inherit !important;
    margin: 0 auto !important;
}
body.cotr-aap-immersive-post .cotr-article-ad-slot--feed-top img,
body.cotr-aap-immersive-post .cotr-article-ad-slot--feed-top video,
body.cotr-aap-immersive-post .cotr-article-ad-slot--feed-top iframe {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: min(38vh, 430px) !important;
    object-fit: contain !important;
    border: 0 !important;
}
body.cotr-aap-immersive-post:not(.cotr-aap-has-feed-ad) .aaee-video-feed,
body.cotr-aap-immersive-post:not(.cotr-aap-has-feed-ad) [data-aaee-video-feed] {
    margin-top: 0 !important;
}
@media (max-width: 700px) {
    body.cotr-aap-immersive-post .cotr-article-ad-slot--feed-top { padding: 8px 8px 6px; }
    body.cotr-aap-immersive-post .cotr-article-ad-slot--feed-top .cotr-article-ad-inner,
    body.cotr-aap-immersive-post .cotr-article-ad-slot--feed-top img,
    body.cotr-aap-immersive-post .cotr-article-ad-slot--feed-top video,
    body.cotr-aap-immersive-post .cotr-article-ad-slot--feed-top iframe {
        max-height: min(28vh, 260px) !important;
    }
}

/* v1.7.0: homepage-specific placements for the Chicks on the Right homepage layout. */
body.aa-seamless-home-active .cotr-article-ad-slot--homepage-nav-bottom {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 10px 20px 16px;
    background: #07080b;
    position: relative;
    z-index: 2;
}
body.aa-seamless-home-active .cotr-article-ad-slot--homepage-nav-bottom .cotr-article-ad-inner {
    width: min(1440px, 100%);
    margin: 0 auto;
}
body.aa-seamless-home-active .cotr-article-ad-slot--homepage-between-shorts-videos {
    margin-top: 26px;
    margin-bottom: 0;
}
body.aa-seamless-home-active .cotr-article-ad-slot--homepage-before-top-stories {
    margin-top: 0;
    margin-bottom: 28px;
}
body.aa-seamless-home-active .cotr-article-ad-slot--homepage-below-top-stories {
    margin-top: 32px;
    margin-bottom: 0;
}
body.aa-seamless-home-active .cotr-article-ad-slot--homepage-above-podcast,
body.aa-seamless-home-active .cotr-article-ad-slot--homepage-above-music {
    margin-top: 26px;
    margin-bottom: 0;
}
body.aa-seamless-home-active .cotr-article-ad-slot--homepage-above-footer {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 28px;
    padding-bottom: 28px;
    background: #fff;
}
@media (max-width: 767px) {
    body.aa-seamless-home-active .cotr-article-ad-slot--homepage-nav-bottom {
        padding: 8px 14px 12px;
    }
    body.aa-seamless-home-active .cotr-article-ad-slot--homepage-between-shorts-videos,
    body.aa-seamless-home-active .cotr-article-ad-slot--homepage-above-podcast,
    body.aa-seamless-home-active .cotr-article-ad-slot--homepage-above-music {
        margin-top: 24px;
    }
    body.aa-seamless-home-active .cotr-article-ad-slot--homepage-before-top-stories {
        margin-bottom: 24px;
    }
    body.aa-seamless-home-active .cotr-article-ad-slot--homepage-below-top-stories {
        margin-top: 24px;
    }
    body.aa-seamless-home-active .cotr-article-ad-slot--homepage-above-footer {
        padding-top: 24px;
        padding-bottom: 24px;
    }
}

/* v1.8.0: dedicated photo-gallery placements. These are active only on
   reload-based gallery views (photo 2+) supplied by COTR Photo Galleries. */
body.cotr-aap-gallery-post .cotr-article-ad-slot--gallery-nav-bottom {
    width:100%;
    max-width:none;
    margin:0;
    padding:10px 20px 16px;
    background:#07080b;
    position:relative;
    z-index:2;
}
body.cotr-aap-gallery-post .cotr-article-ad-slot--gallery-nav-bottom .cotr-article-ad-inner {
    width:min(1440px,100%);
    margin:0 auto;
}
body.cotr-aap-gallery-post .cotrg-gallery-ad-col .cotr-article-ad-slot {
    width:100%;
    max-width:none;
    margin:0;
    padding:0;
}
body.cotr-aap-gallery-post .cotrg-gallery-ad-col .cotr-article-ad-inner {
    width:100%;
    max-width:100%;
}
body.cotr-aap-gallery-post .cotrg-gallery-below-ad .cotr-article-ad-slot--gallery-below {
    width:100%;
    max-width:none;
    margin:0;
    padding:0;
}
body.cotr-aap-gallery-post .cotr-article-ad-slot--gallery-left,
body.cotr-aap-gallery-post .cotr-article-ad-slot--gallery-right {
    position:sticky;
    top:18px;
}
@media(max-width:1180px){
    body.cotr-aap-gallery-post .cotr-article-ad-slot--gallery-left,
    body.cotr-aap-gallery-post .cotr-article-ad-slot--gallery-right {position:static;}
    body.cotr-aap-gallery-post .cotrg-gallery-ad-col {margin-top:12px;margin-bottom:12px;}
}
@media(max-width:767px){
    body.cotr-aap-gallery-post .cotr-article-ad-slot--gallery-nav-bottom {padding:8px 14px 12px;}
}

/* v2.2.0: inline gallery-photo placements for Current and 3-up formats. */
body.cotr-aap-gallery-post .cotrg-gallery-inline-ad .cotr-article-ad-slot{
    width:100%;max-width:none;margin:0;padding:0;
}
body.cotr-aap-gallery-post .cotrg-gallery-inline-ad .cotr-article-ad-inner{
    width:100%;max-width:100%;margin:0 auto;
}
body.cotr-aap-gallery-post .cotrg-gallery-under-image-ad .cotr-article-ad-slot{
    margin-top:0;margin-bottom:0;
}
body.cotr-aap-gallery-post .cotrg-gallery-after-copy-ad .cotr-article-ad-slot{
    margin-top:0;margin-bottom:0;
}
