/* ads.css - AdSense ad container styles
 *
 * Updated: 2026-03-11
 * Side ads on wide screens, bottom banner on narrow screens
 */

/* ========== Side Ad Containers ========== */
.side-ads-wrapper {
    position: fixed;
    top: 100px;
    z-index: 50;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.side-ads-left {
    left: calc((100vw - 900px) / 2 - 160px - 30px);
}

.side-ads-right {
    right: calc((100vw - 900px) / 2 - 160px - 30px);
}

.side-ad-unit {
    width: 160px;
    background: rgba(250, 250, 250, 0.95);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
}

.side-ad-label {
    display: block;
    font-size: 10px;
    color: #bbb;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== Bottom Banner Ad (narrow screens) ========== */
.ad-bottom-banner {
    max-width: 900px;
    margin: 30px auto 0;
    padding: 10px;
    text-align: center;
    background: #fafafa;
    border-radius: 8px;
    display: none;
}

.ad-bottom-banner .ad-label {
    display: block;
    font-size: 11px;
    color: #aaa;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== Ad injected before footer (by components.js) ========== */
.ad-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 10px;
    text-align: center;
    background: #fafafa;
    border-radius: 8px;
}

.ad-container .ad-label {
    display: block;
    font-size: 11px;
    color: #aaa;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-before-footer {
    margin-bottom: 0;
}

/* ========== Responsive ========== */

/* Wide screens: show side ads, hide bottom banner */
@media (min-width: 1300px) {
    .side-ads-wrapper {
        display: flex;
    }

    .ad-bottom-banner {
        display: none !important;
    }

    /* Hide the before-footer ad on wide screens (side ads are visible) */
    .ad-before-footer {
        display: none;
    }
}

/* Narrow screens: show bottom banner, hide side ads */
@media (max-width: 1299px) {
    .side-ads-wrapper {
        display: none !important;
    }

    .ad-bottom-banner {
        display: block;
    }

    .ad-before-footer {
        display: block;
    }
}

@media (max-width: 768px) {
    .ad-bottom-banner,
    .ad-container {
        margin: 15px 10px;
        padding: 8px;
    }
}
