/* WordPress additions to the ported mockup CSS (site.css is generated; edit this file by hand). */

/* Blog: search, topic links, pagination */
.blog-search { display: flex; gap: 10px; margin-top: 26px; max-width: 520px; }
.blog-search input { flex: 1; min-width: 0; font: 16px var(--body); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--white); color: var(--ink); }
.blog-search input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(16,176,192,.18); }
.chips a { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 9px 16px; font: 700 15px/1.2 var(--body); color: var(--ink); text-decoration: none; }
.chips a:hover { border-color: var(--line-strong); }
.chips a[aria-current="page"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.featured-post { margin-bottom: 8px; }
.bcard img, .featured-post img { height: auto; }
.featured-post img { aspect-ratio: 3 / 2; object-fit: cover; }
.bcard img { aspect-ratio: 3 / 2; object-fit: cover; }
.avaz-pager { display: flex; justify-content: center; margin-top: 56px; }
.avaz-pager .page-numbers { display: inline-flex; min-width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0 14px; margin: 0 3px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font: 800 15px/1 var(--display); text-decoration: none; }
.avaz-pager .page-numbers.current { background: var(--navy); color: var(--white); border-color: var(--navy); }
.avaz-pager .page-numbers.dots { border: 0; background: none; }
.avaz-pager a.page-numbers:hover { border-color: var(--teal); }

/* Single post */
.art-hero { max-width: 1000px; }
.art-hero img { width: 100%; height: auto; border-radius: 24px; aspect-ratio: 16 / 9; object-fit: cover; }
.art.no-toc { grid-template-columns: minmax(0, 720px); justify-content: center; }
.tags a { background: var(--soft); border-radius: 8px; padding: 6px 12px; font-size: 14.5px; font-weight: 700; color: var(--muted); text-decoration: none; }
.tags a:hover { color: var(--ink); }

/* Post content written in the editor over the years */
.prose img { max-width: 100%; height: auto; border-radius: 14px; }
.prose figure { margin: 1.4em 0; }
.prose figcaption, .prose .wp-caption-text { font-size: 15px; color: var(--muted); margin-top: 8px; text-align: center; }
.prose .wp-caption { max-width: 100%; }
.prose .alignleft { float: left; margin: .3em 1.4em 1em 0; max-width: 50%; }
.prose .alignright { float: right; margin: .3em 0 1em 1.4em; max-width: 50%; }
.prose .aligncenter { display: block; margin-inline: auto; }
.prose::after { content: ""; display: table; clear: both; }
.prose h3 { font-size: 24px; margin-top: 1.6em; }
.prose h4 { font-size: 20px; margin-top: 1.4em; }
.prose blockquote { margin: 1.4em 0; padding: 18px 24px; border-left: 4px solid var(--orange); background: var(--orange-tint); border-radius: 0 16px 16px 0; font-size: 19px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose iframe, .prose video, .prose embed { max-width: 100%; }
.prose .wp-block-embed__wrapper { position: relative; aspect-ratio: 16 / 9; }
.prose .wp-block-embed__wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 14px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose ul li::marker, .prose ol li::marker { color: var(--teal-deep); font-weight: 700; }
.prose .wp-block-button__link { display: inline-block; background: var(--orange); color: var(--navy); font: 800 16px/1 var(--display); padding: 15px 22px; border-radius: 12px; text-decoration: none; }

/* Comments */
.avaz-comments { max-width: 820px; margin-top: 64px; }
.avaz-comments .comment-list { list-style: none; padding: 0; }
.avaz-comments .comment-body { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 12px; }
.avaz-comments .children { list-style: none; padding-left: 28px; }
.avaz-comments .comment-meta, .avaz-comments .comment-metadata { font-size: 14.5px; color: var(--muted); }
.avaz-comments .avatar { border-radius: 50%; vertical-align: middle; margin-right: 8px; }
.avaz-comments textarea, .avaz-comments input[type="text"], .avaz-comments input[type="email"], .avaz-comments input[type="url"] { width: 100%; font: 16px var(--body); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.avaz-comments .submit { background: var(--orange); color: var(--navy); border: 0; border-radius: 12px; padding: 14px 22px; font: 800 16px/1 var(--display); cursor: pointer; }

/* Screen-reader-only text used by WordPress markup */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Older pages inside the Avaz frame (page.php and the Page Builder Full Width template) */
.legacy-head { padding-block: 56px 28px; }
.legacy-head h1 { margin-top: 0; }
.avaz-legacy.is-boxed .avaz-legacy-content { max-width: 860px; padding-block: 8px 24px; }
.avaz-legacy.is-full .avaz-legacy-content > .alignfull,
.avaz-legacy .alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.avaz-legacy .alignwide { width: min(1200px, 100vw - 32px); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.avaz-legacy img { max-width: 100%; height: auto; }
.avaz-legacy.is-full .avaz-legacy-content > :not(.alignfull):not([class*="kb-row-layout"]):not([class*="wp-block-themeisle-blocks-advanced-columns"]):not([class*="wp-block-kadence"]) { max-width: 1200px; margin-inline: auto; padding-inline: 28px; }
.avaz-legacy.is-full { overflow-x: clip; }
/* Old page content: headings and buttons in the Avaz type */
.avaz-legacy :is(h1, h2, h3, h4) { font-family: var(--display); font-weight: 900; letter-spacing: -0.01em; }
.avaz-legacy.is-boxed h2 { font-size: 30px; margin-top: 1.6em; }

/* Newsletter box on posts */
.post-news { background: var(--teal-tint); border-radius: 20px; padding: 26px 28px; display: grid; gap: 14px; }
.post-news > div:first-child b { font: 900 21px/1.25 var(--display); display: block; }
.post-news > div:first-child span { color: var(--muted); font-size: 16.5px; }
.post-news .news { margin-top: 0; }
.news-brevo input[type=email], .news-brevo input[type=text] { font: 16px var(--body); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.news-brevo button, .news-brevo input[type=submit] { background: var(--orange); color: var(--navy); border: 0; border-radius: 12px; padding: 13px 20px; font: 800 15px/1 var(--display); cursor: pointer; }

/* Stripe checkout message under "Buy on the web" */
.buy-error { margin: 10px 0 0; color: var(--danger); font-size: 14px; }
[data-sku][aria-busy="true"] { opacity: .7; pointer-events: none; }

/* Forms carried over from the old pages (Brevo embeds, Kadence forms), drawn like the Avaz form card.
   Brevo writes inline font/colour styles on every element, hence the !important. */
.form-card .sib-form, .form-card #sib-form-container, .form-card #sib-container, .form-card .sib-form-container { background: transparent !important; border: 0 !important; padding: 0 !important; margin: 0 !important; max-width: none !important; box-shadow: none !important; }
.form-card .sib-form *, .form-card .kb-form * { font-family: var(--body) !important; }
.form-card .sib-form-block, .form-card .sib-input, .form-card .sib-form-block__button-with-loader { padding: 0 !important; margin: 0 0 18px !important; text-align: left !important; }
.form-card .sib-form-block p, .form-card .sib-text-form-block p { color: var(--muted) !important; font-size: 15px !important; }
.form-card .sib-form-block[style*="font-size:32px"] p, .form-card .sib-form-block:first-child p { font: 800 26px/1.2 var(--display) !important; color: var(--navy) !important; }
.form-card .entry__label, .form-card .kb-form label, .form-card .kb-adv-form-label { display: block; font: 700 15px/1.3 var(--body) !important; color: var(--ink) !important; margin-bottom: 8px !important; }
.form-card .entry__field { border: 0 !important; background: none !important; box-shadow: none !important; }
.form-card .sib-form .input, .form-card .sib-form select, .form-card .sib-form textarea,
.form-card .kb-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), .form-card .kb-form select, .form-card .kb-form textarea {
	font: 16px var(--body) !important; color: var(--ink) !important; border: 1.5px solid var(--line) !important; border-radius: 12px !important;
	padding: 13px 14px !important; background: var(--white) !important; width: 100% !important; height: auto !important; box-sizing: border-box; }
.form-card .sib-form .input:focus, .form-card .kb-form input:focus, .form-card .kb-form textarea:focus, .form-card .kb-form select:focus { outline: none; border-color: var(--teal) !important; box-shadow: 0 0 0 4px rgba(16,176,192,.18) !important; }
.form-card .entry__choice { font-size: 15px !important; color: var(--ink) !important; }
.form-card .entry__specification, .form-card .entry__error { font-size: 13px !important; color: var(--muted) !important; }
.form-card .sib-form-block__button, .form-card .kb-form .kb-submit-field .kb-button, .form-card .kb-form button[type="submit"], .form-card .kb-form .kb-forms-submit {
	background: var(--orange) !important; color: var(--navy) !important; border: 0 !important; border-radius: 12px !important;
	font: 800 16px/1 var(--display) !important; padding: 16px 24px !important; width: 100% !important; justify-content: center; cursor: pointer; box-shadow: 0 10px 22px -12px rgba(224,127,0,.7) !important; }
.form-card .sib-form-block__button:hover, .form-card .kb-form .kb-button:hover { background: var(--orange-deep) !important; }
.form-card .sib-form-message-panel { border-radius: 12px !important; font-size: 15px !important; }
.form-card .sib-form-block__button svg { display: none; }

/* Newsletter sign-up */
.news-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.news-msg { margin-top: 10px; font-size: 14px; color: var(--teal-deep); max-width: 400px; }
.news-msg.is-error { color: var(--danger); }
.post-news .news-msg { margin-top: 8px; }

/* [avaz_brevo_form]: Brevo forms drawn with the Avaz field styles (.fields/.field from site.css) */
.brevo-form .fields { margin-top: 0; }
.brevo-form .field .opt { font-weight: 400; color: var(--muted); }
.brevo-form .field .help { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }
.brevo-form .field-row { display: grid; grid-template-columns: 130px 1fr; gap: 8px; }
.brevo-form fieldset { border: 0; padding: 0; margin: 0; }
.brevo-form legend { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.brevo-form .choices { display: flex; flex-wrap: wrap; gap: 8px; }
.brevo-form .choice { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 15px; cursor: pointer; }
.brevo-form .choice:has(input:checked) { border-color: var(--teal); background: var(--teal-tint); }
.brevo-form .choice input { accent-color: var(--teal-deep); }
.brevo-form .form-note { font-size: 13px; color: var(--muted); margin-top: 14px; line-height: 1.5; }
.brevo-form .form-msg { margin-top: 14px; font-weight: 700; color: var(--teal-deep); }
.brevo-form .form-msg.is-error { color: var(--danger); }
.brevo-form .btn[disabled] { opacity: .7; }

/* Reading comfort for older posts */
.prose > p:first-of-type { font-size: 21px; line-height: 1.65; color: var(--ink-prose); }
.prose p { color: var(--ink-prose); }
/* Floated photos: smaller, so the text beside them keeps a readable width */
.prose .alignleft, .prose .alignright, .prose .wp-block-image.alignleft, .prose .wp-block-image.alignright { max-width: min(40%, 300px); }
.prose .wp-block-image.alignleft img, .prose .wp-block-image.alignright img { width: 100%; }
@media (max-width: 760px) {
	.prose .alignleft, .prose .alignright, .prose .wp-block-image.alignleft, .prose .wp-block-image.alignright { float: none; max-width: 100%; margin: 1.4em auto; }
}
/* "Written by" box at the end of older posts */
.prose .author-box { margin-top: 2.4em; padding: 28px 32px; background: var(--soft); border-radius: 24px; gap: 28px !important; align-items: center; font-size: 16px; line-height: 1.6; }
.prose .author-box p { margin-top: 6px; font-size: 16px !important; color: var(--muted); text-align: left !important; }
.prose .author-box .author-label { margin: 0; font: 800 12px/1 var(--display) !important; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-deep) !important; }
.prose .author-box .author-name { margin-top: 10px; font: 800 22px/1.2 var(--display) !important; color: var(--ink) !important; }
.prose .author-box .author-name + p { margin-top: 2px; }
.prose .author-box img { width: 120px !important; height: 120px !important; object-fit: cover; object-position: 50% 15%; border-radius: 50% !important; max-width: none; }
.prose .author-box .wp-block-column:has(img) { flex: 0 0 120px !important; order: -1; }
.prose .author-box figure { margin: 0; }
@media (max-width: 600px) { .prose .author-box { padding: 22px; } }

/* Buy Avaz block inside a blog post (inc/buy.php): one column, and undo the article text styles */
.prose .avaz-buy { font-size: 17px; line-height: 1.5; margin: 1.8em 0; }
.prose .avaz-buy .plan { grid-template-columns: 1fr; }
.prose .avaz-buy .plan-main, .prose .avaz-buy .plan-buy { padding: 28px; }
.prose .avaz-buy .plan-main h3 { font-size: 36px; margin-top: 12px; }
.prose .avaz-buy .checks { padding-left: 0; }
.prose .avaz-buy .checks li + li { margin-top: 0; }
.prose .avaz-buy .pl-desc { color: var(--ink-soft); }
.prose .avaz-buy .inc-h { color: var(--muted); }
.prose .avaz-buy .plan-buy p { color: var(--on-dark-muted); }
.prose .avaz-buy .plan-buy .trial p { color: var(--on-dark-soft); }
.prose .avaz-buy .plan-buy .buy-error { color: var(--danger); }
.prose .avaz-buy .plan-buy a:not(.btn) { color: var(--white); }
.prose .avaz-buy .btn-orange { color: var(--navy); }

/* ACAP directory */
.acap-tools { display: grid; grid-template-columns: 1fr 280px; gap: 12px; align-items: center; }
.acap-search input, .acap-select select { width: 100%; font: 16px var(--body); color: var(--ink); border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--white); }
.acap-search input { padding-left: 44px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%235C5F70' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") 16px 50% no-repeat; }
.acap-search input:focus, .acap-select select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(16,176,192,.18); }
.acap-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.acap-chips .acap-chip { border: 1.5px solid var(--line); background: var(--white); border-radius: 999px; padding: 8px 14px; font: 700 14px var(--body); color: var(--ink); cursor: pointer; }
.acap-chips .acap-chip.is-on { background: var(--navy); border-color: var(--navy); color: var(--white); }
.acap-count { margin: 28px 0 16px; color: var(--muted); }
.acap-count b { color: var(--ink); }
.acap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.acap-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.acap-card[hidden] { display: none; }
.acap-top { display: flex; gap: 14px; align-items: center; }
.acap-av { flex: 0 0 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-tint); color: var(--teal-deep); font: 800 17px var(--display); }
.acap-card:nth-child(3n+2) .acap-av { background: var(--orange-tint); color: var(--orange-deep); }
.acap-card:nth-child(3n) .acap-av { background: var(--plum-tint); color: var(--plum); }
.acap-card h3 { font-size: 18px; line-height: 1.25; }
.acap-role { font-size: 14px; color: var(--muted); margin-top: 2px; }
.acap-place { font-weight: 700; font-size: 15px; }
.acap-place span { font-weight: 400; color: var(--muted); }
.acap-meta { font-size: 14px; color: var(--ink-lede); }
.acap-exp { display: inline-block; background: var(--soft); border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: 13px; margin-right: 8px; }
.acap-focus { font-size: 14px; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.acap-focus:hover { -webkit-line-clamp: unset; }
.acap-contact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.acap-none { margin-top: 24px; padding: 20px 24px; background: var(--soft); border-radius: 16px; }
@media (max-width: 1000px) { .acap-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .acap-grid { grid-template-columns: 1fr; } .acap-tools { grid-template-columns: 1fr; } }

/* Notice bar with several messages taking turns */
.notice .notice-msg { margin: 0; }
.notice.is-rotating .wrap { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; }
.notice.is-rotating .notice-msg { grid-area: 1 / 1; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease, visibility .35s; }
.notice.is-rotating .notice-msg.is-on { opacity: 1; visibility: visible; transform: none; }
.notice.is-rotating .notice-msg[hidden] { display: none; }
.notice-nav { grid-area: 1 / 2; display: flex; gap: 2px; }
.notice-nav button { background: none; border: 0; color: rgba(255,255,255,.7); font: 700 18px/1 var(--body); width: 28px; height: 28px; border-radius: 8px; cursor: pointer; }
.notice-nav button:hover, .notice-nav button:focus-visible { color: var(--white); background: rgba(255,255,255,.12); }
@media (prefers-reduced-motion: reduce) { .notice.is-rotating .notice-msg { transition: none; transform: none; } }
.acap-photo { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.acap-online { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--teal-deep); }
.acap-online::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.acap-chips .acap-chip-online.is-on { background: var(--teal-deep); border-color: var(--teal-deep); }
.acap-update { margin-top: 28px; color: var(--muted); }

/* ACAP directory v2: calm cards (who, what, where, two tags), details in a panel, pages of 24 */
.acap-card { gap: 12px; padding: 20px; }
.acap-card .acap-role { font-size: 14px; }
.acap-card .acap-place { font-size: 15px; }
.acap-tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; margin: 0; }
.acap-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--soft); border-radius: 999px; padding: 3px 10px; font: 700 13px/1.4 var(--body); color: var(--ink-soft); }
.acap-tag.is-online { background: var(--teal-tint); color: var(--teal-deep); }
.acap-tag.is-online::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.acap-open { margin-top: auto; align-self: flex-start; }
.acap-grid { align-items: stretch; }

.acap-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 32px; }
.acap-pager button { min-width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--white); font: 700 15px var(--body); color: var(--ink); cursor: pointer; }
.acap-pager button:hover:not(:disabled) { border-color: var(--navy); }
.acap-pager button.is-on { background: var(--navy); border-color: var(--navy); color: var(--white); }
.acap-pager button:disabled { opacity: .35; cursor: default; }
.acap-pager span { color: var(--muted); padding: 0 4px; }

.acap-dialog { border: 0; border-radius: 24px; padding: 32px; width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 48px); box-shadow: var(--shadow); color: var(--ink); }
.acap-dialog::backdrop { background: rgba(32, 32, 48, .45); }
.acap-dialog .acap-top { margin-bottom: 18px; }
.acap-dialog h2 { font-size: 24px; line-height: 1.2; }
.acap-dialog .acap-av, .acap-dialog .acap-photo { flex-basis: 64px; width: 64px; height: 64px; font-size: 20px; }
.acap-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--soft); font: 700 20px/1 var(--body); color: var(--ink); cursor: pointer; }
.acap-close:hover { background: var(--line); }
.acap-dl { display: grid; grid-template-columns: 110px 1fr; gap: 10px 16px; margin: 0; font-size: 15px; }
.acap-dl dt { font: 800 12px/1.6 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.acap-dl dd { margin: 0; color: var(--ink-soft); }
.acap-dl dd span { color: var(--muted); }
.acap-dialog .acap-contact { margin-top: 24px; padding-top: 0; }
@media (max-width: 520px) {
  .acap-dialog { padding: 24px 20px; border-radius: 20px; }
  .acap-dl { grid-template-columns: 1fr; gap: 2px; }
  .acap-dl dd { margin-bottom: 10px; }
  .acap-dialog .acap-contact .btn { flex: 1 1 100%; }
}

/* Popups (inc/popups.php): dialog.popup in the middle of the screen, .is-corner a box bottom right; .has-image puts a photo beside the text */
.popup { position: fixed; border: 0; padding: 0; border-radius: var(--radius-l); width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
.popup::backdrop { background: rgba(32, 32, 48, .55); }
.popup[open] { animation: popup-in .25s ease-out; }
.popup[open]::backdrop { animation: popup-fade .25s ease-out; }
@keyframes popup-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes popup-fade { from { opacity: 0; } }
.popup.has-image { width: min(880px, calc(100% - 32px)); }
.popup-inner { display: grid; min-height: 100%; }
.popup.has-image .popup-inner { grid-template-columns: 5fr 6fr; }
.popup-media { margin: 0; }
.popup-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.popup .popup-body { padding: 44px 40px 40px; align-self: stretch; display: flex; flex-direction: column; justify-content: center; color: var(--ink); }
.popup-body > * { margin: 0; }
.popup-body > * + * { margin-top: 14px; }
.popup-body > .kicker + h2 { margin-top: 12px; }
.popup-body h2 { font-size: clamp(26px, 3vw, 34px); padding-right: 32px; }
.popup-body p:not(.kicker) { color: var(--ink-soft); }
.popup-body > .actions, .popup-body > .news, .popup-body > .wp-block-avaz-buy { margin-top: 24px; }
.popup-body .wp-block-image img { border-radius: var(--radius-m); }
.popup-close { position: absolute; top: 14px; right: 14px; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--white); color: var(--navy); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.popup-close:hover { background: var(--soft); }
.popup-close:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.popup.is-corner { inset: auto 24px 24px auto; margin: 0; width: min(400px, calc(100% - 32px)); z-index: 60; }
.popup.is-corner .popup-body { padding: 28px 24px 24px; }
.popup.is-corner .popup-body h2 { font-size: 22px; }
.popup.is-corner .popup-body > .actions, .popup.is-corner .popup-body > .news { margin-top: 18px; }
@media (max-width: 640px) {
  .popup.has-image .popup-inner { grid-template-columns: 1fr; }
  .popup-media img { height: 190px; }
  .popup .popup-body { padding: 32px 22px 24px; }
  .popup-body .actions .wp-block-button { flex: 1 1 100%; }
  .popup-body .actions .wp-block-button__link { width: 100%; }
  .popup.is-corner { inset: auto 16px 16px 16px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { .popup[open], .popup[open]::backdrop { animation: none; } }

/* "Follow Avaz" band (inc/social.php) */
.social-band { background: var(--soft); }
.social-band .row-head { margin-bottom: 24px; }
.social-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.social-link { display: flex; align-items: center; gap: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; text-decoration: none; color: var(--ink); transition: border-color .15s ease, transform .15s ease; }
.social-link:hover { border-color: var(--navy); transform: translateY(-1px); }
.social-link b { display: block; font: 800 16px/1.2 var(--display); }
.social-link span span { display: block; font-size: 14px; color: var(--muted); }
.social-ic { flex: 0 0 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--plum-tint); color: var(--plum); }
.social-link:nth-child(2) .social-ic { background: var(--teal-tint); color: var(--teal-deep); }
.social-link:nth-child(3) .social-ic { background: var(--orange-tint); color: var(--orange-deep); }
.social-feed { margin-top: 28px; }
/* Smash Balloon's grid, drawn like Avaz cards */
.social-feed #sb_instagram { padding: 0 !important; }
.social-feed #sb_instagram #sbi_images { padding: 0 !important; gap: 12px; }
.social-feed #sb_instagram .sbi_item { padding: 0 !important; }
.social-feed #sb_instagram .sbi_photo_wrap, .social-feed #sb_instagram .sbi_photo { border-radius: 16px; overflow: hidden; }
.social-feed #sb_instagram .sbi_photo img { transition: transform .3s ease; }
.social-feed #sb_instagram .sbi_photo:hover img { transform: scale(1.03); }
@media (max-width: 760px) { .social-links { grid-template-columns: 1fr; } }
.acap-tag.is-lang { background: var(--plum-tint); color: var(--plum); }

/* ACAP filters: one row of labelled controls */
.acap-tools { grid-template-columns: 1fr; gap: 14px; }
.acap-filters { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.acap-filters:not(:has([data-acap-lang])) { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; }
.acap-field { display: grid; gap: 6px; }
.acap-field > label { font: 800 12px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.acap-field select { width: 100%; font: 16px var(--body); color: var(--ink); border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 14px; background: var(--white); }
.acap-field select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(16, 176, 192, .18); }
.acap-switch { display: inline-flex; align-items: center; gap: 10px; height: 50px; cursor: pointer; font: 700 15px var(--body); white-space: nowrap; }
.acap-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.acap-switch-ui { width: 44px; height: 26px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s ease; flex: none; }
.acap-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(32, 32, 48, .3); transition: transform .15s ease; }
.acap-switch input:checked + .acap-switch-ui { background: var(--teal-deep); }
.acap-switch input:checked + .acap-switch-ui::after { transform: translateX(18px); }
.acap-switch input:focus-visible + .acap-switch-ui { box-shadow: 0 0 0 4px rgba(16, 176, 192, .25); }
@media (max-width: 900px) {
  .acap-filters, .acap-filters:not(:has([data-acap-lang])) { grid-template-columns: 1fr 1fr; }
  .acap-where { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .acap-filters, .acap-filters:not(:has([data-acap-lang])) { grid-template-columns: 1fr; }
  .acap-switch { height: auto; }
}
.acap-dl dd p + p { margin-top: 6px; }
.acap-dl dd ul { margin: 0; padding-left: 1.1em; display: grid; gap: 3px; }
.acap-dl dd li::marker { color: var(--teal-deep); }

/* Icons (inc/icons.php, tools/icons.py): real icons in link cards and the Follow Avaz band */
.avaz-icon { display: block; flex: none; }
.ic { display: grid; place-items: center; color: var(--ink); }
.ic .avaz-icon { width: 24px; height: 24px; }
.ic.bg-teal-tint, .ic[style*="teal-tint"] { color: var(--teal-deep); }
.ic.bg-orange-tint, .ic[style*="orange-tint"] { color: var(--orange-deep); }
.ic.bg-plum-tint, .ic[style*="plum-tint"] { color: var(--plum); }
.ic.bg-green-tint, .ic[style*="green-tint"] { color: var(--after-ink); }
.brand-facebook { color: var(--brand-facebook); }
.brand-telegram { color: var(--brand-telegram); }
.brand-whatsapp { color: var(--brand-whatsapp); }
.brand-youtube { color: var(--brand-youtube); }
.social-ic { background: var(--soft) !important; }

/* Resource library (Download resources page): a pinned filter bar (search, categories, language) and cards
   with a preview of each file. Sections are .rlib-section with the category as id; wp.js does the filtering. */
.rlib-bar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 71px); z-index: 10; background: rgba(255,255,255,.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.rlib-bar .wrap { padding-block: 14px; }
.rlib-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; }
.rlib-search input, .rlib-lang select { width: 100%; font: 16px var(--body); color: var(--ink); border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 14px; background: var(--white); }
.rlib-search input { padding-left: 42px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%235C5F70' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") 15px 50% no-repeat; }
.rlib-search input:focus, .rlib-lang select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(16, 176, 192, .18); }
.rlib-lang select { width: auto; min-width: 170px; }
.rlib-chips { grid-column: 1 / -1; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.rlib-chips::-webkit-scrollbar { display: none; }
.rlib-chip { flex: none; border: 1.5px solid var(--line); background: var(--white); border-radius: 999px; padding: 8px 14px; font: 700 14px var(--body); color: var(--ink); cursor: pointer; white-space: nowrap; }
.rlib-chip:hover { border-color: var(--navy); }
.rlib-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.rlib-chip span { font-weight: 400; opacity: .7; margin-left: 4px; }
.rlib-count { margin: 0; font-size: 14px; color: var(--muted); }
.rlib-section[hidden], .rlib-group[hidden], .rcard[hidden] { display: none; }
.rlib-group + .rlib-group { margin-top: 36px; }
.rlib-sub { font-size: 20px; margin-bottom: 14px; }
.rlib-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rcard { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.rcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.rcard-thumb { aspect-ratio: 4 / 3; background: var(--soft); display: grid; place-items: center; padding: 14px; border-bottom: 1px solid var(--line); }
.rcard-thumb img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 6px 16px -8px rgba(32, 32, 48, .35); background: var(--white); }
.rcard-thumb.is-icon .avaz-icon { width: 40px; height: 40px; }
.rcard-thumb.bg-teal-tint { color: var(--teal-deep); }
.rcard-thumb.bg-orange-tint { color: var(--orange-deep); }
.rcard-thumb.bg-plum-tint { color: var(--plum); }
.rcard-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.rcard h3 { font-size: 17px; line-height: 1.25; }
.rcard-meta { font-size: 14px; color: var(--muted); }
.rcard .go { margin-top: auto; padding-top: 8px; font: 800 15px/1 var(--display); color: var(--teal-deep); }
.rlib-none { padding: 24px; background: var(--soft); border-radius: 16px; }
@media (max-width: 1100px) { .rlib-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .rlib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .rcard h3 { font-size: 15px; }
  .rcard-body { padding: 12px; }
  .rcard-meta { font-size: 13px; }
}
@media (max-width: 520px) {
  .rlib-controls { grid-template-columns: 1fr; }
  .rlib-lang select { width: 100%; }
}
.admin-bar .rlib-bar { top: calc(env(safe-area-inset-top, 0px) + 103px); }
.rlib-section { scroll-margin-top: 200px; }
.rlib-count { grid-column: 1 / -1; }
.rlib-none { margin-block: 32px; }
/* Phones and short screens: the bar would cover half the screen, so it scrolls with the page instead. */
@media (max-width: 760px), (orientation: landscape) and (max-height: 500px) { .rlib-bar, .admin-bar .rlib-bar { position: relative; top: 0; } .rlib-section { scroll-margin-top: 90px; } }
