/* ==========================================================================
   Brokers Analysis - header & footer (2026 redesign)
   Loaded after header.css, so it overrides the older header rules.
   ========================================================================== */

:root {
	--ba-ink: #0e1a2b;
	--ba-ink-2: #16263c;
	--ba-text: #1b2431;
	--ba-muted: #6b7a8d;
	--ba-line: #e6eaf0;
	--ba-orange: #ef4a2b;
	--ba-orange-dark: #d33d1f;
	--ba-cyan: #1daee5;
	--ba-foot-text: #9fb0c2;
	--ba-radius: 10px;
	--ba-wrap: 1280px;
	/* Height reserved for the fixed "open account" bar at the bottom. */
	--ba-sticky-h: 70px;
}

.ba-wrap {
	width: 100%;
	max-width: var(--ba-wrap);
	margin: 0 auto;
	padding-inline: 20px;
}

/* --------------------------------------------------------------- Header */

header.ba-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: #fff;
	border-bottom: 1px solid var(--ba-line);
	box-shadow: none;
	transition: box-shadow .25s ease;
}

header.ba-header.is-stuck {
	box-shadow: 0 6px 22px rgba(14, 26, 43, .09);
}

.ba-header__inner {
	width: 100%;
	max-width: var(--ba-wrap);
	margin: 0 auto;
	padding: 0 20px;
	min-height: 72px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.ba-logo {
	display: block;
	flex: 0 0 auto;
	line-height: 0;
}

.ba-logo img {
	height: 34px;
	width: auto;
	display: block;
}

header.ba-header nav.ba-nav {
	position: static;
	padding: 0;
	margin-left: auto;
}

.ba-nav__list {
	display: flex;
	align-items: center;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ba-nav__list li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ba-nav__link {
	position: relative;
	display: block;
	padding: 10px 13px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--ba-text);
	text-decoration: none;
	border-radius: 8px;
	white-space: nowrap;
	transition: color .18s ease, background-color .18s ease;
}

.ba-nav__link:hover,
.ba-nav__link:focus-visible {
	color: var(--ba-cyan);
	background: #f3f8fb;
	text-decoration: none;
}

.ba-nav__link.is-active {
	color: var(--ba-orange);
	font-weight: 600;
}

.ba-nav__link.is-active::after {
	content: "";
	position: absolute;
	left: 13px;
	right: 13px;
	bottom: 2px;
	height: 2px;
	border-radius: 2px;
	background: var(--ba-orange);
}

/* Header actions -------------------------------------------------------- */

.ba-header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 0 0 auto;
}

.ba-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 18px;
	background: var(--ba-orange);
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	border-radius: 8px;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .18s ease, transform .18s ease;
}

.ba-cta:hover,
.ba-cta:focus-visible {
	background: var(--ba-orange-dark);
	color: #fff !important;
	text-decoration: none;
	transform: translateY(-1px);
}

/* Burger ---------------------------------------------------------------- */

.ba-burger {
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid var(--ba-line);
	border-radius: 9px;
	background: #fff;
	color: var(--ba-orange);
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	transition: background-color .18s ease, border-color .18s ease;
}

.ba-burger:hover {
	background: #fff6f4;
	border-color: #f3cfc7;
}

.ba-burger i {
	display: block;
}

.ba-burger .ba-burger__close,
.ba-burger[aria-expanded="true"] .ba-burger__open {
	display: none;
}

.ba-burger[aria-expanded="true"] .ba-burger__close {
	display: block;
}

/* Drawer head + scrim (mobile only) ------------------------------------- */

.ba-nav__head,
.ba-nav__foot {
	display: none;
}

.ba-scrim {
	position: fixed;
	inset: 0;
	background: rgba(14, 26, 43, .5);
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease;
	z-index: 1001;
}

.ba-scrim.is-open {
	opacity: 1;
	pointer-events: auto;
}

/* Set while the drawer is open (header.css only defines this under 1020px). */
body.no-scroll {
	overflow: hidden;
}

/* --------------------------------------------------------- Header mobile */

@media (max-width: 1023px) {
	.ba-header__inner {
		min-height: 62px;
	}

	.ba-logo img {
		height: 28px;
	}

	.ba-burger {
		display: flex;
	}

	.ba-header__actions .ba-cta {
		display: none;
	}

	header.ba-header nav.ba-nav {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		left: auto;
		width: min(88vw, 340px);
		background: #fff;
		display: flex;
		flex-direction: column;
		transform: translateX(102%);
		transition: transform .28s cubic-bezier(.4, 0, .2, 1);
		box-shadow: -18px 0 40px rgba(14, 26, 43, .16);
		z-index: 1002;
		overflow-y: auto;
	}

	header.ba-header nav.ba-nav.is-open {
		transform: translateX(0);
	}

	.ba-nav__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 14px 18px;
		border-bottom: 1px solid var(--ba-line);
	}

	.ba-nav__head img {
		height: 26px;
		width: auto;
	}

	.ba-nav__close {
		width: 38px;
		height: 38px;
		border: 0;
		border-radius: 9px;
		background: #f5f7fa;
		color: var(--ba-text);
		font-size: 20px;
		line-height: 1;
		cursor: pointer;
	}

	.ba-nav__close:hover {
		background: #ebeff5;
		color: var(--ba-orange);
	}

	.ba-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 6px 0;
	}

	.ba-nav__link {
		padding: 14px 20px;
		border-radius: 0;
		font-size: 15px;
		border-bottom: 1px solid #f1f4f8;
	}

	.ba-nav__link.is-active {
		background: #fff6f4;
		box-shadow: inset 3px 0 0 var(--ba-orange);
	}

	.ba-nav__link.is-active::after {
		display: none;
	}

	.ba-nav__foot {
		display: block;
		margin-top: auto;
		/* Extra bottom space so the button clears the fixed CTA bar. */
		padding: 18px 18px calc(18px + var(--ba-sticky-h));
		border-top: 1px solid var(--ba-line);
	}

	.ba-nav__foot .ba-cta {
		display: flex;
		width: 100%;
		padding: 14px 18px;
	}
}

/* --------------------------------------------------------------- Footer */

/* !important throughout this block: compareSearch.css forces h2/h3 sizes and
   the footer margin globally with !important. */
footer.ba-footer {
	background: var(--ba-ink);
	color: var(--ba-foot-text);
	font-size: 14px;
	margin-bottom: var(--ba-sticky-h) !important;
}

/* Newsletter band */

.ba-news {
	background: var(--ba-ink-2);
	border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.ba-news__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 22px;
	padding-block: 32px;
}

.ba-news__copy h2 {
	margin: 0 0 6px;
	font-size: 21px !important;
	font-weight: 600 !important;
	color: #fff;
	line-height: 1.3 !important;
	text-transform: none;
}

.ba-news__copy p {
	margin: 0;
	font-size: 14px;
	color: var(--ba-foot-text);
}

.ba-news__side {
	flex: 1 1 340px;
	max-width: 480px;
}

.ba-news__form {
	display: flex;
	width: 100%;
}

.ba-news__form input[type="email"] {
	flex: 1 1 auto;
	min-width: 0;
	height: 48px;
	padding: 0 16px;
	font-size: 14px;
	color: #fff;
	background: #0b1523;
	border: 1px solid rgba(255, 255, 255, .14);
	border-right: 0;
	border-radius: var(--ba-radius) 0 0 var(--ba-radius);
	outline: none;
}

.ba-news__form input[type="email"]::placeholder {
	color: #8397ab;
	text-transform: none;
	opacity: 1;
}

.ba-news__form input[type="email"]:focus {
	border-color: var(--ba-cyan);
}

.ba-news__form button {
	flex: 0 0 auto;
	height: 48px;
	padding: 0 22px;
	border: 0;
	border-radius: 0 var(--ba-radius) var(--ba-radius) 0;
	background: var(--ba-orange);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .18s ease;
}

.ba-news__form button:hover {
	background: var(--ba-orange-dark);
}

.ba-news__msg {
	display: inline-block;
	margin-bottom: 10px;
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 500;
}

.ba-news__msg--ok { background: rgba(46, 160, 105, .16); color: #6fdca6; }
.ba-news__msg--err { background: rgba(239, 74, 43, .16); color: #ff9b85; }

/* Link columns */

.ba-footer__grid {
	display: grid;
	grid-template-columns: 1.7fr 1fr 1fr 1fr;
	gap: 40px;
	padding-block: 44px 34px;
}

.ba-fcol h3 {
	margin: 0 0 14px;
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: #fff;
}

.ba-fcol ul {
	list-style: none;
	margin: 0;
	padding: 0;
	margin-left: 0px !important;
}

.ba-fcol li {
	margin: 0;
	list-style: none;
}

.ba-fcol__links a {
	display: inline-block;
	padding: 6px 0;
	font-size: 14px;
	font-weight: 400;
	color: var(--ba-foot-text);
	text-decoration: none;
	transition: color .16s ease, transform .16s ease;
}

.ba-fcol__links a:hover,
.ba-fcol__links a:focus-visible {
	color: var(--ba-cyan);
	transform: translateX(2px);
	text-decoration: none;
}

.ba-fcol--brand img.ba-flogo {
	height: 32px;
	width: auto;
	margin-bottom: 14px;
}

.ba-fcol--brand p {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.7;
	color: var(--ba-foot-text);
	max-width: 46ch;
}

.ba-social {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
}

.ba-social a {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .07);
	color: #cfdae6;
	font-size: 15px;
	text-decoration: none;
	transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.ba-social a:hover,
.ba-social a:focus-visible {
	background: var(--ba-orange);
	color: #fff;
	transform: translateY(-2px);
	text-decoration: none;
}

.ba-dmca img {
	height: 24px;
	width: auto;
	opacity: .85;
}

/* Disclaimer */

.ba-disclaimer {
	border-top: 1px solid rgba(255, 255, 255, .07);
	padding-block: 16px 20px;
}

.ba-disclaimer > summary {
	display: flex;
	align-items: center;
	gap: 10px;
	list-style: none;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .02em;
	color: #cfdae6;
	padding: 4px 0;
}

.ba-disclaimer > summary::-webkit-details-marker {
	display: none;
}

.ba-disclaimer > summary::before {
	content: "";
	width: 7px;
	height: 7px;
	border-right: 2px solid var(--ba-orange);
	border-bottom: 2px solid var(--ba-orange);
	transform: rotate(-45deg);
	transition: transform .2s ease;
	flex: 0 0 auto;
}

.ba-disclaimer[open] > summary::before {
	transform: rotate(45deg);
}

.ba-disclaimer__body p {
	margin: 10px 0 0;
	font-size: 12.5px;
	line-height: 1.9;
	color: #8397ab;
}

/* Bottom bar */

.ba-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, .07);
}

.ba-bottom__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px 20px;
	padding-block: 18px 22px;
	font-size: 13px;
	color: #9fb0c2;
}

.ba-bottom__inner p {
	margin: 0;
	/* Explicit: a global "p { color:#999 }" rule beats inherited colour. */
	color: #9fb0c2;
}

.ba-bottom__inner a {
	color: #fff;
	text-decoration: none;
}

.ba-bottom__inner a:hover {
	color: var(--ba-cyan);
}

/* ------------------------------------------- Sticky "open account" CTA bar */

.footer-bar-popup {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999999;
	background: #fff;
	border-top: 1px solid var(--ba-line);
	box-shadow: 0 -6px 24px rgba(14, 26, 43, .10);
	padding: 11px 16px calc(11px + env(safe-area-inset-bottom, 0px));
}

.footer-bar-popup__inner {
	max-width: var(--ba-wrap);
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px 18px;
}

.footer-bar-popup__text {
	font-size: 14px;
	font-weight: 500;
	color: var(--ba-text);
}

/* #id keeps this ahead of the older button styles. */
#open-account-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 11px 22px;
	background: var(--ba-orange);
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	border: 0;
	border-radius: 8px;
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(239, 74, 43, .3);
	transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

#open-account-btn:hover,
#open-account-btn:focus-visible {
	background: var(--ba-orange-dark);
	color: #fff !important;
	text-decoration: none;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(239, 74, 43, .38);
}

#open-account-btn .fa {
	font-size: 13px;
	opacity: .9;
}

/* Blog pages add their own bottom padding for the same bar. */
body.blog-page {
	padding-bottom: var(--ba-sticky-h);
}

@media (max-width: 768px) {
	:root {
		--ba-sticky-h: 58px;
	}

	.footer-bar-popup {
		padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px));
	}

	/* On a phone the button alone says it; the sentence would wrap the bar. */
	.footer-bar-popup__text {
		display: none;
	}

	#open-account-btn {
		width: 100%;
		padding: 11px 16px;
		font-size: 13.5px;
	}
}

/* Back to top - custom.js toggles inline opacity and the id show_me/hide_me */

a.kode-back-top {
	/* Hidden until custom.js sets inline opacity:1 after ~100px of scroll. */
	opacity: 0;
	pointer-events: none;
	position: fixed;
	right: 18px;
	bottom: 86px;
	width: 42px;
	height: 42px;
	display: grid !important;
	place-items: center;
	border-radius: 10px;
	background: var(--ba-orange);
	color: #fff !important;
	font-size: 20px;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(14, 26, 43, .22);
	transition: opacity .25s ease, background-color .18s ease;
	z-index: 100000000;
}

a.kode-back-top:hover {
	background: var(--ba-orange-dark);
}

a.kode-back-top#show_me {
	pointer-events: auto;
}

/* --------------------------------------------------------- Footer mobile */

@media (max-width: 991px) {
	.ba-footer__grid {
		grid-template-columns: 1fr 1fr;
		gap: 30px;
		padding-block: 36px 28px;
	}

	.ba-fcol--brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 600px) {
	.ba-news__inner {
		flex-direction: column;
		align-items: flex-start;
		padding-block: 26px;
	}

	.ba-news__side {
		width: 100%;
		max-width: none;
	}

	.ba-news__copy h2 {
		font-size: 19px;
	}

	.ba-footer__grid {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	.ba-bottom__inner {
		justify-content: flex-start;
	}

	a.kode-back-top {
		right: 14px;
		bottom: 78px;
		width: 38px;
		height: 38px;
	}
}

@media (prefers-reduced-motion: reduce) {
	header.ba-header nav.ba-nav,
	.ba-scrim,
	.ba-cta,
	.ba-social a,
	.ba-fcol__links a,
	.ba-burger,
	#open-account-btn {
		transition: none !important;
	}
}
