/* ============================================================
   YZ Merkezi — Profesyonel Reklam Slot Sistemi (45-ad-slots.css)
   ============================================================
   Tüm reklam birimlerinin tutarlı, profesyonel ve içerik-uyumlu
   görünümünü sağlar. Dark mode desteği dahildir.
   ============================================================ */

/* ── Temel Reklam Slotu ── */
.yz-ad-slot {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--color-surface-subtle);
    border: 1px solid var(--color-border);
    text-align: center;
    transition: opacity var(--transition-base);
}

.yz-ad-slot:empty {
    display: none;
}

.ad-band {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 8px 0;
}

.ad-band__inner {
    margin-inline: auto;
}

.ad-band--home-after-hero {
    background: var(--color-surface-subtle);
}

/* ── "Reklam" Etiketi ── */
.yz-ad-label {
    display: inline-block;
    position: absolute;
    top: 6px;
    left: 8px;
    z-index: 2;
    padding: 1px 8px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    pointer-events: none;
    line-height: 1.6;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ── Pozisyon Varyantları ── */

/* Header Altı — Leaderboard */
.yz-ad-slot--header_below {
    margin: 0.5rem auto;
    max-width: var(--yz-ad-preferred-width, 728px);
    min-height: 90px;
    padding: 8px;
    width: 100%;
}

/* Footer Üstü — Leaderboard */
.yz-ad-slot--footer_above {
    max-width: var(--yz-ad-preferred-width, 728px);
    margin: 1.5rem auto;
    padding: 10px;
    min-height: 90px;
    width: 100%;
}

/* İçerik İçi — In-article */
.yz-ad-slot--content_inline {
    max-width: 100%;
    margin: 1.5rem 0;
    padding: 12px;
    min-height: 100px;
}

/* Sidebar — Medium Rectangle */
.yz-ad-slot--sidebar {
    max-width: 300px;
    margin: 0 auto 1rem;
    padding: 8px;
    min-height: 250px;
}

/* In-Feed — Kart grid'i ile uyumlu */
.yz-ad-slot--in-feed,
.yz-ad-slot--in_feed {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    min-height: 280px;
    height: 100%;
    background: var(--color-surface-subtle);
    border: 1px dashed var(--color-border);
}

/* Wide directory pages use a bounded horizontal sponsorship break. */
.yz-ad-slot--directory-break {
    contain: layout paint;
    height: 112px;
    margin: 8px auto;
    max-height: 112px;
    max-width: 970px;
    min-height: 112px;
    overflow: hidden;
    padding: 10px;
    width: 100%;
}

.yz-ad-slot--in-feed.yz-ad-slot--directory-break .yz-ad-label {
    left: 8px;
    margin: 0;
    position: absolute;
    top: 6px;
}

.yz-ad-slot--directory-break .adsbygoogle,
.yz-ad-slot--directory-break .yz-custom-ad {
    height: 90px !important;
    max-height: 90px;
    max-width: 100%;
    overflow: hidden;
    width: 100%;
}

.yz-ad-slot--directory-break iframe {
    height: 90px !important;
    max-height: 90px !important;
    max-width: 100% !important;
}

.yz-ad-slot--unfilled {
    display: none;
}

.yz-ad-slot--in-feed .yz-ad-label,
.yz-ad-slot--in_feed .yz-ad-label {
    position: static;
    margin-bottom: 8px;
}

/* Community feed'e özel — reddit-card stack'inde uyumlu reklam */
.yz-ad-slot--community-feed {
    margin: 0.5rem 0;
}

.yz-ad-slot--community-feed .yz-ad-slot {
    margin: 0 auto;
}

/* Kenar Sidebar — Skyscraper */
.yz-ad-slot--edge {
    width: 160px;
    padding: 6px;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
}

/* ── Kenar Sticky Sidebar Container ── */
.yz-edge-sidebar {
    display: none; /* Varsayılan: gizli, geniş ekranda göster */
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    pointer-events: auto;
}

.yz-edge-sidebar--left {
    left: 8px;
}

.yz-edge-sidebar--right {
    right: 8px;
}

/* 1120 px içerik ve 160 px reklamlar arasında güvenli boşluk oluştuğunda göster. */
@media (min-width: 1600px) {
    .yz-edge-sidebar {
        display: block;
    }
}

/* Çok geniş ekranlarda biraz daha içeri çek */
@media (min-width: 1720px) {
    .yz-edge-sidebar--left {
        left: 16px;
    }
    .yz-edge-sidebar--right {
        right: 16px;
    }
}

/* ── AdSense ins elementi düzeltmeleri ── */
.yz-ad-slot .adsbygoogle {
    display: block;
    width: 100%;
    max-width: 100%;
}

.yz-ad-slot--edge .adsbygoogle {
    width: 160px;
}

/* ── Responsive Kurallar ── */

/* Mobilde leaderboard → responsive */
@media (max-width: 767.98px) {
    .yz-ad-slot--header_below,
    .yz-ad-slot--footer_above {
        max-width: var(--yz-ad-preferred-width, 728px);
        min-height: 50px;
        padding: 8px;
    }

    /* Sidebar reklamları mobilde tam genişlik */
    .yz-ad-slot--sidebar {
        max-width: 100%;
    }

    /* In-feed mobilde biraz daha kompakt */
    .yz-ad-slot--in-feed,
    .yz-ad-slot--in_feed {
        min-height: 200px;
        padding: 12px;
    }

    .yz-ad-slot--directory-break {
        height: 112px;
        margin-block: 6px;
        max-height: 112px;
        min-height: 112px;
        padding: 10px;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .yz-ad-slot--header_below,
    .yz-ad-slot--footer_above {
        max-width: var(--yz-ad-preferred-width, 728px);
    }
}

/* ── Utility: Sayfa türüne göre gizleme ── */
.yz-ad-hidden {
    display: none !important;
}
