/* =========================================================
   FOOTER
   =========================================================
   Markup in inc/bt-footer.php. Brand navy rather than Flatsome's grey, one
   brand column beside the link columns, and on a phone the link columns fold
   behind their headings so the footer is about one screen instead of two.

   Every selector here is safelisted for WP Rocket's Remove Unused CSS
   (bt_css_selectors()), because the closed state and :hover/:focus never
   appear in the page it measures.
   ========================================================= */
.bt-footer {
	--bt-footer-bg: var(--bt-navy-dark, #0a2a40);
	--bt-footer-bottom: #071f30;
	--bt-footer-text: rgba(255, 255, 255, .78);
	--bt-footer-dim: rgba(255, 255, 255, .62);
	--bt-footer-line: rgba(255, 255, 255, .12);
	background: var(--bt-footer-bg);
	color: var(--bt-footer-text);
	font-size: 15px;
	line-height: 1.55;
}

.bt-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bt-footer li {
	margin: 0;
}

.bt-footer p {
	margin: 0;
}

/* Hover brightens to white, with no underline. In lists of links that is enough to show what is
   a link; the one link inside a sentence, the credit, keeps a faint underline (.bt-footer__copy a). */
.bt-footer a {
	color: var(--bt-footer-text);
	text-decoration: none;
	transition: color 0.15s ease;
}

.bt-footer a:hover {
	color: var(--bt-white, #fff);
	text-decoration: none;
}

.bt-footer a:focus-visible,
.bt-footer button:focus-visible {
	outline: 2px solid var(--bt-white, #fff);
	outline-offset: 3px;
	border-radius: 4px;
}

/* ---------- Main: brand column + link columns ---------- */
.bt-footer__main {
	padding: 56px 0 48px;
}

.bt-footer__grid {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) minmax(0, 2.6fr);
	gap: 40px;
}

/* Both grids are also Flatsome .containers, whose clearfix ::after became one more grid item: an
   empty row plus its gap (52 px on desktop, 44 px on a phone, found in review on 29 Oct). */
.bt-footer__grid::after,
.bt-footer__bar::after {
	content: none;
}

.bt-footer__logo {
	display: inline-block;
	line-height: 0;
}

.bt-footer__logo img {
	width: auto;
	height: 32px;
}

/* Two classes: the resets above (.bt-footer p, ul, li) would beat one. */
.bt-footer .bt-footer__pitch {
	max-width: 32ch;
	margin-top: 14px;
}

.bt-footer a.bt-footer__rating {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 18px;
	padding: 5px 12px;
	border: 1px solid var(--bt-footer-line);
	border-radius: 999px;
	color: var(--bt-white, #fff);
	font-size: 14px;
}

.bt-footer a.bt-footer__rating:hover {
	border-color: rgba(255, 255, 255, .35);
	text-decoration: none;
}

.bt-footer__rating svg {
	color: #fbbc04;
}

.bt-footer .bt-footer__contact {
	margin-top: 20px;
}

.bt-footer__contact li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 4px 0;
}

.bt-footer__contact svg {
	flex: none;
	color: var(--bt-footer-dim);
}

.bt-footer .bt-footer__social {
	display: flex;
	gap: 10px;
	margin-top: 20px;
}

.bt-footer__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	color: var(--bt-white, #fff);
	font-size: 17px;
}

.bt-footer__social a:hover {
	background: var(--bt-red, #e43a36);
	text-decoration: none;
}

.bt-footer__nav {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 32px;
}

/* The button is the phone's accordion control; it shows only once the script has run (.is-enhanced). */
.bt-footer__toggle {
	display: none;
}

.bt-footer .bt-footer__title {
	width: auto;
	margin: 0 0 12px;
	color: var(--bt-white, #fff);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.4;
	text-transform: none;
}

.bt-footer__links a {
	display: inline-block;
	padding: 5px 0;
}

/* ---------- Bottom bar ---------- */
.bt-footer__bottom {
	padding: 22px 0;
	border-top: 1px solid var(--bt-footer-line);
	background: var(--bt-footer-bottom);
	color: var(--bt-footer-dim);
	font-size: 13px;
}

.bt-footer__bar {
	display: grid;
	grid-template-areas:
		"legal pay"
		"copy copy";
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px 32px;
}

.bt-footer__legal {
	grid-area: legal;
}

.bt-footer__pay {
	grid-area: pay;
	justify-self: end;
}

.bt-footer__copy {
	grid-area: copy;
}

.bt-footer__terms {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
}

/* «Informasjonskapsler» is a button whose inline style inherits the colour, so it takes it from here. */
.bt-footer .bt-footer__terms li {
	color: var(--bt-footer-text);
}

.bt-footer__terms a,
.bt-footer__terms button {
	font-size: 13px;
}

/* !important only to get past the button's inline style (bt-tracking.php). */
.bt-footer__terms button:hover {
	color: var(--bt-white, #fff) !important;
}

/* The credit never breaks inside the name; on a phone it takes a line of its own. */
.bt-footer__credit {
	white-space: nowrap;
}

.bt-footer__copy,
.bt-footer__copy a {
	color: var(--bt-footer-dim);
}

/* In a sentence, colour alone can't mark a link (WCAG 1.4.1), so this one keeps a quiet underline. */
.bt-footer .bt-footer__copy a {
	text-decoration: underline;
	text-decoration-color: rgba(255, 255, 255, 0.3);
	text-underline-offset: 3px;
}

.bt-footer .bt-footer__copy a:hover {
	color: var(--bt-white, #fff);
	text-decoration-color: currentColor;
}

.bt-footer .payment-icons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* One chip size for every mark; the Vipps wordmark is wider than the rest and was taller too. */
.bt-footer .payment-icons .payment-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: 30px;
	min-width: 48px;
	margin: 0;
	padding: 0 8px;
	border-radius: 6px;
	background: rgba(255, 255, 255, .08);
	line-height: 0;
	opacity: 1;
}

.bt-footer .payment-icons .payment-icon svg {
	--fill: var(--bt-white, #fff);
	height: 16px;
	max-width: 44px;
	fill: var(--fill);
}

/* ---------- Phone: brand first, link columns fold ---------- */
@media (max-width: 699px) {
	.bt-footer__main {
		padding: 36px 0 12px;
	}

	.bt-footer__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.bt-footer__nav {
		display: block;
	}

	/* Lines only between groups. Above the first, the gap after the social icons already separates;
	   below the last, the bottom bar's own edge made a double line (Mainul, 29 Oct). Between groups
	   the line shows where an opened list ends and the next heading starts. */
	.bt-footer__group + .bt-footer__group {
		border-top: 1px solid var(--bt-footer-line);
	}

	.bt-footer .bt-footer__title {
		margin: 0;
	}

	/* Without the script the titles stay text and every list stays open. */
	.bt-footer:not(.is-enhanced) .bt-footer__title {
		padding: 14px 0 6px;
	}

	.bt-footer.is-enhanced .bt-footer__label {
		display: none;
	}

	.bt-footer.is-enhanced .bt-footer__toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		min-height: 52px;
		margin: 0;
		padding: 0;
		border: 0;
		background: none;
		box-shadow: none;
		color: inherit;
		font: inherit;
		letter-spacing: inherit;
		text-align: left;
		text-transform: none;
		cursor: pointer;
	}

	.bt-footer.is-enhanced .bt-footer__toggle::after {
		content: "";
		width: 9px;
		height: 9px;
		margin: 0 4px 4px 0;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		color: var(--bt-footer-dim);
		transform: rotate(45deg);
		transition: transform .2s ease;
	}

	.bt-footer.is-enhanced .bt-footer__toggle[aria-expanded="true"]::after {
		margin-bottom: -4px;
		transform: rotate(-135deg);
	}

	.bt-footer.is-enhanced .bt-footer__group:not(.is-open) .bt-footer__links {
		display: none;
	}

	.bt-footer .bt-footer__contact li {
		min-height: 40px;
		padding: 0;
	}

	.bt-footer .bt-footer__links {
		padding-bottom: 10px;
	}

	.bt-footer__links a {
		display: block;
		padding: 9px 0;
	}

	.bt-footer__bottom {
		padding: 24px 0 28px;
	}

	.bt-footer__bar {
		grid-template-areas:
			"pay"
			"legal"
			"copy";
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}

	.bt-footer__pay {
		justify-self: start;
	}

	.bt-footer__credit {
		display: block;
		margin-top: 4px;
	}

	.bt-footer__sep {
		display: none;
	}

	.bt-footer__terms {
		gap: 4px 18px;
	}

	.bt-footer__terms a,
	.bt-footer__terms button {
		display: inline-block;
		padding: 6px 0 !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bt-footer.is-enhanced .bt-footer__toggle::after {
		transition: none;
	}
}
