/*
 * The compliance block. Loaded on every page, including the IDX subdomain via the
 * dynamic wrapper, so it cannot assume anything about the surrounding theme.
 *
 * Selectors are deliberately flat and prefixed. No element selectors, no reliance
 * on inherited type, and explicit resets on the properties Hello Elementor and the
 * IDX Broker stylesheet are both likely to set. This block has to look the same in
 * two documents built by different systems.
 */

.mcs-compliance {
	box-sizing: border-box;
	margin: 0;
	padding: var(--mcs-space-l) var(--mcs-gutter);
	border-top: 1px solid var(--mcs-line-strong);
	background: var(--mcs-paper-sunk);
	color: var(--mcs-muted);
	font-family: var(--mcs-font-mono);
	font-size: var(--mcs-step--2);
	line-height: 1.55;
	text-align: left;
}

.mcs-compliance *,
.mcs-compliance *::before,
.mcs-compliance *::after {
	box-sizing: inherit;
}

.mcs-compliance__inner {
	display: flex;
	gap: var(--mcs-space-m);
	align-items: flex-start;
	max-width: var(--mcs-width-page);
	margin-inline: auto;
}

.mcs-compliance__body {
	flex: 1 1 auto;
	min-width: 0;
}

.mcs-compliance__body > p {
	margin: 0 0 var(--mcs-space-2xs);
	max-width: 90ch;
}

.mcs-compliance__body > p:last-child {
	margin-bottom: 0;
}

.mcs-compliance__brokerage {
	color: var(--mcs-ink);
	font-size: var(--mcs-step--1);
}

.mcs-compliance__team {
	font-family: var(--mcs-font-display);
	font-weight: var(--mcs-weight-display);
	letter-spacing: var(--mcs-tracking-display);
}

.mcs-compliance__brokerage strong {
	font-weight: var(--mcs-weight-medium);
}

.mcs-compliance a {
	color: inherit;
	text-decoration-color: var(--mcs-line-strong);
	text-underline-offset: 2px;
}

.mcs-compliance a:hover,
.mcs-compliance a:focus-visible {
	color: var(--mcs-accent-deep);
	text-decoration-color: currentColor;
}

.mcs-compliance__licenses {
	font-size: var(--mcs-step--2);
}

.mcs-compliance__verified {
	padding-top: var(--mcs-space-2xs);
	border-top: var(--mcs-rule-hair);
	color: var(--mcs-signal);
}

.mcs-compliance__eho {
	flex: 0 0 auto;
	width: 48px;
	height: auto;
}

.mcs-compliance__eho--text {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border: 1px solid var(--mcs-line-strong);
	border-radius: var(--mcs-radius-sm);
	color: var(--mcs-ink-soft);
	font-size: var(--mcs-step--2);
	font-weight: var(--mcs-weight-medium);
	letter-spacing: 0.06em;
}

.mcs-compliance--inline {
	border-top: var(--mcs-rule);
	background: transparent;
}

@media (max-width: 40rem) {
	.mcs-compliance__inner {
		flex-direction: column;
		gap: var(--mcs-space-s);
	}
}

/*
 * The FMLS disclosure block.
 *
 * Deliberately NOT styled like the brokerage block above. Rule 11.13 requires every
 * disclosure to be at least as prominent in size, color and other appearance
 * attributes as the FMLS Content text on the page — so the small-print treatment
 * used for the rest of the compliance furniture is non-compliant here.
 *
 * --mcs-fmls-content-size is written inline by the plugin from the measured size of
 * the listing text on the IDX pages. The block never renders smaller than that, and
 * never in a lower-contrast colour than the body text.
 */

.mcs-fmls {
	box-sizing: border-box;
	margin: 0;
	padding: var(--mcs-space-l) var(--mcs-gutter);
	border-top: 2px solid var(--mcs-ink);
	background: var(--mcs-paper-raised);
	color: var(--mcs-ink);
	font-family: var(--mcs-font-body);
	font-size: var(--mcs-fmls-content-size, 17px);
	line-height: 1.5;
	text-align: left;
}

.mcs-fmls *,
.mcs-fmls *::before,
.mcs-fmls *::after {
	box-sizing: inherit;
}

.mcs-fmls__inner {
	display: flex;
	gap: var(--mcs-space-m);
	align-items: flex-start;
	max-width: var(--mcs-width-page);
	margin-inline: auto;
}

.mcs-fmls__body {
	flex: 1 1 auto;
	min-width: 0;
}

/* Full inherited size and full-contrast ink. Do not reduce either: the floor is
   a rule, not a design preference. */
.mcs-fmls__text {
	margin: 0 0 var(--mcs-space-s);
	max-width: 90ch;
	color: var(--mcs-ink);
	font-size: inherit;
}

.mcs-fmls__text:last-child {
	margin-bottom: 0;
}

.mcs-fmls a {
	color: var(--mcs-accent-deep);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.mcs-fmls__logo {
	flex: 0 0 auto;
	width: auto;
	max-width: 180px;
	height: auto;
}

.mcs-fmls__logo--missing {
	display: block;
	padding: var(--mcs-space-2xs) var(--mcs-space-xs);
	border: 2px solid #b32d00;
	border-radius: var(--mcs-radius-sm);
	color: #b32d00;
	font-family: var(--mcs-font-mono);
	font-size: var(--mcs-step--2);
	max-width: 180px;
}

.mcs-fmls__entity,
.mcs-fmls__updated {
	color: var(--mcs-ink-soft);
}

.mcs-fmls--unconfigured {
	border-top: 4px solid #b32d00;
	background: #fff4f0;
}

.mcs-fmls--unconfigured .mcs-fmls__text {
	color: #7a1f00;
	font-weight: var(--mcs-weight-medium);
}

@media (max-width: 40rem) {
	.mcs-fmls__inner {
		flex-direction: column;
		gap: var(--mcs-space-s);
	}
}
