/*
 * ASAE Advocacy Updates — public styles.
 *
 * Copied from the Newsroom (Updates from the CEO) stylesheet with the
 * asae-au- prefix swapped for asae-au-, so both series look identical.
 * Surfaces: single advocacy_update (body.asae-au-streamlined), the
 * [asae_advocacy_updates] listing, the members-only callout and pills,
 * and the shared footer.
 */

/* "← Return to Advocacy Updates" link rendered at the bottom of
 * the_content via the_content filter at priority 25 (after the
 * boilerplate at priority 20). Set off from the About ASAE block
 * above with a top border so it reads as end-of-release navigation
 * rather than part of the boilerplate. */
.asae-au-back-link {
	margin: 1.5em 0 0;
	padding-top: 1em;
	border-top: 1px solid var(--asae-border-subtle, #dddddd);
	font-size: 0.95em;
}
.asae-au-back-link a {
	/* Inherit theme's link color rather than forcing one — keeps the
	 * end-of-release nav consistent with how the theme styles links
	 * elsewhere. */
	text-decoration: none;
}
.asae-au-back-link a:hover,
.asae-au-back-link a:focus {
	text-decoration: underline;
}

/* Stale-content warning box — pale yellow, shown when a release is
 * more than 1 year old. Sits between the back link and the title. */
.asae-au-stale-warning {
	margin: 0 0 1em;
	padding: 0.75em 1.25em;
	background: #fcf8e3;
	border-left: 4px solid #f0ad4e;
	border-radius: 0 var(--asae-radius, 3px) var(--asae-radius, 3px) 0;
	color: var(--nv-text-color, #2b2b2b);
	font-size: 0.95em;
}
.asae-au-stale-warning strong {
	font-weight: 700;
}

/* Publish date — prepended to the_content as a labeled <time>. Renders
 * just below the theme's page title, looking like article subhead. */
.asae-au-publish-date {
	margin: -0.4em 0 1.2em;
	color: var(--asae-text-muted, #595959);
	font-style: italic;
	font-size: 0.95em;
}
.asae-au-publish-date time {
	display: inline;
}

/* Theme chrome cleanup — fired on the body.asae-au-streamlined class
 * added by ASAE_NR_Content::add_streamlined_body_class().
 *
 * The Neve theme renders a "post cover" block (.nv-post-cover) above
 * page.php's content area for any single-post-shaped view, regardless
 * of which template_include returns. The block contains a duplicated
 * breadcrumb + H1 PLUS author byline + date — all unwanted on a press
 * release. page.php's own .nv-page-title-wrap renders the breadcrumb
 * + title cleanly without the author/date, which is what we want, so
 * we hide the cover block here.
 *
 * The sidebar (.nv-sidebar-wrap) is also unwanted; we hide it and
 * expand .nv-single-page-wrap to full width so content fills the row.
 *
 * Selectors are scoped under body.asae-au-streamlined so these rules
 * never affect other pages on the site. !important is necessary
 * because Neve's inline customizer-driven styles use the cascade we
 * have to win against. */
body.asae-au-streamlined .nv-post-cover,
body.asae-au-streamlined .nv-sidebar-wrap {
	display: none !important;
}
body.asae-au-streamlined .neve-main > .container > .row > .col,
body.asae-au-streamlined .neve-main > .container-fluid > .row > .col {
	max-width: 100% !important;
	flex: 0 0 100% !important;
	width: 100% !important;
}

/* The stale warning is echoed by loop_start, which fires inside
 * the_post(). Neve renders .nv-page-title-wrap from OUTSIDE the loop,
 * so the warning lands AFTER the title-wrap in DOM order. Make
 * .nv-single-page-wrap.col a flex column and assign orders so the
 * visual sequence becomes:
 *   1. .nv-page-title-wrap    → order 1 (breadcrumb + title)
 *   2. stale warning (if any) → order 2 (between title and content)
 *   3. .nv-content-wrap       → order 3 (date, body, boilerplate,
 *                                       bottom back link inside)
 * The bottom back link lives inside .nv-content-wrap so its position
 * is untouched by these orders (it's not a direct child of the flex
 * container). */
body.asae-au-streamlined .nv-single-page-wrap.col {
	display: flex !important;
	flex-direction: column !important;
}
body.asae-au-streamlined .nv-single-page-wrap.col > .nv-page-title-wrap {
	order: 1;
}
body.asae-au-streamlined .nv-single-page-wrap.col > .asae-au-stale-warning {
	order: 2;
}
body.asae-au-streamlined .nv-single-page-wrap.col > .nv-content-wrap {
	order: 3;
}
/* Title alignment matches body Pages (left), not Neve's wide-screen
 * default which centers .nv-page-title-wrap. */
body.asae-au-streamlined .nv-page-title-wrap,
body.asae-au-streamlined .nv-page-title,
body.asae-au-streamlined .nv-page-title-wrap .neve-breadcrumbs-wrapper,
body.asae-au-streamlined .nv-page-title-wrap h1 {
	--textalign: left;
	text-align: left;
}

/* ── Listing shortcode ──────────────────────────────────────────────── */

.asae-au-list {
	color: var(--nv-text-color, #2b2b2b);
	font-size: 16px;
	line-height: 1.5;
}

/* Focus rings: only on genuinely interactive elements. Defensive scoping
 * so themes that focus-style their landmark regions don't outline the
 * entire widget. */
.asae-au-list a:focus-visible,
.asae-au-list button:focus-visible,
.asae-au-list input:focus-visible,
.asae-au-list select:focus-visible {
	outline: 3px solid var(--nv-primary-accent, #bd491e);
	outline-offset: 2px;
}
.asae-au-list:focus,
.asae-au-list:focus-visible,
.asae-au-list:focus-within,
.asae-au-list[tabindex]:focus,
.asae-au-list[tabindex]:focus-visible,
.asae-au-search:focus,
.asae-au-search:focus-visible,
.asae-au-search:focus-within,
.asae-au-search[tabindex]:focus,
.asae-au-search[tabindex]:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}

/* Search form */
.asae-au-search {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.75em 1em;
	margin-bottom: 0.75em;
}
.asae-au-search-field {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
	flex: 1 1 240px;
	min-width: 160px;
}
/* Search-text input gets more room than the scope toggle */
.asae-au-search-text {
	flex: 1 1 320px;
}

/* Search scope toggle — radio pair "Title only" / "Search all text". */
.asae-au-search-scope {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em 1em;
	margin: 0;
	padding: 0;
	border: 0;
	flex: 0 1 auto;
}
.asae-au-search-scope label {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-size: 0.95em;
	cursor: pointer;
}
.asae-au-search-scope input[type="radio"] {
	margin: 0;
}

/* Year navigation — clickable list, "All" first, then years newest-first. */
.asae-au-years {
	margin: 0 0 1em;
}
.asae-au-years ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25em 0.4em;
	list-style: none;
	margin: 0;
	padding: 0;
	align-items: center;
}
.asae-au-years a,
.asae-au-years span {
	display: inline-block;
	padding: 0.25em 0.7em;
	border: 1px solid var(--asae-border-subtle, #dddddd);
	border-radius: var(--asae-radius-sm, 2px);
	color: var(--nv-primary-accent, #bd491e);
	background: var(--nv-site-bg, #fff);
	text-decoration: none;
	font-size: 0.95em;
	min-width: 3em;
	text-align: center;
}
.asae-au-years a:hover,
.asae-au-years a:focus {
	border-color: var(--nv-primary-accent, #bd491e);
	filter: brightness(0.95);
}
.asae-au-years .is-current span {
	background: var(--nv-primary-accent, #bd491e);
	border-color: var(--nv-primary-accent, #bd491e);
	color: #fff;
	font-weight: 600;
}
.asae-au-search-field label {
	font-weight: 600;
	font-size: 0.95em;
}
.asae-au-search input[type="search"],
.asae-au-search select {
	min-height: 2.4em;
	padding: 0.3em 0.6em;
	border: 1px solid var(--asae-border-control, #767676);
	border-radius: var(--asae-radius-sm, 2px);
	font: inherit;
	background: var(--nv-site-bg, #fff);
}
.asae-au-search-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6em;
}
.asae-au-search-submit {
	padding: 0.4em 1em;
	border: 1px solid var(--nv-primary-accent, #bd491e);
	background: var(--nv-primary-accent, #bd491e);
	color: #fff;
	border-radius: var(--asae-radius-sm, 2px);
	cursor: pointer;
	font: inherit;
}
.asae-au-search-submit:hover,
.asae-au-search-submit:focus {
	/* Theme-agnostic darken — works for whatever color the brand
	 * variable resolves to.
	 *
	 * Uses a translucent black layer rather than `filter: brightness()`: a
	 * filter applies to everything the element paints, including its own white
	 * label, so it greyed the text while darkening the button and lowered
	 * contrast instead of raising it. */
	background-image: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15));
}
.asae-au-search-clear {
	/* Inherit theme link color. */
	text-decoration: underline;
}

/* Results summary line */
.asae-au-results-summary {
	margin: 0.5em 0 0.75em;
	font-style: italic;
	color: var(--asae-text-muted, #595959);
}

/* Empty state */
.asae-au-empty {
	padding: 1em 1.25em;
	background: var(--asae-surface, #f7f7f7);
	border: 1px solid var(--asae-border-subtle, #dddddd);
	border-radius: var(--asae-radius, 3px);
	font-style: italic;
}

/* List of release cards */
.asae-au-items {
	list-style: none;
	margin: 0 0 1em;
	padding: 0;
}
.asae-au-item {
	padding: 1em 0;
	border-bottom: 1px solid var(--asae-border-subtle, #dddddd);
}
.asae-au-item:first-child {
	border-top: 1px solid var(--asae-border-subtle, #dddddd);
}
.asae-au-item-title {
	margin: 0 0 0.25em;
	font-size: 1.15em;
	font-weight: 600;
	line-height: 1.3;
}
.asae-au-item-title a {
	/* Inherit theme link color so card titles match the rest of
	 * the site's link styling. */
	text-decoration: none;
}
.asae-au-item-title a:hover,
.asae-au-item-title a:focus {
	text-decoration: underline;
}
.asae-au-item-meta {
	margin: 0 0 0.5em;
	font-size: 0.9em;
	color: var(--asae-text-muted, #595959);
}
.asae-au-item-excerpt {
	margin: 0;
}

/* Pagination — same visual language as the CAE Roster shortcode */
.asae-au-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25em;
	list-style: none;
	margin: 1em 0;
	padding: 0;
	align-items: center;
}
.asae-au-pagination a,
.asae-au-pagination span {
	display: inline-block;
	padding: 0.3em 0.7em;
	border: 1px solid var(--asae-border-subtle, #dddddd);
	border-radius: var(--asae-radius-sm, 2px);
	color: var(--nv-primary-accent, #bd491e);
	background: var(--nv-site-bg, #fff);
	text-decoration: none;
	min-width: 2.4em;
	text-align: center;
}
.asae-au-pagination a:hover,
.asae-au-pagination a:focus {
	border-color: var(--nv-primary-accent, #bd491e);
	filter: brightness(0.95);
}
.asae-au-pagination .is-current span {
	background: var(--nv-primary-accent, #bd491e);
	border-color: var(--nv-primary-accent, #bd491e);
	color: #fff;
	font-weight: 600;
}
.asae-au-pagination .is-disabled span {
	color: #a7aaad;
	background: var(--asae-surface, #f7f7f7);
	border-color: var(--asae-border-subtle, #dddddd);
	cursor: not-allowed;
}
.asae-au-pagination .is-ellipsis span {
	border: none;
	background: transparent;
	padding: 0.3em 0.2em;
	color: var(--asae-text-muted, #595959);
}

/* Stack form vertically below 720px so 240-min flex children don't
 * wrap weirdly on phones. */
@media (max-width: 720px) {
	.asae-au-search {
		flex-direction: column;
		align-items: stretch;
	}
	.asae-au-search-field {
		flex: 1 1 auto;
	}
}

/* ── Members-only callout and listing pills ──────────────────────────
 * Pill states and contrast mirror the AN / Content Partnership lock chips:
 * locked is filled and assertive, unlocked outlined and quiet, and the
 * shackle glyph differs too, so state never rests on colour alone. */
.asae-au-item-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35em 0.75em;
}
.asae-au-lock-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	padding: 0.12em 0.6em;
	border-radius: 999px;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
}
.asae-au-lock__glyph {
	flex: 0 0 auto;
	width: 1.15em;
	height: 1.15em;
}
/* #fff on #2c3338 = 12.6:1. */
.asae-au-lock-chip--locked {
	background: #2c3338;
	color: #fff;
}
/* Ink on white = 15:1; the 3.05:1 ring carries the boundary (1.4.11). */
.asae-au-lock-chip--unlocked {
	background: transparent;
	color: #1d2327;
	box-shadow: inset 0 0 0 1px #8c8f94;
}

.asae-au-teaser {
	margin-bottom: 1.5em;
}
.asae-au-memberwall {
	margin: 2em 0;
	padding: 1.75em 1.25em;
	border: 1px solid var(--asae-border-subtle, #dddddd);
	border-radius: var(--asae-radius-md, 8px);
	text-align: center;
}
.asae-au-memberwall h2 {
	margin-top: 0;
}
.asae-au-memberwall__lock {
	display: inline-block;
	margin-right: 0.35em;
	vertical-align: -0.1em;
}
.asae-au-memberwall__lock .asae-au-lock__glyph {
	width: 0.9em;
	height: 0.9em;
}
.asae-au-memberwall .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75em;
}

/* ── Shared footer (synced pattern) ───────────────────────────────────── */
.asae-au-footer {
	display: block;
	margin: 2.5em 0 0;
	padding-top: 1.5em;
	border-top: 1px solid var(--asae-border-subtle, #dddddd);
}
.asae-au-footer > :first-child {
	margin-top: 0;
}
