/* Ad slots: paid banners, AdSense and LaughParty house promos share one frame (includes/ad-manager.php). */
.lp-ad-slot {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    width: 100%; max-width: 1440px; margin: 26px auto; padding-inline: 16px; box-sizing: border-box;
}
.lp-ad-slot--header_leaderboard { margin: 14px auto 4px; }
.lp-ad-slot--games_sidebar { margin: 18px 0 0; padding: 0; }
.lp-ad { display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0; }
.lp-ad-label {
    font: 600 10px/1.2 'Inter', system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase;
    color: #6c7890; margin-bottom: 5px;
}
.lp-ad-link { display: block; color: inherit; text-decoration: none; }
.lp-ad-link img { display: block; height: auto; border-radius: 4px; }
.lp-ad-frame { display: block; border: 0; }
/* Shrink to narrow screens only inside a slot, whose width is known. A percentage cap in a
   shrink-to-fit parent (e.g. a preview row) would collapse the banner to nothing. */
.lp-ad .lp-ad-link, .lp-ad .lp-ad-link img, .lp-ad .lp-ad-frame { max-width: 100%; }

/* Desktop and phone widths carry different banner sizes; a node can serve both. */
.lp-ad--mobile { display: none; }
.lp-ad--desktop.lp-ad--mobile { display: flex; }
@media (max-width: 767.98px) {
    .lp-ad--desktop { display: none; }
    .lp-ad--mobile { display: flex; }
    .lp-ad-slot--no-mobile { display: none; }
}
@media (min-width: 768px) {
    .lp-ad-slot--no-desktop { display: none; }
}

/* AdSense frame; the house promo behind it shows only when AdSense has nothing or is blocked. */
.lp-ad--network { width: 100%; }
.lp-ad-network-frame { width: 100%; min-height: var(--lp-minh-d, 0); }
@media (max-width: 767.98px) { .lp-ad-network-frame { min-height: var(--lp-minh-m, 0); } }
.lp-ad-backup { display: none; width: 100%; justify-content: center; }
.lp-ad-unfilled .lp-ad-network-frame { display: none; }
.lp-ad-unfilled .lp-ad-backup--desktop { display: flex; }
@media (max-width: 767.98px) {
    .lp-ad-unfilled .lp-ad-backup--desktop { display: none; }
    .lp-ad-unfilled .lp-ad-backup--mobile { display: flex; }
}

/* Designed banners: one design that re-flows to every size, scaled with container units. */
.lp-designed {
    position: relative; display: block; width: calc(var(--ad-w) * 1px);
    aspect-ratio: var(--ad-w) / var(--ad-h); container-type: size; overflow: hidden;
    background: var(--ad-bg); color: var(--ad-fg); border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(20, 33, 61, .14);
    font-family: 'Outfit', system-ui, sans-serif; line-height: 1.12;
    transition: transform .15s ease, box-shadow .15s ease;
}
.lp-designed:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(20, 33, 61, .14), 0 6px 16px rgba(20, 33, 61, .16); color: var(--ad-fg); }
.lp-designed:focus-visible { outline: 3px solid #2479b8; outline-offset: 3px; }
.lp-designed-inner { position: absolute; inset: 0; display: flex; }
.lp-designed [hidden] { display: none !important; }
.lp-designed .lp-designed-art {
    flex: none; aspect-ratio: 1; object-fit: cover; background: #fff;
    border: 2px solid #14213d; border-radius: 22%; box-shadow: 2px 2px 0 rgba(20, 33, 61, .85);
}
.lp-designed-copy { display: flex; flex-direction: column; min-width: 0; }
.lp-designed-headline { display: block; font-weight: 900; letter-spacing: -.03em; overflow-wrap: anywhere; }
.lp-designed-body {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
    font-family: 'Inter', system-ui, sans-serif; font-weight: 500; line-height: 1.3; opacity: .92;
}
.lp-designed-cta {
    flex: none; align-self: center; white-space: nowrap; border-radius: 999px;
    background: var(--ad-accent); color: var(--ad-cta-fg);
    font: 800 1em/1 'Inter', system-ui, sans-serif; box-shadow: 2px 2px 0 rgba(20, 33, 61, .85);
}

/* wide: 970x250, 970x90, 728x90, 468x60, 320x100, 320x50, 300x50 */
.lp-designed--wide .lp-designed-inner { align-items: center; gap: 2.4cqw; padding: 7cqh 2.8cqw; }
.lp-designed--wide .lp-designed-art { height: 84cqh; width: auto; }
.lp-designed--wide .lp-designed-copy { flex: 1; gap: 4cqh; }
.lp-designed--wide .lp-designed-headline {
    font-size: max(11px, min(27cqh, 4.6cqw, 46px));
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.lp-designed--wide .lp-designed-body { font-size: max(10px, min(15cqh, 2.3cqw, 20px)); -webkit-line-clamp: 2; }
.lp-designed--wide .lp-designed-cta { font-size: max(10px, min(15cqh, 2.3cqw, 19px)); padding: .75em 1.15em; }
@container (max-height: 70px) {
    .lp-designed--wide .lp-designed-body { display: none; }
    .lp-designed--wide .lp-designed-inner { padding-block: 5cqh; }
}
@container (max-width: 520px) {
    .lp-designed--wide .lp-designed-body { display: none; }
}
@container (max-width: 340px) {
    .lp-designed--wide .lp-designed-headline { font-size: max(11px, min(27cqh, 5.4cqw)); }
}

/* box: 336x280, 300x250, 250x250 */
.lp-designed--box .lp-designed-inner { flex-direction: column; justify-content: space-between; padding: 8cqw; gap: 3cqh; }
.lp-designed--box .lp-designed-art { position: absolute; top: 7cqw; right: 7cqw; width: 30cqw; height: auto; transform: rotate(4deg); }
.lp-designed--box .lp-designed-copy { gap: 3cqh; }
.lp-designed--box .lp-designed-headline { font-size: max(15px, 9.4cqw); padding-right: 33cqw; min-height: 30cqw; }
.lp-designed--box .lp-designed-body { font-size: max(11px, 5.1cqw); }
.lp-designed--box .lp-designed-cta { align-self: flex-start; font-size: max(11px, 5cqw); padding: .8em 1.2em; }
.lp-designed--box.lp-designed--no-art .lp-designed-headline { padding-right: 0; min-height: 0; }

/* tall: 300x600, 160x600 */
.lp-designed--tall .lp-designed-inner { flex-direction: column; align-items: center; justify-content: space-between; text-align: center; padding: 9cqw 8cqw; gap: 3cqh; }
.lp-designed--tall .lp-designed-art { width: 72cqw; height: auto; }
.lp-designed--tall .lp-designed-copy { gap: 3cqh; align-items: center; }
.lp-designed--tall .lp-designed-headline { font-size: max(13px, 12cqw); }
.lp-designed--tall .lp-designed-body { font-size: max(10px, 6.4cqw); -webkit-line-clamp: 5; }
.lp-designed--tall .lp-designed-cta { font-size: max(10px, 6.6cqw); padding: .8em 1.1em; }

/* Phone sticky bar (mobile_anchor placement). */
.lp-ad-slot--sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; margin: 0; max-width: none;
    padding: 6px 42px 6px 8px; background: #fffdf9; border-top: 1px solid #e8e1d7;
    box-shadow: 0 -6px 18px rgba(20, 33, 61, .14);
}
.lp-ad-slot--sticky .lp-ad-label { display: none; }
.lp-ad-close {
    position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
    width: 30px; height: 30px; border: 1px solid #c9d2dd; border-radius: 50%;
    background: #fff; color: #14213d; font-size: 18px; line-height: 1; cursor: pointer;
}
body.lp-has-sticky-ad { padding-bottom: 72px; }

/* Admin preview (?ad_preview=1) outlines every slot and names what filled it. */
.lp-ad-slot--preview { outline: 2px dashed #2479b8; outline-offset: 6px; border-radius: 6px; }
.lp-ad-preview-caption {
    max-width: 100%; padding: 6px 10px; border-radius: 6px; background: #e2f1fc; color: #14213d;
    font: 500 12px/1.45 'Inter', system-ui, sans-serif; text-align: center;
}
.lp-ad-preview-caption code { font-size: 11px; background: #fff; padding: 1px 5px; border-radius: 4px; }
.lp-ad .lp-ad-placeholder { max-width: 100%; }
.lp-ad-placeholder {
    display: grid; place-items: center; width: calc(var(--ad-w) * 1px); aspect-ratio: var(--ad-w) / var(--ad-h);
    border-radius: 6px; color: #43536c; font: 700 12px 'Inter', system-ui, sans-serif;
    background: repeating-linear-gradient(45deg, #f3f6fa 0 10px, #e8eef5 10px 20px);
}
@media (prefers-reduced-motion: reduce) { .lp-designed { transition: none; } .lp-designed:hover { transform: none; } }
