/* Moodfex Life Path Number Calculator — matches the mfx-* design language. */
.mfx-lp {
	--mfx-lp-bg: #ffffff;
	--mfx-lp-soft: #edf2e9;
	--mfx-lp-text: #20241f;
	--mfx-lp-muted: #687066;
	--mfx-lp-green: #52644d;
	--mfx-lp-green-dark: #34412f;
	--mfx-lp-gold: #aa8f58;
	--mfx-lp-line: #e1e6dd;
	width: 100%;
	max-width: 720px;
	margin: 0 auto;
	box-sizing: border-box;
	color: var(--mfx-lp-text);
	font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
	line-height: 1.6;
}

.mfx-lp *,
.mfx-lp *::before,
.mfx-lp *::after {
	box-sizing: border-box;
}

/* The HTML [hidden] attribute must win over the widget's display rules
   (buttons use display:inline-flex, the loader uses display:flex, etc.). */
.mfx-lp [hidden] {
	display: none !important;
}

.mfx-lp__card {
	background: var(--mfx-lp-bg);
	border: 1px solid var(--mfx-lp-line);
	border-radius: 20px;
	padding: 28px;
	box-shadow: 0 12px 32px rgba(40, 50, 38, 0.06);
}

.mfx-lp__title {
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 500;
	font-size: clamp(1.5rem, 3.5vw, 2rem);
	line-height: 1.2;
	margin: 0 0 8px;
	color: var(--mfx-lp-text);
}

.mfx-lp__lead {
	margin: 0 0 22px;
	color: var(--mfx-lp-muted);
	font-size: 1.02rem;
}

.mfx-lp__field {
	margin-bottom: 18px;
}

.mfx-lp__label {
	display: block;
	font-weight: 700;
	font-size: 0.92rem;
	margin-bottom: 8px;
	color: var(--mfx-lp-text);
}

.mfx-lp__input {
	display: block;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	padding: 13px 15px;
	/* 16px keeps iOS Safari from zooming the page on focus. */
	font-size: 16px;
	font-family: inherit;
	text-align: left;
	color: var(--mfx-lp-text);
	background: #fbfcfa;
	border: 1px solid #cad5c5;
	border-radius: 12px;
	/* Normalise the native iOS date control so it respects width:100% and left align. */
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* iOS renders the date value inside a nested container that can push right;
   pin it to the left and let it shrink. */
.mfx-lp__input::-webkit-date-and-time-value {
	text-align: left;
	margin: 0;
}

.mfx-lp__form,
.mfx-lp__field,
.mfx-lp__card {
	min-width: 0;
}

.mfx-lp__input:focus {
	outline: none;
	border-color: var(--mfx-lp-green);
	box-shadow: 0 0 0 3px rgba(82, 100, 77, 0.18);
}

.mfx-lp__input[aria-invalid="true"] {
	border-color: #b4553f;
}

.mfx-lp__error {
	margin: 8px 0 0;
	min-height: 1.2em;
	color: #a8452f;
	font-size: 0.9rem;
	font-weight: 600;
}

.mfx-lp__error:empty {
	min-height: 0;
	margin: 0;
}

.mfx-lp__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 14px;
}

.mfx-lp__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 13px 22px;
	font-size: 0.98rem;
	font-family: inherit;
	font-weight: 800;
	border-radius: 999px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.mfx-lp__btn:focus-visible {
	outline: 3px solid rgba(82, 100, 77, 0.45);
	outline-offset: 2px;
}

.mfx-lp__btn--primary {
	background: var(--mfx-lp-green-dark);
	color: #ffffff;
}

.mfx-lp__btn--primary:hover {
	background: #2a3527;
}

.mfx-lp__btn--ghost {
	background: #ffffff;
	color: var(--mfx-lp-green-dark);
	border-color: #cad5c5;
}

.mfx-lp__btn--ghost:hover {
	background: var(--mfx-lp-soft);
}

.mfx-lp__privacy {
	margin: 0;
	font-size: 0.84rem;
	color: var(--mfx-lp-muted);
}

.mfx-lp__result {
	margin-top: 24px;
	text-align: center;
}

/* On-page 9:16 card preview — the exact image that gets downloaded/shared. */
.mfx-lp__preview {
	width: 100%;
	max-width: 340px;
	margin: 0 auto;
}

.mfx-lp__preview-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 9 / 16;
	border: 1px solid var(--mfx-lp-line);
	border-radius: 18px;
	background: var(--mfx-lp-soft);
	color: var(--mfx-lp-muted);
	font-size: 0.92rem;
}

.mfx-lp__card-img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 18px;
	border: 1px solid var(--mfx-lp-line);
	box-shadow: 0 14px 36px rgba(40, 50, 38, 0.12);
}

/* Text fallback (shown only if the card image cannot be rendered). */
.mfx-lp__textcard {
	padding: 26px;
	border: 1px solid var(--mfx-lp-line);
	border-top: 3px solid var(--mfx-lp-gold);
	border-radius: 18px;
	background: linear-gradient(180deg, #fbfcfa, #f4f7f1);
}

.mfx-lp__result-label {
	margin: 0 0 6px;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mfx-lp-green);
}

.mfx-lp__number {
	margin: 0 0 14px;
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 500;
	font-size: clamp(3.4rem, 12vw, 5rem);
	line-height: 1;
	color: var(--mfx-lp-green-dark);
}

.mfx-lp__steps {
	display: inline-block;
	text-align: left;
	margin: 0 auto 16px;
	padding: 14px 18px;
	background: #ffffff;
	border: 1px solid var(--mfx-lp-line);
	border-radius: 12px;
}

.mfx-lp__step {
	margin: 2px 0;
	font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
	font-size: 0.95rem;
	color: var(--mfx-lp-text);
}

.mfx-lp__meaning {
	margin: 0 auto;
	max-width: 540px;
	color: var(--mfx-lp-muted);
	font-size: 1.02rem;
}

/* ---- Share / download the 9:16 result card ---- */
.mfx-lp__share {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 22px;
}

.mfx-lp__share .mfx-lp__btn {
	min-width: 190px;
}

.mfx-lp__btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.mfx-lp__share-status {
	flex-basis: 100%;
	margin: 4px 0 0;
	min-height: 1.1em;
	font-size: 0.88rem;
	color: var(--mfx-lp-muted);
}

.mfx-lp__share-status:empty {
	min-height: 0;
}

/* ---- Fix the page's own calculator grid overflow on tablet/mobile ----
   The page's .mfx-grid keeps a wide grid track because its items default to
   min-width:auto, so the boxes overflow the viewport (a pre-existing page issue
   on every calculator page). This override is scoped to the calculator page via
   the plugin stylesheet and lets the single-column track shrink to fit. */
@media ( max-width: 800px ) {
	.mfx-grid {
		grid-template-columns: 1fr !important;
	}
	.mfx-grid > .mfx-box {
		min-width: 0 !important;
		max-width: 100% !important;
		width: auto !important;
	}
}

/* ---- Embedded mode: form moved into the page's existing calculator box ---- */
/* Neutralise the static placeholder's dashed/centered styling. */
.mfx-calculator.mfx-calc-hydrated {
	min-height: 0;
	padding: 0;
	border: 0;
	background: none;
	display: block;
	place-items: initial;
	text-align: left;
}

/* The form now lives inside .mfx-box, so drop its own card chrome and width cap
   and hide its title (the box already provides a "Calculate Your Result" heading). */
.mfx-lp--embedded {
	max-width: none;
}

.mfx-lp--embedded .mfx-lp__card {
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: none;
}

.mfx-lp--embedded .mfx-lp__title {
	display: none;
}

@media (max-width: 600px) {
	.mfx-lp__card {
		padding: 20px;
	}
	.mfx-lp__result {
		padding: 20px;
	}
	.mfx-lp__btn {
		width: 100%;
	}
	.mfx-lp--embedded .mfx-lp__card {
		padding: 0;
	}
}
