/* ============================================================
 * SciCirc 広告スロット 共通CSS
 * - AdSense承認後にここの class に広告コードを差し込む
 * - body.is-premium のときは全広告を非表示
 * - body.ads-pending のときは "準備中" プレースホルダーを表示
 * ============================================================ */

.ad-slot {
    margin: 24px auto;
    text-align: center;
    overflow: hidden;
    min-height: 90px;
    max-width: 728px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px dashed var(--surface-border, rgba(255, 255, 255, 0.1));
    position: relative;
    padding: 8px;
    box-sizing: border-box;
}

.ad-slot__label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-secondary, #888);
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    text-transform: uppercase;
    opacity: 0.5;
}

/* バリアント */
.ad-slot--top { margin-top: 12px; margin-bottom: 32px; }
.ad-slot--bottom { margin-top: 32px; margin-bottom: 12px; }

.ad-slot--inline {
    margin: 32px auto;
    min-height: 250px;
}

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

.ad-slot--sidebar-sticky {
    max-width: 300px;
    min-height: 250px;
    position: sticky;
    top: 80px;
}

.ad-slot--rectangle {
    max-width: 336px;
    min-height: 280px;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .ad-slot { min-height: 100px; }
    .ad-slot--inline { min-height: 200px; }
    .ad-slot--sidebar,
    .ad-slot--sidebar-sticky {
        max-width: 100%;
        position: static;
    }
}

/* プレミアム会員は完全非表示 (body.is-premium をサーバ側で付与) */
body.is-premium .ad-slot {
    display: none !important;
}

/* AdSense 承認待ち時のプレースホルダー */
body.ads-pending .ad-slot {
    background: rgba(255, 165, 0, 0.04);
    border-color: rgba(255, 165, 0, 0.25);
}

body.ads-pending .ad-slot:not(:has(ins, iframe))::before {
    content: "📋 広告枠（AdSense 承認待ち）";
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 80px;
    color: rgba(255, 165, 0, 0.7);
    font-size: 0.75rem;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 0.05em;
}

/* AdSense ins タグが入ったら通常表示 */
.ad-slot ins.adsbygoogle {
    display: block;
    width: 100%;
}
