/*
* Filename: ads.css
* Directory: /www/css/
* File path: /www/css/ads.css
* Description: Ryddige annonsefelt for WEBoracle, inkludert trygg intern preview for administratorroller.
* Language: Norwegian
* Copyright: Webmasterinfo.no
*/

.wo-ad-slot {
    width: min(100%, 1120px);
    margin: 22px auto;
    padding: 14px 18px;
    box-sizing: border-box;
    border: 1px solid rgba(216, 132, 53, 0.28);
    border-radius: 16px;
    background: rgba(30, 42, 56, 0.58);
    color: #d7dee7;
    text-align: center;
    overflow: hidden;
}

.wo-ad-slot--global-top { margin-top: 18px; margin-bottom: 18px; }
.wo-ad-slot--global-bottom { margin-top: 26px; margin-bottom: 12px; }
.wo-ad-slot--home-top,
.wo-ad-slot--home-mid,
.wo-ad-slot--home-bottom { margin-top: 26px; margin-bottom: 36px; }
.wo-ad-slot--between-sections { margin-top: -10px; margin-bottom: 36px; }
.wo-ad-slot--article-top,
.wo-ad-slot--article-mid,
.wo-ad-slot--article-bottom { width: 100%; margin: 24px 0; }
.wo-ad-slot--inside-content { clear: both; margin: 28px 0; }

.wo-ad-label,
.wo-ad-slot__label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d88435;
}

.wo-ad-slot__text { display: block; font-size: 0.9rem; color: #c6cfda; }
.wo-ad-slot__meta { margin-top: 4px; font-size: 0.78rem; color: #9fb0c1; }
.wo-ad-slot__consent-note { margin-top: 5px; color: #f0b36f; }

.wo-ad-slot--placeholder {
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-style: dashed;
}

.wo-ad-slot--internal-preview {
    border-color: rgba(111, 218, 147, 0.5);
    background: rgba(22, 46, 36, 0.68);
}

.wo-ad-slot--internal-preview .wo-ad-label,
.wo-ad-slot__label { color: #6fda93; }
.wo-ad-slot ins.adsbygoogle { min-height: 90px; }

@media (max-width: 760px) {
    .wo-ad-slot {
        width: calc(100% - 24px);
        margin-left: 12px;
        margin-right: 12px;
        border-radius: 12px;
    }
}



/*
 * Høyre AdSense-sidefelt v2.
 *
 * Design-/layoutvern:
 * - Skjult som standard.
 * - Vises bare på desktop der det er rimelig plass ved siden av hovedcontaineren.
 * - Bredden beregnes ut fra ledig plass ved siden av ca. 1200px hovedinnhold.
 * - Den er fixed/flytende og påvirker ikke grid, flex, høyde eller bredde på sideinnholdet.
 * - På små skjermer, nettbrett, mobil og print er den skjult.
 *
 * Viktig ved 14" skjerm med høy Windows-skalering:
 * Nettleseren bruker CSS-piksler etter skalering, ikke fysisk 2880px-bredde.
 * Derfor starter v2 på 1536 CSS-piksler, men bruker dynamisk bredde for å unngå layoutkollisjon.
 */
.wo-ad-slot--right-sidebar {
    display: none;
}

@media (min-width: 1536px) and (min-height: 720px) {
    .wo-ad-slot--right-sidebar {
        position: fixed;
        top: 148px;
        right: 14px;
        z-index: 20;
        display: flex;
        width: clamp(120px, calc((100vw - 1240px) / 2 - 24px), 300px);
        max-width: 300px;
        min-width: 120px;
        min-height: 250px;
        max-height: calc(100vh - 190px);
        margin: 0;
        padding: 10px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
    }

    .wo-ad-slot--right-sidebar ins.adsbygoogle {
        display: block;
        width: 100%;
        min-width: 120px;
        min-height: 250px;
    }

    .wo-ad-slot--right-sidebar.wo-ad-slot--placeholder {
        min-height: 250px;
    }
}

@media (min-width: 1760px) and (min-height: 720px) {
    .wo-ad-slot--right-sidebar {
        right: 24px;
        padding: 12px;
    }

    .wo-ad-slot--right-sidebar ins.adsbygoogle {
        min-width: 160px;
    }
}

@media (max-width: 1535px), (max-height: 719px), print {
    .wo-ad-slot--right-sidebar {
        display: none !important;
    }
}

