/* =========================================================================
   Forexive floating pill header
   Scoped under body.fx-pill-header so it cannot leak onto the original header.
   ========================================================================= */

body.fx-pill-header {
	--fx-ink: #f3faf6;
	--fx-muted: rgba(243, 250, 246, 0.64);
	--fx-line: rgba(255, 255, 255, 0.14);
	--fx-green: #12b981;
	--fx-green-deep: #0d9a6a;
	--fx-announce: #06140f;
	--fx-glass: #2d665194;
	--fx-radius-pill: 16px;
	--fx-radius-card: 16px;
	--fx-radius-btn: 10px;
	--fx-announce-h: 40px;
	--fx-pill-h: 56px;
	--fx-z-header: 10020;
	--fx-z-overlay: 10010;
}

body.fx-pill-header.fx-menu-open {
	overflow: hidden;
	touch-action: none;
}

/* Hide Tawk while the mobile card is open */
body.fx-pill-header.fx-menu-open iframe[src*="tawk.to"],
body.fx-pill-header.fx-menu-open .widget-visible,
body.fx-pill-header.fx-menu-open .tawk-min-container,
body.fx-pill-header.fx-menu-open div[id^="tawk-"],
body.fx-pill-header.fx-menu-open div[class*="tawk-"] {
	visibility: hidden !important;
	pointer-events: none !important;
	opacity: 0 !important;
}

.fx-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: var(--fx-z-header);
	pointer-events: none;
	font-family: "Poppins", system-ui, -apple-system, sans-serif;
}

.admin-bar .fx-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .fx-header {
		top: 46px;
	}
}

.fx-header * {
	pointer-events: auto;
	box-sizing: border-box;
}

/* ---- Announcement ---------------------------------------------------- */
.fx-announce {
	background: var(--fx-announce);
	color: #fff;
	height: var(--fx-announce-h);
	display: flex;
	align-items: center;
	justify-content: center;
}

.fx-announce__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: min(1280px, calc(100% - 32px));
	min-width: 0;
}

.fx-announce__badge {
	flex: 0 0 auto;
	background: var(--fx-green);
	color: #04140f;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1;
	padding: 5px 10px;
	border-radius: var(--fx-radius-pill);
}

.fx-announce__text {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}

.fx-announce__cta {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: opacity 0.15s ease;
}

.fx-announce__cta:hover {
	opacity: 0.8;
	color: #fff;
}

@media (max-width: 720px) {
	.fx-announce__cta {
		display: none;
	}
	.fx-announce__text {
		font-size: 12px;
	}
	.fx-announce {
		--fx-announce-h: 36px;
		height: var(--fx-announce-h);
	}
}

/* ---- Pill ------------------------------------------------------------ */
.fx-pill-wrap {
	padding: 10px 16px 0;
}

.fx-header .fx-pill {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	height: var(--fx-pill-h);
	max-width: 1280px;
	margin: 0 auto;
	padding: 6px 8px 6px 18px;
	background: var(--fx-glass);
	backdrop-filter: blur(22px) saturate(160%);
	-webkit-backdrop-filter: blur(22px) saturate(160%);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--fx-radius-pill);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.1) inset,
		0 12px 40px rgba(0, 0, 0, 0.32),
		0 2px 8px rgba(0, 0, 0, 0.18);
	transition: box-shadow 0.25s ease, background 0.25s ease;
}

.fx-header.is-scrolled .fx-pill {
	background: #2d6651c7;
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.1) inset,
		0 16px 48px rgba(0, 0, 0, 0.4),
		0 4px 12px rgba(0, 0, 0, 0.22);
}

.fx-brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	text-decoration: none;
	color: var(--fx-ink);
	min-width: 0;
}

.fx-brand__mark {
	width: 140px;
    object-fit: cover;
    display: block;
    flex: 0 0 auto;
}

.fx-brand__name {
	font-size: 16px;
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1;
	color: #fff;
}

/* ---- Desktop nav ----------------------------------------------------- */
.fx-pill__nav {
	flex: 0 1 auto;
	min-width: 0;
	display: none;
}

.fx-nav {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 2px;
}

.fx-nav > li {
	position: relative;
	margin: 0;
}

.fx-nav > li > a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 8px 12px;
	font-size: 14px;
	font-weight: 500;
	color: var(--fx-muted);
	text-decoration: none;
	border-radius: 10px;
	line-height: 1.2;
	transition: color 0.15s ease, background 0.15s ease;
}

.fx-nav > li > a:hover,
.fx-nav > li.current-menu-item > a,
.fx-nav > li.current-menu-ancestor > a {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
}

.fx-nav > .menu-item-has-children > a::after {
	content: "";
	width: 8px;
	height: 8px;
	border-right: 1.6px solid currentColor;
	border-bottom: 1.6px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	opacity: 0.7;
}

.fx-header,
.fx-pill-wrap,
.fx-header .fx-pill,
.fx-pill__nav,
.fx-nav > li {
	overflow: visible;
}

.fx-nav .sub-menu {
	list-style: none;
	margin: 0;
	padding: 8px;
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	min-width: 188px;
	background: rgba(10, 28, 22, 0.92);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
	z-index: 20;
}

.fx-nav > .menu-item-has-children:hover > .sub-menu,
.fx-nav > .menu-item-has-children:focus-within > .sub-menu,
.fx-nav > .menu-item-has-children.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.fx-nav .sub-menu a {
	display: block;
	padding: 10px 12px;
	font-size: 14px;
	font-weight: 500;
	color: var(--fx-ink);
	text-decoration: none;
	border-radius: 10px;
}

.fx-nav .sub-menu a:hover {
	background: rgba(255, 255, 255, 0.08);
}

/* ---- Products mega-menu ---------------------------------------------- */
.fx-mega {
	position: absolute;
	top: 100%;
	left: 0;
	padding-top: 12px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
	z-index: 30;
	pointer-events: none;
}

.fx-nav > .fx-has-mega:hover > .fx-mega,
.fx-nav > .fx-has-mega:focus-within > .fx-mega,
.fx-nav > .fx-has-mega.is-open > .fx-mega {
	opacity: 1;
	visibility: visible;
	transform: none;
	pointer-events: auto;
}

.fx-mega__inner {
	display: grid;
	grid-template-columns: minmax(280px, 360px) 220px;
	gap: 0;
	min-width: 560px;
	background: rgba(10, 22, 32, 0.96);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 14px;
	box-shadow: 0 22px 50px rgba(0, 0, 0, 0.42);
	overflow: hidden;
}

.fx-mega__list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px;
}

.fx-mega__item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
	text-align: left;
}

.fx-mega__item:hover {
	background: rgba(255, 255, 255, 0.07);
}

.fx-mega__ico {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #9ff3d0;
	background: rgba(18, 185, 129, 0.16);
}

.fx-mega__ico--2-step { color: #9fd4ff; background: rgba(80, 160, 255, 0.16); }
.fx-mega__ico--instant { color: #ffe08a; background: rgba(240, 180, 40, 0.16); }
.fx-mega__ico--apex { color: #d7c4ff; background: rgba(150, 110, 255, 0.16); }

.fx-mega__copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.fx-mega__title {
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	line-height: 1.25;
}

.fx-mega__desc {
	font-size: 12px;
	font-weight: 400;
	color: rgba(243, 250, 246, 0.58);
	line-height: 1.4;
}

.fx-mega__meta {
	font-size: 12px;
	font-weight: 600;
	color: var(--fx-green);
	margin-top: 2px;
}

.fx-mega__promo {
	padding: 14px;
	border-left: 1px solid rgba(255, 255, 255, 0.08);
	display: flex;
	flex-direction: column;
	background: rgba(0, 0, 0, 0.18);
}

.fx-mega__promo-visual {
	height: 92px;
	border-radius: 10px;
	margin-bottom: 12px;
	background:
		radial-gradient(120px 80px at 80% 20%, rgba(18, 185, 129, 0.45), transparent 70%),
		linear-gradient(160deg, #0c2a20 0%, #071410 100%);
	display: flex;
	align-items: flex-start;
	padding: 10px;
}

.fx-mega__promo-badge {
	background: var(--fx-green);
	color: #04140f;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: 6px;
}

.fx-mega__promo-title {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
}

.fx-mega__promo-text {
	margin: 0 0 14px;
	font-size: 12px;
	color: rgba(243, 250, 246, 0.58);
	line-height: 1.4;
}

.fx-mega__promo-cta {
	margin-top: auto;
	height: 36px;
	width: 100%;
}

/* ---- Actions --------------------------------------------------------- */
.fx-pill__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
	flex: 0 0 auto;
}

.fx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 36px;
	padding: 0 14px;
	border-radius: var(--fx-radius-btn);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	line-height: 1;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
	white-space: nowrap;
}

.fx-btn--solid {
	background: var(--fx-green);
	color: #fff;
	border: 1px solid transparent;
}

.fx-btn--solid:hover {
	background: var(--fx-green-deep);
	color: #fff;
}

.fx-btn--ghost {
	background: transparent;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.42);
}

.fx-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.72);
	color: #fff;
}

.fx-pill__cta {
	height: 36px;
	padding: 0 14px;
	border-radius: var(--fx-radius-btn);
}

/* Language */
.fx-lang {
	position: relative;
	display: none;
}

.fx-lang__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: 0;
	padding: 6px 4px;
	cursor: pointer;
	color: var(--fx-ink);
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
}

.fx-lang__flag {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.fx-lang__panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	min-width: 188px;
	background: rgba(10, 28, 22, 0.94);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
	padding: 8px;
	z-index: 6;
}

.fx-lang__panel[hidden] {
	display: none !important;
}

.fx-lang__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fx-lang__opt {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	background: none;
	border: 0;
	padding: 8px 10px;
	border-radius: 8px;
	color: var(--fx-ink);
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	text-align: left;
}

.fx-lang__opt:hover,
.fx-lang__opt.is-current {
	background: rgba(255, 255, 255, 0.08);
}

.fx-lang__opt img {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 auto;
}

.fx-lang__panel .gtranslate_wrapper {
	display: none !important;
}

/* Hamburger / close */
.fx-toggle {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: transparent;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #fff;
	position: relative;
}

.fx-toggle__bars,
.fx-toggle__bars::before,
.fx-toggle__bars::after {
	display: block;
	width: 16px;
	height: 1.8px;
	background: currentColor;
	border-radius: 2px;
	position: relative;
}

.fx-toggle__bars::before,
.fx-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
}

.fx-toggle__bars::before { top: -5px; }
.fx-toggle__bars::after { top: 5px; }

.fx-toggle__x {
	display: none;
	width: 16px;
	height: 16px;
	position: relative;
}

.fx-toggle__x::before,
.fx-toggle__x::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 16px;
	height: 1.8px;
	background: currentColor;
	border-radius: 2px;
}

.fx-toggle__x::before { transform: translate(-50%, -50%) rotate(45deg); }
.fx-toggle__x::after { transform: translate(-50%, -50%) rotate(-45deg); }

body.fx-menu-open .fx-toggle__bars { display: none; }
body.fx-menu-open .fx-toggle__x { display: block; }

/* ---- Mobile overlay -------------------------------------------------- */
.fx-overlay {
	position: fixed;
	inset: 0;
	z-index: var(--fx-z-overlay);
	display: flex;
	flex-direction: column;
	padding:
		calc(var(--fx-announce-h) + var(--fx-pill-h) + 22px)
		12px
		12px;
}

.admin-bar .fx-overlay {
	padding-top: calc(32px + var(--fx-announce-h) + var(--fx-pill-h) + 22px);
}

@media screen and (max-width: 782px) {
	.admin-bar .fx-overlay {
		padding-top: calc(46px + var(--fx-announce-h) + var(--fx-pill-h) + 22px);
	}
}

.fx-overlay[hidden] {
	display: none !important;
}

.fx-overlay__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 20, 15, 0.38);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

.fx-menu-card {
	position: relative;
	z-index: 1;
	background: rgba(10, 28, 22, 0.88);
	backdrop-filter: blur(22px) saturate(160%);
	-webkit-backdrop-filter: blur(22px) saturate(160%);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--fx-radius-card);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
	padding: 12px 8px 16px;
	display: flex;
	flex-direction: column;
	max-height: 100%;
	overflow: auto;
	animation: fxCardIn 0.22s ease;
}

@keyframes fxCardIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.fx-menu-card__nav {
	padding: 8px 12px 4px;
}

.fx-nav--mobile {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
}

.fx-nav--mobile > li > a {
	display: flex;
	width: 100%;
	padding: 11px 8px;
	font-size: 17px;
	font-weight: 600;
	color: var(--fx-ink);
	border-radius: 12px;
	background: none;
}

.fx-nav--mobile > li > a:hover {
	background: rgba(255, 255, 255, 0.08);
}

.fx-nav--mobile > .menu-item-has-children > a::after {
	margin-left: auto;
	transform: rotate(45deg);
	transition: transform 0.16s ease;
}

.fx-nav--mobile > .menu-item-has-children.is-open > a::after {
	transform: rotate(225deg);
}

.fx-nav--mobile .sub-menu {
	position: static;
	opacity: 1;
	visibility: visible;
	transform: none;
	box-shadow: none;
	padding: 0 8px 8px 16px;
	min-width: 0;
	display: none;
}

.fx-nav--mobile > .menu-item-has-children.is-open > .sub-menu {
	display: block;
}

.fx-nav--mobile .sub-menu a {
	padding: 10px 8px;
	font-size: 16px;
	color: var(--fx-muted);
}

.fx-menu-card__lang {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	padding: 8px 16px 4px;
}

.fx-menu-card__lang .fx-lang__opt {
	width: 32px;
	height: 32px;
	padding: 0;
	justify-content: center;
	border: 1px solid var(--fx-line);
	border-radius: 50%;
}

.fx-menu-card__lang .fx-lang__opt.is-current {
	border-color: var(--fx-green);
}

.fx-menu-card__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding: 16px 16px 8px;
	margin-top: 8px;
	border-top: 1px solid var(--fx-line);
}

.fx-menu-card__actions .fx-btn {
	width: 100%;
	min-width: 0;
	height: 44px;
	border-radius: 12px;
}

.fx-lang .fx-ico-chevron {
	opacity: 0.7;
}

/* ---- Desktop layout -------------------------------------------------- */
@media (min-width: 1201px) {
	.fx-pill-wrap {
		padding: 12px 24px 0;
	}

	.fx-header .fx-pill {
		padding: 6px 8px 6px 20px;
		gap: 12px;
	}

	.fx-pill__nav {
		display: block;
	}

	.fx-lang {
		display: inline-flex;
	}

	.fx-toggle {
		display: none;
	}

	.fx-overlay {
		display: none !important;
	}

	.fx-brand__name {
		font-size: 17px;
	}

	.fx-pill__cta {
		height: 36px;
	}
}

@media (min-width: 1201px) and (max-width: 1320px) {
	.fx-nav > li > a {
		padding: 8px 8px;
		font-size: 13px;
	}
}

/* Compact mobile pill */
@media (max-width: 1200px) {
	.fx-header .fx-pill {
		--fx-pill-h: 52px;
		height: var(--fx-pill-h);
		padding: 5px 6px 5px 14px;
	}

	.fx-pill__cta {
		height: 34px;
		padding: 0 12px;
		font-size: 13px;
	}
	
	.fx-pill__login {
		display: none;
	}

	.fx-brand__name {
		font-size: 15px;
		letter-spacing: 0.04em;
	}
}

.fx-nav--mobile .fx-mega {
	position: static;
	padding: 0;
	opacity: 1;
	visibility: visible;
	transform: none;
	pointer-events: auto;
	display: none;
}

.fx-nav--mobile > .fx-has-mega.is-open > .fx-mega {
	display: block;
}

.fx-nav--mobile .fx-mega__inner {
	display: block;
	min-width: 0;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
}

.fx-nav--mobile .fx-mega__list {
	padding: 0 8px 8px 8px;
}

.fx-nav--mobile .fx-mega__item {
	padding: 10px 8px;
}

.fx-nav--mobile .fx-mega__title {
	font-size: 16px;
}

.fx-nav--mobile .fx-mega__promo {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.fx-menu-card,
	.fx-nav .sub-menu,
	.fx-mega,
	.fx-header .fx-pill {
		animation: none;
		transition: none;
	}
}

body.fx-pill-header.forexive-checkout-page .forexive-checkout {
	padding-top: 128px;
}
