/* WP Official News Hub — frontend styles.
 *
 * Design intent (v0.1.4): blend with the host theme. Inherit color, font
 * size, and font weight from the theme wherever possible. Use light
 * borders, modest accents, and no heavy opinionated buttons. All classes
 * are .ntoh- prefixed so we never collide with theme rules.
 */

.ntoh-list {
	margin: 1.25em 0;
	width: 100%;
	max-width: 100%;
}

.ntoh-empty {
	padding: .85em 1em;
	border: 1px dashed currentColor;
	border-color: rgba(0,0,0,.18);
	color: inherit;
	opacity: .75;
	border-radius: 3px;
	background: transparent;
	font-size: inherit;
}

/* --- Compact layout --- */
.ntoh-compact-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ntoh-compact-item {
	padding: .5em 0;
	border-bottom: 1px solid rgba(0,0,0,.08);
	line-height: 1.55;
	color: inherit;
}
.ntoh-compact-item:last-child { border-bottom: 0; }
.ntoh-compact-item .ntoh-date {
	font-variant-numeric: tabular-nums;
	opacity: .7;
	margin-right: .35em;
}
.ntoh-compact-item .ntoh-source {
	opacity: .85;
	margin-right: .35em;
}
.ntoh-compact-item .ntoh-title { font-weight: 600; }
.ntoh-compact-item .ntoh-excerpt { opacity: .8; }

/* --- List layout (v0.1.5, recommended) ---
 * Single column. Each entry is a self-contained vertical row that flows
 * naturally inside the host theme's content column. Same restraint as
 * the cards layout — no opinionated borders, no heavy headings, no
 * card chrome. */
.ntoh-list-items {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ntoh-list-item {
	padding: 1em 1.05em;
	border: 1px solid rgba(0,0,0,.10);
	border-radius: 6px;
	background: transparent;
	color: inherit;
	margin: 0 0 .85em;
}
.ntoh-list-item:last-child { margin-bottom: 0; }
.ntoh-list-item__badges {
	margin: 0 0 .35em;
	line-height: 1;
}
.ntoh-list-item__heading {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .3em .5em;
	margin: 0 0 .25em;
}
.ntoh-list-item__title {
	margin: 0;
	font-size: inherit;
	font-weight: 600;
	line-height: 1.45;
	color: inherit;
}
.ntoh-list-item__chips {
	display: inline-flex;
	flex-wrap: wrap;
	gap: .25em;
	align-items: center;
}
.ntoh-list-item__meta {
	display: flex;
	flex-wrap: wrap;
	gap: .15em .85em;
	font-size: .9em;
	opacity: .75;
	margin: 0 0 .45em;
}
.ntoh-list-item__meta-label {
	opacity: .75;
	margin-right: .15em;
}
.ntoh-list-item__excerpt {
	margin: 0 0 .65em;
	opacity: .9;
	font-size: inherit;
}
.ntoh-list-item__actions { margin: 0; }

/* --- Cards layout --- */
.ntoh-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1em;
}
.ntoh-card {
	border: 1px solid rgba(0,0,0,.1);
	border-radius: 4px;
	padding: 1em 1.1em;
	background: transparent;
	color: inherit;
	display: flex;
	flex-direction: column;
}
.ntoh-card-header { margin-bottom: .4em; }

/* Badges sit in their own block-level row above the title. Hidden entirely
 * by markup when show_importance="0" and the post isn't pinned. */
.ntoh-card-badges {
	display: block;
	margin: 0 0 .35em;
	line-height: 1;
}

/* The card title takes the theme's h3-level styling — only weight is set
 * so it remains readable as a heading without overriding the theme's font
 * size or color. */
.ntoh-card-title {
	margin: 0;
	font-size: inherit;
	font-weight: 600;
	line-height: 1.4;
	color: inherit;
}

.ntoh-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: .25em .9em;
	font-size: .9em;
	opacity: .75;
	margin: .35em 0 .65em;
}
.ntoh-card-meta .ntoh-meta-label { opacity: .75; margin-right: .15em; }
.ntoh-card-excerpt {
	margin: 0 0 .85em;
	opacity: .9;
	font-size: inherit;
}
.ntoh-card-actions { margin: auto 0 0; }

/* --- Badges (importance + pin) ---
 * Kept subtle so they read as a small label, not a callout. */
.ntoh-badge {
	display: inline-block;
	font-size: .72em;
	font-weight: 600;
	letter-spacing: 0;
	padding: .12em .55em;
	border-radius: 999px;
	line-height: 1.5;
	background: rgba(0,0,0,.07);
	color: inherit;
	vertical-align: middle;
}
.ntoh-badge-normal { background: rgba(0,0,0,.07); }
.ntoh-badge-important {
	background: rgba(214, 153, 0, .14);
	color: #6b4a00;
}
.ntoh-badge-urgent {
	background: rgba(214, 54, 56, .14);
	color: #8a1f21;
}
.ntoh-pin {
	display: inline-block;
	font-size: .72em;
	font-weight: 600;
	padding: .12em .5em;
	border-radius: 999px;
	background: rgba(0,0,0,.05);
	color: inherit;
	margin-left: .35em;
	vertical-align: middle;
	opacity: .8;
}
.ntoh-category-chip {
	display: inline-block;
	font-size: .72em;
	font-weight: 600;
	letter-spacing: 0;
	padding: .12em .55em;
	border: 1px solid rgba(0,0,0,.12);
	border-radius: 999px;
	line-height: 1.5;
	background: transparent;
	color: inherit;
	vertical-align: middle;
}

/* --- CTA button ---
 * Light outline-style button that inherits the theme's text color. Falls
 * back to a neutral fill on hover so it still feels clickable in pale
 * themes. */
.ntoh-btn {
	display: inline-block;
	padding: .42em .95em;
	border: 1px solid rgba(0,0,0,.18);
	border-radius: 4px;
	background: rgba(0,0,0,.03);
	color: inherit;
	text-decoration: none !important;
	font-size: inherit;
	line-height: 1.3;
}
.ntoh-btn:hover,
.ntoh-btn:focus {
	background: rgba(0,0,0,.06);
	color: inherit;
}
.ntoh-btn-compact {
	padding: .1em .55em;
	font-size: .85em;
	margin-left: .35em;
}

/* --- Grouped layout (one section per taxonomy term) --- */
.ntoh-groups { margin: 1.25em 0; }
.ntoh-group { margin: 0 0 2em; }
.ntoh-group:last-child { margin-bottom: 0; }
.ntoh-group-heading {
	margin: 0 0 .65em;
	padding: 0 0 .25em;
	border-bottom: 1px solid rgba(0,0,0,.12);
	font-size: inherit;
	font-weight: 600;
	line-height: 1.4;
	color: inherit;
}

/* --- Single-post CTA (below the_content) --- */
.ntoh-single-cta {
	margin: 1.5em 0 0;
	padding: 1em 0 0;
	border-top: 1px solid rgba(0,0,0,.08);
}
.ntoh-btn-single {
	padding: .55em 1.1em;
}

/* --- Single CPT page: hide theme's post-date markup ---
 * Scoped to body.single-nt_official_news so regular posts and pages are
 * never affected. Targets the common selectors used by classic and
 * block-based themes. The PHP-side filter on the_date / get_the_date is
 * the primary mechanism; this is a fallback for themes that hard-code
 * markup around the date element. */
body.single-nt_official_news .entry-date,
body.single-nt_official_news .posted-on,
body.single-nt_official_news .post-date,
body.single-nt_official_news .entry-meta .date,
body.single-nt_official_news time.published,
body.single-nt_official_news time.entry-date,
body.single-nt_official_news .wp-block-post-date {
	display: none !important;
}

/* --- Responsive --- */
@media (max-width: 600px) {
	.ntoh-cards { grid-template-columns: 1fr; }
	.ntoh-compact-item { font-size: inherit; }
}
