/* Resume Builder ads (config/ads.php → rb_ad()). Slim banner sizes set by CSS – the ad never gets huge.
   Sizes follow the box the ad sits in (container queries), so a narrow editor column gets a small banner. */
.rb-ad { container-type: inline-size; width: 100%; max-width: 780px; margin: 22px auto; padding: 8px 10px 10px; border: 1px dashed #d9dce7; border-radius: 12px; background: #fafbfe; text-align: center; }
.rb-ad-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.rb-ad-label { color: #8a90a2; font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.rb-ad-why { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px; border: 0; background: none; color: #6c3cf0; font-size: 12px; font-weight: 600; cursor: pointer; }
.rb-ad-why:hover { text-decoration: underline; }
.rb-ad-slot { display: flex; justify-content: center; overflow: hidden; }
.rb-ad-ins { width: 300px; height: 100px; max-width: 100%; }                         /* phones / narrow columns */
@container (min-width: 490px) { .rb-ad-ins { width: 468px; height: 60px; } }        /* tablets / editor column */
@container (min-width: 728px) { .rb-ad-ins { width: 728px; height: 90px; } }        /* desktop */
.rb-ad:has(ins[data-ad-status="unfilled"]) { display: none; }                        /* no ad available → no empty box */
.rb-ad-editor { margin: 18px 0 6px; }

/* "Why ads?" dialog */
.rb-ads-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .55); }
.rb-ads-modal[hidden] { display: none; }
.rb-ads-modal-box { position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px 24px 22px; border-radius: 18px; background: #fff; color: #334155; font-size: 14.5px; line-height: 1.6; text-align: left; box-shadow: 0 30px 70px rgba(15, 23, 42, .35); }
.rb-ads-modal-box h3 { margin: 0 0 10px; color: #0f172a; font-size: 20px; font-weight: 800; }
.rb-ads-modal-box p { margin: 0 0 10px; }
.rb-ads-modal-box ul { margin: 4px 0 12px; padding: 0; list-style: none; }
.rb-ads-modal-box ul li { display: flex; gap: 9px; margin-bottom: 7px; }
.rb-ads-modal-box ul li i { flex-shrink: 0; color: #16a34a; }
.rb-ads-modal-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 12px; border-radius: 14px; background: #f4f0ff; color: #6c3cf0; font-size: 22px; }
.rb-ads-modal-thanks { color: #6c3cf0; font-weight: 700; }
.rb-ads-modal-x { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: #f1f5f9; color: #475569; }
.rb-ads-modal-ok { width: 100%; padding: 12px; border: 0; border-radius: 12px; background: #6c3cf0; color: #fff; font-size: 15px; font-weight: 700; }
.rb-ads-modal-ok:hover { background: #5b2ee0; }
html.rb-ads-lock { overflow: hidden; }

/* ad blocker popup: cannot be closed – only "reload" */
.rb-adblock { z-index: 2100; background: rgba(15, 23, 42, .78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.rb-adblock-icon { background: #fef2f2; color: #dc2626; }
.rb-adblock-steps { margin: 4px 0 12px; padding-left: 22px; list-style: decimal; }
.rb-adblock-steps li { display: list-item; margin-bottom: 4px; }
.rb-ads-modal-ok i { margin-right: 6px; }

/* an ad as a full-width row inside a card grid (template lists, My Resumes) */
.cv-tl-ad, .cvd-grid-ad { grid-column: 1 / -1; }
.cv-tl-ad .rb-ad, .cvd-grid-ad .rb-ad { margin: 6px auto; }

/* dashboard: top (after the header), middle (after My Resumes), bottom (after "Start with a template") */
.rb-ad-dash-top { margin: 0 auto 22px; }
.rb-ad-dash-mid { margin: 26px auto 24px; }
.rb-ad-dash-bottom { margin: 28px auto 8px; }
