/* Car-problem pages (template-car-problem.php): content beside a sticky help form. */
.lm-crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: var( --lm-space-2 );
	font-size: 14px;
	color: var( --lm-color-text-muted );
}

.lm-crumbs a {
	color: inherit;
}

.lm-problem-layout {
	display: grid;
	gap: var( --lm-space-5 );
	grid-template-columns: minmax( 0, 1fr ) minmax( 280px, 360px );
	align-items: start;
}

.lm-problem-main {
	min-width: 0;
	display: grid;
	gap: var( --lm-space-4 );
}

.lm-problem-side {
	position: sticky;
	top: 90px;
}

.lm-safety {
	border-radius: var( --lm-radius-card );
	padding: var( --lm-space-3 ) var( --lm-space-4 );
	border: 1px solid var( --lm-color-border );
	border-left-width: 5px;
}

.lm-safety p {
	margin: 0;
}

.lm-safety__label {
	margin-bottom: 4px !important;
}

.lm-safety--red {
	border-left-color: #c62828;
	background: #fdeeee;
}

.lm-safety--amber {
	border-left-color: #d98200;
	background: #fff5e6;
}

.lm-safety--green {
	border-left-color: #2e7d32;
	background: #edf7ee;
}

.lm-problem-prose {
	max-width: 70ch;
	font-family: var( --lm-font-copy );
	line-height: 1.65;
}

.lm-problem-prose h2 {
	margin: var( --lm-space-5 ) 0 var( --lm-space-2 );
}

.lm-problem-prose h3 {
	margin: var( --lm-space-4 ) 0 var( --lm-space-1 );
}

.lm-problem-prose ul,
.lm-problem-prose ol {
	padding-left: 1.3em;
}

.lm-problem-prose li + li {
	margin-top: 6px;
}

.lm-problem-form {
	display: grid;
	gap: 8px;
	padding: var( --lm-space-4 );
	border: 1px solid var( --lm-color-border );
	border-radius: var( --lm-radius-card );
	background: var( --lm-color-bg );
	box-shadow: 0 8px 24px rgba( 23, 28, 35, 0.08 );
}

.lm-problem-form h2 {
	margin: 0 0 4px;
	font-size: 20px;
}

.lm-problem-form label {
	font-weight: 600;
	font-size: 14px;
}

.lm-problem-form input[type="text"],
.lm-problem-form input[type="tel"],
.lm-problem-form select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var( --lm-color-border );
	border-radius: 8px;
	font: inherit;
	background: var( --lm-color-bg );
	color: var( --lm-color-text );
}

.lm-problem-toggle {
	display: flex;
	gap: var( --lm-space-3 );
	border: 0;
	padding: 0;
	margin: 0;
}

.lm-problem-toggle legend {
	position: absolute;
	left: -9999px;
}

.lm-problem-toggle label {
	font-weight: 500;
}

.lm-problem-form .lm-button {
	margin-top: 6px;
}

.lm-problem-form__small {
	margin: 0;
	font-size: 12px;
	color: var( --lm-color-text-muted );
}

.lm-problem-towns {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 260px, 1fr ) );
	gap: 10px;
	padding: 0;
	list-style: none;
}

.lm-problem-towns li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 14px;
	border: 1px solid var( --lm-color-border );
	border-radius: var( --lm-radius-card );
	background: var( --lm-color-bg );
}

.lm-problem-towns a {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lm-problem-towns span {
	color: var( --lm-color-text-muted );
	font-size: 14px;
	white-space: nowrap;
}

.lm-problem-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 240px, 1fr ) );
	gap: var( --lm-space-3 );
	margin-bottom: var( --lm-space-4 );
}

.lm-problem-card {
	display: grid;
	gap: 6px;
	padding: var( --lm-space-3 );
	border: 1px solid var( --lm-color-border );
	border-radius: var( --lm-radius-card );
	color: var( --lm-color-text );
	text-decoration: none;
}

.lm-problem-card:hover,
.lm-problem-card:focus-visible {
	border-color: var( --lm-color-primary );
}

.lm-problem-card span {
	color: var( --lm-color-text-muted );
	font-size: 14px;
}

@media ( max-width: 860px ) {
	.lm-problem-layout {
		grid-template-columns: minmax( 0, 1fr );
	}

	.lm-problem-side {
		position: static;
		order: -1;
	}
}

/* Heading scale inside the content and form. Doubled classes beat the Elementor kit's h2/h3 sizes. */
.lm-problem-prose.lm-problem-prose h2 {
	font-size: clamp( 24px, 3vw, 30px );
	line-height: 1.2;
}

.lm-problem-prose.lm-problem-prose h3 {
	font-size: 19px;
	line-height: 1.3;
}

.lm-problem-form.lm-problem-form h2 {
	font-size: 22px;
	line-height: 1.2;
}

.lm-problem-towns.lm-problem-towns,
.lm-problem-grid.lm-problem-grid {
	margin-left: 0;
}

/*
 * Hero over the page's featured image. The photos are already dark on the left, so the overlay
 * only needs to darken the text side, not the subject on the right as .lm-page-hero's does.
 */
.lm-problem-hero.lm-problem-hero {
	display: flex;
	align-items: center;
	min-height: 380px;
	background-image:
		linear-gradient( 90deg, rgba( 18, 23, 29, 0.85 ) 0%, rgba( 18, 23, 29, 0.55 ) 40%, rgba( 18, 23, 29, 0 ) 70% ),
		var( --lm-page-hero-image );
	background-position: right center;
}

.lm-problem-hero .lm-crumbs {
	color: rgba( 255, 255, 255, 0.75 );
}

.lm-problem-card__draft {
	margin-left: 6px;
	padding: 1px 6px;
	border-radius: 4px;
	background-color: var( --lm-color-surface-alt );
	color: var( --lm-color-text-muted );
	font-size: 12px;
	font-style: normal;
	font-weight: 600;
	vertical-align: middle;
}

/* Phones: the text covers the photo, so a smaller file and an even overlay keep it readable. */
@media ( max-width: 700px ) {
	.lm-problem-hero.lm-problem-hero {
		min-height: 0;
		background-image:
			linear-gradient( 90deg, rgba( 18, 23, 29, 0.82 ) 0%, rgba( 18, 23, 29, 0.6 ) 100% ),
			var( --lm-problem-hero-small, var( --lm-page-hero-image ) );
		background-position: 75% center;
	}
}
