/* Ultimate Newswire Pro Max — public Newsroom "Featured grid".
   Loaded after public.css; reuses its design tokens (--unpm-line, --unpm-text,
   --unpm-muted, --unpm-accent) and the shared .unpm-btn button class. */

.unpm-newsroom {
	max-width: 1100px;
	margin: 0 auto;
	color: var(--unpm-text);
	font-size: 15px;
}

/* The shortcode supplies its own hero heading just above the search bar, so
   hide the theme's duplicate page title. This stylesheet only loads on the
   newsroom page, so the rule is scoped to it. */
.wp-block-post-title,
.entry-header .entry-title,
h1.entry-title {
	display: none;
}

/* ---- Hero search band ---------------------------------------------------- */
.unpm-news-hero {
	text-align: center;
	padding: 8px 16px 14px;
}

.unpm-news-title {
	margin: 0 0 14px;
	font-size: 2.2rem;
	line-height: 1.12;
	color: var(--unpm-text);
}

.unpm-news-search-wrap {
	display: flex;
	justify-content: center;
}

.unpm-news-search {
	width: 100%;
	max-width: 560px;
	box-sizing: border-box;
	padding: 13px 18px;
	border: 1px solid var(--unpm-line);
	border-radius: 999px;
	background: #fff;
	font-size: 15px;
	color: var(--unpm-text);
	box-shadow: 0 1px 2px rgba( 16, 24, 40, 0.04 );
}

.unpm-news-search::placeholder {
	color: var(--unpm-muted);
}

.unpm-news-search:focus {
	outline: none;
	border-color: var(--unpm-accent);
	box-shadow: 0 0 0 3px rgba( 37, 99, 235, 0.15 );
}

/* ---- Filter bar ---------------------------------------------------------- */
.unpm-news-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 24px;
	padding: 0 4px;
}

.unpm-news-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex: 1 1 auto;
}

/* Category pills: label-wrapped checkbox styled as a toggle button. The input
   is visually hidden; :has(input:checked) fills the pill on modern browsers. */
.unpm-news-pill {
	display: inline-flex;
	align-items: center;
	padding: 7px 14px;
	border: 1px solid var(--unpm-line);
	border-radius: 999px;
	background: #fff;
	font-size: 13px;
	line-height: 1.2;
	color: var(--unpm-text);
	cursor: pointer;
	user-select: none;
	transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.unpm-news-pill input[type="checkbox"] {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
	white-space: nowrap;
	border: 0;
}

.unpm-news-pill:hover {
	border-color: var(--unpm-accent);
}

.unpm-news-pill:has( input:checked ) {
	border-color: var(--unpm-accent);
	background: var(--unpm-accent);
	color: #fff;
	font-weight: 600;
}

.unpm-news-pill:focus-within {
	outline: 2px solid var(--unpm-accent);
	outline-offset: 2px;
}

/* Facet dropdowns (Industry / Region) — same approach as the marketplace. */
.unpm-news-facet {
	position: relative;
	flex: 0 0 auto;
}

.unpm-news-facet-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border: 1px solid var(--unpm-line);
	border-radius: 8px;
	background: #fff;
	font-size: 14px;
	line-height: 1.2;
	color: var(--unpm-text);
	cursor: pointer;
	white-space: nowrap;
	list-style: none;
	user-select: none;
}

.unpm-news-facet-btn::-webkit-details-marker {
	display: none;
}
.unpm-news-facet-btn::marker {
	content: "";
}

.unpm-news-facet-btn:hover {
	border-color: var(--unpm-accent);
}

.unpm-news-facet-btn:focus-visible {
	outline: 2px solid var(--unpm-accent);
	outline-offset: 1px;
}

/* Highlight the facet button when it holds active selections. */
.unpm-news-facet:has( input:checked ) .unpm-news-facet-btn {
	border-color: var(--unpm-accent);
	background: #eef2ff;
	color: var(--unpm-accent);
	font-weight: 600;
}

.unpm-news-facet-caret {
	font-size: 11px;
	color: var(--unpm-muted);
	transition: transform 0.15s ease;
}
.unpm-news-facet[open] .unpm-news-facet-caret {
	transform: rotate( 180deg );
}

.unpm-news-facet-panel {
	position: absolute;
	z-index: 20;
	top: calc( 100% + 6px );
	left: 0;
	min-width: 200px;
	max-width: 280px;
	max-height: 300px;
	overflow-y: auto;
	padding: 8px;
	background: #fff;
	border: 1px solid var(--unpm-line);
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba( 29, 36, 51, 0.12 );
}

.unpm-news-facet-opt {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 7px 10px;
	border-radius: 8px;
	font-size: 14px;
	color: var(--unpm-text);
	cursor: pointer;
}
.unpm-news-facet-opt:hover {
	background: #f3f5f9;
}
.unpm-news-facet-opt input[type="checkbox"] {
	margin: 0;
	flex: 0 0 auto;
}
.unpm-news-facet-opt span {
	flex: 1 1 auto;
}

/* ---- Card grid ----------------------------------------------------------- */
.unpm-news-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 280px, 1fr ) );
	gap: 18px;
}

.unpm-news-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--unpm-line);
	border-radius: 12px;
	padding: 16px;
	transition: box-shadow 0.14s, transform 0.14s, border-color 0.14s;
}

.unpm-news-card:hover {
	border-color: #c2cde4;
	box-shadow: 0 8px 22px rgba( 16, 24, 40, 0.09 );
	transform: translateY( -2px );
}

/* Featured cards span two columns on wide screens with a left accent border. */
.unpm-news-card--featured {
	grid-column: span 2;
	border-left: 4px solid var(--unpm-accent);
	padding: 22px 24px;
}

.unpm-news-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}

.unpm-news-chips {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
}

.unpm-news-chip {
	display: inline-block;
	background: #eef2ff;
	color: #3730a3;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 9px;
	border-radius: 999px;
}

.unpm-news-date {
	color: var(--unpm-muted);
	font-size: 12px;
	margin-left: auto;
}

.unpm-news-headline {
	margin: 0 0 8px;
	font-size: 17px;
	line-height: 1.3;
}
.unpm-news-headline a {
	color: var(--unpm-text);
	text-decoration: none;
}
.unpm-news-headline a:hover {
	color: var(--unpm-accent);
	text-decoration: underline;
}

.unpm-news-card--featured .unpm-news-headline {
	font-size: 22px;
	line-height: 1.22;
}

.unpm-news-excerpt {
	margin: 0 0 14px;
	color: var(--unpm-muted);
	font-size: 14px;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.unpm-news-card--featured .unpm-news-excerpt {
	-webkit-line-clamp: 4;
	line-clamp: 4;
}

.unpm-news-card-foot {
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid var(--unpm-line);
}

.unpm-news-source {
	color: var(--unpm-muted);
	font-size: 13px;
	font-weight: 600;
}

.unpm-news-empty {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--unpm-muted);
	font-size: 15px;
	padding: 40px 16px;
	margin: 0;
}

/* ---- Load more + loading state ------------------------------------------- */
#unpm-news-more {
	display: block;
	margin: 22px auto;
}
#unpm-news-more[hidden] {
	display: none;
}

.unpm-is-loading {
	opacity: 0.55;
	pointer-events: none;
}

/* ---- Responsive ---------------------------------------------------------- */
@media ( max-width: 640px ) {
	.unpm-news-card--featured {
		grid-column: span 1;
	}
}

@media ( max-width: 560px ) {
	.unpm-news-grid {
		grid-template-columns: 1fr;
	}
	.unpm-news-title {
		font-size: 1.8rem;
	}
	.unpm-news-facet {
		flex: 1 1 100%;
	}
	.unpm-news-facet-btn {
		width: 100%;
		justify-content: space-between;
	}
	.unpm-news-facet-panel {
		left: 0;
		right: 0;
		max-width: none;
	}
}
