.hrsj-ad-slot {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-block: 1rem;
    overflow: hidden;
    border-radius: 8px;
    background: var(--wp--preset--color--base, #fff);
}

.hrsj-ad-slot__frame {
    display: grid;
    width: 100%;
}

.hrsj-ad-slot__item {
    grid-area: 1 / 1;
    min-width: 0;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease-out;
}

.hrsj-ad-slot__item.is-active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.hrsj-ad-slot__link,
.hrsj-ad-slot__media {
    display: block;
    width: 100%;
    line-height: 0;
}

.hrsj-ad-slot__link:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: -3px;
}

.hrsj-ad-slot__image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

.hrsj-ad-slot__toggle {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 2;
    display: grid;
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.52);
    opacity: 0.72;
    cursor: pointer;
    transition: opacity 160ms ease-out;
}

.hrsj-ad-slot__toggle:hover,
.hrsj-ad-slot__toggle:focus-visible {
    opacity: 1;
}

.hrsj-ad-slot__toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.hrsj-ad-slot__toggle-icon {
    display: block;
    width: 15px;
    height: 15px;
}

.hrsj-ad-slot__toggle-icon--play {
    display: none;
}

.hrsj-ad-slot__toggle[aria-pressed="true"] .hrsj-ad-slot__toggle-icon--pause {
    display: none;
}

.hrsj-ad-slot__toggle[aria-pressed="true"] .hrsj-ad-slot__toggle-icon--play {
    display: block;
}

.hrsj-ad-slot--newspare_article_sidebar,
.hrsj-ad-slot--newspare_video_sidebar {
    margin-top: 0;
}

.hrsj-ad-slot--newspare_home_sidebar_rectangle,
.hrsj-ad-slot--newspare_home_sidebar_square {
    width: 100%;
    margin-block-start: 0;
    margin-inline-start: 0 !important;
    margin-inline-end: auto !important;
}

.hrsj-ad-placement--home-rectangle,
.hrsj-ad-placement--home-square {
    padding-block-start: 2.75rem;
}

.hrsj-ad-slot--newspare_home_sidebar_rectangle .hrsj-ad-slot__frame {
    aspect-ratio: 4 / 3;
}

.hrsj-ad-slot--newspare_home_sidebar_square .hrsj-ad-slot__frame {
    aspect-ratio: 4 / 3;
}

.hrsj-ad-slot--newspare_home_sidebar_rectangle .hrsj-ad-slot__item,
.hrsj-ad-slot--newspare_home_sidebar_rectangle .hrsj-ad-slot__link,
.hrsj-ad-slot--newspare_home_sidebar_rectangle .hrsj-ad-slot__media,
.hrsj-ad-slot--newspare_home_sidebar_rectangle .hrsj-ad-slot__image,
.hrsj-ad-slot--newspare_home_sidebar_square .hrsj-ad-slot__item,
.hrsj-ad-slot--newspare_home_sidebar_square .hrsj-ad-slot__link,
.hrsj-ad-slot--newspare_home_sidebar_square .hrsj-ad-slot__media,
.hrsj-ad-slot--newspare_home_sidebar_square .hrsj-ad-slot__image {
    height: 100%;
}

.newspare-header-ad:not(:has(.hrsj-ad-slot)),
.hrsj-ad-placement:not(:has(.hrsj-ad-slot)) {
    display: none;
}

.newspare-header-brand:has(+ .newspare-header-ad:not(:has(.hrsj-ad-slot))) {
    flex-basis: 100% !important;
}

.hrsj-mobile-ad-placement {
    display: none !important;
}

@media (max-width: 781px) {
    .hrsj-mobile-ad-placement:has(.hrsj-ad-slot) {
        display: block !important;
    }

    .hrsj-mobile-ad-placement .hrsj-ad-slot {
        width: 100%;
        margin-block: 1rem;
    }

    .hrsj-ad-placement--home-rectangle,
    .hrsj-ad-placement--home-square {
        padding-block-start: 1rem;
    }
}

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