/* CodeOrder Theme — header (base, always loaded).
   The mobile drawer lives in mobile-menu.css — do not re-add drawer rules here.
   Variant overrides live in header-<variant>.css and load additionally. */


.nav {
	position: sticky; top: 0; z-index: 50;
	backdrop-filter: blur(20px) saturate(140%);
	-webkit-backdrop-filter: blur(20px) saturate(140%);
	background: var(--nav-bg);
	border-bottom: 1px solid var(--nav-border);
	transition: background-color 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}
.nav.scrolled {
	background: var(--nav-bg-scrolled);
	border-bottom-color: var(--line);
	box-shadow: var(--shadow-1);
}
.nav-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 68px;
	gap: 24px;
}
.nav-logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.nav-logo img,
.nav-logo .custom-logo { height: 36px; width: auto; display: block; }
.nav-logo a { font-family: var(--font-display); font-size: 24px; color: var(--heading); text-decoration: none; font-weight: 500; }

/* The CodeOrder logo a new site shows until the owner sets their own
   (codeon_rv2_render_logo). The word follows the text colour, so it reads in
   dark mode and on the dark footer; the mark keeps its brand colours. */
.co-default-logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--heading);
	text-decoration: none;
	line-height: 1;
}
.co-default-logo svg { width: 34px; height: 34px; flex: none; display: block; }
.co-default-logo__word {
	font-family: var(--font-body);
	font-size: 21px;
	font-weight: 700;
	letter-spacing: -0.02em;
}
.co-default-logo--menu svg { width: 30px; height: 30px; }
.co-default-logo--menu .co-default-logo__word { font-size: 19px; }
.co-default-logo--footer { color: var(--on-brand); margin-bottom: 24px; }
.co-default-logo--footer svg { width: 44px; height: 44px; }
.co-default-logo--footer .co-default-logo__word { font-size: 26px; }

.nav-center {
	display: flex; gap: 6px; align-items: center;
	padding: 6px;
	background: var(--nav-pill);
	border-radius: 999px;
	list-style: none;
}
.nav-center-list { display: flex; gap: 6px; align-items: center; margin: 0; padding: 0; list-style: none; }
.nav-center .menu-item { list-style: none; display: inline-flex; }
.nav-center a {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	color: var(--ink-soft);
	padding: 8px 16px;
	border-radius: 999px;
	transition: color 180ms ease, background-color 180ms ease;
	line-height: 1;
}
.nav-center a:hover, .nav-center .current-menu-item a {
	color: var(--heading);
	background: var(--surface);
}

.nav-right { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.nav-phone {
	font-size: 13px; font-weight: 500; text-decoration: none; color: var(--ink-soft);
	display: inline-flex; align-items: center; gap: 8px;
	padding: 8px 14px;
	border-radius: 999px;
	transition: color 180ms ease, background-color 180ms ease;
}
.nav-phone:hover { color: var(--brand-text); background: color-mix(in srgb, var(--brand) 6%, transparent); }

.nav-cta-btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 16px 10px 18px;
	border-radius: 999px;
	font-size: 13px; font-weight: 600;
	background: var(--brand);
	color: var(--on-brand);
	text-decoration: none;
	/* "Order online" broke onto two lines on phones and doubled the bar's
	   button height; the label never wraps, the logo gives way instead. */
	white-space: nowrap;
	flex-shrink: 0;
	transition: background-color 200ms ease, transform 200ms ease;
}
.nav-cta-btn:hover { background: var(--brand-deep); transform: translateY(-1px); }
.nav-cta-btn .arr {
	width: 22px; height: 22px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--on-brand) 18%, transparent);
	display: inline-grid; place-items: center;
}

.nav-account {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 5px 14px 5px 5px;
	border-radius: 999px;
	text-decoration: none;
	color: var(--ink-soft);
	font-size: 13px; font-weight: 500;
	border: 1px solid var(--line);
	background: transparent;
	transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
	line-height: 1;
}
.nav-account:hover {
	background: color-mix(in srgb, var(--brand) 8%, transparent);
	color: var(--heading);
	border-color: color-mix(in srgb, var(--brand) 25%, transparent);
}
.nav-account .avatar {
	width: 26px; height: 26px;
	border-radius: 50%;
	background: var(--brand);
	color: var(--on-brand);
	display: grid; place-items: center;
	flex-shrink: 0;
}

.nav-menu-btn {
	display: none;
	width: 40px; height: 40px;
	border: 1px solid var(--line);
	background: transparent;
	border-radius: 999px;
	cursor: pointer;
	align-items: center; justify-content: center;
	color: var(--ink);
}
.nav-menu-btn:hover { border-color: var(--brand-text); color: var(--brand-text); }

/* Light/dark switch. Both glyphs ship in the markup and CSS decides which one is
   visible, so the button cannot briefly show the wrong icon between the no-flash
   boot script and the deferred main.js. */
.theme-toggle {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: transparent;
	color: var(--ink);
	cursor: pointer;
	transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}
.theme-toggle:hover {
	border-color: var(--brand-text);
	color: var(--brand-text);
	background: color-mix(in srgb, var(--brand) 7%, transparent);
}
.theme-toggle-ico { display: grid; place-items: center; grid-area: 1 / 1; }
/* Light theme offers the moon (what you'd switch TO); dark offers the sun. */
.theme-toggle-sun { display: none; }
html[data-theme="dark"] .theme-toggle-sun { display: grid; }
html[data-theme="dark"] .theme-toggle-moon { display: none; }

@media (max-width: 1180px) {
	.nav-center { display: none; }
	.nav-menu-btn { display: inline-flex; }
}
@media (max-width: 920px) {
	.nav-inner { height: 60px; }
	.nav-cta-btn { padding: 10px 14px; font-size: 12px; }
	.nav-phone { display: none; }
	.nav-account .am-label { display: none; }
	.nav-account { padding: 5px; }
	/* Below the drawer breakpoint the switch lives inside the drawer instead,
	   so the header keeps room for the order CTA. */
	.nav-theme-toggle { display: none; }
}
@media (max-width: 782px) {
	/* The bottom app bar already has an Account tab: one fewer button up here
	   is what lets the logo and the order button share a phone-width bar. */
	body.bottom-app-menu-has-account .nav-account { display: none; }
}
@media (max-width: 600px) {
	.nav-inner { gap: 12px; }
	.nav-right { gap: 8px; }
	.nav-cta-btn { padding: 9px 12px; }
	.nav-cta-btn .arr { display: none; }
	.nav-logo { min-width: 0; }
	.co-default-logo--header { gap: 8px; }
	.co-default-logo--header svg { width: 30px; height: 30px; }
	.co-default-logo--header .co-default-logo__word { font-size: 18px; }
}
@media (max-width: 359px) {
	.co-default-logo--header .co-default-logo__word { display: none; }
}

/* Phones: no frosted glass. Re-blurring 20px of page behind a sticky bar on
   every scroll frame is one of the costliest things a phone GPU can be asked
   to do, and at this opacity the blur is barely visible anyway. */
@media (max-width: 900px) {
	.nav,
	.nav.scrolled {
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
		background: color-mix(in srgb, var(--paper) 97%, transparent);
	}
}
