/* .l-layout-block__item > *:empty is problematic in the grid - we bump the specificity instead of using !important */
.c-ad.c-ad {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.c-ad iframe {
    position: relative;
}

.c-ad:not([data-google-query-id]) {
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    z-index: -9999 !important;
}

#OutOfPage {
    z-index: 9000;
}

.c-ad[data-type='OUT_OF_PAGE'] {
    position: fixed;
    left: 0;
    top: 0;
}

.c-ad[data-type='INPAGE'] {
    /* Exception is needed for Teads which is not rendering ok in a flex container */
    display: block;
}

.c-ad[data-type="FLOORAD"] {
    position: fixed;
    bottom: 0;
    left: calc(50%);
    margin-bottom: 0;
    z-index: 6000;
    transform: translateX(-50%);
}

.c-ad[data-type^="HALFRECT"] {
    min-height: 125px; /* Set min-height to avoid page jumps as much as possible. */
}

.c-ad[data-type^="RECT"] {
    min-height: 250px; /* Set min-height to avoid page jumps as much as possible. */
}

.c-ad[data-type^="BANNER"] {
    min-height: 90px; /* Set min-height to avoid page jumps as much as possible. */
}

.c-ad[data-type="BANNER_ABOVE"] .c-ad--sticky {
    position: fixed;
    top: 0 !important;
    text-align: center;
    z-index: 9000;
    width: 100%;
    background-color: #fff;
}

.c-ad[data-type="BANNER_ABOVE"] .c-ad--absolute {
    position: absolute;
    text-align: center;
    z-index: 9000;
    width: 100%;
    background-color: #fff;
}

.c-ad--hidden {
    visibility: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
}

@media only screen and (max-width: 980px) {
    .c-ad[data-type^="BANNER"] {
        min-height: 75px;
    }
}

@media only screen and (max-width: 480px) {
    /* MOBILE */
    .c-ad--with-background {
        padding: 10px;
        background-color: #f5f5f5;
        border: 1px solid #f0f0f0;
    }

    .c-ad[data-prefix]::before {
        font-weight: 500;
        font-size: 10px;
        line-height: 16px;
        content: attr(data-prefix);
        text-transform: uppercase;
        margin-bottom: 10px;
        color: #a3a3a3;
    }
}

@media print {
    .c-ad {
        display: none;
    }
}
