/* ==========================================================================
   Horizon Menu — Frontend styles
   Design system scoped to .hm-menu so host themes are never affected.
   ========================================================================== */

.hm-menu {
	--hm-text: #201b14;
	--hm-text-muted: #6f6659;
	--hm-text-faint: #96897a;
	--hm-heading: #17130e;
	--hm-accent: #027d42;
	--hm-accent-soft: #e2f2ea;
	--hm-border: #e9e2d6;
	--hm-border-strong: #d8cdb8;
	--hm-surface: #fffdfa;
	--hm-surface-alt: #faf6ef;
	--hm-danger: #a63a34;
	--hm-danger-bg: #fbf0ef;
	--hm-radius-sm: 6px;
	--hm-radius-md: 10px;
	--hm-radius-lg: 16px;
	--hm-shadow-sm: 0 1px 2px rgba(30, 22, 8, 0.06);
	--hm-shadow-md: 0 10px 30px -12px rgba(30, 22, 8, 0.18);
	--hm-font-heading: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', serif;

	max-width: 900px;
	margin: 0 auto;
	font-family: inherit;
	color: var(--hm-text);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.hm-menu * {
	box-sizing: border-box;
}

/* Intro */
.hm-menu-intro {
	margin-bottom: 2.25rem;
	font-size: 1.05rem;
	color: var(--hm-text-muted);
}

.hm-menu-intro p:first-child {
	margin-top: 0;
}

/* Quick category navigation */
.hm-menu-nav {
	position: sticky;
	top: 5rem;
	z-index: 5;
	display: flex;
	gap: 0.5rem;
	overflow-x: auto;
	padding: 0.6rem 0.1rem;
	margin: 0 0 2rem;
	background: linear-gradient(to bottom, var(--hm-surface) 75%, transparent);
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.hm-menu-nav::-webkit-scrollbar {
	height: 4px;
}

.hm-menu-nav::-webkit-scrollbar-thumb {
	background: var(--hm-border-strong);
	border-radius: 2px;
}

.hm-menu-nav-link {
	flex: 0 0 auto;
	display: inline-block;
	padding: 0.4rem 0.9rem;
	border: 1px solid var(--hm-border-strong);
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--hm-text-muted);
	text-decoration: none;
	background: var(--hm-surface);
	transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.hm-menu-nav-link:hover,
.hm-menu-nav-link:focus-visible {
	color: var(--hm-accent);
	border-color: var(--hm-accent);
	background: var(--hm-accent-soft);
}

/* Category */
.hm-category {
	margin-bottom: 3rem;
	scroll-margin-top: 4.5rem;
}

.hm-category-title {
	position: relative;
	font-family: var(--hm-font-heading);
	font-size: 1.6rem;
	font-weight: 700;
	margin: 0 0 0.6rem;
	padding-bottom: 0.6rem;
	color: var(--hm-heading);
	letter-spacing: 0.01em;
}

.hm-category-title::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 46px;
	height: 3px;
	border-radius: 2px;
	background: var(--hm-accent);
}

.hm-category-desc {
	color: var(--hm-text-muted);
	margin: 0 0 1.25rem;
	font-size: 0.95rem;
	font-style: italic;
}

/* Dishes list */
.hm-dishes {
	display: flex;
	flex-direction: column;
}

.hm-dish {
	display: flex;
	gap: 1.1rem;
	padding: 1.15rem 0.6rem;
	margin: 0 -0.6rem;
	border-bottom: 1px solid var(--hm-border);
	border-radius: var(--hm-radius-md);
	transition: background 0.15s ease, box-shadow 0.15s ease;
}

.hm-dish:last-child {
	border-bottom: none;
}

.hm-dish:hover {
	background: var(--hm-surface-alt);
}

.hm-dish-image {
	flex-shrink: 0;
	width: 104px;
	height: 104px;
	overflow: hidden;
	border-radius: var(--hm-radius-md);
	box-shadow: var(--hm-shadow-sm);
	background: var(--hm-surface-alt);
}

.hm-dish-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.hm-dish:hover .hm-dish-image img {
	transform: scale(1.05);
}

.hm-dish-body {
	flex: 1;
	min-width: 0;
}

/* Title + price row with dotted leader (classic menu layout) */
.hm-dish-row {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
}

.hm-dish-title {
	flex: 0 1 auto;
	font-size: 1.08rem;
	font-weight: 700;
	margin: 0;
	color: var(--hm-heading);
}

.hm-dish-leader {
	flex: 1 1 auto;
	min-width: 0.75rem;
	border-bottom: 1px dotted var(--hm-border-strong);
	margin-bottom: 0.3rem;
}

.hm-dish-price {
	flex: 0 0 auto;
	font-weight: 700;
	font-size: 1rem;
	color: var(--hm-accent);
	white-space: nowrap;
}

.hm-dish-price .hm-price-separator {
	color: var(--hm-text-faint);
	font-weight: 400;
	margin: 0 0.15rem;
}

.hm-dish-subtitle {
	font-size: 0.85rem;
	color: var(--hm-text-faint);
	margin: 0.2rem 0 0;
	font-style: italic;
}

.hm-dish-description {
	font-size: 0.92rem;
	color: var(--hm-text-muted);
	margin: 0.4rem 0 0;
}

.hm-dish-description p {
	margin: 0.25rem 0;
}

.hm-dish-footnote {
	font-size: 0.8rem;
	color: var(--hm-text-faint);
	margin: 0.4rem 0 0;
}

/* Allergen badges */
.hm-allergens {
	display: inline-flex;
	gap: 0.25rem;
	margin-left: 0.35rem;
	vertical-align: middle;
}

.hm-allergen {
	display: inline-block;
	color: #fff;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 0.12rem 0.4rem;
	border-radius: 999px;
	line-height: 1.5;
	text-decoration: none;
	cursor: help;
}

/* Allergen legend */
.hm-allergen-legend {
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--hm-border);
}

.hm-allergen-legend h4 {
	font-size: 0.8rem;
	margin: 0 0 1rem;
	color: var(--hm-text-faint);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
}

.hm-allergen-legend ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 0.6rem 1rem;
}

.hm-allergen-legend li {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.85rem;
	color: var(--hm-text-muted);
}

.hm-allergen-legend .hm-allergen {
	flex-shrink: 0;
	min-width: 1.6em;
	text-align: center;
}

/* Notices */
.hm-notice {
	padding: 1.1rem 1.35rem;
	border-radius: var(--hm-radius-md);
	margin: 1rem 0;
	border: 1px solid var(--hm-border);
	border-left: 4px solid var(--hm-accent);
	background: var(--hm-surface-alt);
	box-shadow: var(--hm-shadow-sm);
}

.hm-notice p {
	margin: 0.35rem 0;
}

.hm-notice p:first-child {
	margin-top: 0;
}

.hm-notice p:last-child {
	margin-bottom: 0;
}

.hm-notice--error {
	border-left-color: var(--hm-danger);
	background: var(--hm-danger-bg);
}

.hm-notice--error .hm-error {
	color: var(--hm-danger);
	font-weight: 600;
}

.hm-notice--empty ul {
	margin: 0.6rem 0 0 1.1rem;
	padding: 0;
}

.hm-notice--empty li {
	margin-bottom: 0.3rem;
	color: var(--hm-text-muted);
}

.hm-notice--empty a {
	display: inline-block;
	margin-top: 0.25rem;
	font-weight: 600;
	color: var(--hm-accent);
	text-decoration: none;
}

.hm-notice--empty a:hover {
	text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
	.hm-dish {
		flex-direction: column;
	}

	.hm-dish-image {
		width: 100%;
		height: 180px;
	}

	.hm-menu-nav {
		margin-left: -0.25rem;
		margin-right: -0.25rem;
		padding-left: 0.25rem;
		padding-right: 0.25rem;
	}
}

/* Print */
@media print {
	.hm-menu-nav {
		display: none;
	}

	.hm-dish {
		break-inside: avoid;
	}

	.hm-category {
		break-inside: avoid-page;
	}

	.hm-dish:hover {
		background: none;
	}

	.hm-dish-image img {
		transform: none;
	}
}
