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

.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-of-type {
	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-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.875em;
	font-weight: 600;
	letter-spacing: 0.02em;
	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__sub {
	display: block;
	margin-top: 2px;
	font-size: 0.875em;
	opacity: 0.7;
}

.rm-menu p.rm-cat__note,
.rm-menu p.rm-footnote {
	margin: 14px 0 0;
	padding: 0;
	font-size: 0.75em;
	line-height: 1.45;
	opacity: 0.65;
}

.rm-menu p.rm-footnote {
	margin-top: 18px;
}

/* ---------- Επιλογή ποικιλίας κόκκου ---------- */

.rm-vswitch__label {
	margin: 8px 0 6px;
	font-size: 0.8125em;
	opacity: 0.7;
}

.rm-vswitch {
	position: -webkit-sticky;
	position: sticky;
	top: var(--rm-sticky-top, 0px);
	z-index: 20;
	margin: 0 -6px;
	padding: 6px 6px 8px;
	background: var(--rm-bg, #fff);
}

/* Απαλό σβήσιμο κάτω από την μπάρα, ώστε τα είδη να «χάνονται» από κάτω της. */
.rm-vswitch::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 14px;
	background: linear-gradient(var(--rm-bg, #fff), transparent);
	pointer-events: none;
}

.rm-vswitch__bar {
	display: flex;
	gap: 4px;
	padding: 3px;
	border: 1px solid var(--rm-line);
	border-radius: 999px;
}

.rm-menu button.rm-vswitch__btn {
	-webkit-appearance: none;
	appearance: none;
	flex: 1 1 0;
	min-width: 0;
	min-height: 44px;
	margin: 0;
	padding: 6px 10px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font: inherit;
	font-size: 0.875em;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-align: center;
	white-space: normal;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.rm-menu button.rm-vswitch__btn:hover {
	background: var(--rm-hover);
}

.rm-menu button.rm-vswitch__btn[aria-pressed="true"] {
	background: var(--rm-accent, currentColor);
	color: var(--rm-bg, #fff);
}

.rm-menu button.rm-vswitch__btn:focus-visible {
	outline: 2px solid var(--rm-accent, currentColor);
	outline-offset: 2px;
}

.rm-vinfo {
	margin: 2px 0 10px;
	font-size: 0.8125em;
	line-height: 1.45;
}

.rm-vinfo__origin {
	display: block;
	opacity: 0.75;
}

.rm-vinfo__notes summary {
	display: inline-block;
	margin-top: 4px;
	cursor: pointer;
	list-style: none;
	text-decoration: underline;
	text-underline-offset: 3px;
	opacity: 0.85;
}

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

.rm-menu .rm-vinfo__notes p {
	margin: 4px 0 0;
	opacity: 0.75;
}

/* Ό,τι αλλάζει με την ποικιλία: φαίνεται μόνο το στοιχείο της επιλεγμένης. */
.rm-menu .rm-v {
	display: none;
}

.rm-menu[data-variety="0"] .rm-v[data-v="0"],
.rm-menu[data-variety="1"] .rm-v[data-v="1"],
.rm-menu[data-variety="2"] .rm-v[data-v="2"] {
	display: block;
}

.rm-menu[data-variety="0"] .rm-vp--multi[data-v="0"],
.rm-menu[data-variety="1"] .rm-vp--multi[data-v="1"],
.rm-menu[data-variety="2"] .rm-vp--multi[data-v="2"] {
	display: flex;
}

.rm-vp--multi {
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	margin-top: 6px;
	text-align: right;
}

.rm-vp__line {
	white-space: nowrap;
}

.rm-vp__label {
	font-size: 0.875em;
	font-weight: 400;
	opacity: 0.7;
}

.rm-vp__price {
	display: inline-block;
	min-width: 3.8em;
	margin-left: 0.15em;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.rm-item__price.rm-vp .rm-vp__price {
	min-width: 0;
}

.rm-vp__na {
	font-size: 0.8em;
	font-weight: 400;
	opacity: 0.6;
}

/* ---------- Φωτογραφία είδους: μικρή, μεγαλώνει με πάτημα ---------- */

.rm-menu li.rm-item--photo {
	flex-wrap: wrap;
}

.rm-menu li.rm-item--photo > .rm-item__main {
	flex: 1 1 0;
	min-width: 0;
}

.rm-menu button.rm-photo {
	-webkit-appearance: none;
	appearance: none;
	flex: 0 0 auto;
	display: block;
	width: 84px;
	height: 84px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	box-shadow: none;
	overflow: hidden;
	cursor: zoom-in;
	-webkit-tap-highlight-color: transparent;
	transition: width 0.25s ease, height 0.25s ease;
}

.rm-menu button.rm-photo:focus,
.rm-menu button.rm-photo:active {
	outline: 0;
	box-shadow: none;
}

.rm-menu button.rm-photo:focus-visible {
	outline: 2px solid var(--rm-accent, currentColor);
	outline-offset: 2px;
}

.rm-menu .rm-photo img.rm-photo__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	object-position: center;
	transform: scale(1.25);
	transition: transform 0.25s ease;
}

/* Μεγάλη: όλο το πλάτος, πάνω από το όνομα. */
.rm-menu li.rm-item--zoom > button.rm-photo {
	order: -1;
	flex-basis: 100%;
	width: 100%;
	height: auto;
	cursor: zoom-out;
}

.rm-menu li.rm-item--zoom .rm-photo img.rm-photo__img {
	height: auto;
	max-height: 70vh;
	object-fit: contain;
	transform: none;
}

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

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

	.rm-menu button.rm-photo {
		width: 76px;
		height: 76px;
	}

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

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

	.rm-chevron,
	.rm-cat__head,
	.rm-menu button.rm-vswitch__btn,
	.rm-menu button.rm-photo,
	.rm-menu .rm-photo img.rm-photo__img {
		transition: none;
	}
}
