/**
 * Satchel layout: header / footer built in Elementor (Headers / Footers post types).
 * Colours and type come from the Elementor kit globals (CSS custom properties).
 */

/* ---------------------------------------------------------------------------
 * [satchel_menu] base
 * ------------------------------------------------------------------------ */
.satchel-menu__list,
.satchel-menu__list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.satchel-menu a {
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.satchel-menu a:focus-visible,
.satchel-menu-toggle:focus-visible,
.satchel-button-up:focus-visible {
	outline: 2px solid var(--e-global-color-primary, #212121);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
 * Header bar (logo · main menu · buttons)
 * ------------------------------------------------------------------------ */
.satchel-header-bar {
	position: relative;
	z-index: 50;
}

.satchel-header-bar__logo a,
.satchel-header-bar__logo img {
	display: block;
}

.satchel-header-bar > .satchel-header-bar__secondary {
	margin-inline-start: auto;
}

/* Shared type: Body/p14-regular */
.satchel-menu--header a,
.satchel-menu--header .satchel-menu__group-title {
	font-family: var(--e-global-typography-4e3ed09a-font-family, "Inter"), sans-serif;
	font-size: var(--e-global-typography-4e3ed09a-font-size, 14px);
	font-weight: var(--e-global-typography-4e3ed09a-font-weight, 400);
	line-height: var(--e-global-typography-4e3ed09a-line-height, 20px);
	color: var(--e-global-color-primary, #212121);
}

.satchel-menu__chevron {
	display: inline-block;
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	background: url("../img/i-s-arrow-down.svg") center / 16px 16px no-repeat;
	transition: transform 0.2s ease;
}

/* Buttons menu: "LOG IN", "CONTACT US" (Body/Special) */
.satchel-menu--buttons .satchel-menu__list {
	display: flex;
	align-items: center;
	gap: 24px;
}

.satchel-menu--buttons .satchel-menu__list > li > a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 0 9px;
	border-radius: 4px;
	color: var(--e-global-color-primary, #212121);
	font-family: var(--e-global-typography-accent-font-family, "Inter"), sans-serif;
	font-size: var(--e-global-typography-accent-font-size, 12px);
	font-weight: var(--e-global-typography-accent-font-weight, 500);
	line-height: var(--e-global-typography-accent-line-height, 20px);
	letter-spacing: var(--e-global-typography-accent-letter-spacing, 1px);
	text-transform: uppercase;
	white-space: nowrap;
}

.satchel-menu--buttons .satchel-menu__list > li > a:hover {
	color: var(--e-global-color-secondary, #4c4c4c);
}

/* Burger / close button ([satchel_menu_toggle]); shown on tablet & mobile only */
.satchel-header-bar__toggle {
	display: none;
}

/* Doubled class: beats the kit's ".elementor-kit-N button" styles */
.satchel-menu-toggle.satchel-menu-toggle,
.satchel-menu-toggle.satchel-menu-toggle:hover,
.satchel-menu-toggle.satchel-menu-toggle:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	box-shadow: none;
	color: var(--e-global-color-primary, #212121);
	cursor: pointer;
}

/* Figma "i-s-menu": three 24×2 bars at y = 2 / 11 / 20 */
.satchel-menu-toggle__bars,
.satchel-menu-toggle__bars::before,
.satchel-menu-toggle__bars::after {
	display: block;
	width: 24px;
	height: 2px;
	border-radius: 1px;
	background-color: currentColor;
}

.satchel-menu-toggle__bars {
	position: relative;
}

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

.satchel-menu-toggle__bars::before {
	top: -9px;
}

.satchel-menu-toggle__bars::after {
	top: 9px;
}

/* Open: Figma "i-s-x" */
.satchel-menu-toggle.satchel-menu-toggle[aria-expanded="true"] {
	background: url("../img/i-s-x.svg") center / 24px 24px no-repeat;
}

.satchel-menu-toggle[aria-expanded="true"] .satchel-menu-toggle__bars {
	display: none;
}

/* ---------------------------------------------------------------------------
 * Desktop (≥1025px): inline menu + "Accounts & Products" mega panel
 * ------------------------------------------------------------------------ */
@media (min-width: 1025px) {
	/* The panel spans the whole header bar, so nothing between it and the bar may be positioned */
	.satchel-header-bar > .satchel-header-bar__primary,
	.satchel-header-bar__primary .elementor-widget-container,
	.satchel-menu--header,
	.satchel-menu--header .satchel-menu__list,
	.satchel-menu--header .satchel-menu__list > li {
		position: static;
	}

	.satchel-menu--header .satchel-menu__list {
		display: flex;
		align-items: center;
		gap: 24px;
	}

	/* Top items fill the 88px bar height so the pointer can travel into the panel */
	.satchel-menu--header .satchel-menu__list > li > a {
		display: inline-flex;
		align-items: center;
		gap: 4px;
		padding: 34px 0;
		white-space: nowrap;
	}

	.satchel-menu--header .satchel-menu__list > li > a:hover {
		color: var(--e-global-color-secondary, #4c4c4c);
	}

	/* Mega panel */
	.satchel-menu--header .satchel-menu__list > li > .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		z-index: 60;
		display: grid;
		/* Figma at 1440: 276 / 606 / 276 columns, 54px gaps, starting at the 75px gutter.
		   The extra 24px of end padding makes the fr tracks land on those exact widths. */
		grid-template-columns: 276fr 606fr 276fr;
		column-gap: 54px;
		align-items: start;
		padding: 4px calc(max(75px, (100% - 1290px) / 2) + 24px) 48px max(75px, calc((100% - 1290px) / 2));
		background-color: var(--e-global-color-7fad3719, #fafafa);
		box-shadow: 0 4px 40px rgba(0, 0, 0, 0.15);
		clip-path: inset(0 -80px -80px -80px);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.2s ease, visibility 0s linear 0.2s;
	}

	.satchel-menu--header .satchel-menu__list > li:hover > .sub-menu,
	.satchel-menu--header .satchel-menu__list > li:focus-within > .sub-menu {
		opacity: 1;
		visibility: visible;
		transition-delay: 0s;
	}

	/* Open state of the top bar: active item Grey80 with the chevron flipped up, others Grey50 */
	.satchel-menu--header .satchel-menu__list > li.menu-item-has-children:is(:hover, :focus-within) > a {
		color: var(--e-global-color-secondary, #4c4c4c);
	}

	.satchel-menu--header .satchel-menu__list > li:is(:hover, :focus-within) > a > .satchel-menu__chevron {
		background-image: url("../img/i-s-arrow-down-grey80.svg");
		transform: rotate(180deg);
	}

	.satchel-menu--header .satchel-menu__list:has(> li.menu-item-has-children:is(:hover, :focus-within)) > li:not(.menu-item-has-children) > a {
		color: var(--e-global-color-c84e2216, #8e8e8e);
	}

	/* Group heading: Desktop headings/H4 + Grey15 rule */
	.satchel-menu--header .satchel-menu__group-title {
		display: block;
		margin-bottom: 16px;
		padding-bottom: 12px;
		border-bottom: 1px solid var(--e-global-color-3bd84d0b, #dbdbdb);
		font-family: var(--e-global-typography-637c3e3c-font-family, "Inter"), sans-serif;
		font-size: var(--e-global-typography-637c3e3c-font-size, 16px);
		font-weight: var(--e-global-typography-637c3e3c-font-weight, 700);
		line-height: var(--e-global-typography-637c3e3c-line-height, 20px);
	}

	.satchel-menu--header .sub-menu .sub-menu a {
		display: inline-block;
		padding: 10px 0;
		white-space: nowrap;
	}

	.satchel-menu--header .sub-menu .sub-menu a:hover,
	.satchel-menu--header .sub-menu .sub-menu a:focus-visible {
		color: var(--e-global-color-secondary, #4c4c4c);
	}

	/* Long groups (Products) flow into two sub-columns of 4 rows */
	.satchel-menu--header .sub-menu .sub-menu:has(> li:nth-child(5)) {
		display: grid;
		grid-template-columns: 349fr 257fr;
		grid-template-rows: repeat(4, auto);
		grid-auto-flow: column;
	}
}

/* ---------------------------------------------------------------------------
 * Tablet & mobile (≤1024px): 56px bar + full-screen menu (Figma "Menu", 2543:3081)
 * ------------------------------------------------------------------------ */
@media (max-width: 1024px) {
	.satchel-header-bar > .satchel-header-bar__primary,
	.satchel-header-bar > .satchel-header-bar__secondary {
		display: none;
	}

	.satchel-header-bar > .satchel-header-bar__toggle {
		display: flex;
		align-items: center;
		height: 56px;
		margin-inline: auto -8px;
	}

	/* Open: the bar becomes a white full-screen sheet */
	#satchel-header-bar.is-open {
		position: fixed;
		top: var(--wp-admin--admin-bar--height, 0px);
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 1000;
		align-content: flex-start;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding-bottom: 32px;
		background-color: var(--e-global-color-905bacf3, #ffffff);
		transition: none;
	}

	#satchel-header-bar.is-open > .satchel-header-bar__primary,
	#satchel-header-bar.is-open > .satchel-header-bar__secondary {
		display: block;
		flex: 0 0 100%;
		width: 100%;
		max-width: 100%;
		margin-inline-start: 0;
	}

	/* LOG IN / CONTACT US first, under a Grey15 rule */
	#satchel-header-bar.is-open > .satchel-header-bar__secondary {
		order: 10;
		margin-bottom: 16px;
		padding-top: 8px;
		border-top: 1px solid var(--e-global-color-3bd84d0b, #dbdbdb);
	}

	#satchel-header-bar.is-open > .satchel-header-bar__primary {
		order: 11;
	}

	.satchel-menu--buttons .satchel-menu__list {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.satchel-menu--buttons .satchel-menu__list > li > a {
		display: flex;
		padding: 7px 12px 5px;
	}

	.satchel-menu--buttons .satchel-menu__list > li:first-child > a {
		background-color: var(--e-global-color-accent, #ffd657);
		box-shadow: 0 2px 6px rgba(255, 214, 87, 0.2);
	}

	.satchel-menu--buttons .satchel-menu__list > li:first-child > a:hover {
		color: var(--e-global-color-primary, #212121);
		background-color: #f5c93f;
	}

	/* Groups: "Accounts & Products" itself is implied, its groups are listed directly */
	.satchel-menu--header .satchel-menu__list > li.menu-item-has-children > a {
		display: none;
	}

	.satchel-menu--header .satchel-menu__list > li > .sub-menu {
		display: flex;
		flex-direction: column;
		gap: 8px;
	}

	/* Group heading: Mobile headings/H3 (Inter 600 16/20), 40px row + Grey15 rule */
	.satchel-menu--header .satchel-menu__group-title {
		display: flex;
		align-items: center;
		min-height: 41px;
		border-bottom: 1px solid var(--e-global-color-3bd84d0b, #dbdbdb);
		font-family: var(--e-global-typography-primary-font-family, "Inter"), sans-serif;
		font-size: 16px;
		font-weight: var(--e-global-typography-primary-font-weight, 600);
		line-height: 20px;
	}

	.satchel-menu--header a {
		display: flex;
		align-items: center;
		min-height: 40px;
		padding: 10px 0;
	}

	.satchel-menu--header a:hover {
		color: var(--e-global-color-secondary, #4c4c4c);
	}

	/* Top items without a panel (Partnerships, Fintech consulting) follow the groups after a rule */
	.satchel-menu--header .satchel-menu__list > li.menu-item-has-children + li:not(.menu-item-has-children) {
		margin-top: 8px;
		border-top: 1px solid var(--e-global-color-3bd84d0b, #dbdbdb);
	}

	html.satchel-menu-open {
		overflow: hidden;
	}
}

/* ---------------------------------------------------------------------------
 * Banner strip
 * ------------------------------------------------------------------------ */
.satchel-banner__icon img {
	display: block;
}

.satchel-banner__cta .elementor-button {
	border: 0;
	white-space: nowrap;
}

@media (min-width: 1025px) {
	.satchel-banner__text .elementor-heading-title {
		white-space: nowrap;
	}
}

/* Tablet & mobile (Figma "Section / Mobile / Baner"): icon · text (fills, wraps) · button */
@media (max-width: 1024px) {
	.satchel-banner > .satchel-banner__text {
		flex: 1 1 0;
		min-width: 0;
	}

	.satchel-banner > .satchel-banner__cta {
		flex: 0 0 auto;
	}
}

/* ---------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------ */
.satchel-menu--footer .satchel-menu__list > li > a {
	display: block;
	padding: 8px 0;
	color: var(--e-global-color-secondary, #4c4c4c);
	font-family: var(--e-global-typography-4e3ed09a-font-family, "Inter"), sans-serif;
	font-size: var(--e-global-typography-4e3ed09a-font-size, 14px);
	font-weight: var(--e-global-typography-4e3ed09a-font-weight, 400);
	line-height: var(--e-global-typography-4e3ed09a-line-height, 20px);
}

.satchel-menu--footer .satchel-menu__list > li > a:hover {
	color: var(--e-global-color-primary, #212121);
}

.satchel-footer__small p {
	margin: 0 0 6px;
}

.satchel-footer__small p:last-child {
	margin-bottom: 0;
}

.satchel-social a,
.satchel-social img,
.satchel-button-up__arrow img {
	display: block;
}

.satchel-social img {
	filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
	transition: opacity 0.2s ease;
}

.satchel-social a:hover img {
	opacity: 0.7;
}

/* App Store / Google Play badges: 135×40 box (border 1px), badge artwork centred */
.satchel-app-badge a {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 38px;
}

.satchel-app-badge img {
	display: block;
}

/* Mobile footer (Figma "Section / Mobile / Footer"): 32px rows, 154.8×45.9 store badges */
@media (max-width: 767px) {
	.satchel-menu--footer .satchel-menu__list > li > a {
		padding: 6px 0;
	}

	.satchel-app-badge a {
		height: 43.6px;
	}
}

/* ---------------------------------------------------------------------------
 * Button Up (scroll to top)
 * ------------------------------------------------------------------------ */
.satchel-button-up {
	filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
	border-radius: 136px;
	transition: opacity 0.2s ease, visibility 0s linear 0s;
}

.satchel-button-up__arrow img {
	transform: rotate(180deg);
}

.satchel-js .satchel-button-up:not(.is-visible) {
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

@media (prefers-reduced-motion: reduce) {
	.satchel-menu--header .sub-menu,
	.satchel-menu__chevron,
	.satchel-button-up {
		transition: none;
	}
}
