/* Reklamy SuperionGG — blok reklamy (artykuły, góra strony, listy, przyklejona na telefonie).
   Kolory biorą zmienne motywu (moduł motyw: --sl-*), z ciemnymi wartościami zapasowymi. */
.sgg-ad {
    --ad-bg: var(--sl-surface-2, rgba(255,255,255,.025));
    --ad-border: var(--sl-border, rgba(106,184,255,.14));
    --ad-label: var(--sl-faint, rgba(180,205,255,.45));
    position: relative;
    display: block;
    clear: both;
    width: 100%;
    max-width: 100%;
    margin: 28px auto;
    padding: 22px 12px 12px;
    box-sizing: border-box;
    background: var(--ad-bg);
    border: 1px solid var(--ad-border);
    border-radius: 14px;
    text-align: center;
    line-height: 0;
    contain: layout;
}
.sgg-ad *, .sgg-ad *::before, .sgg-ad *::after { box-sizing: border-box; }
.sgg-ad__label {
    position: absolute;
    top: 6px;
    left: 12px;
    font: 700 9.5px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ad-label);
    pointer-events: none;
    user-select: none;
}
.sgg-ad__body { display: flex; justify-content: center; line-height: normal; }
.sgg-ad__link {
    display: block;
    width: min(100%, var(--sgg-ad-w, 970px));
    border-radius: 10px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
    text-decoration: none !important;
    border: 0 !important;
    box-shadow: none;
}
a.sgg-ad__link:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.28); }
a.sgg-ad__link:focus-visible { outline: 2px solid #60a5fa; outline-offset: 3px; }
.sgg-ad picture { display: block; }
.sgg-ad__img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: rgba(255,255,255,.03);
}
/* szablony HTML (Partner / Rekrutacja) mają własny wygląd — bez podwójnej ramki */
.sgg-ad--tpl-partner, .sgg-ad--tpl-redaktor-rekrutacja { padding: 20px 0 0; background: transparent; border: 0; }
.sgg-ad--tpl-partner .sgg-ad__label, .sgg-ad--tpl-redaktor-rekrutacja .sgg-ad__label { left: 4px; top: 4px; }
.sgg-ad--tpl-partner .sgg-ad__body > *, .sgg-ad--tpl-redaktor-rekrutacja .sgg-ad__body > * { width: 100%; margin: 0 !important; }

/* ── miejsca ── */
.sgg-ad--article { margin: 34px auto; }
.sgg-ad--article_end { margin: 40px auto 24px; }
.sgg-ad--top { margin: 12px auto; max-width: 1068px; border-radius: 12px; }
.sgg-ad--archive { margin: 18px 0; }
.sgg-ad--shortcode { margin: 22px auto; }

/* przyklejona na dole — tylko telefony */
.sgg-ad-sticky { display: none; }
@media (max-width: 768px) {
    .sgg-ad-sticky:not([hidden]) {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 99990;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
        background: rgba(8,12,20,.94);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-top: 1px solid rgba(106,184,255,.18);
        box-shadow: 0 -8px 24px rgba(0,0,0,.35);
        animation: sgg-ad-up .35s ease-out;
    }
    .sgg-ad-sticky .sgg-ad { margin: 0; padding: 14px 0 0; background: transparent; border: 0; }
    .sgg-ad-sticky .sgg-ad__label { top: 2px; left: 4px; }
    .sgg-ad-sticky .sgg-ad__link { width: min(100%, var(--sgg-ad-w, 728px)); max-height: 100px; border-radius: 6px; }
    .sgg-ad-sticky .sgg-ad__img { max-height: 100px !important; object-fit: contain; }
    .sgg-ad-sticky__close {
        position: absolute;
        top: -14px;
        right: 10px;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        border: 1px solid rgba(106,184,255,.3);
        background: #0d1524;
        color: #dbe7ff;
        font-size: 18px;
        line-height: 1;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0,0,0,.4);
    }
    body.sgg-ad-sticky-on { padding-bottom: 120px; }
}
@keyframes sgg-ad-up { from { transform: translateY(100%); } to { transform: none; } }

/* ── telefon ── */
@media (max-width: 640px) {
    .sgg-ad { margin: 24px auto; padding: 20px 8px 8px; border-radius: 12px; }
    .sgg-ad__link { border-radius: 8px; }
    .sgg-ad--article { margin: 26px -4px; width: calc(100% + 8px); max-width: calc(100% + 8px); }
}

/* jasny motyw strony */
html[data-sgg-theme="light"] .sgg-ad { --ad-bg: #f6f8fb; --ad-border: #e3e8ef; --ad-label: #8a96a8; }

/* reklamy nigdy w tabelach meczów i blokach oznaczonych data-no-ads */
[data-no-ads] .sgg-ad { display: none !important; }
@media print { .sgg-ad, .sgg-ad-sticky { display: none !important; } }
