/* =========================================================
   HEADER
   =========================================================
   Flatsome builds the header; which parts show where is pinned in
   inc/bt-theme-mods.php (sticky row, phone top row, phone search row).
   This file sets the sizes those settings can't: the phone's trust line
   and search field, tap targets, and the phone menu drawer. It also lays
   out the menu that menu-setup.php shapes: shopping left, help and
   business right, the Laptop columns, and Tilbud's mark.

   Every selector is safelisted for WP Rocket's Remove Unused CSS
   (inc/bt-header.php): the drawer and the stuck header are not in the
   page RUCSS measures.
   ========================================================= */

/* «Henting i Oslo» was 9.6 px: Flatsome's small-nav size scaled it down. */
#top-bar .bt-pickup-bar__text {
	font-size: 13px;
}

/* ---------- The menu's marks: Tilbud's red % and the two service icons ----------
   The classes come from menu-setup.php. Red is the shop's sale colour (Brand Standard K2), so the
   mark is red and the word stays navy: red text on white is 4.24:1, under what 15 px text needs.
   The icons tell the two halves of the desktop row apart; both work in the phone menu too. */
li.bt-nav-it {
	--bt-nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 14v-2a8 8 0 0 1 16 0v2'/%3E%3Crect x='3' y='14' width='4' height='6' rx='1.5'/%3E%3Crect x='17' y='14' width='4' height='6' rx='1.5'/%3E%3C/svg%3E");
}

li.bt-nav-biz {
	--bt-nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2M3 13h18'/%3E%3C/svg%3E");
}

#wide-nav .header-bottom-nav > li.bt-nav-tilbud > a::before,
#main-menu .nav-sidebar > li.bt-nav-tilbud > a::before {
	content: "%";
	content: "%" / "";
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 19px;
	height: 19px;
	margin-right: 8px;
	border-radius: 50%;
	background: var(--bt-red, #e43a36);
	opacity: 1; /* Flatsome fades every other item's a::before while the menu is hovered. */
	color: #fff;
	font: 700 11px/1 "Open Sans", sans-serif;
}

#wide-nav .header-bottom-nav > li.bt-nav-service > a::before,
#main-menu .nav-sidebar > li.bt-nav-service > a::before {
	content: "";
	flex: none;
	width: 17px;
	height: 17px;
	margin-right: 7px;
	background-color: currentColor;
	opacity: 1;
	-webkit-mask: var(--bt-nav-ico) center / contain no-repeat;
	mask: var(--bt-nav-ico) center / contain no-repeat;
}

/* ---------- Desktop menu row (4 Nov 2026) ----------
   Shopping on the left (Laptop, Butikk, Tilbud), help and business pushed right, where the row
   was 71 % empty at 1440 px. Montserrat 700 is the brand's heading face; 600 isn't loaded.
   #wide-nav outranks Flatsome's printed menu colours. Hover and an open dropdown get a soft navy
   fill behind the word; nothing in the menu is underlined (Mainul, 5 Nov 2026: premium shops
   don't, and nothing else on the site does). A fill strengthens, it never fades. */
@media (min-width: 850px) {
	#wide-nav .flex-col.flex-left {
		flex: 1 1 auto;
	}

	/* The row's right column is empty (nothing is placed there) but grows; at 1024 px it held 204 px,
	   so «For bedrifter» stopped short of the edge under the cart. */
	#wide-nav .flex-col.flex-right {
		flex: 0 0 auto;
	}

	#wide-nav .header-bottom-nav.nav-left {
		width: 100%;
	}

	#wide-nav .header-bottom-nav > li {
		margin: 0;
	}

	#wide-nav .header-bottom-nav > li > a.nav-top-link {
		display: flex;
		align-items: center;
		min-height: 36px;
		margin: 8px 0;
		padding: 0 14px;
		border-radius: 8px;
		color: var(--bt-navy, #0f3d5e);
		transition: background-color 0.15s ease, color 0.15s ease;
		font-family: Montserrat, sans-serif;
		font-size: 15px;
		font-weight: 700;
		letter-spacing: 0;
		text-transform: none;
	}

	/* The first and last words stay in line with the logo and the cart; their fill reaches past. */
	#wide-nav .header-bottom-nav > li:first-child > a.nav-top-link {
		margin-left: -14px;
	}

	#wide-nav .header-bottom-nav > li:last-child > a.nav-top-link {
		margin-right: -14px;
	}

	#wide-nav .header-bottom-nav > li.bt-nav-push {
		margin-left: auto;
	}

	#wide-nav .header-bottom-nav > li.bt-nav-service > a.nav-top-link {
		color: var(--bt-body, #374151);
	}

	#wide-nav .header-bottom-nav > li > a.nav-top-link:hover,
	#wide-nav .header-bottom-nav > li.current-dropdown > a.nav-top-link {
		background-color: var(--bt-navy-soft, #e8f0f7);
		color: var(--bt-navy-dark, #0a2a40);
	}

	#wide-nav .header-bottom-nav > li.active > a.nav-top-link {
		color: var(--bt-navy-dark, #0a2a40);
	}

	/* The plain dropdowns (Butikk, IT-hjelp, For bedrifter) get the same fill as the Laptop menu. */
	#wide-nav .header-bottom-nav > li:not(.bt-nav-laptop) > .nav-dropdown > li > a:hover {
		background-color: var(--bt-navy-soft, #e8f0f7);
		color: var(--bt-navy-dark, #0a2a40);
	}

	/* The Laptop menu: four columns, a card and a button row, as wide as the header. Flatsome
	   makes the columns (a second-level item with children) and sets the panel's width on hover. */
	/* Flatsome pins this panel with an inline `inset: 52px 0 0`. Its own dropdowns are tables, which
	   outgrow bottom: 0; a grid doesn't, so the height comes back here. */
	#wide-nav li.bt-nav-laptop > .nav-dropdown {
		bottom: auto !important;
		height: auto !important;
		display: grid;
		grid-template-columns: 1fr 1.25fr 1fr 1.15fr 1.3fr;
		column-gap: 28px;
		padding: 26px 28px 0;
		border: 1px solid var(--bt-border, #e5e7eb);
		border-top: 2px solid var(--bt-navy, #0f3d5e);
		border-radius: 0 0 10px 10px;
		box-shadow: 0 18px 40px rgba(15, 61, 94, 0.14);
	}

	#wide-nav li.bt-nav-laptop > .nav-dropdown > li.nav-dropdown-col {
		display: block;
		width: auto;
		min-width: 0;
		border: 0;
		white-space: normal;
	}

	#wide-nav li.bt-nav-laptop > .nav-dropdown > li.nav-dropdown-col > a {
		padding: 0 0 12px;
		border: 0 !important;
		color: var(--bt-muted, #6b7280);
		font: 700 13px/1.2 Montserrat, sans-serif;
		letter-spacing: 0;
		text-transform: none;
	}

	#wide-nav li.bt-nav-laptop .nav-column {
		padding: 0;
	}

	#wide-nav li.bt-nav-laptop .nav-column > li > a {
		margin: 0 -10px;
		padding: 6px 10px;
		border: 0 !important;
		border-radius: 6px;
		color: var(--bt-ink, #111);
		font-size: 15px;
		line-height: 1.3;
		white-space: normal;
	}

	#wide-nav li.bt-nav-laptop .nav-column > li > a:hover {
		background-color: var(--bt-navy-soft, #e8f0f7);
	}

	#wide-nav li.bt-nav-laptop > .nav-dropdown > li.nav-dropdown-col > a:hover {
		color: var(--bt-ink, #111);
	}

	#wide-nav li.bt-nav-laptop > .nav-dropdown > li.bt-mega-card {
		align-self: start;
	}

	#wide-nav li.bt-nav-laptop > .nav-dropdown > li.bt-mega-card > a {
		display: flex;
		flex-direction: column;
		gap: 8px;
		padding: 20px;
		border: 0 !important;
		border-radius: 10px;
		background: var(--bt-navy-dark, #0a2a40);
		color: #fff;
		font: 700 17px/1.25 Montserrat, sans-serif;
		white-space: normal;
	}

	#wide-nav li.bt-nav-laptop > .nav-dropdown > li.bt-mega-card > a::after {
		content: "Les mer →";
		content: "Les mer →" / "Les mer";
		margin-top: 4px;
		font: 700 14px/1 "Open Sans", sans-serif;
	}

	#wide-nav li.bt-nav-laptop > .nav-dropdown > li.bt-mega-card > a:hover {
		background: var(--bt-footer-bottom, #071f30);
	}

	#wide-nav li.bt-nav-laptop .bt-mega-card__text {
		color: #dbe7f0;
		font: 400 14px/1.45 "Open Sans", sans-serif;
	}

	#wide-nav li.bt-nav-laptop > .nav-dropdown > li.bt-mega-all {
		display: flex;
		grid-column: 1 / -1;
		align-items: center;
		gap: 16px;
		margin-top: 20px;
		padding: 14px 0 16px;
		border-top: 1px solid var(--bt-border, #e5e7eb);
	}

	#wide-nav li.bt-nav-laptop > .nav-dropdown > li.bt-mega-all > a {
		padding: 11px 18px;
		border: 0 !important;
		border-radius: 6px;
		background: var(--bt-navy, #0f3d5e);
		color: #fff;
		font: 700 15px/1 Montserrat, sans-serif;
	}

	#wide-nav li.bt-nav-laptop > .nav-dropdown > li.bt-mega-all > a:hover {
		background: var(--bt-navy-dark, #0a2a40);
	}

	#wide-nav li.bt-nav-laptop > .nav-dropdown > li.bt-mega-all::after {
		content: "Alle testet, tilbakestilt og beskrevet før salg";
		color: var(--bt-muted, #6b7280);
		font-size: 14px;
	}
}

/* ---------- Phone ---------- */
@media (max-width: 849px) {
	/* The trust line, centred, in a shorter bar than the desktop one. The id beats the 40 px
	   min-height Flatsome prints into the page from its top bar setting. */
	#top-bar.header-top,
	#top-bar .flex-row {
		min-height: 32px;
	}

	#top-bar .bt-topbar-trust {
		font-size: 12.5px;
	}

	#top-bar .bt-topbar-icon {
		width: 20px;
		height: 20px;
	}


	/* Menu and cart: 44 px targets; the icons were 20-24 px wide. */
	.header-main .mobile-nav > li > a {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 44px;
		min-height: 44px;
		padding: 0;
	}

	.header-main .mobile-nav .icon-menu,
	.header-main .mobile-nav .icon-shopping-cart {
		font-size: 22px;
	}

	/* The search row under the logo. It scrolls away with the page (bottombar_sticky). Even space
	   above and below: with none above, the field sat on the line under the logo row. */
	#wide-nav {
		padding: 10px 0;
		border-bottom: 1px solid var(--bt-border, #e5e7eb);
	}

	#wide-nav .flex-row {
		min-height: 0;
	}

	/* Flatsome's nav item spacing would add 10 px around the field. */
	#wide-nav .header-search-form,
	#wide-nav .header-search-form-wrapper,
	#wide-nav .searchform-wrapper {
		width: 100%;
		margin: 0;
		padding: 0;
		line-height: 1;
	}

	/* Flatsome's flat form draws the pill and the button; this sets the size. */
	#wide-nav .search-field {
		height: 44px;
		padding: 0 16px;
		font-size: 16px; /* 16 px, so iOS doesn't zoom in on focus */
	}

	#wide-nav .ux-search-submit {
		height: 44px;
		min-width: 48px;
	}
}

/* Under 360 px the full trust line ran past the screen (by 3 px at 320). Keep the rating and drop
   «· Kvalitetstestet brukt elektronikk», a bare text node, by zeroing the font around it. */
@media (max-width: 359px) {
	#top-bar .bt-topbar-text {
		gap: 0;
		font-size: 0;
	}

	#top-bar .bt-topbar-text strong {
		font-size: 12.5px;
	}
}

/* ---------- Phone menu drawer ---------- */
/* Solid white: Flatsome's 95 % white let the page's headline show through the menu. */
.mfp-wrap.off-canvas-left .mfp-content {
	background-color: var(--bt-white, #fff);
}

/* Flatsome hides a closed submenu by making it see-through and fixing it off to one side, so its
   links still took Tab. Hidden, they leave the tab order and the accessibility tree until opened. */
#main-menu .nav-sidebar li.has-child:not(.active) > ul {
	visibility: hidden;
}

/* Flatsome writes nav-uppercase into the drawer's markup; sentence case reads like the rest of the site. */
#main-menu .nav-sidebar.nav-uppercase > li > a {
	padding-top: 14px;
	padding-bottom: 14px;
	color: var(--bt-ink, #111);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
}

#main-menu .nav-sidebar .sub-menu > li > a,
#main-menu .nav-sidebar .children > li > a {
	padding-top: 10px;
	padding-bottom: 10px;
	color: var(--bt-body, #374151);
	font-size: 15px;
	text-transform: none;
}

/* The top items in the heading face, with Tilbud's mark and the service icons beside the words. */
#main-menu .nav-sidebar.nav-uppercase > li.menu-item > a {
	font-family: Montserrat, sans-serif;
}

/* A gap and a label between shopping and «IT-hjelp» / «For bedrifter». The item is a wrapping flex
   row, so the label takes its own line and the open button stays beside the link. */
#main-menu .nav-sidebar > li.bt-nav-push {
	border-top: 6px solid var(--bt-surface, #f5f7fa);
}

#main-menu .nav-sidebar > li.bt-nav-push::before {
	content: "Hjelp og bedrift";
	flex: 0 0 100%;
	padding: 16px 20px 0;
	color: var(--bt-muted, #6b7280);
	font: 700 12px/1 Montserrat, sans-serif;
}

/* Under «Laptop» each group (Merke, Bruk, Pris, Kjøpsguider) opens on its own, as the top items do,
   instead of all of them open at once (Mainul, 5 Nov 2026). bt-menu.php prints Flatsome's open
   button for them; Flatsome's script opens and closes them and bt-header.php labels the button. */
#main-menu .nav-sidebar li.bt-mega-col {
	display: flex;
	flex-flow: row wrap;
	align-items: center;
	margin: 0;
}

#main-menu .nav-sidebar li.bt-mega-col > a {
	flex: 1 1 auto;
	color: var(--bt-ink, #111);
	font: 700 15px/1.3 "Open Sans", sans-serif;
	letter-spacing: 0;
	text-transform: none;
}

#main-menu .nav-sidebar li.bt-mega-col > ul {
	flex: 0 0 100%;
}

#main-menu .nav-sidebar li.bt-mega-col:not(.active) > ul {
	display: none;
}

#main-menu .nav-sidebar li.bt-mega-card > a {
	display: block;
	color: var(--bt-navy, #0f3d5e);
	font-weight: 700;
}

#main-menu .nav-sidebar .bt-mega-card__text {
	display: block;
	margin-top: 4px;
	color: var(--bt-muted, #6b7280);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
}

#main-menu .nav-sidebar li.bt-mega-all > a {
	display: inline-block;
	margin: 10px 0 14px;
	padding: 10px 16px;
	border-radius: 6px;
	background: var(--bt-navy, #0f3d5e);
	color: #fff;
	font: 700 14px/1 Montserrat, sans-serif;
}

#main-menu .nav-sidebar li.bt-mega-all > a:hover {
	background: var(--bt-navy-dark, #0a2a40);
}

/* The social icons in the footer's style: one colour, outlined, instead of each network's own. */
#main-menu .social-icons .button.icon,
#main-menu .social-icons .button.icon i {
	border-color: var(--bt-border, #e5e7eb) !important;
	background: transparent !important;
	color: var(--bt-navy, #0f3d5e) !important;
}

#main-menu .social-icons .button.icon {
	border: 1.5px solid var(--bt-border, #e5e7eb) !important;
}

#main-menu .social-icons .button.icon:hover {
	border-color: var(--bt-navy, #0f3d5e) !important;
}
