/**
 * Style Pack Hub — permanent styles, no settings.
 * H2: green bar #00450E, white text.
 * H3: black text, 4px green (#00450E) bottom line.
 * Tables: full width, striped rows.
 * TOC: green border/title, collapsible.
 *
 * All selectors are scoped under body.wsph-styled so the styles
 * only apply to the posts the plugin is set to touch
 * (see Settings > Style Pack Hub — the Apply to option).
 */

/* H2: colored bar, centered text (like homepage) */
body.wsph-styled .entry-content h2,
body.wsph-styled .wp-block-post-content h2 {
	text-align: center;
	background-color: #00450E;
	color: #ffffff;
	font-size: 1.5rem;
	padding: 8px 14px;
}

/* H3: black centered text with a permanent 4px green bottom line. */
body.wsph-styled .entry-content h3,
body.wsph-styled .wp-block-post-content h3 {
	text-align: center;
	color: #000000;
	font-size: 1.25rem;
	padding: 6px 10px;
	border-bottom: 4px solid #00450E;
}

/* Tables: full width, small font, bordered cells (like homepage) */
body.wsph-styled .entry-content table,
body.wsph-styled .wp-block-post-content table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.875em;
	table-layout: auto !important; /* keeps "Fixed width table cells" OFF */
}

body.wsph-styled .entry-content table td,
body.wsph-styled .entry-content table th,
body.wsph-styled .wp-block-post-content table td,
body.wsph-styled .wp-block-post-content table th {
	border: 1px solid #ddd;
	padding: 0.5em;
	text-align: left;
}

/* Striped rows: every odd row light grey (like homepage) */
body.wsph-styled .entry-content table tbody tr:nth-child(odd),
body.wsph-styled .wp-block-post-content table tbody tr:nth-child(odd) {
	background-color: #f0f0f0;
}

/* Table of Contents (auto-generated) */
body.wsph-styled .wsph-toc {
	border: 2px solid #00450E;
	border-radius: 8px;
	padding: 18px 22px;
	margin: 0 0 28px 0;
	background: #ffffff;
}
body.wsph-styled .wsph-toc-title {
	font-weight: 700;
	font-size: 1.25em;
	color: #00450E;
	margin-bottom: 10px;
}
body.wsph-styled .wsph-toc ul {
	margin: 0;
	padding-left: 22px;
	list-style: disc;
}
body.wsph-styled .wsph-toc li {
	margin: 5px 0;
}
body.wsph-styled .wsph-toc a {
	text-decoration: none;
}
body.wsph-styled .wsph-toc a:hover {
	text-decoration: underline;
}
/* Collapsible TOC (native <details>: no JavaScript needed) */
body.wsph-styled summary.wsph-toc-title {
	cursor: pointer;
	list-style: none;
}
body.wsph-styled summary.wsph-toc-title::-webkit-details-marker {
	display: none;
}
body.wsph-styled .wsph-toc-collapsible .wsph-toc-title::after {
	content: "\25BE";
	float: right;
}
body.wsph-styled details.wsph-toc:not([open]) .wsph-toc-title::after {
	content: "\25B8";
}
body.wsph-styled details.wsph-toc:not([open]) .wsph-toc-title {
	margin-bottom: 0;
}

/* mobile tables: fit all columns at once on phones - no sideways scroll */
@media (max-width: 600px) { body.wsph-styled .entry-content .wp-block-table table { table-layout: fixed !important; width: 100%; font-size: 0.8em; } body.wsph-styled .entry-content .wp-block-table th, body.wsph-styled .entry-content .wp-block-table td { padding: 0.4em 0.5em; } body.wsph-styled .entry-content .wp-block-table table:has(tr > :nth-child(3)) th:first-child, body.wsph-styled .entry-content .wp-block-table table:has(tr > :nth-child(3)) td:first-child { width: 50%; } body.wsph-styled .entry-content .wp-block-table table:not(:has(tr > :nth-child(3))) th:first-child, body.wsph-styled .entry-content .wp-block-table table:not(:has(tr > :nth-child(3))) td:first-child { width: 75%; }}
body.wsph-styled .wp-block-table .has-fixed-layout td, body.wsph-styled .wp-block-table .has-fixed-layout th { word-break: normal; overflow-wrap: normal; }