/*
 * LumoSeo: the two blocks at the top of an article, "what you will find here"
 * and the call to action.
 *
 * They bring no look of their own. Font, font size and text colour come from
 * the article around them, and the hairlines are mixed from that text colour,
 * so the blocks sit on a white, tinted or dark page alike. One colour is the
 * site's: --lumoseo-accent, set by the site owner in the plugin's settings or
 * read from the site's own buttons by boxes.js, together with their corner
 * radius. Without either, the ticks and the button use the text colour.
 *
 * Every rule is scoped to .lumoseo-box, the class the plugin gives a block when
 * it rebuilds it for display. The !important flags are there because themes
 * style lists, links and headings inside post content with heavier selectors.
 */

.lumoseo-box {
	--lumoseo-line: rgba(127, 127, 127, .32);
	font: inherit !important;
	color: inherit !important;
	text-align: start !important;
	background: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
}

/* Width and side margins are left to the theme, so the blocks line up with the
   article's own column, also where the theme centres that column itself. */

@supports (color: color-mix(in srgb, red 50%, blue)) {
	.lumoseo-box {
		--lumoseo-line: color-mix(in srgb, currentColor 18%, transparent);
	}
}

.lumoseo-box * {
	box-sizing: border-box !important;
}

/* ── What you will find in the article ─────────────────────────────────────── */

.lumoseo-preview-box.lumoseo-box {
	margin-top: 2em !important;
	margin-bottom: 2.2em !important;
	padding: 1.25em 0 1.35em !important;
	border-top: 1px solid var(--lumoseo-line) !important;
	border-bottom: 1px solid var(--lumoseo-line) !important;
}

/* Directly followed by the call to action: the two read as one strip. */
.lumoseo-preview-box.lumoseo-box.lumoseo-box--joined {
	margin-bottom: 0 !important;
	border-bottom: 0 !important;
}

.lumoseo-box .lumoseo-box-title {
	font: inherit !important;
	font-size: .88em !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	color: inherit !important;
	opacity: .82 !important;
	margin: 0 0 .85em !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	letter-spacing: .01em !important;
	text-transform: none !important;
}

.lumoseo-box .lumoseo-box-title::before,
.lumoseo-box .lumoseo-box-title::after {
	content: none !important;
}

.lumoseo-box .lumoseo-box-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: grid !important;
	grid-template-columns: 1fr !important;
	gap: .7em 2.2em !important;
}

/* Two columns where the article's column is wide enough for them, never more:
   decided by the width of the block, not of the screen. */
@supports (width: max(1em, 40%)) {
	.lumoseo-box .lumoseo-box-list {
		grid-template-columns: repeat(auto-fit, minmax(max(12em, 40%), 1fr)) !important;
	}
}

.lumoseo-box .lumoseo-box-list > li {
	list-style: none !important;
	position: relative !important;
	margin: 0 !important;
	padding: 0 !important;
	padding-inline-start: 1.55em !important;
	background: none !important;
	border: 0 !important;
	font-size: 1em !important;
	line-height: 1.5 !important;
}

.lumoseo-box .lumoseo-box-list > li::marker {
	content: none !important;
}

/* The tick, drawn so that it scales with the text and takes the accent. */
.lumoseo-box .lumoseo-box-list > li::before {
	content: "" !important;
	display: block !important;
	position: absolute !important;
	inset-inline-start: .22em !important;
	top: .28em !important;
	width: .36em !important;
	height: .68em !important;
	border: solid var(--lumoseo-accent, currentColor) !important;
	border-width: 0 .14em .14em 0 !important;
	border-radius: 0 !important;
	background: none !important;
	transform: rotate(45deg) !important;
}

.lumoseo-box .lumoseo-box-list strong {
	display: block !important;
	font: inherit !important;
	font-weight: 700 !important;
	color: inherit !important;
}

.lumoseo-box .lumoseo-box-list strong::after {
	content: none !important;
}

.lumoseo-box .lumoseo-box-list span {
	display: block !important;
	font: inherit !important;
	font-size: .93em !important;
	color: inherit !important;
	opacity: .86 !important;
	margin: .1em 0 0 !important;
}

/* ── Call to action ────────────────────────────────────────────────────────── */

.lumoseo-cta-box.lumoseo-box {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: .9em 1.6em !important;
	margin-top: 2em !important;
	margin-bottom: 2.2em !important;
	padding: 1.15em 0 !important;
	border-top: 1px solid var(--lumoseo-line) !important;
	border-bottom: 1px solid var(--lumoseo-line) !important;
}

.lumoseo-box--joined + .lumoseo-cta-box.lumoseo-box {
	margin-top: 0 !important;
}

.lumoseo-box .lumoseo-cta-text {
	flex: 1 1 16em !important;
	min-width: 0 !important;
}

.lumoseo-cta-box.lumoseo-box .lumoseo-cta-text > .lumoseo-cta-title {
	font: inherit !important;
	font-size: 1.1em !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	color: inherit !important;
	margin: 0 0 .2em !important;
	padding: 0 !important;
}

.lumoseo-cta-box.lumoseo-box .lumoseo-cta-text > .lumoseo-cta-body {
	font: inherit !important;
	font-size: .95em !important;
	line-height: 1.5 !important;
	color: inherit !important;
	opacity: .86 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Filled with the accent when there is one, outlined in the text colour when
   there is none: legible on any page either way. */
.lumoseo-box a.lumoseo-cta-button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: .5em !important;
	flex: 0 0 auto !important;
	width: auto !important;
	min-width: 0 !important;
	padding: .72em 1.5em !important;
	font: inherit !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	text-decoration: none !important;
	white-space: nowrap !important;
	color: var(--lumoseo-on-accent, inherit) !important;
	background: var(--lumoseo-accent, transparent) !important;
	border: 1.5px solid var(--lumoseo-accent, currentColor) !important;
	border-radius: var(--lumoseo-radius, 6px) !important;
	box-shadow: none !important;
	transition: filter .15s ease-out, transform .15s ease-out !important;
}

/* An arrow that points the way the text reads. */
.lumoseo-box a.lumoseo-cta-button::after {
	content: "" !important;
	width: .42em !important;
	height: .42em !important;
	margin-inline-start: .1em !important;
	border: solid currentColor !important;
	border-width: 0 0 .13em .13em !important;
	transform: rotate(45deg) !important;
}

html:not([dir="rtl"]) .lumoseo-box a.lumoseo-cta-button::after {
	transform: rotate(-135deg) !important;
}

.lumoseo-box a.lumoseo-cta-button:hover,
.lumoseo-box a.lumoseo-cta-button:focus-visible {
	color: var(--lumoseo-on-accent, inherit) !important;
	background: var(--lumoseo-accent, transparent) !important;
	text-decoration: none !important;
	box-shadow: none !important;
	filter: brightness(.92) !important;
	transform: translateY(-1px) !important;
}

.lumoseo-box a.lumoseo-cta-button:focus-visible {
	outline: 2px solid var(--lumoseo-accent, currentColor) !important;
	outline-offset: 2px !important;
}

@media (max-width: 600px) {
	.lumoseo-box a.lumoseo-cta-button {
		width: 100% !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lumoseo-box a.lumoseo-cta-button {
		transition: none !important;
	}

	.lumoseo-box a.lumoseo-cta-button:hover,
	.lumoseo-box a.lumoseo-cta-button:focus-visible {
		transform: none !important;
	}
}

/* ── A block the plugin could not rebuild keeps its saved markup ───────────── */

.lumoseo-preview-box:not(.lumoseo-box),
.lumoseo-cta-box:not(.lumoseo-box) {
	margin-top: 2em !important;
	margin-bottom: 2em !important;
	padding: 1.2em 0 !important;
	background: none !important;
	border: 0 !important;
	border-top: 1px solid rgba(127, 127, 127, .32) !important;
	border-bottom: 1px solid rgba(127, 127, 127, .32) !important;
	border-radius: 0 !important;
}

.lumoseo-preview-box:not(.lumoseo-box) h2 {
	font: inherit !important;
	font-weight: 700 !important;
	margin: 0 0 .6em !important;
	padding: 0 !important;
	border: 0 !important;
}
