/*
 * Header (v1.2): location bar, header row, main navigation and mobile drawer.
 * Loaded after style.css; overrides the old "novel" rules on #top-handler, #nav-handler and #menu.
 * Markup: header.php, template-parts/header-*.php.
 */

#top-handler,
#nav-handler,
.ajr-drawer {
	font-family: 'Open Sans', Arial, Helvetica, sans-serif;
}

#top-handler {
	background-color: #fff;
	border-bottom: 1px solid #e3e7ea;
}

.ajr-wrap {
	box-sizing: border-box;
	max-width: 1170px;
	margin: 0 auto;
	padding: 0 20px;
}

.ajr-icon {
	flex: none;
	vertical-align: middle;
}

/* ---- Location bar ---- */

.ajr-topbar {
	background: #333;
	color: #dbdbdb;
	font-size: 12px;
}

.ajr-topbar .ajr-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
	min-height: 40px;
}

.ajr-switch {
	display: flex;
	align-items: center;
}

.ajr-switch-label {
	margin-right: 10px;
	color: #9a9a9a;
}

.ajr-switch-item {
	padding: 11px 12px;
	font-weight: 600;
	line-height: 18px;
}

.ajr-topbar a.ajr-switch-item,
.ajr-topbar a.ajr-switch-item:hover {
	color: #dbdbdb;
	text-decoration: none;
}

.ajr-topbar a.ajr-switch-item:hover {
	color: #fff;
}

.ajr-switch-item.is-current {
	color: #fff;
	font-weight: 700;
	background: rgba(237, 51, 56, 0.28);
	box-shadow: inset 0 -3px 0 #ed3338;
}

.ajr-topbar-info {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 22px;
	margin-left: auto;
}

.ajr-today,
.ajr-mail {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.ajr-today .ajr-icon,
.ajr-mail .ajr-icon {
	color: #ed3338;
}

.ajr-topbar a.ajr-mail,
.ajr-topbar a.ajr-mail:hover {
	color: #dbdbdb;
	text-decoration: none;
}

.ajr-langs {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
	font-weight: 600;
}

.ajr-langs li + li::before {
	content: "·";
	padding: 0 6px;
	color: #777;
}

.ajr-langs a,
.ajr-langs a:hover {
	color: #9a9a9a;
	text-decoration: none;
}

.ajr-langs a:hover,
.ajr-langs [aria-current] {
	color: #fff;
}

/* ---- Header row ---- */

.ajr-header > .ajr-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 32px;
	padding-top: 22px;
	padding-bottom: 22px;
}

.ajr-brand {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}

.ajr-logo img {
	display: block;
	height: 50px;
	width: auto;
	opacity: 0.72; /* Grey logo; replace with a grey logo file when there is one. */
}

.ajr-location {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 14px;
	font-size: 12.5px;
	color: #555;
}

.ajr-location strong {
	color: #ed3338;
	letter-spacing: 0.06em;
}

.ajr-address {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.ajr-address .ajr-icon {
	color: #777;
}

.ajr-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px 28px;
}

.ajr-brands {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	padding-right: 28px;
	border-right: 1px solid #e3e7ea;
}

.ajr-brands.is-single {
	gap: 14px;
}

.ajr-brands.is-single img {
	display: block;
	height: 42px;
	width: auto;
}

.ajr-brands-note {
	font-size: 12px;
	line-height: 1.4;
	color: #555;
}

.ajr-brands.is-many {
	gap: 8px 10px;
}

.ajr-brands.is-many img,
.ajr-brandstrip img {
	display: block;
	box-sizing: border-box;
	height: 44px;
	width: auto;
	max-width: 84px;
	padding: 10px 14px;
	object-fit: contain;
	filter: grayscale(1);
	opacity: 0.7;
	transition: filter 0.2s, opacity 0.2s;
}

.ajr-brands.is-many a:hover img,
.ajr-brandstrip a:hover img {
	filter: none;
	opacity: 1;
}

.ajr-phone {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ajr-phone span {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #777;
}

.ajr-phone a,
.ajr-phone a:hover {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: #333;
	text-decoration: none;
}

.ajr-phone a:hover {
	color: #ed3338;
}

a.ajr-cta,
a.ajr-quick-cta {
	display: inline-block;
	padding: 13px 20px;
	border-radius: 3px;
	background: #ed3338;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
}

a.ajr-cta:hover,
a.ajr-quick-cta:hover {
	background: #c8202a;
	color: #fff;
	text-decoration: none;
}

/* Mobile-only parts. */
.ajr-burger,
.ajr-quick,
.ajr-brandstrip {
	display: none;
}

/* The template paints every <button> red with !important. */
button.ajr-burger,
button.ajr-drawer-close,
button.ajr-sub-toggle {
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background-color: #edf1f4 !important;
	color: #414141 !important;
	font-size: 9px;
	font-weight: 600;
	line-height: 1;
	text-transform: uppercase;
	box-shadow: none;
}

button.ajr-drawer-close {
	display: flex;
	background-color: #333 !important;
	color: #fff !important;
}

/* ---- Main navigation ---- */

#nav-handler {
	padding: 0;
	background-color: #edf1f4;
}

#nav-handler #menu-handler {
	float: none;
	width: 100%;
	margin: 0;
}

#nav-handler ul#nav {
	float: left; /* The old template floats it right. */
	margin-left: -15px;
	padding: 0;
}

#nav-handler #menu::after {
	content: "";
	display: table;
	clear: both;
}

#nav-handler #menu .menu-nav > li {
	height: 46px;
	border: 0;
}

#nav-handler #menu .menu-nav > li > a > span.link-no-image {
	padding: 0 15px;
	font: 400 13px/46px 'Open Sans', Arial, Helvetica, sans-serif;
	text-transform: uppercase;
}

/* Red bar under the hovered and the active item (the old template only had it on hover). */
#nav-handler #menu .menu-nav > li > a .tc-border {
	display: block;
	position: absolute;
	top: auto;
	right: 15px;
	bottom: 0;
	left: 15px;
	width: auto;
	height: 3px;
	padding: 0 !important;
	background: #ed3338;
	opacity: 0;
}

#nav-handler #menu .menu-nav > li > a:hover .tc-border,
#nav-handler #menu .menu-nav > li.sfHover > a .tc-border,
#nav-handler #menu .menu-nav > li.active > a .tc-border {
	opacity: 1;
}

#nav-handler #menu .menu-nav > li > a .tc-arrow {
	display: none !important;
}

#nav-handler .menu-nav li:hover > ul,
#nav-handler .menu-nav li.sfHover > ul {
	top: 46px;
}

/* Old mobile menu (selectnav) is replaced by the drawer. */
a#menupanel,
.panel1,
.selectnav {
	display: none !important;
}

/* ---- Mobile drawer ---- */

.ajr-drawer[hidden] {
	display: none !important;
}

.ajr-drawer {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	background: #fff;
	color: #333;
	-webkit-overflow-scrolling: touch;
}

body.ajr-drawer-open {
	overflow: hidden;
}

.ajr-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid #e3e7ea;
}

.ajr-drawer .ajr-logo img {
	height: 36px;
}

.ajr-drawer .ajr-brand {
	gap: 6px;
}

.ajr-drawer .ajr-location {
	font-size: 11.5px;
}

.ajr-drawer-switch {
	padding: 16px 16px 4px;
}

.ajr-drawer-switch .ajr-switch {
	display: grid;
	grid-template-columns: auto 1fr 1fr;
	align-items: center;
}

.ajr-drawer-switch .ajr-switch-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #777;
}

.ajr-drawer-switch .ajr-switch-item {
	padding: 11px 0;
	border: 1px solid #c9d0d6;
	font-size: 13px;
	text-align: center;
	color: #414141;
	text-decoration: none;
}

.ajr-drawer-switch .ajr-switch-item.is-current {
	border-color: #ed3338;
	background: #ed3338;
	box-shadow: none;
	color: #fff;
}

.ajr-drawer-nav {
	padding: 8px 16px 0;
}

.ajr-drawer-menu,
.ajr-drawer-menu ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ajr-drawer-menu li {
	position: relative;
	border-bottom: 1px solid #e3e7ea;
}

.ajr-drawer-menu > li > a {
	display: block;
	padding: 15px 52px 15px 0;
	font-size: 15px;
	line-height: 1.3;
	color: #414141;
	text-transform: uppercase;
	text-decoration: none;
}

/* Not .current-page-ancestor: "Domov" links to /sl/kranj/, the parent of every Kranj page. */
.ajr-drawer-menu > li.current-menu-item > a,
.ajr-drawer-menu > li.current-menu-ancestor > a {
	padding-left: 12px;
	box-shadow: inset 3px 0 0 #ed3338;
	color: #ed3338;
	font-weight: 600;
}

.ajr-drawer-menu ul {
	display: none;
	padding: 0 0 8px 14px;
}

.ajr-drawer-menu li.is-open > ul {
	display: block;
}

.ajr-drawer-menu ul li {
	border: 0;
}

.ajr-drawer-menu ul a {
	display: block;
	padding: 10px 0;
	font-size: 14px;
	color: #555;
	text-decoration: none;
}

.ajr-drawer-menu ul .current-menu-item > a {
	color: #ed3338;
}

button.ajr-sub-toggle {
	display: flex;
	position: absolute;
	top: 3px;
	right: 0;
	width: 44px;
	height: 44px;
	background-color: transparent !important;
	color: #9a9a9a !important;
}

.ajr-sub-toggle .ajr-icon {
	transition: transform 0.2s;
}

li.is-open > .ajr-sub-toggle .ajr-icon {
	transform: rotate(180deg);
}

.ajr-drawer .ajr-quick {
	display: grid;
	padding: 22px 16px;
}

.ajr-drawer-info {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: auto;
	padding: 18px 16px 22px;
	background: #333;
	color: #dbdbdb;
	font-size: 12.5px;
}

.ajr-drawer-info > span,
.ajr-drawer-info > a {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #dbdbdb;
	text-decoration: none;
}

.ajr-drawer-info .ajr-icon {
	color: #ed3338;
}

.ajr-drawer-info .ajr-langs {
	margin-top: 6px;
	padding-top: 12px;
	border-top: 1px solid #4a4a4a;
}

/* Pokliči / Naroči servis buttons (header on mobile, and drawer). */
.ajr-quick {
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.ajr-quick a {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	height: 46px;
	padding: 0 10px;
	font-size: 13px;
}

a.ajr-quick-call,
a.ajr-quick-call:hover {
	border: 1px solid #c9d0d6;
	border-radius: 3px;
	color: #333;
	font-weight: 700;
	text-decoration: none;
}

.ajr-quick-call .ajr-icon {
	color: #ed3338;
}

/* ---- Tablet and mobile ---- */

@media (max-width: 979px) {
	#nav-handler {
		display: none;
	}

	.ajr-topbar .ajr-wrap,
	.ajr-header > .ajr-wrap {
		padding-right: 16px;
		padding-left: 16px;
	}

	.ajr-header > .ajr-wrap {
		flex-wrap: nowrap;
		gap: 12px;
		padding-top: 14px;
		padding-bottom: 14px;
	}

	.ajr-brand {
		gap: 6px;
	}

	.ajr-logo img {
		height: 36px;
	}

	.ajr-location {
		font-size: 11.5px;
	}

	.ajr-header .ajr-address,
	.ajr-header .ajr-brands-note,
	.ajr-brands.is-many,
	.ajr-phone,
	a.ajr-cta {
		display: none;
	}

	.ajr-actions {
		flex-wrap: nowrap;
		gap: 12px;
	}

	.ajr-brands.is-single {
		padding: 0;
		border: 0;
	}

	.ajr-brands.is-single img {
		height: 30px;
	}

	button.ajr-burger {
		display: flex;
	}

	.ajr-header .ajr-quick {
		display: grid;
		padding: 0 16px 14px;
	}

	.ajr-brandstrip {
		display: grid;
		grid-template-columns: repeat(6, 1fr);
		align-items: center;
		gap: 6px;
		padding: 10px 16px;
		border-top: 1px solid #e3e7ea;
	}

	.ajr-brandstrip img {
		width: 100%;
		max-width: none;
		height: 26px;
		padding: 0;
	}
}

@media (max-width: 480px) {
	/* Slovenian pages have both in the drawer; EN/IT/HR (.lang-active) keep the languages here. */
	.ajr-topbar .ajr-mail,
	body:not(.lang-active) .ajr-topbar .ajr-langs {
		display: none;
	}

	.ajr-switch-label {
		margin-right: 4px;
	}
}

@media (min-width: 980px) {
	.ajr-drawer {
		display: none !important;
	}
}
