/**
 * MkSEO — Blog Content (Beta).
 *
 * Self-contained, colour-agnostic toggles: they use `currentColor` and faint
 * translucent surfaces so they inherit the theme's typography and palette and
 * sit naturally inside a Divi layout, without reusing Divi's `et_pb_toggle`
 * classes (which would let Divi's own JavaScript double-bind to them). Everything
 * is prefixed `dbc-` so a site can restyle it freely.
 *
 * The collapse behaviour is gated behind `.dbc-ready`, which dbc.js adds once it
 * takes over: without JavaScript every panel stays open (progressive
 * enhancement) instead of being trapped closed.
 */

/* ----------------------------------------------------------------- Toggles */

.dbc-accordion {
	margin: 0 0 1.5em;
}

.dbc-toggle {
	margin: 0 0 0.5em;
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	border-radius: 3px;
	background: rgba( 0, 0, 0, 0.015 );
}

.dbc-accordion .dbc-toggle__title {
	position: relative;
	margin: 0;
	padding: 0.7em 2.6em 0.7em 1em;
	font-size: 1.05em;
	font-weight: 600;
	line-height: 1.35;
	cursor: pointer;
	outline-offset: -2px;
}

.dbc-toggle__title::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 1.1em;
	width: 0.5em;
	height: 0.5em;
	margin-top: -0.35em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate( 45deg );
	transition: transform 0.2s ease;
	opacity: 0.7;
}

.dbc-toggle--open > .dbc-toggle__title::after {
	margin-top: -0.1em;
	transform: rotate( -135deg );
}

.dbc-toggle__content {
	padding: 0 1em 1em;
}

.dbc-toggle__content > *:first-child {
	margin-top: 0;
}

.dbc-toggle__content > *:last-child {
	margin-bottom: 0;
}

/* Progressive enhancement: only collapse once dbc.js has initialised. */
.dbc-accordion.dbc-ready .dbc-toggle__content {
	overflow: hidden;
	transition: height 0.3s ease;
}

.dbc-accordion.dbc-ready .dbc-toggle:not( .dbc-toggle--open ):not( .dbc-animating ) > .dbc-toggle__content {
	display: none;
}

@media ( prefers-reduced-motion: reduce ) {
	.dbc-accordion.dbc-ready .dbc-toggle__content {
		transition: none;
	}
}

