/**
 * The site header, the phone menu and the footer (inc/site-chrome.php, js/kg-chrome.js).
 *
 * Breakpoints as Elementor's: desktop from 1025px; tablet and phone below it get the round icon and the
 * menu button instead of the logo and the nav. Selectors carry two classes (or start with `body`) so the
 * Elementor kit's site-wide link and button styles (`.elementor-kit-22 a`, `.elementor-kit-22 button`) and
 * Hello's reset (`button:hover` pink) don't reach in.
 */

/* ---------- shared ---------- */

body .kg-header button,
body .kg-drawer button {
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: inherit;
	cursor: pointer;
	font: inherit;
	margin: 0;
	padding: 0;
}

body .kg-header button:hover,
body .kg-header button:focus,
body .kg-drawer button:hover,
body .kg-drawer button:focus {
	background: none;
	color: inherit;
}

body .kg-header :focus-visible,
body .kg-drawer :focus-visible,
body .kg-footer :focus-visible {
	outline: 2px solid var(--kg-color-green);
	outline-offset: 3px;
}

body .kg-header .kg-button,
body .kg-footer .kg-button {
	background-color: var(--kg-color-green);
	border-radius: 3px;
	color: var(--kg-color-dark);
	display: inline-block;
	font-family: var(--kg-font);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	padding: 8px 16px 7px;
	text-decoration: none;
	transition: background-color 0.2s;
}

body .kg-header .kg-button:hover,
body .kg-footer .kg-button:hover {
	background-color: var(--kg-color-cream);
}

.kg-chevron {
	display: block;
	transition: transform 0.2s;
}

.kg-links {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* two columns that read downwards, as the old Shop dropdown did */
.kg-links--two {
	column-gap: 32px;
	columns: 2;
}

.kg-links--two li {
	break-inside: avoid;
}

/* ---------- header ---------- */

/* style.css has `body { overflow: hidden }` (since the first commit), which makes the body a scroll box
   that never scrolls, so a sticky header would scroll away with it (Elementor Pro's sticky used a fixed
   copy instead). Clip sideways overflow without that: `clip` isn't a scroll box. html keeps its
   overflow-x: hidden, so browsers without `clip` still don't scroll sideways. */
body {
	overflow: visible;
	overflow-x: clip;
}

.kg-header {
	background-color: var(--kg-color-dark);
	color: var(--kg-color-white);
	font-family: var(--kg-font);
	position: sticky;
	top: 0;
	z-index: 100;
}

body.admin-bar .kg-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .kg-header {
		top: 46px;
	}
}

@media screen and (max-width: 600px) {
	body.admin-bar .kg-header {
		top: 0; /* the admin bar scrolls away on phones */
	}
}

.kg-header__barwrap {
	position: relative; /* the desktop panels span the full width under the bar */
}

.kg-header__bar {
	align-items: center;
	display: flex;
	gap: 28px;
	margin: 0 auto;
	max-width: 1240px;
	min-height: 86px;
	padding: 0 23px;
}

body .kg-header .kg-header__brand {
	display: block;
	flex: none;
	line-height: 0;
}

.kg-header__logo {
	height: 40px;
	width: auto;
}

/* the round leaf; the file is wider than tall (transparent sides), so only its height is set */
.kg-header__icon {
	display: none;
	height: 40px;
	width: auto;
}

.kg-header__menu-button {
	display: none !important;
	line-height: 0;
}

/* the nav */

.kg-nav {
	align-self: stretch;
	display: flex;
	margin-left: 30px;
}

.kg-nav__list {
	align-items: stretch;
	display: flex;
	gap: 28px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.kg-nav__item {
	align-items: center;
	display: flex;
	gap: 7px;
}

body .kg-header .kg-nav__link {
	color: var(--kg-color-white);
	font-size: 16px;
	font-weight: 400;
	text-decoration: none;
	white-space: nowrap;
}

body .kg-header .kg-nav__link:hover,
body .kg-header .kg-nav__item.is-open > .kg-nav__link,
body .kg-header .kg-nav__item:hover > .kg-nav__link,
body .kg-header .kg-nav__item.is-current > .kg-nav__link {
	color: var(--kg-color-green);
}

body .kg-header .kg-nav__toggle {
	align-items: center;
	display: flex;
	height: 24px;
	justify-content: center;
	width: 14px;
}

.kg-nav__item.is-open .kg-nav__toggle .kg-chevron {
	transform: rotate(180deg);
}

/* the desktop panels */

.kg-panel {
	background-color: var(--kg-color-dark);
	border-radius: 0 0 20px 20px;
	border-top: 1px solid rgba(243, 242, 235, 0.25);
	left: 0;
	opacity: 0;
	position: absolute;
	right: 0;
	top: 100%;
	transition: opacity 0.15s, visibility 0.15s;
	visibility: hidden;
}

/* Under the pointer, or opened by its button (js/kg-chrome.js); before that script runs, keyboard focus opens it. */
.kg-nav__item--panel:hover > .kg-panel,
.kg-nav__item--panel.is-open > .kg-panel,
.kg-header:not(.kg-header--js) .kg-nav__item--panel:focus-within > .kg-panel {
	opacity: 1;
	visibility: visible;
}

.kg-nav__item--panel.is-closed > .kg-panel {
	opacity: 0;
	visibility: hidden; /* closed by its button or Esc while the pointer is still over the item */
}

.kg-panel__inner {
	display: flex;
	justify-content: center;
	margin: 0 auto;
	max-width: 1240px;
	padding: 32px 23px 38px;
}

.kg-panel__col,
.kg-panel__card {
	border-left: 1px solid rgba(243, 242, 235, 0.3);
	padding: 0 42px;
}

.kg-panel__col:first-child,
.kg-panel__card:first-child {
	border-left: 0;
}

.kg-panel__heading {
	color: var(--kg-color-green);
	font-size: 16px;
	margin: 0 0 14px;
}

body .kg-header .kg-panel .kg-links a {
	color: var(--kg-color-white);
	display: block;
	font-size: 12px;
	font-weight: 700;
	line-height: 31px;
	text-decoration: none;
	white-space: nowrap;
}

body .kg-header .kg-panel .kg-links a:hover {
	color: var(--kg-color-green);
}

.kg-panel__deals {
	align-self: center;
	margin-left: 30px;
	width: 385px;
}

/* The deals boxes carry the Elementor widget's class (.elementor-widget-dynamic_deals_mall), so style.css
   places the carousel's arrow on the card's right edge as before; it needs a positioned box. */
.kg-panel__deals,
.kg-drawer__deals {
	position: relative;
}

/* That class also makes the box full-width (style.css, !important): in the dropdown it keeps its column. */
.kg-panel .kg-panel__deals.elementor-widget-dynamic_deals_mall {
	flex: none;
	width: 385px !important;
}

.kg-panel--cards .kg-panel__inner {
	padding-top: 38px;
}

.kg-panel__card {
	max-width: 238px;
	padding: 0 20px;
}

.kg-panel__title {
	color: var(--kg-color-white);
	font-size: 20px;
	line-height: 1.2;
	margin: 0 0 8px;
}

.kg-panel__text {
	color: var(--kg-color-white);
	font-size: 12px;
	line-height: 1.25;
	margin: 0 0 16px;
}

/* the store picker and the store messages (styled by style.css, #selectLocationCTA etc.) */

.kg-header__store {
	align-items: center;
	display: flex;
	flex: none;
	margin-left: auto;
	position: relative; /* #locationDropdown hangs under it */
}

.kg-header__store .shopping-at p {
	line-height: 1.6;
	max-width: 80px;
}

.kg-header__messages:empty {
	display: none;
}

/* tablet and phone: the icon and the menu button */

@media screen and (max-width: 1024px) {
	.kg-header__bar {
		gap: 18px;
		min-height: 72px;
		padding: 0 20px;
	}

	.kg-header__logo,
	.kg-nav {
		display: none;
	}

	.kg-header__icon {
		display: block;
	}

	.kg-header__menu-button {
		display: block !important;
	}

	.kg-header__store .shopping-at p {
		max-width: none;
	}
}

@media screen and (max-width: 767px) {
	.kg-header__bar {
		gap: 14px;
		min-height: 64px;
		padding: 0 16px;
	}

	.kg-header__icon {
		height: 32px;
	}
}

/* ---------- the phone menu (a modal <dialog>) ---------- */

html.kg-drawer-open {
	overflow: hidden;
}

.kg-drawer {
	background-color: var(--kg-color-dark);
	border: 0;
	color: var(--kg-color-white);
	font-family: var(--kg-font);
	height: 100%;
	inset: 0;
	margin: 0;
	max-height: 100%;
	max-width: 100%;
	overflow-y: auto;
	padding: 26px 28px 40px;
	width: 100%;
}

.kg-drawer::backdrop {
	background: rgba(0, 0, 0, 0.6);
}

.kg-drawer__top {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin-bottom: 28px;
}

.kg-drawer__logo {
	height: 46px;
	width: auto;
}

body .kg-drawer .kg-drawer__close {
	line-height: 0;
	padding: 6px;
}

.kg-drawer__list {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
}

.kg-drawer__row {
	align-items: center;
	display: flex;
	gap: 12px;
}

body .kg-drawer .kg-drawer__link {
	color: var(--kg-color-white);
	display: block;
	font-size: 22px;
	line-height: 1.2;
	padding: 10px 0;
	text-decoration: none;
}

body .kg-drawer .kg-drawer__link[aria-current="page"] {
	color: var(--kg-color-green);
}

body .kg-drawer .kg-drawer__toggle {
	align-items: center;
	display: flex;
	height: 40px;
	justify-content: center;
	width: 32px;
}

.kg-drawer__toggle[aria-expanded="true"] .kg-chevron {
	transform: rotate(180deg);
}

.kg-drawer__sub {
	border-top: 1px solid rgba(243, 242, 235, 0.25);
	margin: 4px 0 10px;
	padding: 8px 0 4px;
}

.kg-drawer__heading {
	border-bottom: 1px solid rgba(243, 242, 235, 0.25);
	color: var(--kg-color-green);
	font-size: 16px;
	margin: 12px 0 6px;
	padding-bottom: 8px;
}

body .kg-drawer .kg-drawer__sub .kg-links a {
	color: var(--kg-color-white);
	display: block;
	font-size: 14px;
	line-height: 36px;
	text-decoration: none;
}

/* ---------- footer ---------- */

.kg-footer {
	background-color: var(--kg-color-dark);
	color: var(--kg-color-white);
	font-family: var(--kg-font);
}

.kg-footer__inner {
	margin: 0 auto;
	max-width: 1240px;
	padding: 70px 23px 34px;
}

.kg-footer__main {
	align-items: flex-start;
	display: flex;
	gap: 40px;
}

body .kg-footer .kg-footer__badge {
	display: block;
	flex: none;
	line-height: 0;
	margin-right: 50px;
	width: 124px;
}

.kg-footer__cols {
	display: flex;
	gap: 18px;
}

.kg-footer__col {
	min-width: 95px;
}

.kg-footer__heading {
	color: var(--kg-color-green);
	font-size: 13px;
	margin: 0 0 16px;
}

.kg-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
}

body .kg-footer .kg-footer__links a {
	color: var(--kg-color-white);
	display: block;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.6;
	padding: 5px 0;
	text-decoration: none;
}

body .kg-footer .kg-footer__links a:hover {
	color: var(--kg-color-green);
}

.kg-footer__signup {
	flex: 0 1 290px;
	margin-left: auto;
}

.kg-footer__title {
	color: var(--kg-color-white);
	font-size: 14px;
	font-weight: 700;
	margin: 0 0 12px;
}

.kg-footer__text {
	font-size: 11px;
	line-height: 1.45;
	margin: 0 0 16px;
}

body .kg-footer .kg-footer__text a {
	color: var(--kg-color-green);
}

body .kg-footer .kg-footer__licence {
	display: block;
	line-height: 0;
	margin-top: 22px;
	max-width: 258px;
}

.kg-footer__licence img {
	border-radius: 10px;
}

.kg-footer__side {
	display: flex;
	flex: none;
	flex-direction: column;
	gap: 26px;
	margin-left: 60px;
}

.kg-footer__app-links {
	display: flex;
	flex-direction: column;
	gap: 9px;
}

body .kg-footer .kg-footer__app-links a {
	display: block;
	line-height: 0;
	width: 125px;
}

.kg-footer__social {
	display: flex;
	gap: 14px;
	list-style: none;
	margin: 0;
	padding: 0;
}

body .kg-footer .kg-footer__social a {
	color: var(--kg-color-green);
	display: block;
	line-height: 0;
	margin: -7px; /* a 36px target around the 22px icon, the row's spacing unchanged */
	padding: 7px;
}

body .kg-footer .kg-footer__social a:hover {
	color: var(--kg-color-white);
}

.kg-footer__bottom {
	align-items: flex-end;
	display: flex;
	gap: 30px;
	justify-content: space-between;
	margin-top: 36px;
}

.kg-footer__awards {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.kg-footer__awards img {
	height: 76px;
	width: auto;
}

.kg-footer__legal {
	font-size: 12px; /* the smallest size the site uses for words people read */
	margin: 0;
	white-space: nowrap;
}

body .kg-footer .kg-footer__legal a {
	color: var(--kg-color-green);
}

@media screen and (max-width: 1024px) {
	.kg-footer__main {
		flex-wrap: wrap;
		gap: 36px;
	}

	.kg-footer__signup {
		margin-left: 0;
	}

	.kg-footer__side {
		margin-left: 0;
	}
}

@media screen and (max-width: 767px) {
	.kg-footer__inner {
		padding: 48px 20px 30px;
	}

	.kg-footer__main,
	.kg-footer__side {
		align-items: center;
		flex-direction: column;
		text-align: center;
	}

	.kg-footer__main {
		gap: 30px;
	}

	body .kg-footer .kg-footer__badge {
		margin: 0 auto;
		width: 86px;
	}

	/* Company and Shop side by side, Locations under them, as the old phone footer had them. */
	.kg-footer__cols {
		display: grid;
		gap: 22px 12px;
		grid-template-columns: 1fr 1fr;
		text-align: center;
		width: 100%;
	}

	.kg-footer__col:nth-child(3) {
		grid-column: 1 / -1;
	}

	body .kg-footer .kg-footer__links a {
		font-size: 12px;
		padding: 4px 0;
	}

	.kg-footer__heading {
		font-size: 13px;
		margin-bottom: 6px;
	}

	.kg-footer__signup {
		flex-basis: auto;
	}

	.kg-footer__title {
		font-size: 14px;
		margin-bottom: 8px;
	}

	.kg-footer__text {
		font-size: 12px;
	}

	body .kg-footer .kg-footer__licence {
		margin: 18px auto 0;
		max-width: 220px;
	}

	.kg-footer__app-links {
		flex-direction: row;
		justify-content: center;
	}

	body .kg-footer .kg-footer__app-links a {
		width: 110px;
	}

	.kg-footer__side {
		gap: 20px;
	}

	.kg-footer__social {
		justify-content: center;
	}

	.kg-footer__bottom {
		align-items: center;
		border-top: 1px solid rgba(243, 242, 235, 0.15);
		flex-direction: column;
		gap: 22px;
		padding-top: 24px;
	}

	.kg-footer__awards {
		justify-content: center;
		max-width: 260px;
	}

	.kg-footer__awards img {
		height: 76px;
	}

	.kg-footer__legal {
		white-space: normal;
	}
}
