/**
 * News Element — Section Heading block (news-element's heading,
 * heading_2 and heading-oblique). One markup; each .is-{style} adds its
 * decoration. Colours, sizes and spacing can be changed in the Decoration
 * controls; the values here are the starting look.
 */

.ne-heading-title {
	margin: 0;
}

/* Scoped so the theme's content-link underline doesn't win. */
.ne-heading .ne-heading-title a {
	color: inherit;
	text-decoration: none;
}

.ne-heading-text {
	position: relative;
	display: inline-block;
}

/* Underline: bottom border, short accent bar sitting on it. :where() keeps the
   specificity below Line color / Line thickness (this sheet loads after the
   per-post CSS). */
:where(.ne-heading.is-underline) {
	border-bottom: 2px solid #eee;
}

.is-underline .ne-heading-text {
	padding-bottom: 10px;
}

.is-underline .ne-heading-text::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 30px;
	height: 2px;
	background: var(--ne-color-primary, #ea0000);
}

/* Label: title in a filled box on the bottom border. */
:where(.ne-heading.is-label) {
	border-bottom: 2px solid #eee;
}

.is-label .ne-heading-text {
	padding: 8px 14px;
	background: #eee;
}

/* Lines / Rule / Oblique: the title is a row with line(s) filling it. */
.is-lines .ne-heading-title,
.is-rule .ne-heading-title,
.is-oblique .ne-heading-title {
	display: flex;
	align-items: center;
	gap: 20px;
}

.is-lines .ne-heading-title::before,
.is-lines .ne-heading-title::after,
.is-oblique .ne-heading-title::before,
.is-oblique .ne-heading-title::after,
.is-rule .ne-heading-title::after {
	content: '';
	flex: 1 1 1em;
	border-top: 1px solid #eee;
}

/* Rule: the second line of "Double line gap" (rule_dbl), hidden until that control sets its style. */
.is-rule .ne-heading-title::after {
	border-bottom: 1px none #eee;
}

/* Side bar: vertical accent before the title. */
.is-bar .ne-heading-text {
	padding-left: 16px;
}

.is-bar .ne-heading-text::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 0;
	width: 5px;
	height: 80%;
	background: var(--ne-color-primary, #ea0000);
	transform: translateY(-50%);
}

/* Slanted: slanted borders either side of the title. */
.is-slanted .ne-heading-text {
	padding: 4px 16px;
}

.is-slanted .ne-heading-text::before {
	content: '';
	position: absolute;
	inset: 0;
	border-right: 3px solid var(--ne-color-primary, #ea0000);
	border-left: 3px solid var(--ne-color-primary, #ea0000);
	transform: skewX(-10deg);
}

/* Oblique: title in a slanted filled box between the lines. */
.is-oblique .ne-heading-text {
	z-index: 0;
	flex: 0 0 auto;
	padding: 3px 12px;
	color: #fff;
}

.is-oblique .ne-heading-text::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--ne-color-primary, #ea0000);
	transform: skewX(-10deg);
}
