/*
 * Public ad slots. Mobile-first: slots are full width with a small radius and
 * keep the creative's aspect ratio; larger screens cap the width per slot.
 * Slides are stacked in one grid cell so the slot height never jumps.
 */

.ad-slot {
    position: relative;
    width: 100%;
    margin: 1.5rem auto;
}

.ad-slot__track {
    display: grid;
    border-radius: .5rem;
    overflow: hidden;
    background: #f4f4f4;
}

.ad-slot__slide {
    grid-area: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    opacity: 0;
    visibility: hidden;
    transition: opacity .6s ease, visibility .6s;
}

.ad-slot__slide.is-active {
    opacity: 1;
    visibility: visible;
}

.ad-slot__link { display: block; width: 100%; }

.ad-slot__image,
.ad-slot__frame {
    display: block;
    width: 100%;
    aspect-ratio: var(--ad-aspect, 728 / 90);
    border: 0;
}

/* contain, not cover: advertiser artwork must never be cropped. */
.ad-slot__image { object-fit: contain; }
.ad-slot__frame { min-height: 90px; background: #fff; }

.ad-slot__label {
    position: absolute;
    top: .35rem;
    left: .35rem;
    z-index: 2;
    padding: 0 .4rem;
    border-radius: .25rem;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    pointer-events: none;
}

/* Ad D shares the download section; Broadleaf's own slide keeps its layout. */
.ad-slot--web_ad_d { margin: 0; }
.ad-slot--web_ad_d .ad-slot__track { background: transparent; border-radius: 0; }
.ad-slot--web_ad_d .ad-slot__slide--house { display: block; }

/* Sidebar rectangle: same column width as the agent/share card above it */
.ad-slot--web_property_detail_sidebar {
    margin: 1rem 0 0;
    width: 100%;
    max-width: none;
}

@media (min-width: 768px) {
    .ad-slot { max-width: 728px; }
    .ad-slot--web_ad_d { max-width: none; }
    .ad-slot--web_property_detail_sidebar { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    .ad-slot__slide { transition: none; }
}
