/*
 * Μενού Εστιατορίου – εμφάνιση.
 * Δεν ορίζει γραμματοσειρές ή χρώματα: όλα κληρονομούνται από το θέμα.
 */

.rm-menu {
	--rm-line: rgba(128, 128, 128, 0.3);
	--rm-hover: rgba(128, 128, 128, 0.08);
	font: inherit;
	color: inherit;
	line-height: 1.4;
	box-sizing: border-box;
}

@supports (color: color-mix(in srgb, red, blue)) {
	.rm-menu {
		--rm-line: color-mix(in srgb, currentColor 18%, transparent);
		--rm-hover: color-mix(in srgb, currentColor 6%, transparent);
	}
}

.rm-menu *,
.rm-menu *::before,
.rm-menu *::after {
	box-sizing: border-box;
}

/* ---------- Κατηγορία (ακορντεόν) ---------- */

.rm-cat {
	border-bottom: 1px solid var(--rm-line);
	margin: 0;
}

.rm-cat:first-child {
	border-top: 1px solid var(--rm-line);
}

.rm-cat__head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 6px;
	cursor: pointer;
	list-style: none;
	user-select: none;
	scroll-margin-top: 5.5rem;
	transition: background-color 0.15s ease;
}

.rm-cat__head::-webkit-details-marker {
	display: none;
}

.rm-cat__head::marker {
	content: "";
}

.rm-cat__head:hover {
	background-color: var(--rm-hover);
}

.rm-cat__head,
.rm-cat__head:focus,
.rm-cat__head:focus-visible,
.rm-cat__head:active {
	outline: 0 !important;
	box-shadow: none !important;
	-webkit-tap-highlight-color: transparent;
}

.rm-cat__text {
	flex: 1 1 auto;
	min-width: 0;
}

.rm-cat__title {
	display: block;
	font-size: 1.25em;
	font-weight: 600;
	line-height: 1.25;
}

.rm-cat__hours {
	display: block;
	margin-top: 2px;
	font-size: 0.875em;
	opacity: 0.7;
}

.rm-chevron {
	flex: 0 0 auto;
	width: 10px;
	height: 10px;
	margin-right: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}

.rm-cat[open] > .rm-cat__head .rm-chevron {
	transform: rotate(-135deg);
}

.rm-cat__body {
	padding: 2px 6px 20px;
}

.rm-cat[open] > .rm-cat__body {
	animation: rm-fade 0.25s ease;
}

@keyframes rm-fade {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* ---------- Υποκατηγορίες ---------- */

.rm-group__title {
	margin: 20px 0 4px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--rm-line);
	font-size: 0.8125em;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.65;
}

.rm-group:first-child .rm-group__title {
	margin-top: 8px;
}

/* ---------- Είδη ---------- */

.rm-menu ul.rm-items {
	margin: 0;
	padding: 0;
	list-style: none;
}

.rm-menu li.rm-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	padding: 11px 0;
	list-style: none;
}

.rm-item__main {
	flex: 1 1 auto;
	min-width: 0;
}

.rm-item__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
}

.rm-item__name {
	font-weight: 500;
	overflow-wrap: anywhere;
}

.rm-item__price {
	flex: 0 0 auto;
	font-weight: 600;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.rm-menu p.rm-item__desc {
	margin: 3px 0 0;
	padding: 0;
	font-size: 0.8125em;
	line-height: 1.45;
	opacity: 0.72;
}

/* ---------- Εικονίδια ---------- */

.rm-icon {
	flex: 0 0 auto;
	display: block;
	overflow: hidden;
	border-radius: 8px;
}

.rm-icon--cat {
	width: 56px;
	height: 56px;
}

.rm-icon--item {
	width: 48px;
	height: 48px;
}

.rm-menu .rm-icon img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
}

.rm-empty {
	opacity: 0.7;
}

/* Ωράριο: κατηγορίες εκτός ωραρίου = ανενεργές (γκρι) και στο τέλος της λίστας */
.rm-cat--closed .rm-cat__head,
.rm-cat--closed .rm-cat__body {
	opacity: 0.5;
}

.rm-cat--closed .rm-icon img {
	filter: grayscale(1);
}

/* Κείμενο μόνο για αναγνώστες οθόνης */
.rm-cat__off {
	display: none;
}

.rm-cat--closed .rm-cat__off {
	display: block;
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 480px) {
	.rm-icon--cat {
		width: 48px;
		height: 48px;
	}

	.rm-icon--item {
		width: 42px;
		height: 42px;
	}

	.rm-cat__head {
		gap: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rm-cat[open] > .rm-cat__body {
		animation: none;
	}

	.rm-chevron,
	.rm-cat__head {
		transition: none;
	}
}
