.apr-ad-slot {
    --apr-ad-shell-width: min(100%, var(--apr-ad-width));
    clear: both;
    width: 100%;
    margin: 2rem auto;
    font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif);
}

.apr-ad-slot__inner {
    box-sizing: border-box;
    width: var(--apr-ad-shell-width);
    margin-inline: auto;
    display: grid;
    grid-template-rows: auto 1fr;
    align-content: stretch;
    justify-items: center;
    gap: 0.5rem;
    padding: 0.625rem;
    border-block: 1px dotted var(--color-brand-lines, #e4e4e7);
    color: var(--color-brand-text-light, #71717a);
}

.apr-ad-slot__label {
    margin: 0;
    font-size: 0.625rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-brand-text-light, #71717a);
}

.apr-ad-slot__creative {
    position: relative;
    width: 100%;
    aspect-ratio: var(--apr-ad-ratio-width) / var(--apr-ad-ratio-height);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.apr-ad-slot__creative > div,
.apr-ad-slot__creative [id^="avp_zid_"] {
    position: absolute !important;
    top: 0;
    left: 0;
    max-width: none !important;
    transform-origin: top left;
}

.apr-ad-slot__creative img {
    width: 100%;
    max-width: 100%;
    height: auto;
}

.apr-ad-slot__placeholder {
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: var(--apr-ad-ratio-width) / var(--apr-ad-ratio-height);
    display: grid;
    place-items: center;
    border: 1px dashed var(--color-brand-lines, #e4e4e7);
    background: color-mix(in oklch, var(--color-brand-bg-middle, #f4f4f5) 45%, transparent);
    font-size: 0.75rem;
    line-height: 1.3;
    text-align: center;
}

.apr-ad-slot--billboard {
    margin-block: 2.5rem;
}

.apr-ad-slot--homepage_leaderboard {
    margin-block: 0;
    padding-block: 3rem;
}

.apr-ad-slot--homepage_leaderboard .apr-ad-slot__inner {
    border-block: 0;
}

.apr-ad-slot--homepage_midfeed {
    padding-block: 3rem;
    background: var(--color-brand-bg-middle, #f4f4f5);
}

.apr-ad-slot--homepage_midfeed .apr-ad-slot__inner {
    border-block: 0;
}

.apr-ad-slot--homepage_latest_sticky {
    position: sticky;
    top: calc(var(--header-height, 140px) + 1rem);
    margin-block: 0;
}

.apr-ad-slot--homepage_latest_sticky .apr-ad-slot__inner {
    padding: 0;
    border-block: 0;
}

@media (max-width: 767px) {
    .apr-ad-slot {
        --apr-ad-shell-width: min(100%, var(--apr-ad-mobile-width));
        margin-block: 1.75rem;
    }

    .apr-ad-slot__creative,
    .apr-ad-slot__placeholder {
        aspect-ratio: var(--apr-ad-mobile-ratio-width) / var(--apr-ad-mobile-ratio-height);
    }
}
