/* M4 Forex Calculators — scoped to .m4fx so it can sit inside any page template */

.m4fx {
	background-color: #0a0e24;
	background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
	background-size: 22px 22px;
	padding: 48px 24px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	box-sizing: border-box;
}

.m4fx * {
	box-sizing: border-box;
}

.m4fx__intro {
	text-align: center;
	max-width: 720px;
	margin: 0 auto;
}

.m4fx__title {
	font-family: Georgia, 'Times New Roman', serif;
	font-weight: 700;
	font-size: 32px;
	color: #ffffff;
	margin: 0;
	letter-spacing: 0.01em;
}

.m4fx__subtitle {
	font-family: Georgia, 'Times New Roman', serif;
	font-weight: 700;
	font-size: 21px;
	color: #ffffff;
	margin: 16px 0 0;
	line-height: 1.4;
}

.m4fx__lead {
	font-size: 14.5px;
	color: #b7bcde;
	line-height: 1.7;
	margin: 16px auto 0;
	max-width: 720px;
}

.m4fx__tabs {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: center;
	margin: 28px auto;
	max-width: 900px;
}

.m4fx__tab {
	padding: 13px 22px;
	border-radius: 999px;
	cursor: pointer;
	background: transparent;
	color: #ffffff;
	border: 1.5px solid rgba(255, 255, 255, 0.3);
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.m4fx__tab.is-active {
	background: #8ed100;
	color: #0b0b0b;
	border-color: transparent;
}

.m4fx__panel {
	background: #101838;
	border-radius: 20px;
	padding: 40px 44px;
	max-width: 900px;
	margin: 0 auto;
}

.m4fx__panel-title {
	font-family: Georgia, 'Times New Roman', serif;
	font-weight: 700;
	font-size: 25px;
	color: #ffffff;
	margin: 0 0 8px;
}

.m4fx__panel-helper {
	font-size: 13.5px;
	color: #9ba0c4;
	margin: 0 0 26px;
	line-height: 1.6;
	max-width: 560px;
}

.m4fx__fields {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.m4fx__field label {
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: #d5d8ee;
	margin-bottom: 8px;
}

.m4fx__field select,
.m4fx__field input {
	width: 100%;
	height: 46px;
	border-radius: 8px;
	border: none;
	padding: 0 16px;
	font-size: 14px;
	color: #12172b;
	background: #ffffff;
	font-family: inherit;
}

.m4fx__field select:focus,
.m4fx__field input:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(142, 209, 0, 0.4);
}

.m4fx__calculate {
	margin-top: 28px;
	height: 46px;
	padding: 0 32px;
	border-radius: 999px;
	border: none;
	background: #8ed100;
	color: #0b0b0b;
	font-weight: 800;
	font-size: 13px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	cursor: pointer;
}

.m4fx__calculate:hover {
	background: #7ac900;
}

.m4fx__calculate:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(142, 209, 0, 0.5);
}

.m4fx__result {
	margin-top: 26px;
	padding-top: 22px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.m4fx__result-line {
	font-size: 20px;
	font-weight: 700;
	color: #ffffff;
}

.m4fx__result-value {
	color: #8ed100;
}

.m4fx__result-pending {
	font-size: 14px;
	color: #9ba0c4;
}

.m4fx__result-error {
	font-size: 13px;
	color: #ff8a65;
}

.m4fx__result-note {
	font-size: 12px;
	color: #8890b8;
	margin-top: 6px;
}

.m4fx__instructions {
	margin-top: 26px;
	padding-top: 22px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.m4fx__instructions-title {
	font-size: 14px;
	font-weight: 700;
	color: #ffffff;
	margin-bottom: 10px;
}

.m4fx__instructions ol {
	margin: 0;
	padding-left: 18px;
	font-size: 13px;
	color: #9ba0c4;
	line-height: 1.7;
}

.m4fx__instructions li {
	margin-bottom: 6px;
}

.m4fx__disclaimer {
	margin: 24px auto 0;
	max-width: 900px;
	font-size: 11px;
	color: #6b7093;
	text-align: center;
}

/* RTL support (Arabic) — WPML sets dir="rtl" on <html> for RTL languages.
   Headings/labels/instructions mirror automatically via the browser's
   default text-align: start. Only the actual codes/numbers need to be
   pinned LTR so currency codes and figures don't get bidi-reordered. */
html[dir="rtl"] .m4fx__field select,
html[dir="rtl"] .m4fx__field input {
	text-align: right;
}

@media (max-width: 640px) {
	.m4fx {
		padding: 36px 16px;
	}
	.m4fx__panel {
		padding: 28px 20px;
	}
	.m4fx__title {
		font-size: 26px;
	}
	.m4fx__subtitle {
		font-size: 18px;
	}
}
