/* Instagram Money Calculator free tool */
.ml-imc {
	--ml-imc-gradient: linear-gradient(135deg, #9647db, #005ff9);
	--ml-imc-danger: #ef4444;
	--ml-imc-ink: #0a0a0a;
	--ml-imc-muted: #7a7a85;
	--ml-imc-faint: #9090a0;
	--ml-imc-border: #00000014;
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	width: min(100%, var(--site-width, 1200px));
	margin: 0 auto;
	color: var(--ml-imc-ink);
	font-family: inherit;
	line-height: 1.6;
	text-align: left;
}

.ml-center-hero .ml-imc {
	margin-top: 24px;
}

.ml-imc *,
.ml-imc *::before,
.ml-imc *::after {
	box-sizing: border-box;
}

.ml-imc :is(h2, h3, p, ol) {
	margin: 0;
}

.ml-imc button {
	margin: 0;
	font-family: inherit;
	cursor: pointer;
	appearance: none;
}

.ml-imc :is(button, a, input):focus-visible {
	outline: 2px solid #005ff961;
	outline-offset: 2px;
}

.ml-imc svg {
	flex: 0 0 auto;
}

.ml-imc__card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--ml-imc-border);
	border-radius: 28px;
}

/* Inputs */
.ml-imc__inputs {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 40px 44px;
	border-inline-end: 1px solid var(--ml-imc-border);
}

.ml-imc .ml-imc__eyebrow {
	color: var(--ml-imc-muted);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.ml-imc__sub {
	color: var(--ml-imc-faint);
	font-size: 14px;
}

.ml-imc__group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ml-imc__label {
	display: flex;
	align-items: baseline;
	gap: 8px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
}

.ml-imc__note {
	color: var(--ml-imc-faint);
	font-size: 12px;
	font-weight: 400;
}

.ml-imc__field {
	position: relative;
	display: flex;
	align-items: center;
}

.ml-imc__field svg {
	position: absolute;
	inset-inline-start: 16px;
	width: 20px;
	height: 20px;
	color: var(--ml-imc-faint);
	pointer-events: none;
	transition: color 0.2s;
}

.ml-imc .ml-imc__field input {
	width: 100%;
	height: 52px;
	margin: 0;
	padding: 12px 16px 12px 48px;
	color: var(--ml-imc-ink);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.4;
	background: #fff;
	border: 1px solid var(--ml-imc-border);
	border-radius: 12px;
	box-shadow: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	appearance: none;
	-moz-appearance: textfield;
}

.ml-imc .ml-imc__field input::-webkit-outer-spin-button,
.ml-imc .ml-imc__field input::-webkit-inner-spin-button {
	margin: 0;
	appearance: none;
}

.ml-imc .ml-imc__field input::placeholder {
	color: var(--ml-imc-faint);
}

.ml-imc .ml-imc__field input:hover {
	border-color: #9647db40;
}

.ml-imc .ml-imc__field input:focus {
	border-color: #9647db85;
	outline: 0;
	box-shadow: 0 0 0 4px #9647db1f;
}

.ml-imc__field:focus-within svg {
	color: #9647db;
}

.ml-imc .ml-imc__field input[aria-invalid="true"] {
	border-color: #ef444473;
	box-shadow: 0 0 0 4px #ef444414;
}

.ml-imc__error {
	padding: 12px 16px;
	color: #dc2626;
	font-size: 14px;
	font-weight: 500;
	background: #ef444414;
	border: 1px solid #ef44444d;
	border-radius: 12px;
}

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

.ml-imc .ml-imc__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 52px;
	padding: 12px 24px;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	background: var(--ml-imc-gradient);
	border: 0;
	border-radius: 12px;
	box-shadow: 0 8px 20px #9647db33;
	transition: transform 0.2s, box-shadow 0.2s;
}

.ml-imc .ml-imc__submit:hover {
	box-shadow: 0 12px 28px #9647db4d;
	transform: translateY(-1px);
}

.ml-imc__submit svg {
	width: 20px;
	height: 20px;
}

/* Results */
.ml-imc__output {
	display: flex;
	flex-direction: column;
	padding: 40px 32px;
	background: #fafafa;
}

.ml-imc__output > .ml-imc__eyebrow {
	margin-bottom: 8px;
}

.ml-imc__metric {
	padding: 16px 0;
	border-bottom: 1px solid var(--ml-imc-border);
}

.ml-imc__metric-label {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	color: var(--ml-imc-faint);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.8px;
	text-transform: uppercase;
}

.ml-imc__metric-label svg {
	width: 16px;
	height: 16px;
}

.ml-imc__metric-value {
	min-height: 40px;
	margin-bottom: 4px;
	color: #c4c4cc;
	font-size: 36px;
	font-weight: 800;
	line-height: 1.1;
	overflow-wrap: anywhere;
}

.ml-imc__output.is-calculated .ml-imc__metric-value--engagement {
	color: #005ff9;
}

.ml-imc__output.is-calculated .ml-imc__metric-value--earnings {
	color: #9647db;
	background: var(--ml-imc-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.ml-imc__metric-sub {
	color: var(--ml-imc-faint);
	font-size: 12px;
	line-height: 1.5;
}

.ml-imc__message {
	padding: 16px 0 20px;
	color: var(--ml-imc-muted);
	font-size: 14px;
	line-height: 1.5;
}

.ml-imc__output.is-calculated .ml-imc__message {
	color: var(--ml-imc-ink);
	font-weight: 500;
}

.ml-imc__cta {
	margin-top: auto;
	padding: 20px;
	color: #fff;
	background: var(--ml-imc-gradient);
	border-radius: 16px;
}

.ml-imc .ml-imc__cta-title {
	font-size: 20px;
	font-weight: 800;
	line-height: 1.4;
}

.ml-imc .ml-imc__cta-copy {
	margin: 4px 0 16px;
	font-size: 14px;
	line-height: 1.5;
	opacity: 0.85;
}

.ml-imc a.ml-imc__cta-button {
	display: block;
	padding: 12px;
	color: #9647db;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	background: #fff;
	border-radius: 8px;
	transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.ml-imc a.ml-imc__cta-button:hover {
	color: #9647db;
	background: #ffffffeb;
	box-shadow: 0 6px 20px #00000026;
	transform: translateY(-1px);
}

/* How it works */
.ml-imc__how {
	margin-top: 64px;
}

.ml-imc .ml-imc__how-title {
	margin-bottom: 32px;
	font-size: 36px;
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
}

.ml-imc .ml-imc__steps {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	padding: 0;
	list-style: none;
}

.ml-imc__step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 28px 24px;
	text-align: center;
	background: #fff;
	border: 1px solid var(--ml-imc-border);
	border-radius: 20px;
}

.ml-imc__step-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin-bottom: 8px;
	color: #fff;
	font-size: 20px;
	font-weight: 800;
	line-height: 1;
	background: var(--ml-imc-gradient);
	border-radius: 50%;
}

.ml-imc .ml-imc__step-title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
}

.ml-imc__step-copy {
	color: var(--ml-imc-muted);
	font-size: 14px;
	line-height: 1.5;
}

.ml-imc__formula {
	margin-top: 20px;
	padding: 28px 32px;
	background: linear-gradient(135deg, #9647db0a, #005ff90a);
	border: 1px solid var(--ml-imc-border);
	border-radius: 20px;
}

.ml-imc .ml-imc__formula-title {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-bottom: 20px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.4;
}

.ml-imc__formula-title svg {
	width: 24px;
	height: 24px;
	color: #9647db;
}

.ml-imc__formula-lines {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px 24px;
	background: #fff;
	border: 1px solid var(--ml-imc-border);
	border-radius: 12px;
}

.ml-imc__formula-lines code {
	padding: 0;
	color: #005ff9;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 14px;
	line-height: 1.6;
	background: none;
	overflow-wrap: anywhere;
}

/* Editor preview: the tool is static there. */
.ml-free-tool-preview {
	pointer-events: none;
}

@media (max-width: 900px) {
	.ml-imc__card {
		grid-template-columns: minmax(0, 1fr);
	}

	.ml-imc__inputs {
		border-inline-end: 0;
		border-bottom: 1px solid var(--ml-imc-border);
	}

	.ml-imc__output {
		padding: 36px 44px 44px;
	}

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

@media (max-width: 600px) {
	.ml-imc__card {
		border-radius: 20px;
	}

	.ml-imc__inputs,
	.ml-imc__output {
		padding: 28px 20px;
	}

	.ml-imc__metric-value {
		font-size: 32px;
	}

	.ml-imc__how {
		margin-top: 48px;
	}

	.ml-imc .ml-imc__how-title {
		font-size: 28px;
	}

	.ml-imc .ml-imc__steps {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}

	.ml-imc__formula {
		padding: 24px 20px;
	}

	.ml-imc__formula-lines {
		padding: 16px;
	}

	.ml-imc__formula-lines code {
		font-size: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ml-imc *,
	.ml-imc *::before,
	.ml-imc *::after {
		transition-duration: 0.01ms !important;
	}
}
