/*
 * ManxLiving-specific polish for the filter sheet, footer credit and advertised
 * price history. Kept in the child theme because these presentation choices are
 * specific to the property portal rather than the shared MotorTrader surface.
 */

/* Keep the modal action available while its fields scroll. */
.mx-js .mx-sheet[open] {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	overflow: hidden;
	padding: 0;
}

.mx-js .mx-sheet[open] .mx-sheet__head {
	margin: 0;
	padding: clamp(24px, 4vw, 40px) clamp(24px, 4vw, 40px) var(--s-3);
}

.mx-js .mx-sheet[open] .mx-filters {
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: var(--s-1) clamp(24px, 4vw, 40px) var(--s-4);
}

.mx-sheet__actions {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-end;
	gap: var(--s-3);
	margin-top: var(--s-3);
}

.mx-js .mx-sheet[open] .mx-sheet__actions {
	margin: 0;
	padding: var(--s-3) clamp(24px, 4vw, 40px) clamp(24px, 4vw, 32px);
	border-top: 1px solid var(--c-rule);
	background: var(--c-ground);
}

.mx-sheet__reset {
	color: var(--c-ink-2);
	font-size: var(--t-small);
}

.mx-sheet__reset:hover { color: var(--c-ink); }

.mx-sheet__actions .mx-btn {
	min-width: 11rem;
	border-radius: 8px;
	background: var(--c-accent);
	border-color: var(--c-accent);
	color: var(--c-accent-ink);
}

.mx-sheet__actions .mx-btn:hover {
	background: transparent;
	color: var(--c-accent);
}

/* The exact figures remain below; this is the quick visual explanation. */
.mx-history {
	max-width: 46rem;
}

.mx-history__overview {
	margin: 0 0 var(--s-4);
}

.mx-history__summary {
	margin: 0 0 var(--s-3);
	font-size: var(--t-body);
	color: var(--c-ink);
}

.mx-history__chart {
	display: block;
	width: 100%;
	height: auto;
	min-height: 8rem;
	color: var(--c-cut);
	border-bottom: 1px solid var(--c-rule);
}

.mx-history__chart-guide {
	stroke: var(--c-rule);
	stroke-width: 1;
	vector-effect: non-scaling-stroke;
}

.mx-history__chart-line {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
}

.mx-history__chart-point {
	fill: var(--c-ground);
	stroke: currentColor;
	stroke-width: 2;
	vector-effect: non-scaling-stroke;
}

.mx-history__chart-point--current {
	fill: currentColor;
}

.mx-history__axis {
	display: flex;
	justify-content: space-between;
	gap: var(--s-3);
	margin-top: 5px;
	color: var(--c-ink-2);
	font-size: var(--t-legal);
	font-variant-numeric: lining-nums tabular-nums;
}

.mx-history__change--up { color: var(--c-ink-2); }

.mx-footer__copyright {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0 .75em;
}

.mx-footer__copyright .mx-footer__powered {
	margin: 0;
	display: inline-flex;
	color: inherit;
}

@container mxpage (width < 44rem) {
	.mx-js .mx-sheet[open] {
		overflow: hidden;
		padding: 0;
	}

	.mx-js .mx-sheet[open] .mx-sheet__head {
		padding: var(--s-4) clamp(18px, 5vw, 32px) var(--s-3);
	}

	.mx-js .mx-sheet[open] .mx-filters {
		padding: var(--s-1) clamp(18px, 5vw, 32px) var(--s-4);
	}

	.mx-js .mx-sheet[open] .mx-sheet__actions {
		padding: var(--s-3) clamp(18px, 5vw, 32px) calc(var(--s-3) + env(safe-area-inset-bottom));
	}

	.mx-sheet__actions {
		align-items: stretch;
	}

	.mx-sheet__actions .mx-btn {
		flex: 1 1 auto;
		min-width: 0;
	}
}
