/**
 * Membership Trust Information Banner
 * Loaded only with [em_membership_plans] / membership dashboard.
 */

.em-mtb {
	--em-mtb-bg: #fff5f5;
	--em-mtb-card-bg: #ffffff;
	--em-mtb-border: #f3d0d0;
	--em-mtb-heading: #111827;
	--em-mtb-text: #4b5563;
	--em-mtb-hl: #ca1c1c;
	--em-mtb-hl-alt: #16a34a;
	--em-mtb-btn: #b3232e;
	--em-mtb-radius: 18px;
	--em-mtb-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
	--em-mtb-mt: 8px;
	--em-mtb-mb: 28px;
	--em-mtb-pad: 24px;

	width: 100%;
	margin: var(--em-mtb-mt) 0 var(--em-mtb-mb);
	padding: 0;
	box-sizing: border-box;
	font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.em-mtb *,
.em-mtb *::before,
.em-mtb *::after {
	box-sizing: border-box;
}

.em-mtb__section-title {
	margin: 0 0 1rem;
	text-align: center;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--em-mtb-heading);
}

.em-mtb__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	width: 100%;
	padding: 1.1rem;
	background: var(--em-mtb-bg);
	border: 1px solid var(--em-mtb-border);
	border-radius: calc(var(--em-mtb-radius) + 4px);
}

.em-mtb__card {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 0.85rem;
	min-width: 0;
	background: var(--em-mtb-card-bg);
	border: 1px solid var(--em-mtb-border);
	border-radius: var(--em-mtb-radius);
	padding: var(--em-mtb-pad);
	box-shadow: var(--em-mtb-shadow);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.em-mtb__card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.em-mtb__card.is-disabled,
.em-mtb.is-disabled {
	opacity: 0.45;
}

.em-mtb__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: #ffe8e8;
	font-size: 1.45rem;
	line-height: 1;
}

.em-mtb__card:nth-child(2) .em-mtb__icon {
	background: #e8f8ef;
}

.em-mtb__card:nth-child(3) .em-mtb__icon {
	background: #fde8f0;
}

.em-mtb__image {
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: 50%;
}

.em-mtb__body {
	flex: 1 1 auto;
	min-width: 0;
	text-align: left;
}

.em-mtb__heading {
	margin: 0 0 0.45rem;
	font-size: 0.98rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--em-mtb-heading);
}

.em-mtb__heading-icon {
	margin-right: 0.25rem;
}

.em-mtb__desc {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.65;
	color: var(--em-mtb-text);
	text-align: left;
}

.em-mtb__p {
	margin: 0 0 0.65rem;
	padding: 0;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
	text-align: left;
	text-wrap: pretty;
}

.em-mtb__p:last-child {
	margin-bottom: 0;
}

.em-mtb__hl {
	color: var(--em-mtb-hl);
	font-weight: 700;
}

.em-mtb__hl-alt {
	color: var(--em-mtb-hl-alt);
	font-weight: 700;
}

.em-mtb__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 0.75rem;
	padding: 0.5rem 1rem;
	border-radius: 8px;
	background: var(--em-mtb-btn);
	color: #fff !important;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none !important;
}

.em-mtb__btn:hover,
.em-mtb__btn:focus {
	filter: brightness(0.92);
	color: #fff !important;
	text-decoration: none !important;
}

.em-mtb__bar {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.65rem 1rem;
	margin-top: 0.85rem;
	padding: 0.75rem 1rem;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	color: #6b7280;
	font-size: 0.85rem;
	line-height: 1.4;
}

.em-mtb__bar-item {
	margin: 0;
}

.em-mtb__bar-sep {
	display: inline-block;
	width: 1px;
	height: 1.1em;
	background: #d1d5db;
}

/* Tablet — 2 + 1 */
@media (max-width: 1024px) {
	.em-mtb__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		padding: 0.9rem;
	}

	.em-mtb__card:nth-child(3) {
		grid-column: 1 / -1;
		max-width: 100%;
	}
}

/* Mobile — 1 column */
@media (max-width: 767px) {
	.em-mtb {
		margin-top: 0.5rem;
		margin-bottom: 1.25rem;
	}

	.em-mtb__grid {
		grid-template-columns: 1fr;
		gap: 0.75rem;
		padding: 0.75rem;
	}

	.em-mtb__card {
		flex-direction: column;
		align-items: center;
		padding: 16px;
		text-align: center;
	}

	.em-mtb__card:nth-child(3) {
		grid-column: auto;
	}

	.em-mtb__body {
		text-align: left;
		width: 100%;
	}

	.em-mtb__icon,
	.em-mtb__image {
		margin: 0 auto;
	}

	.em-mtb__heading {
		text-align: left;
	}

	.em-mtb__bar {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 0.5rem;
	}

	.em-mtb__bar-sep {
		width: 2.5rem;
		height: 1px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.em-mtb__card {
		transition: none;
	}

	.em-mtb__card:hover {
		transform: none;
	}
}
