/* ── AdSense Manager — Frontend Placeholder Styles ───────────────────────── */

.adsense-manager-ad {
    display: block;
    line-height: 0;
    text-align: center;
    width: 100%;
}

/* ── Placeholder wrapper ──────────────────────────────────────────────────── */
.adsense-ph-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;
    box-sizing: border-box;
    max-width: 100%;
    overflow: visible;
    border-radius: 6px;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 1.5px dashed #c3c4c7;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 8px auto;
}

/* no corner ribbon — transparent bg */

/* ── Inner content (vertical layout — default) ───────────────────────────── */
.adsense-ph-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 14px 16px;
    width: 100%;
    z-index: 1;
    text-align: center;
}

/* ── Icon ─────────────────────────────────────────────────────────────────── */
.adsense-ph-icon {
    color: #4285f4;
    opacity: .75;
    flex-shrink: 0;
}

/* ── Dimension pill ───────────────────────────────────────────────────────── */
.adsense-ph-dims {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(66,133,244,.12);
    border: 1px solid rgba(66,133,244,.25);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #1a4abf;
    letter-spacing: -.3px;
    white-space: nowrap;
}
.adsense-ph-dims svg { opacity: .7; }

/* ── Ad name ──────────────────────────────────────────────────────────────── */
.adsense-ph-name {
    font-size: 11px;
    font-weight: 700;
    color: #3c4043;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}

/* ── Best-for description ─────────────────────────────────────────────────── */
.adsense-ph-desc {
    font-size: 10px;
    color: #80868b;
    line-height: 1.4;
    max-width: 220px;
}

/* ── "Ad Placeholder" badge ───────────────────────────────────────────────── */
.adsense-ph-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1px solid #c3c4c7;
    border-radius: 12px;
    padding: 3px 9px;
    font-size: 10px;
    font-weight: 600;
    color: #5f6368;
    letter-spacing: .04em;
    white-space: nowrap;
    margin-top: 2px;
}
.adsense-ph-badge svg { opacity: .6; }

/* ══════════════════════════════════════════════════════════════════════════════
   HORIZONTAL layout — for thin ads (height < 100px)
   Applied via data-layout="h" on the wrapper
   ══════════════════════════════════════════════════════════════════════════════ */
.adsense-ph-wrap[data-layout="h"] .adsense-ph-inner {
    flex-direction: row;
    gap: 14px;
    justify-content: center;
    align-items: center;
    padding: 6px 14px;
    overflow: hidden;
    width: 100%;
}
.adsense-ph-wrap[data-layout="h"] .adsense-ph-icon {
    display: none;
}
.adsense-ph-wrap[data-layout="h"] .adsense-ph-desc {
    display: none;
}
.adsense-ph-wrap[data-layout="h"] .adsense-ph-badge {
    margin-top: 0;
    margin-left: 0;
}

/* ══════════════════════════════════════════════════════════════════════════════
   TALL layout — for skyscraper ads (height > 400px)
   Applied via data-layout="t" on the wrapper
   ══════════════════════════════════════════════════════════════════════════════ */
.adsense-ph-wrap[data-layout="t"] .adsense-ph-inner {
    gap: 10px;
    padding: 20px 12px;
}
.adsense-ph-wrap[data-layout="t"] .adsense-ph-icon svg {
    width: 40px;
    height: 40px;
}
.adsense-ph-wrap[data-layout="t"] .adsense-ph-dims {
    font-size: 15px;
    padding: 4px 14px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE layout — full-width flexible ads
   ══════════════════════════════════════════════════════════════════════════════ */
.adsense-ph-wrap[data-layout="r"] {
    width: 100%;
    min-height: 90px;
    display: flex;
}
.adsense-ph-wrap[data-layout="r"] .adsense-ph-inner {
    flex-direction: row;
    gap: 14px;
    justify-content: center;
    padding: 12px 20px;
}
.adsense-ph-wrap[data-layout="r"] .adsense-ph-desc {
    display: none;
}
.adsense-ph-wrap[data-layout="r"] .adsense-ph-badge::before {
    content: 'Responsive · ';
    opacity: .6;
}

/* shimmer removed — transparent background makes it unnecessary */
.adsense-ph-shimmer { display: none; }

/* ── Wrapper margin reset ─────────────────────────────────────────────────── */
.adsense-manager-ad .adsense-ph-wrap {
    margin: 8px auto;
}

/* ── Custom Image Ad ──────────────────────────────────────────────────────── */
.adsense-custom-ad-wrap {
    display: block;
    text-align: center;
    line-height: 0;
    margin: 8px auto;
}
.adsense-custom-ad-wrap a {
    display: inline-block;
    line-height: 0;
}
.adsense-custom-img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ══════════════════════════════════════════════════════════════════════════════
   DEVICE TARGETING
   Breakpoints:
     Desktop  ≥ 1025 px
     Tablet   768 px – 1024 px
     Mobile   ≤ 767 px
   ══════════════════════════════════════════════════════════════════════════════ */

/* All devices — always show */
.adsense-show-all    { display: block; }

/* Desktop — visible by default (base styles = desktop), hidden on smaller */
.adsense-show-desktop { display: block; }

/* Tablet — hidden on desktop and mobile */
.adsense-show-tablet  { display: none; }

/* Mobile — hidden on desktop and tablet */
.adsense-show-mobile  { display: none; }

/* Tablet breakpoint */
@media (min-width: 768px) and (max-width: 1024px) {
    .adsense-show-desktop { display: none;  }
    .adsense-show-tablet  { display: block; }
    .adsense-show-mobile  { display: none;  }
    .adsense-show-all     { display: block; }
}

/* Mobile breakpoint */
@media (max-width: 767px) {
    .adsense-show-desktop { display: none;  }
    .adsense-show-tablet  { display: none;  }
    .adsense-show-mobile  { display: block; }
    .adsense-show-all     { display: block; }
}
