/* Ads (wc-cms/lib/ads.php). Only loaded on pages that show an ad. Each ad is shown only on the
 * screen sizes it was set for: phone < 600px, tablet 600-1023px, laptop 1024-1519px, wide 1520px+. */
.wca { display: none; }
@media (max-width: 599px) { .wca.d-phone { display: block; } }
@media (min-width: 600px) and (max-width: 1023px) { .wca.d-tablet { display: block; } }
@media (min-width: 1024px) and (max-width: 1519px) { .wca.d-laptop { display: block; } }
@media (min-width: 1520px) { .wca.d-wide { display: block; } }

.wca-label { display: block; margin: 0 0 6px; font: 600 10.5px/1.3 var(--font, system-ui, sans-serif); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3, #64748b); }
.wca-box { position: relative; }
.wca-box img { display: block; max-width: 100%; height: auto; }
.wca a.wca-link { text-decoration: none; color: inherit; }
.wca a.wca-link:focus-visible { outline: 2px solid var(--accent, #2552e8); outline-offset: 3px; border-radius: 12px; }

/* In the page: between sections, in the article, in the blog sidebar.
 * The spacing sits on the ad itself, so a place that ends up empty takes no room. */
.wca-place .wca { max-width: 970px; margin: 28px auto; }
.wca-band .wca-place .wca { margin: 8px auto 28px; }
.wca-place .wca-b .wca-box, .wca-place .wca-g .wca-box { text-align: center; }
.wca-place .wca-b img { margin: 0 auto; border-radius: 10px; }
.post-rail .wca-place .wca { margin: 16px 0 0; }

/* Google: nothing shows until the ad is filled; an unfilled place is removed */
.wca-g { min-height: 0; }
.wca-g .wca-label { visibility: hidden; height: 0; margin: 0; }
.wca-place .wca-g:not(.is-filled) { margin: 0 !important; }
.wca-g.is-filled .wca-label { visibility: visible; height: auto; margin: 0 0 6px; }
.wca-g ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

/* HTML ads: a sandboxed frame, shown once it has loaded (until then it takes no room) */
.wca-h:not(.is-on) { height: 0; overflow: hidden; margin: 0 !important; }
.wca-fr { overflow: hidden; border-radius: 12px; }
.wca-fr iframe { display: block; width: 100%; height: 100%; border: 0; background: transparent; }
.wca-fluid { width: 100%; max-width: 970px; margin: 0 auto; }
@media (max-width: 599px) { .wca-fluid[style*="--wca-hp"] { height: var(--wca-hp) !important; } }

/* Adsterra: a sandboxed frame, shown once an ad is in it (until then it takes no room) */
.wca-a:not(.is-on) { height: 0; overflow: hidden; margin: 0 !important; }
.wca-a .wca-fr { border-radius: 0; margin: 0 auto; max-width: 100%; }
.wca-an .wca-fr { height: 1px; }
.wca-place .wca-a .wca-box { display: flex; justify-content: center; }
.wca-place .wca-an .wca-box { display: block; }
.wca-wait { visibility: hidden !important; pointer-events: none !important; }

/* Simple ads: a card made from the image and text */
.wca-s .wca-link { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--card, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: 14px; box-shadow: var(--shadow-sm, none); transition: border-color .15s ease, box-shadow .15s ease; }
.wca-s .wca-link:hover { border-color: var(--border-2, #cbd5e1); box-shadow: var(--shadow, none); }
.wca-img { flex: none; width: 64px; height: 64px; object-fit: cover; border-radius: 14px; }
.wca-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wca-tx b { font-weight: 650; font-size: 1rem; line-height: 1.35; color: var(--text, #0f172a); }
.wca-tx span { font-size: .92rem; line-height: 1.5; color: var(--text-2, #334155); }
.wca-go { flex: none; padding: 9px 16px; border-radius: 10px; background: var(--accent, #2552e8); color: var(--on-accent, #fff); font-weight: 600; font-size: .92rem; line-height: 1.2; white-space: nowrap; }
.wca-s .wca-link:hover .wca-go { background: var(--accent-hover, #1d42c4); }
@media (max-width: 599px) {
  .wca-row .wca-link { flex-wrap: wrap; gap: 12px; padding: 14px; }
  .wca-row .wca-img { width: 44px; height: 44px; border-radius: 12px; }
  .wca-row .wca-tx { flex-basis: calc(100% - 60px); }
  .wca-row .wca-tx b { font-size: .95rem; }
  .wca-row .wca-tx span { font-size: .86rem; line-height: 1.45; }
  .wca-row .wca-go { width: 100%; text-align: center; }
}
.wca-box .wca-link { max-width: 970px; margin: 0 auto; }

/* Card shapes for fixed places */
.wca-tall .wca-link { width: 160px; height: 600px; box-sizing: border-box; flex-direction: column; justify-content: flex-start; text-align: center; padding: 18px 14px; gap: 14px; }
.wca-tall .wca-img { width: 64px; height: 64px; }
.wca-tall .wca-tx { flex: 1; }
.wca-tall .wca-tx b { font-size: .95rem; }
.wca-tall .wca-tx span { font-size: .84rem; }
.wca-tall .wca-go { width: 100%; box-sizing: border-box; white-space: normal; text-align: center; padding: 10px 8px; }
.wca-box .wca-link { box-sizing: border-box; }
.wca-sq .wca-link { width: 300px; height: 250px; flex-direction: column; justify-content: center; text-align: center; gap: 10px; padding: 18px; }
.wca-bar .wca-link { width: 728px; height: 90px; padding: 10px 14px; gap: 14px; box-shadow: none; border-color: transparent; background: transparent; }
.wca-bar .wca-link:hover { border-color: transparent; box-shadow: none; }
.wca-bar .wca-img { width: 60px; height: 60px; border-radius: 12px; }
.wca-bar .wca-tx b { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wca-bar .wca-tx span { font-size: .84rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wca-bar .d-tablet .wca-link { width: 468px; height: 60px; padding: 6px 10px; gap: 10px; }
.wca-bar .d-tablet .wca-img { width: 44px; height: 44px; border-radius: 10px; }
.wca-bar .d-tablet .wca-tx span { -webkit-line-clamp: 1; }
.wca-bar .d-tablet .wca-go { padding: 7px 12px; font-size: .85rem; }
.wca-mini .wca-link { width: 320px; height: 50px; padding: 5px 8px; gap: 10px; border-radius: 10px; }
.wca-mini .wca-img { width: 38px; height: 38px; border-radius: 9px; }
.wca-mini .wca-tx b { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wca-mini .wca-go { padding: 7px 11px; font-size: .82rem; border-radius: 8px; }

/* Bottom bar: full width, banner in the middle, label and close button as small tabs on top */
.wca-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; display: flex; justify-content: center; padding: 6px 12px; background: color-mix(in srgb, var(--card, #fff) 92%, transparent); border-top: 1px solid var(--border, #e2e8f0); box-shadow: 0 -8px 24px -12px rgba(15, 23, 42, .18); -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px); }
.wca-bar[hidden], html.has-consent .wca-bar { display: none !important; }
.wca-bar-in { display: flex; justify-content: center; }
.wca-bar .wca { position: static; }
.wca-bar .wca-label { position: absolute; left: 12px; bottom: 100%; margin: 0; padding: 3px 9px 2px; background: var(--card, #fff); border: 1px solid var(--border, #e2e8f0); border-bottom: 0; border-radius: 8px 8px 0 0; visibility: visible; height: auto; }
.wca-bar .wca-g:not(.is-filled) .wca-label { visibility: hidden; }
.wca-x { position: absolute; right: 12px; bottom: 100%; display: grid; place-items: center; width: 30px; height: 24px; padding: 0; color: var(--text-2, #334155); background: var(--card, #fff); border: 1px solid var(--border, #e2e8f0); border-bottom: 0; border-radius: 8px 8px 0 0; cursor: pointer; }
.wca-x:hover { color: var(--text, #0f172a); }
.wca-x:focus-visible { outline: 2px solid var(--accent, #2552e8); outline-offset: 2px; }
html.wca-bar-on body { padding-bottom: var(--wca-bar-h, 0px); }
html.wca-bar-on .consent { bottom: calc(16px + var(--wca-bar-h, 0px)); }

/* Side rails: beside the content on wide screens only */
.wca-rail { position: fixed; top: 96px; z-index: 5; width: 160px; }
.wca-rail[hidden] { display: none !important; }
.wca-rail-l { left: max(12px, calc((100vw - 1180px) / 2 - 160px - 28px)); }
.wca-rail-r { right: max(12px, calc((100vw - 1180px) / 2 - 160px - 28px)); }
/* Rails sit outside the 1180px column, which leaves room for them from about 1580px: 1600px to be safe. */
@media (max-width: 1599px), (max-height: 819px) { .wca-rail { display: none !important; } }

/* Owner preview chip */
.wca-pv { position: fixed; left: 12px; top: 78px; z-index: 200; padding: 5px 10px; border-radius: 999px; background: #b45309; color: #fff; font: 600 12px/1.3 system-ui, sans-serif; pointer-events: none; opacity: .92; }

@media print { .wca, .wca-bar, .wca-rail, .wca-band, .wca-place, .wca-pv { display: none !important; } }
