/**
 * Order Hub modal. All selectors are scoped under `.mrmm-order-hub` so nothing
 * leaks into the host theme. Colors are driven by CSS variables so the pop-up
 * can be dark, light, or fully custom (set from Appearance → Order Pop-up).
 */

.mrmm-order-hub {
	/* Dark defaults; overridden by the inline theme block. */
	--oh-bg: #0b0d10;
	--oh-card: #13161b;
	--oh-red: #e32636;
	--oh-red-dark: #c81929;
	--oh-line: rgba(255, 255, 255, .12);
	--oh-text: #b8bec8;
	--oh-heading: #ffffff;
	--oh-muted: #8d95a2;
	--oh-chip: rgba(255, 255, 255, .08);

	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: none;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.mrmm-order-hub[data-open="1"] { display: block; }

.mrmm-order-hub *,
.mrmm-order-hub *::before,
.mrmm-order-hub *::after { box-sizing: border-box; }

body.mrmm-oh-lock { overflow: hidden !important; }

.mrmm-order-hub .mrmm-oh-overlay {
	position: absolute;
	inset: 0;
	background: rgba(3, 4, 6, .72);
	backdrop-filter: blur(4px);
}

.mrmm-order-hub .mrmm-oh-panel {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(720px, calc(100% - 32px));
	max-height: calc(100% - 48px);
	background: var(--oh-bg);
	color: var(--oh-text);
	border: 1px solid var(--oh-line);
	border-radius: 18px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
	animation: mrmm-oh-in .18s ease;
}

@keyframes mrmm-oh-in {
	from { opacity: 0; transform: translate(-50%, -46%); }
	to   { opacity: 1; transform: translate(-50%, -50%); }
}

.mrmm-order-hub .mrmm-oh-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 20px;
	border-bottom: 1px solid var(--oh-line);
	flex-shrink: 0;
}

.mrmm-order-hub .mrmm-oh-title {
	font-weight: 800;
	font-size: 18px;
	letter-spacing: -0.02em;
	color: var(--oh-heading);
	margin: 0;
	flex: 1;
	min-width: 0;
}

.mrmm-order-hub .mrmm-oh-back,
.mrmm-order-hub .mrmm-oh-close {
	appearance: none;
	background: transparent;
	border: 1px solid var(--oh-line);
	color: var(--oh-heading);
	width: 38px;
	height: 38px;
	border-radius: 9px;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.mrmm-order-hub .mrmm-oh-back:hover,
.mrmm-order-hub .mrmm-oh-close:hover {
	border-color: var(--oh-red);
	color: var(--oh-red);
}

.mrmm-order-hub .mrmm-oh-back[hidden] { display: none; }

.mrmm-order-hub .mrmm-oh-summary {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 20px 0;
}

.mrmm-order-hub .mrmm-oh-summary span {
	font-size: 12px;
	font-weight: 700;
	color: var(--oh-heading);
	background: var(--oh-chip);
	border: 1px solid var(--oh-line);
	padding: 5px 11px;
	border-radius: 20px;
}

.mrmm-order-hub .mrmm-oh-summary:empty { display: none; }

.mrmm-order-hub .mrmm-oh-body {
	padding: 16px 20px 22px;
	overflow-y: auto;
}

.mrmm-order-hub .mrmm-oh-step[hidden] { display: none; }

.mrmm-order-hub .mrmm-oh-h2 {
	font-weight: 800;
	font-size: 20px;
	color: var(--oh-heading);
	margin: 6px 0 16px;
	letter-spacing: -0.02em;
}

.mrmm-order-hub .mrmm-oh-empty {
	color: var(--oh-muted);
	font-size: 15px;
	padding: 20px 0;
	text-align: center;
}

.mrmm-order-hub .mrmm-oh-grid,
.mrmm-order-hub .mrmm-oh-types {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.mrmm-order-hub .mrmm-oh-card {
	appearance: none;
	text-align: left;
	width: 100%;
	background: var(--oh-card);
	border: 1px solid var(--oh-line);
	border-radius: 14px;
	overflow: hidden;
	cursor: pointer;
	color: var(--oh-text);
	transition: border-color .15s ease, transform .15s ease;
	display: flex;
	flex-direction: column;
}

.mrmm-order-hub .mrmm-oh-card:hover { border-color: var(--oh-red); }

.mrmm-order-hub .mrmm-oh-card:focus-visible {
	outline: 3px solid var(--oh-red);
	outline-offset: 2px;
}

.mrmm-order-hub .mrmm-oh-card[hidden] { display: none; }

.mrmm-order-hub .mrmm-oh-card.is-recommended {
	border-color: var(--oh-red);
	box-shadow: 0 0 0 1px var(--oh-red) inset;
}

/* Provider list — one full-width row per option:
   [logo]  [name + badges + description]  [Order button] */
.mrmm-order-hub .mrmm-oh-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.mrmm-order-hub .mrmm-oh-provider {
	flex-direction: row;
	align-items: center;
	gap: 18px;
	padding: 16px 20px;
}
.mrmm-order-hub .mrmm-oh-prov-logo {
	flex: 0 0 auto;
	width: 64px;
	height: 64px;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}
.mrmm-order-hub .mrmm-oh-prov-logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.mrmm-order-hub .mrmm-oh-prov-main {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.mrmm-order-hub .mrmm-oh-provider .mrmm-oh-card-name { font-size: 19px; }
.mrmm-order-hub .mrmm-oh-provider .mrmm-oh-continue {
	flex: 0 0 auto;
	width: auto;
	margin-top: 0;
	padding: 0 24px;
	height: 48px;
	white-space: nowrap;
}
.mrmm-order-hub .mrmm-oh-provider .mrmm-oh-continue::after {
	content: "\2192";
	margin-left: 4px;
}

@media (max-width: 640px) {
	.mrmm-order-hub .mrmm-oh-provider { flex-wrap: wrap; gap: 12px 14px; }
	.mrmm-order-hub .mrmm-oh-prov-main { flex-basis: calc(100% - 78px); }
	.mrmm-order-hub .mrmm-oh-provider .mrmm-oh-continue { width: 100%; }
}

.mrmm-order-hub .mrmm-oh-card-body {
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

.mrmm-order-hub .mrmm-oh-card-name {
	font-weight: 700;
	font-size: 17px;
	color: var(--oh-heading);
}

.mrmm-order-hub .mrmm-oh-card-desc {
	font-size: 13px;
	color: var(--oh-text);
	line-height: 1.5;
}

.mrmm-order-hub .mrmm-oh-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 2px;
}

.mrmm-order-hub .mrmm-oh-badge {
	font-size: 11px;
	font-weight: 700;
	padding: 4px 9px;
	border-radius: 20px;
	background: var(--oh-chip);
	color: var(--oh-heading);
}

.mrmm-order-hub .mrmm-oh-badge.rec { background: var(--oh-red); color: #fff; }
.mrmm-order-hub .mrmm-oh-badge[hidden] { display: none; }

.mrmm-order-hub .mrmm-oh-logo {
	height: 34px;
	max-width: 140px;
	object-fit: contain;
	object-position: left center;
	margin-bottom: 2px;
}

.mrmm-order-hub .mrmm-oh-continue {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--oh-red);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	height: 44px;
	border-radius: 10px;
	border: none;
	cursor: pointer;
	width: 100%;
}

.mrmm-order-hub .mrmm-oh-continue:hover { background: var(--oh-red-dark); }

.mrmm-order-hub .mrmm-oh-type {
	min-height: 96px;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 20px;
}

.mrmm-order-hub .mrmm-oh-type .mrmm-oh-card-name { font-size: 19px; }

.mrmm-order-hub .mrmm-oh-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* The order button that opens the modal. */
.mrmm-order-button {
	background: #e32636;
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	padding: 0 24px;
	height: 50px;
	display: inline-flex;
	align-items: center;
	border-radius: 10px;
	border: none;
	cursor: pointer;
	font-family: inherit;
}
.mrmm-order-button:hover { filter: brightness(0.92); }
.mrmm-order-button.is-disabled {
	background: rgba(227, 38, 54, .35);
	cursor: not-allowed;
}

@media (max-width: 640px) {
	.mrmm-order-hub .mrmm-oh-panel {
		top: 0;
		left: 0;
		transform: none;
		width: 100%;
		height: 100%;
		max-height: 100%;
		border-radius: 0;
		animation: none;
	}
	.mrmm-order-hub .mrmm-oh-grid,
	.mrmm-order-hub .mrmm-oh-types {
		grid-template-columns: 1fr;
	}
}
