/*
 * Mongkung Menu — base styles (loaded on every page).
 *
 * Design system (dark "Charcoal Bistro", tokens live in theme.json):
 *   Widths    content 42rem · wide/POS 72rem · POS order panel 230px–27%
 *   Gutters   1rem (mobile) → 2rem (≥768px, via theme.json root padding)
 *   Breakpoints  600px cards 2-col · 900px POS 75/25 layout · 1200px max density
 *   Sticky UI   --mk-header-h header, panel/bar offsets derive from it
 */

:root {
	--mk-header-h: 3.75rem; /* sized for the 36px site logo; title-only header is slightly shorter */

	/* Native form controls (radios, selects, autofill) render dark. */
	color-scheme: dark;

	/* theme.json puts radius sizes under settings.border, which generates
	   --wp--preset--border-radius--*. Alias the shorter names the CSS uses. */
	--wp--preset--radius--sm: var(--wp--preset--border-radius--sm);
	--wp--preset--radius--md: var(--wp--preset--border-radius--md);
	--wp--preset--radius--lg: var(--wp--preset--border-radius--lg);
}

img {
	max-width: 100%;
	height: auto;
}

/* Paddings and borders stay inside declared widths (inputs, cards, iframes). */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/* Explicit hidden state (some themes set display on these elements). */
[hidden] {
	display: none !important;
}

/* Jump targets must clear the sticky header. */
[id] {
	scroll-margin-top: calc(var(--mk-header-h) + 0.75rem);
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* Screen-reader text (not provided on the front end by WP core). */
.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
}

/* Skip link. */
.mk-skip-link {
	position: fixed;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100;
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	padding: 0.5rem 1rem;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
	border-radius: var(--wp--preset--radius--sm);
	font-weight: 600;
	text-decoration: none;
}

/* Announcement bar above the header (Settings → Announcement Bar). */
.mk-notice-bar {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
	text-align: center;
}

.mk-notice-bar p {
	margin: 0;
	padding: 0.5rem 1rem;
	font-size: 0.8125rem;
	font-weight: 600;
}

/* Social icon row in the footer (Settings → Social Links). */
.mk-social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin-top: 0.75rem;
}

.mk-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	color: var(--wp--preset--color--text);
}

.mk-social a:hover,
.mk-social a:focus-visible {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.mk-social svg {
	display: block;
	width: 1.125rem;
	height: 1.125rem;
	fill: currentColor;
}

/* Sticky slim header. */
.mk-header {
	position: sticky;
	top: 0;
	z-index: 90;
	background: var(--wp--preset--color--background);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

/* Keep the footer pinned to the bottom on short pages. */
.wp-site-blocks {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
}

.wp-site-blocks > footer {
	margin-top: auto;
}

/* Header cart pill (server-rendered; JS opens the drawer / panel). */
.mk-header-cart {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.375rem 0.875rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	font-weight: 600;
	font-size: 0.875rem;
	text-decoration: none;
	white-space: nowrap;
}

.mk-header-cart svg {
	display: block;
	flex: 0 0 auto;
}

.mk-header-cart-count {
	display: inline-block;
	min-width: 1.25rem;
	text-align: center;
	padding: 0 0.375rem;
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
	font-weight: 700;
}

/* Mobile navigation overlay must match the theme, not the page behind it. */
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--surface);
}

/* Header brand: when a logo is set it replaces the site title. */
.mk-brand {
	align-items: center;
}

.mk-brand .wp-block-site-logo img {
	display: block;
	height: auto;
}

.mk-brand:has(.wp-block-site-logo img) .wp-block-site-title {
	display: none;
}

/* Opening hours card. */
.mk-hours {
	margin-top: 3rem; /* replaces the section padding the card layout removed */
	padding: 1.5rem 1.25rem;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--preset--radius--lg);
}

.mk-hours-badge {
	margin: 0 0 0.25rem;
	font-size: 1.75rem;
	line-height: 1;
}

.mk-hours-row p {
	margin: 0;
	padding: 0.625rem 0;
}

.mk-hours-row {
	border-bottom: 1px dashed var(--wp--preset--color--border);
}

.mk-hours-row:last-child {
	border-bottom: 0;
}

.mk-hours-row p:last-child {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--wp--preset--color--primary);
}

.mk-hours-note {
	margin: 0.875rem 0 0;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
}

/* Google Maps embed (Find Us section). */
.mk-map {
	margin-top: 1.5rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--preset--radius--md);
	overflow: hidden;
}

.mk-map iframe {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	border: 0;
}

@media (min-width: 600px) {
	.mk-map iframe {
		aspect-ratio: 16 / 9;
	}
}

/* Opening hours + Find Us: one quiet info band under the menu (desktop).
   A dashed divider separates it from the menu cards; hours and contact
   details share the left column, the map owns the right half. Phones keep
   the stacked card look (unchanged). */
@media (min-width: 900px) {
	.mk-duo {
		display: grid;
		grid-template-columns: 1.1fr 1fr;
		gap: 0.5rem 3rem;
		align-items: center;
		margin-top: 3rem;
		padding-top: 2.5rem;
		border-top: 1px dashed var(--wp--preset--color--border);
	}

	/* Plain column, no card. !important beats the pattern's inline padding. */
	.mk-duo .mk-hours {
		background: transparent;
		border: 0;
		border-radius: 0;
		padding: 0 !important;
		margin-top: 0;
		justify-content: flex-start;
		grid-column: 1;
		grid-row: 1;
	}

	/* The hours pattern centers its inner 22–26rem — let it fill the column. */
	.mk-duo .mk-hours > *,
	.mk-duo .mk-hours-list > * {
		max-width: none;
	}

	.mk-duo .mk-hours-badge {
		display: none;
	}

	/* Contact section dissolves so the map can own the right half. */
	.mk-duo .mk-contact-info {
		display: contents;
	}

	.mk-duo .mk-contact-info > h2,
	.mk-duo .mk-contact-info > .wp-block-group {
		grid-column: 1;
		/* WP's constrained layout shrink-wraps and auto-centers children —
		   force full cell width. */
		justify-self: stretch;
		width: 100%;
		margin-left: 0;
		margin-right: 0;
		max-width: none;
	}

	.mk-duo .mk-contact-info > h2 {
		grid-row: 2;
		margin-top: 2rem;
		margin-bottom: 0.75rem;
	}

	.mk-duo .mk-contact-info > .wp-block-group {
		grid-row: 3;
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
		gap: 0.25rem;
	}

	.mk-duo .mk-map {
		grid-column: 2;
		grid-row: 1 / span 3;
		margin-top: 0;
		height: 100%;
	}

	.mk-duo .mk-map iframe {
		height: 100%;
	}

	/* Small muted section labels instead of big centered headings. */
	.mk-duo h2 {
		margin: 0 0 0.75rem;
		font-size: 0.875rem;
		font-weight: 600;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		text-align: left !important; /* beats .has-text-align-center */
		color: var(--wp--preset--color--muted);
	}

	/* Left-aligned, quiet text (WP's align-center classes load after us). */
	.mk-duo .mk-contact-info p,
	.mk-duo .mk-hours-note {
		text-align: left !important;
	}

	.mk-duo .mk-contact-info p,
	.mk-duo .mk-hours-row p,
	.mk-duo .mk-hours-note {
		margin: 0;
	}
}

/* Section rhythm for homepage sections. */
.mk-recipes h2,
.mk-story h2,
.mk-hours h2,
.mk-contact-info h2,
.mk-cta h2 {
	margin-bottom: 0;
}


@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}