.tmf-machine-lineup,
.tmf-ml-admin-preview {
	--tmf-marker-color: #008ec3;
	--tmf-marker-border: #fff;
	--tmf-canvas-height-desktop: 60vh;
	--tmf-canvas-height-mobile: 57vh;
	--tmf-canvas-height: var(--tmf-canvas-height-desktop);
	--tmf-machine-gap: 1.5vw;
	color: #17202a;
	font-family: inherit;
}

/* The theme constrains direct page-section children to 1080px. The frontend
 * lineup is intentionally a full-width section within that parent. */
.section.page > .tmf-machine-lineup.tmf-ml-render-root {
	width: calc(100% + 60px);
	max-width: none;
	margin-right: -30px;
	margin-left: -30px;
}

@supports (height: 1dvh) {
	.tmf-machine-lineup,
	.tmf-ml-admin-preview {
		--tmf-canvas-height-desktop: 60dvh;
		--tmf-canvas-height-mobile: 57dvh;
	}
}

body.tmf-ml-modal-open {
	overflow: hidden;
}

.tmf-ml-scroll {
	position: relative;
	z-index: 1;
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	overscroll-behavior-y: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.tmf-ml-canvas-frame {
	position: relative;
	width: 100%;
}

.tmf-ml-scroll:focus-visible {
	outline: 3px solid rgba(0, 142, 195, .35);
	outline-offset: 3px;
}

.tmf-ml-canvas-scroll-fade {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 64px;
	pointer-events: none;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .78));
	opacity: 0;
	transition: opacity .2s ease;
}

.tmf-ml-canvas-frame.has-scroll-right .tmf-ml-canvas-scroll-fade {
	opacity: 1;
}

.tmf-ml-canvas {
	position: relative;
	width: 100%;
	min-width: 0;
	height: var(--tmf-canvas-height);
	min-height: 240px;
	overflow: hidden;
	background: transparent;
	isolation: isolate;
}

.tmf-ml-canvas[data-tmf-canvas-viewport="full"] {
	overflow: visible;
}

.tmf-ml-canvas-label {
	position: absolute;
	top: 12px;
	left: 14px;
	z-index: 6;
	padding: 5px 8px;
	border: 1px solid rgba(22, 56, 67, .18);
	border-radius: 5px;
	background: rgba(255, 255, 255, .72);
	box-shadow: 0 2px 8px rgba(20, 52, 63, .08);
	color: rgba(22, 56, 67, .66);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .04em;
	line-height: 1;
	text-transform: uppercase;
	pointer-events: none;
}

.tmf-ml-background-actions,
.tmf-ml-canvas-actions {
	position: absolute;
	z-index: 7;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px;
	border: 1px solid rgba(197, 214, 218, .9);
	border-radius: 8px;
	background: rgba(255, 255, 255, .92);
	box-shadow: 0 5px 16px rgba(20, 52, 63, .15);
	backdrop-filter: blur(8px);
}

.tmf-ml-background-actions {
	top: 12px;
	right: 14px;
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity .16s ease, transform .16s ease;
}

.tmf-ml-admin-edit-mode .tmf-ml-canvas-frame:has(.tmf-ml-background:hover, .tmf-ml-background-actions:hover) .tmf-ml-background-actions,
.tmf-ml-admin-edit-mode .tmf-ml-background-actions:focus-within {
	opacity: 1;
	transform: translateY(0);
}

.tmf-ml-canvas-actions {
	bottom: 14px;
	left: 14px;
}

.tmf-ml-admin-edit-mode .tmf-ml-machines > .tmf-ml-canvas-actions {
	position: relative;
	bottom: auto;
	left: auto;
	flex: 0 0 auto;
	align-self: flex-end;
}

.tmf-ml-machine-action,
.tmf-ml-canvas-action,
.tmf-ml-background-action {
	display: grid;
	width: 29px;
	height: 29px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #2a6476;
	font: inherit;
	place-items: center;
	cursor: pointer;
}

.tmf-ml-machine-action:hover,
.tmf-ml-machine-action:focus-visible,
.tmf-ml-canvas-action:hover,
.tmf-ml-canvas-action:focus-visible,
.tmf-ml-background-action:hover,
.tmf-ml-background-action:focus-visible {
	background: #e8f5f7;
	color: #075f7e;
	outline: none;
}

.tmf-ml-machine-action-danger {
	color: #a33e4c;
}

.tmf-ml-machine-action-danger:hover,
.tmf-ml-machine-action-danger:focus-visible {
	background: #fff0f1;
	color: #8f3040;
}

.tmf-ml-machine-action:disabled,
.tmf-ml-background-action:disabled {
	opacity: .35;
	cursor: not-allowed;
}

.tmf-ml-machine-action .dashicons,
.tmf-ml-canvas-action .dashicons,
.tmf-ml-background-action .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
}

.tmf-ml-background {
	position: absolute;
	z-index: 0;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: auto;
	background-color: #eef2f3;
	background-position: center bottom;
	background-repeat: no-repeat;
	background-size: cover;
}

.tmf-ml-background::after {
	position: absolute;
	inset: 0;
	content: '';
	background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .04));
	pointer-events: none;
}

.tmf-ml-machines {
	position: absolute;
	z-index: 1;
	top: 7%;
	right: auto;
	bottom: 7%;
	left: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: var(--tmf-machine-gap);
	width: max-content;
	min-width: calc(100% - 40px);
	height: 86%;
	padding: 0 12px;
	box-sizing: border-box;
}

.tmf-ml-machine {
	position: relative;
	display: flex;
	align-items: flex-end;
	height: 100%;
	flex: 0 0 auto;
}

.tmf-ml-machine-label {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	z-index: 10;
	max-width: 220px;
	padding: 5px 8px;
	border: 1px solid rgba(197, 214, 218, .95);
	border-radius: 6px;
	background: rgba(255, 255, 255, .96);
	box-shadow: 0 5px 15px rgba(20, 52, 63, .14);
	color: #214a59;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	opacity: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	transform: translate(-50%, 4px);
	transition: opacity .16s ease, transform .16s ease;
	white-space: nowrap;
	pointer-events: none;
}

.tmf-ml-machine-actions {
	position: absolute;
	top: calc(100% + 8px);
	bottom: auto;
	left: 50%;
	z-index: 12;
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 4px;
	border: 1px solid rgba(197, 214, 218, .95);
	border-radius: 8px;
	background: rgba(255, 255, 255, .94);
	box-shadow: 0 7px 18px rgba(20, 52, 63, .17);
	opacity: 0;
	transform: translate(-50%, -4px);
	transition: opacity .16s ease, transform .16s ease;
	backdrop-filter: blur(8px);
}

.tmf-ml-admin-edit-mode .tmf-ml-machine:hover .tmf-ml-machine-actions,
.tmf-ml-admin-edit-mode .tmf-ml-machine:focus-within .tmf-ml-machine-actions,
.tmf-ml-admin-edit-mode .tmf-ml-machine:hover .tmf-ml-machine-label,
.tmf-ml-admin-edit-mode .tmf-ml-machine:focus-within .tmf-ml-machine-label {
	opacity: 1;
	transform: translate(-50%, 0);
}

.tmf-ml-machine-drag-handle {
	cursor: grab;
}

.tmf-ml-machine-drag-handle:active {
	cursor: grabbing;
}

.tmf-ml-machine-image-wrap {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	height: calc(var(--tmf-machine-height, 100) * 1%);
	min-width: 92px;
	max-height: 100%;
}

.tmf-ml-machine-surface {
	position: relative;
	display: flex;
	height: 100%;
	flex: 0 0 auto;
	align-items: flex-end;
	justify-content: center;
}

.tmf-ml-machine-image {
	display: block;
	width: auto;
	height: 100%;
	max-width: none;
	object-fit: contain;
	object-position: center bottom;
}

.tmf-ml-machine-placeholder {
	display: grid;
	width: 180px;
	height: 100%;
	place-items: center;
	padding: 18px;
	border: 1px dashed rgba(19, 51, 62, .35);
	border-radius: 6px 6px 0 0;
	box-sizing: border-box;
	color: rgba(19, 51, 62, .65);
	font-size: 12px;
	text-align: center;
}

.tmf-ml-marker {
	position: absolute;
	z-index: 3;
	display: grid;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 3px solid var(--tmf-marker-border);
	border-radius: 50%;
	background: var(--tmf-marker-color);
	box-shadow: 0 2px 7px rgba(0, 0, 0, .25);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 800;
	line-height: 1;
	place-items: center;
	cursor: pointer;
	transform: translate(-50%, -50%);
	transition: background-color .16s ease, box-shadow .16s ease, transform .16s ease;
	animation: tmf-ml-marker-pulse 2.8s ease-in-out infinite;
}

@keyframes tmf-ml-marker-pulse {
	0%,
	100% {
		box-shadow: 0 2px 7px rgba(0, 0, 0, .25);
		transform: translate(-50%, -50%) scale(1);
	}
	50% {
		box-shadow: 0 0 0 3px rgba(0, 142, 195, .16), 0 2px 8px rgba(0, 0, 0, .28);
		transform: translate(-50%, -50%) scale(1.045);
	}
}

.tmf-ml-marker:hover,
.tmf-ml-marker:focus-visible,
.tmf-ml-marker.is-selected {
	background: #006f99;
	box-shadow: 0 0 0 4px rgba(0, 142, 195, .22), 0 3px 10px rgba(0, 0, 0, .3);
	animation: none;
	outline: none;
	transform: translate(-50%, -50%) scale(1.08);
}

.tmf-ml-machine-name {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.tmf-ml-modal {
	position: fixed;
	z-index: 100000;
	inset: 0;
	display: grid;
	padding: 24px;
	place-items: center;
	pointer-events: none;
}

.tmf-ml-modal[hidden] {
	display: none;
}

.tmf-ml-modal.is-open {
	pointer-events: auto;
}

.tmf-ml-modal-preload {
	position: fixed;
	top: 0;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

.tmf-ml-modal-preload iframe {
	display: block;
	width: 1px;
	height: 1px;
	border: 0;
}

.tmf-ml-modal-backdrop {
	position: absolute;
	inset: 0;
	display: grid;
	padding: 24px;
	background: rgba(5, 20, 28, .78);
	opacity: 0;
	place-items: center;
	transition: opacity .3s ease;
}

.tmf-ml-modal.is-open .tmf-ml-modal-backdrop {
	opacity: 1;
}

.tmf-ml-dialog {
	position: relative;
	display: flex;
	width: min(760px, 100%);
	max-height: min(760px, 92vh);
	flex-direction: column;
	overflow: hidden;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 18px 64px rgba(0, 0, 0, .36);
	opacity: 0;
	transform: translateY(-40px);
	transition: opacity .3s ease, transform .3s ease;
}

.tmf-ml-modal.is-open .tmf-ml-dialog {
	opacity: 1;
	transform: translateY(0);
}

.tmf-ml-modal-close {
	position: absolute;
	z-index: 2;
	top: 12px;
	right: 12px;
	display: grid;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .58);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	place-items: center;
	cursor: pointer;
}

.tmf-ml-modal-close:hover,
.tmf-ml-modal-close:focus-visible {
	background: #006f99;
	outline: 3px solid rgba(255, 255, 255, .65);
	outline-offset: 2px;
}

.tmf-ml-modal-content {
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 0;
	transition: opacity .16s ease, transform .16s ease;
}

.tmf-ml-modal-content.is-leaving-next {
	opacity: 0;
	transform: translateX(-18px);
}

.tmf-ml-modal-content.is-leaving-prev {
	opacity: 0;
	transform: translateX(18px);
}

.tmf-ml-modal-content.is-entering {
	opacity: 0;
	transform: translateX(18px);
}

.tmf-ml-modal-media:empty {
	display: none;
}

.tmf-ml-modal-media {
	background-color: #000;
}

.tmf-ml-modal-media iframe,
.tmf-ml-modal-media video {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	background: #000;
}

.tmf-ml-modal-media iframe:not([data-tmf-ml-youtube-frame]):not([data-tmf-ml-vimeo-loaded="1"]) {
	opacity: 0;
}

.tmf-ml-modal-copy {
	padding: 26px 28px 22px;
}

.tmf-ml-modal-copy:empty {
	display: none;
}

.tmf-ml-modal-title {
	margin: 0 0 10px;
	font-size: clamp(20px, 3vw, 30px);
	line-height: 1.15;
}

.tmf-ml-modal-text > :first-child {
	margin-top: 0;
}

.tmf-ml-modal-text > :last-child {
	margin-bottom: 0;
}

.tmf-ml-modal-text--plain {
	white-space: pre-wrap;
}

.tmf-ml-modal-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 18px;
	border-top: 1px solid #e7ecee;
	background: #fafcfc;
}

.tmf-ml-modal-footer[hidden] {
	display: none;
}

.tmf-ml-modal-nav {
	min-width: 90px;
	padding: 8px 12px;
	border: 1px solid #cad7db;
	border-radius: 6px;
	background: #fff;
	color: #17343e;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.tmf-ml-modal-nav:disabled {
	opacity: .4;
	cursor: not-allowed;
}

.tmf-ml-modal-nav:not(:disabled):hover,
.tmf-ml-modal-nav:not(:disabled):focus-visible {
	border-color: #008ec3;
	color: #006f99;
	outline: 3px solid rgba(0, 142, 195, .18);
	outline-offset: 1px;
}

.tmf-ml-modal-count {
	color: #687b82;
	font-size: 12px;
	font-weight: 700;
}

@media (max-width: 640px) {
	.tmf-machine-lineup,
	.tmf-ml-admin-preview {
		--tmf-canvas-height: var(--tmf-canvas-height-mobile);
	}

	.tmf-ml-modal,
	.tmf-ml-modal-backdrop {
		padding: 10px;
	}

	.tmf-ml-dialog {
		max-height: 94vh;
		border-radius: 9px;
	}

	.tmf-ml-modal-copy {
		padding: 20px;
	}

	.tmf-ml-modal-footer {
		padding: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tmf-ml-marker,
	.tmf-ml-modal-backdrop,
	.tmf-ml-dialog,
	.tmf-ml-modal-content,
	.tmf-ml-canvas-scroll-fade {
		transition: none;
	}

	.tmf-ml-marker {
		animation: none;
	}

}
