.masp {
	--masp-bg: #f6faf9;
	--masp-panel: #ffffff;
	--masp-text: #17332f;
	--masp-muted: #5b6d69;
	--masp-border: #d8e7e3;
	--masp-accent: #0f8f80;
	--masp-accent-strong: #087568;
	--masp-warning: #9b3d2b;
	color: var(--masp-text);
	background: var(--masp-bg);
	padding: clamp(24px, 5vw, 52px);
	border: 1px solid var(--masp-border);
	border-radius: 8px;
	max-width: 980px;
	margin: 0 auto;
}

.masp,
.masp * {
	box-sizing: border-box;
}

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

.masp__progress {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	padding: 0;
	margin: 0 0 18px;
	list-style: none;
}

.masp__progress-step {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 7px;
	min-width: 0;
	color: var(--masp-muted);
	font-size: 12px;
	font-weight: 700;
}

.masp__progress-step::before {
	content: "";
	position: absolute;
	top: 14px;
	left: 30px;
	right: -8px;
	height: 2px;
	background: var(--masp-border);
}

.masp__progress-step:last-child::before {
	display: none;
}

.masp__progress-step span {
	position: relative;
	z-index: 1;
	display: grid;
	width: 28px;
	height: 28px;
	place-items: center;
	border-radius: 50%;
	background: #eaf4f1;
	color: var(--masp-muted);
}

.masp__progress-step strong {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.masp:not([data-step]) .masp__progress-step--selfie,
.masp[data-step="start"] .masp__progress-step--selfie,
.masp[data-step="photo-selected"] .masp__progress-step--selfie,
.masp[data-step="details"] .masp__progress-step--selfie,
.masp[data-step="details"] .masp__progress-step--contact,
.masp[data-step="submitted"] .masp__progress-step {
	color: var(--masp-accent-strong);
}

.masp:not([data-step]) .masp__progress-step--selfie span,
.masp[data-step="start"] .masp__progress-step--selfie span,
.masp[data-step="photo-selected"] .masp__progress-step--selfie span,
.masp[data-step="details"] .masp__progress-step--selfie span,
.masp[data-step="details"] .masp__progress-step--contact span,
.masp[data-step="submitted"] .masp__progress-step span {
	background: var(--masp-accent);
	color: #fff;
}

.masp[data-step="details"] .masp__progress-step--selfie::before,
.masp[data-step="submitted"] .masp__progress-step::before {
	background: var(--masp-accent);
}

.masp__header {
	max-width: 720px;
	margin: 0 0 22px;
}

.masp__eyebrow {
	margin: 0 0 8px;
	color: var(--masp-accent-strong);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: uppercase;
}

.masp h2 {
	margin: 0 0 10px;
	font-size: clamp(26px, 4vw, 42px);
	line-height: 1.08;
	letter-spacing: 0;
}

.masp p {
	font-size: 16px;
	line-height: 1.55;
}

.masp__header p:last-child {
	margin: 0;
	color: var(--masp-muted);
}

.masp[data-step="submitted"] .masp__header {
	display: none;
}

.masp[data-step="details"] .masp__header {
	margin-bottom: 10px;
}

.masp[data-step="details"] .masp__header p:not(.masp__eyebrow) {
	display: none;
}

.masp[data-step="details"] .masp h2 {
	font-size: 22px;
	line-height: 1.1;
}

.masp[data-step="photo-selected"] .masp__header,
.masp[data-step="photo-selected"] .masp__upload,
.masp[data-step="details"] .masp__header,
.masp[data-step="details"] .masp__upload,
.masp[data-step="details"] .masp__preview,
.masp[data-step="details"] .masp__button--retake,
.masp[data-step="details"] .masp__button--reveal {
	display: none !important;
}

.masp__form,
.masp__result {
	background: var(--masp-panel);
	border: 1px solid var(--masp-border);
	border-radius: 8px;
	padding: clamp(18px, 4vw, 28px);
	box-shadow: 0 14px 42px rgba(30, 74, 67, 0.08);
}

.masp__grid {
	display: grid;
	gap: 14px;
	margin-bottom: 16px;
}

.masp__details {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid var(--masp-border);
}

.masp__form-intro {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
	padding: 10px;
	border: 1px solid var(--masp-border);
	border-radius: 8px;
	background: #f6faf9;
}

.masp__form-intro img {
	display: block;
	width: 44px;
	height: 44px;
	flex: 0 0 auto;
	object-fit: cover;
	border: 1px solid var(--masp-border);
	border-radius: 50%;
	background: #eef5f3;
}

.masp__form-intro p {
	margin: 0;
	color: var(--masp-text);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
}

.masp__field {
	display: grid;
	gap: 7px;
	color: var(--masp-text);
	font-size: 14px;
	font-weight: 700;
}

.masp__field input {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border: 1px solid var(--masp-border);
	border-radius: 6px;
	background: #fff;
	color: var(--masp-text);
	font: inherit;
	font-weight: 500;
}

.masp__field input:focus {
	border-color: var(--masp-accent);
	outline: 3px solid rgba(15, 143, 128, 0.16);
	outline-offset: 0;
}

.masp__upload {
	position: relative;
	display: flex;
	min-height: 170px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 24px;
	text-align: center;
	background: #fbfdfc;
	border: 1px dashed #9bc7bf;
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 160ms ease, background-color 160ms ease;
}

.masp__upload:hover,
.masp__upload:focus-within {
	background: #f1faf8;
	border-color: var(--masp-accent);
}

.masp__upload input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.masp__upload-icon {
	display: grid;
	width: 44px;
	height: 44px;
	place-items: center;
	border-radius: 50%;
	background: var(--masp-accent);
	color: #fff;
	font-size: 30px;
	line-height: 1;
}

.masp__upload-title {
	font-size: 18px;
	font-weight: 700;
}

.masp__upload-note {
	color: var(--masp-muted);
	font-size: 14px;
}

.masp__preview {
	margin-top: 16px;
}

.masp__preview img {
	display: block;
	width: 100%;
	max-height: 420px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid var(--masp-border);
}

.masp[data-step="photo-selected"] .masp__preview {
	margin-top: 0;
}

.masp[data-step="photo-selected"] .masp__button {
	margin-top: 12px;
}

.masp[data-step="details"] .masp__preview {
	display: none !important;
}

.masp__check {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin-top: 16px;
	color: var(--masp-muted);
	font-size: 14px;
	line-height: 1.45;
}

.masp__check input {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	margin-top: 2px;
	accent-color: var(--masp-accent);
}

.masp__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	width: 100%;
	margin-top: 20px;
	padding: 12px 18px;
	border: 0;
	border-radius: 6px;
	background: var(--masp-accent);
	color: #fff !important;
	font-size: 16px;
	font-weight: 700;
	text-decoration: none !important;
	cursor: pointer;
	transition: background-color 160ms ease, transform 160ms ease;
}

.masp__button:hover,
.masp__button:focus {
	background: var(--masp-accent-strong);
	color: #fff !important;
}

.masp__button:disabled {
	cursor: not-allowed;
	opacity: 0.48;
}

.masp__button--secondary {
	background: #17332f;
}

.masp__button--retake {
	margin-top: 12px;
}

.masp__button--secondary:hover,
.masp__button--secondary:focus {
	background: #0d2421;
}

.masp__status {
	min-height: 24px;
	margin: 14px 0 0;
	color: var(--masp-muted);
	font-size: 14px;
}

.masp__status[data-state="error"] {
	color: var(--masp-warning);
	font-weight: 700;
}

.masp__status[data-state="loading"] {
	color: var(--masp-accent-strong);
}

.masp__result {
	margin-top: 22px;
}

.masp[data-step="submitted"] .masp__result {
	margin-top: 0;
}

.masp__result--success h3 {
	margin: 0 0 8px;
	font-size: 24px;
	line-height: 1.2;
}

.masp__result--success p {
	margin: 0;
	color: var(--masp-muted);
}

.masp__success-person {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}

.masp__success-person img {
	display: block;
	width: 54px;
	height: 54px;
	flex: 0 0 auto;
	object-fit: cover;
	border: 1px solid var(--masp-border);
	border-radius: 50%;
	background: #eef5f3;
}

.masp__success-person strong {
	color: var(--masp-text);
	font-size: 17px;
	line-height: 1.25;
}

.masp__compare {
	display: grid;
	gap: 14px;
}

.masp__compare figure {
	margin: 0;
}

.masp__compare img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid var(--masp-border);
	background: #eef5f3;
}

.masp__compare figcaption {
	margin-top: 8px;
	color: var(--masp-muted);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0;
}

.masp__disclaimer {
	margin: 16px 0 0;
	color: var(--masp-muted);
	font-size: 13px;
}

.masp__actions {
	display: grid;
	gap: 10px;
}

.masp-floating {
	display: none;
}

.masp-modal[hidden] {
	display: none !important;
}

html.masp-modal-open {
	overflow: hidden;
}

html.masp-modal-open .medisam-mobile-cta,
html.masp-modal-open .gt_float_switcher,
html.masp-modal-open .gtranslate_wrapper,
html.masp-modal-open .gt_switcher,
html.masp-modal-open #gtranslate_wrapper,
html.masp-modal-open [id^="gt-wrapper-"],
html.masp-modal-open .mystickyelements-fixed,
html.masp-modal-open #mystickyelements,
body.masp-modal-open .medisam-mobile-cta,
body.masp-modal-open .gt_float_switcher,
body.masp-modal-open .gtranslate_wrapper,
body.masp-modal-open .gt_switcher,
body.masp-modal-open #gtranslate_wrapper,
body.masp-modal-open [id^="gt-wrapper-"],
body.masp-modal-open .mystickyelements-fixed,
body.masp-modal-open #mystickyelements {
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

@media (min-width: 720px) {
	.masp__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.masp__field--wide {
		grid-column: 1 / -1;
	}

	.masp__compare {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.masp__actions {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.masp-floating {
		display: block;
	}

	.masp-floating__button {
		position: fixed;
		left: 14px;
		bottom: calc(env(safe-area-inset-bottom, 0px) + 92px);
		z-index: 2147483600;
		display: grid;
		width: 58px;
		height: 58px;
		place-items: center;
		border: 0;
		border-radius: 50%;
		background: #0f8f80;
		color: #fff;
		box-shadow: 0 12px 34px rgba(8, 79, 70, 0.32);
		cursor: pointer;
	}

	.masp-floating__button svg {
		display: block;
		width: 29px;
		height: 29px;
	}

	.masp-floating__button:hover,
	.masp-floating__button:focus {
		background: #087568;
		color: #fff;
		outline: 3px solid rgba(15, 143, 128, 0.28);
		outline-offset: 3px;
	}

	.masp-modal {
		position: fixed;
		inset: 0;
		z-index: 2147483647;
		display: flex;
		align-items: flex-start;
		justify-content: center;
		padding: max(10px, env(safe-area-inset-top, 0px)) 10px 0;
		background: rgba(9, 24, 22, 0.58);
	}

	.masp-modal__sheet {
		position: relative;
		z-index: 2147483647;
		width: min(100%, 520px);
		max-height: calc(100dvh - max(10px, env(safe-area-inset-top, 0px)));
		overflow: auto;
		border-radius: 8px;
		background: #fff;
		-webkit-overflow-scrolling: touch;
	}

	.masp-modal__sheet .masp {
		width: 100%;
		margin: 0;
		border: 0;
		border-radius: 8px;
		padding: 12px 12px 16px;
	}

	.masp-modal__sheet .masp__header {
		padding-right: 42px;
		margin-bottom: 14px;
	}

	.masp-modal__sheet .masp h2 {
		font-size: 25px;
	}

	.masp-modal__sheet .masp__progress {
		position: sticky;
		top: 0;
		z-index: 3;
		margin: -4px -2px 12px;
		padding: 4px 2px 8px;
		background: #f6faf9;
	}

	.masp-modal__sheet .masp[data-step="details"] .masp__progress {
		margin-bottom: 8px;
		padding-bottom: 6px;
	}

	.masp-modal__sheet .masp__progress-step {
		grid-template-columns: 1fr;
		justify-items: center;
		gap: 4px;
		text-align: center;
		font-size: 10px;
	}

	.masp-modal__sheet .masp__progress-step::before {
		top: 13px;
		left: calc(50% + 17px);
		right: calc(-50% + 16px);
	}

	.masp-modal__sheet .masp__progress-step span {
		width: 26px;
		height: 26px;
	}

	.masp-modal__sheet .masp[data-step="details"] .masp__header {
		display: none;
	}

	.masp-modal__sheet .masp[data-step="details"] .masp__form,
	.masp-modal__sheet .masp[data-step="submitted"] .masp__result {
		padding: 12px;
	}

	.masp-modal__sheet .masp[data-step="details"] .masp__details {
		margin-top: 0;
		padding-top: 0;
		border-top: 0;
	}

	.masp-modal__sheet .masp[data-step="details"] .masp__form-intro {
		margin-bottom: 8px;
		padding: 8px;
	}

	.masp-modal__sheet .masp[data-step="details"] .masp__form-intro img {
		width: 38px;
		height: 38px;
	}

	.masp-modal__sheet .masp[data-step="details"] .masp__grid {
		gap: 7px;
		margin-bottom: 8px;
	}

	.masp-modal__sheet .masp[data-step="details"] .masp__field {
		gap: 4px;
		font-size: 13px;
	}

	.masp-modal__sheet .masp[data-step="details"] .masp__field input {
		min-height: 37px;
		padding: 7px 9px;
	}

	.masp-modal__sheet .masp[data-step="details"] .masp__check {
		margin-top: 7px;
		font-size: 12px;
		line-height: 1.25;
	}

	.masp-modal__sheet .masp[data-step="details"] .masp__button {
		min-height: 40px;
		margin-top: 9px;
	}

	.masp-modal__close {
		position: sticky;
		top: 10px;
		left: calc(100% - 52px);
		z-index: 2147483647;
		display: grid;
		width: 42px;
		height: 42px;
		margin: 10px 10px -52px auto;
		place-items: center;
		border: 1px solid #d8e7e3;
		border-radius: 50%;
		background: #fff;
		color: #17332f;
		font-size: 28px;
		line-height: 1;
		box-shadow: 0 8px 20px rgba(30, 74, 67, 0.12);
		cursor: pointer;
	}

	.masp-modal__close:hover,
	.masp-modal__close:focus {
		background: #f1faf8;
		outline: 3px solid rgba(15, 143, 128, 0.22);
		outline-offset: 2px;
	}
}
