/*
Theme Name:     Johannes Child
Theme URI:      https://mekshq.com/theme/johannes/
Description:    Child theme for Johannes WordPress theme. Adds DM-specific UI components (accordion FAQs, callouts) per the editorial style guide.
Author:         Digital Matters
Author URI:     https://digitalmatters.me
Template:       johannes
Version:        0.2.0
*/

/* ============================================================
 * FAQ Accordion
 * Uses native HTML5 <details>/<summary>. Scoped to .entry-content
 * so it only affects post body content, not other places the theme
 * might use <details>.
 * ============================================================ */

.entry-content details {
	border: 1px solid #e1e5ea;
	border-radius: 6px;
	margin: 0 0 0.75em;
	padding: 0;
	overflow: hidden;
	background: #ffffff;
}

.entry-content details + details {
	margin-top: 0.5em;
}

.entry-content details summary {
	cursor: pointer;
	padding: 1em 3em 1em 1.25em;
	background: #f5f7fa;
	font-weight: 600;
	font-size: 1.05em;
	color: #1a2733;
	list-style: none;
	position: relative;
	user-select: none;
	line-height: 1.4;
	transition: background-color 0.15s ease;
}

/* Remove default disclosure markers across browsers */
.entry-content details summary::-webkit-details-marker {
	display: none;
}
.entry-content details summary::marker {
	display: none;
}

/* Plus / minus indicator on the right */
.entry-content details summary::after {
	content: "+";
	position: absolute;
	right: 1.25em;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.5em;
	color: #6b7785;
	font-weight: 400;
	line-height: 1;
}

.entry-content details[open] summary::after {
	content: "−";
}

.entry-content details summary:hover {
	background: #eceff3;
}

.entry-content details[open] summary {
	background: #eceff3;
	border-bottom: 1px solid #e1e5ea;
}

/* Body content inside the open accordion */
.entry-content details > *:not(summary) {
	padding-left: 1.25em;
	padding-right: 1.25em;
}

.entry-content details > *:not(summary):first-of-type {
	padding-top: 1em;
}

.entry-content details > *:not(summary):last-child {
	padding-bottom: 1em;
}

/* Nested paragraphs and lists inside the accordion */
.entry-content details p {
	margin: 0 0 0.75em;
}

.entry-content details > p:last-child {
	margin-bottom: 0;
}

/* ============================================================
 * Callout boxes (future use — not in any post yet, but ready)
 * Usage: <div class="dm-callout dm-callout-info">...</div>
 *        Variants: -info, -warning, -success, -note
 * ============================================================ */

.entry-content .dm-callout {
	border-left: 4px solid #999;
	background: #f5f7fa;
	padding: 1em 1.25em;
	margin: 1.25em 0;
	border-radius: 0 4px 4px 0;
}

.entry-content .dm-callout-info {
	border-left-color: #2c7be5;
	background: #f0f6ff;
}

.entry-content .dm-callout-warning {
	border-left-color: #d97706;
	background: #fef6e7;
}

.entry-content .dm-callout-success {
	border-left-color: #16a34a;
	background: #f0faf3;
}

.entry-content .dm-callout-note {
	border-left-color: #6b7785;
	background: #f5f7fa;
}

.entry-content .dm-callout > *:first-child {
	margin-top: 0;
}

.entry-content .dm-callout > *:last-child {
	margin-bottom: 0;
}

/* ============================================================
 * Pagination disabled-state spans
 * Parent theme rules at main.css:5555-5589 use tag-qualified
 * selectors (a.prev, a.next) to give the active Prev/Next links
 * absolute positioning, ~200px min-width, and the chevron icons.
 * When we swap a disabled anchor for <span> for crawlability, those
 * rules stop matching and the span falls through to the 46x46 tile
 * rule (.johannes-pagination .page-numbers). Mirror the active
 * anchor layout for span here so disabled Prev/Next look the same
 * as the active ones, just in the muted disabled palette.
 * ============================================================ */

.johannes-pagination span.prev,
.johannes-pagination span.next {
	position: absolute;
	top: 0;
	width: auto;
	height: auto;
	min-width: 135px;
	margin: 0;
	padding: 12px 24px;
	border: none;
	font-size: 1.4rem;
	line-height: 1;
	text-align: center;
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-pack: center;
	-webkit-justify-content: center;
	-ms-flex-pack: center;
	justify-content: center;
	-webkit-box-align: center;
	-webkit-align-items: center;
	-ms-flex-align: center;
	align-items: center;
	cursor: not-allowed;
}

.johannes-pagination span.prev {
	left: 0;
}

.johannes-pagination span.next {
	right: 0;
}

.johannes-pagination span.prev:before {
	content: "\e908";
	font-family: "johannes-font";
	font-size: 1.8rem;
	margin-right: 2px;
	margin-left: -9px;
}

.johannes-pagination span.next:after {
	content: "\e909";
	font-family: "johannes-font";
	font-size: 1.8rem;
	margin-left: 2px;
	margin-right: -9px;
}

@media (min-width: 992px) {
	.johannes-pagination span.prev,
	.johannes-pagination span.next {
		min-width: 200px;
	}
}
