/* Base Ad Containers */
.ad-wrapper {
    width: 100%;
    margin: 15px 0;
    display: flex;
    justify-content: center;
    border: 1px dashed var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

@media (min-width: 1025px) {
    .hero-ad {
        margin-top: 0;
    }
}

.post-hero {
    margin-top: 0;
}

.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--bg-secondary);
    margin: 0;
    position: relative;
}

.ad-placeholder::before {
    content: attr(data-label);
    font-size: var(--font-12);
    color: var(--text-muted);
    letter-spacing: 1.5px;
    opacity: .8;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

/* Ad loads centered in placeholder */
.ad-placeholder .adsbygoogle {
    display: block !important;
    width: 100%;
    max-width: 100%;
    min-height: inherit;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    background: var(--bg-secondary);
}

/* Different Ad Sizes */

/* Leaderboard - Top/Bottom */
.ad-leaderboard {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
}

/* Large Rectangle - Often Best Performing */
.ad-rectangle {
    width: 100%;
    max-width: 336px;
    min-height: 280px;
}

/* Half Page / Skyscraper */
.ad-skyscraper {
    width: 100%;
    max-width: 300px;
    min-height: 600px;
}

/* In-Feed / Fluid */
.ad-fluid {
    width: 100%;
    min-height: 150px;
}

/* Post Content Ads */
.ad-in-post {
    width: 100%;
    min-height: 250px;
}

/* Responsive Hide / Size Adjustments */
@media (max-width: 1024px) {
    .ad-leaderboard {
        max-width: 320px;
        min-height: 100px;
    }

    .ad-rectangle {
        max-width: 300px;
        min-height: 250px;
    }

    .ad-skyscraper {
        max-width: 300px;
        min-height: 250px;
        /* Skyscrapers on mobile are better as rectangles */
    }
}

/* Responsive Hide */
@media (max-width: 480px) {
    .desktop-ad {
        display: none;
    }
}