/* ============================================================
   Restaurant Menu Management — Front-end Styles
   Author: Astrit Shuli
   ============================================================ */

/* ---- Wrapper ---- */
.rmm-wrapper {
	font-family: inherit;
	max-width: 900px;
	margin: 0 auto;
}

/* ---- Badges ---- */
.rmm-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 8px 0 16px;
}
.rmm-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .03em;
}
.rmm-badge--type {
	color: #fff;
}
.rmm-badge--area {
	background: #f0f4f8;
	color: #444;
	border: 1px solid #dce5ef;
}

/* ---- Cover image ---- */
.rmm-menu-cover {
	margin-bottom: 16px;
	border-radius: 8px;
	overflow: hidden;
}
.rmm-menu-cover img {
	width: 100%;
	height: auto;
	display: block;
	max-height: 320px;
	object-fit: cover;
}

/* ---- Excerpt / note ---- */
.rmm-menu-excerpt {
	color: #555;
	margin-bottom: 12px;
}
.rmm-menu-note {
	margin-top: 24px;
	padding: 12px 16px;
	background: #fef9e7;
	border-left: 3px solid #f0c040;
	border-radius: 0 4px 4px 0;
	font-size: .88em;
	color: #555;
}

/* ---- No results ---- */
.rmm-no-menus,
.rmm-no-file,
.rmm-no-sections {
	padding: 20px;
	text-align: center;
	color: #777;
	background: #f9f9f9;
	border: 1px dashed #ddd;
	border-radius: 6px;
}

/* ================================================================
   TABS LAYOUT
   ================================================================ */
.rmm-style-tabs .rmm-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	border-bottom: 2px solid #e5e7eb;
	padding-bottom: 0;
	margin-bottom: 0;
}

.rmm-tab-btn {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-bottom: none;
	padding: 10px 20px;
	font-size: .92em;
	font-weight: 600;
	cursor: pointer;
	border-radius: 6px 6px 0 0;
	color: #555;
	transition: background .15s, color .15s;
	position: relative;
	bottom: -2px;
}
.rmm-tab-btn:hover {
	background: #fff;
	color: #222;
}
.rmm-tab-btn--active {
	background: #fff;
	border-bottom-color: #fff;
	color: #222;
	z-index: 1;
}

.rmm-tabs-content {
	border: 1px solid #e5e7eb;
	border-top: none;
	border-radius: 0 0 8px 8px;
	background: #fff;
}

.rmm-tab-panel {
	display: none;
	padding: 24px;
}
.rmm-tab-panel--active { display: block; }

/* ================================================================
   BUILDER DISPLAY
   ================================================================ */
.rmm-builder-display { width: 100%; }

/* ---- Section ---- */
.rmm-section-display {
	margin-bottom: 32px;
}
.rmm-section-heading {
	font-size: 1.1em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: #2c2c2c;
	margin: 0 0 4px;
	padding-bottom: 8px;
	border-bottom: 2px solid #e5e7eb;
}
.rmm-section-display > .rmm-section-desc {
	color: #777;
	font-style: italic;
	margin: 0 0 12px;
	font-size: .9em;
}

/* ---- Item List ---- */
.rmm-item-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ---- Layout: list (default) ---- */
.rmm-layout-list .rmm-item-display {
	display: flex;
	flex-direction: column;
	padding: 12px 0;
	border-bottom: 1px solid #f0f0f0;
}
.rmm-layout-list .rmm-item-display:last-child { border-bottom: none; }

/* ---- Layout: grid ---- */
.rmm-layout-grid .rmm-item-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
}
.rmm-layout-grid .rmm-item-display {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 16px;
}

/* ---- Layout: compact ---- */
.rmm-layout-compact .rmm-item-display {
	padding: 6px 0;
	border-bottom: 1px dotted #eee;
}
.rmm-layout-compact .rmm-item-desc,
.rmm-layout-compact .rmm-item-allergens { display: none; }

/* ---- Featured item ---- */
.rmm-item--featured {
	background: linear-gradient(90deg, #fffbea 0%, transparent 100%);
}
.rmm-layout-grid .rmm-item--featured {
	border-color: #f0c040;
	background: #fffbea;
}

/* ---- Item header ---- */
.rmm-item-header {
	display: flex;
	align-items: baseline;
	gap: 6px;
	flex-wrap: wrap;
}

.rmm-item-name {
	font-weight: 600;
	font-size: .97em;
	color: #1a1a1a;
	flex: 1;
}

.rmm-item-price {
	font-weight: 700;
	color: #2c6e49;
	white-space: nowrap;
	margin-left: auto;
	font-size: .95em;
}
.rmm-price-note {
	font-weight: 400;
	color: #888;
	font-size: .8em;
}

.rmm-item-desc {
	margin: 4px 0 0;
	color: #666;
	font-size: .88em;
	line-height: 1.5;
}
.rmm-item-allergens {
	margin: 4px 0 0;
	color: #999;
	font-size: .8em;
}

/* ---- Tags ---- */
.rmm-tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 1px 5px;
	border-radius: 3px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .04em;
	line-height: 1.4;
	cursor: default;
}
.rmm-tag--vegan       { background: #d4edda; color: #155724; }
.rmm-tag--vegetarian  { background: #c3e6cb; color: #1e5631; }
.rmm-tag--gf          { background: #fff3cd; color: #856404; }
.rmm-tag--spicy       { background: #f8d7da; color: #721c24; }
.rmm-tag--new         { background: #d1ecf1; color: #0c5460; }
.rmm-tag--chef        { background: #ffeeba; color: #856404; }
.rmm-tag--halal       { background: #d4edda; color: #155724; }

/* ---- File Display ---- */
.rmm-file-display { width: 100%; }
.rmm-file-image {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.rmm-pdf-wrapper { width: 100%; }
.rmm-pdf-embed {
	width: 100%;
	height: 70vh;
	min-height: 400px;
	border: none;
	border-radius: 6px;
}
.rmm-file-download {
	display: inline-block;
	margin-top: 8px;
}

/* ---- PDF link button ---- */
.rmm-file-display--link {
	padding: 24px 0;
}
.rmm-pdf-link-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 28px; /* default; overridden by inline style from admin settings */
	background: #2c6e49;
	color: #fff;
	text-decoration: none; /* default; overridden by inline style when underline is on */
	font-weight: 600;
	font-size: 1em;
	border-radius: 6px;
	transition: filter .15s, transform .1s;
	cursor: pointer;
}
.rmm-pdf-link-btn:hover,
.rmm-pdf-link-btn:focus {
	filter: brightness(0.88);
	color: inherit;
	transform: translateY(-1px);
}

/* Font-size modifiers only — padding is set via inline style */
.rmm-pdf-link-btn--small  { font-size: .82em; }
.rmm-pdf-link-btn--medium { font-size: .95em; }
.rmm-pdf-link-btn--large  { font-size: 1.15em; }

/* Icon span */
.rmm-btn-icon {
	font-style: normal;
	line-height: 1;
}

/* ---- Cards Layout (multiple menus) ---- */
.rmm-style-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 24px;
}
.rmm-style-cards .rmm-menu-entry {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
	padding: 0 0 20px;
}
.rmm-style-cards .rmm-menu-title {
	padding: 16px 20px 8px;
	margin: 0;
}
.rmm-style-cards .rmm-tab-panel,
.rmm-style-cards .rmm-tab-panel--active,
.rmm-style-cards .rmm-builder-display,
.rmm-style-cards .rmm-file-display,
.rmm-style-cards .rmm-badges,
.rmm-style-cards .rmm-menu-excerpt {
	padding-left: 20px;
	padding-right: 20px;
}

/* ---- Menu entry title (list/cards view) ---- */
.rmm-style-list .rmm-menu-entry {
	margin-bottom: 40px;
}
.rmm-menu-title {
	font-size: 1.4em;
	margin-bottom: 8px;
}

/* ================================================================
   INDEX STYLE  [restaurant_menu style="index"]
   ================================================================ */

.rmm-index-wrap {
	max-width: 640px;
	margin: 0 auto;
	font-family: inherit;
}

.rmm-index-heading {
	text-align: center;
	font-size: 1.5em;
	margin: 0 0 24px;
}

.rmm-index-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.rmm-index-item {
	width: 100%;
}

/* Shared button shell */
.rmm-index-btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 16px 20px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-left: 4px solid #2c6e49;
	border-radius: 8px;
	cursor: pointer;
	text-decoration: none;
	color: inherit;
	font-size: 1em;
	font-family: inherit;
	text-align: left;
	box-sizing: border-box;
	transition: background .15s, box-shadow .15s;
}
.rmm-index-btn:hover {
	background: #f9fafb;
	box-shadow: 0 2px 10px rgba(0,0,0,.08);
	color: inherit;
	text-decoration: none;
}
/* Open state — flatten bottom corners when content is visible below */
.rmm-index-btn--toggle[aria-expanded="true"] {
	background: #f9fafb;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	border-bottom-color: transparent;
}

.rmm-index-btn__inner {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	flex-wrap: wrap;
	min-width: 0;
}

.rmm-index-icon {
	font-size: 1.25em;
	flex-shrink: 0;
	line-height: 1;
}

.rmm-index-name {
	font-weight: 700;
	font-size: 1em;
	color: #1a1a1a;
	white-space: nowrap;
}

.rmm-index-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

/* Small inline badges inside the button */
.rmm-idx-badge {
	display: inline-block;
	font-size: 10px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 20px;
	white-space: nowrap;
	letter-spacing: .02em;
}
.rmm-idx-badge--area {
	background: #f0f4f8;
	color: #555;
	border: 1px solid #dce5ef;
}

/* Arrow indicator */
.rmm-index-arrow {
	font-size: 1em;
	flex-shrink: 0;
	margin-left: 14px;
	color: #aaa;
	transition: transform .22s ease;
	line-height: 1;
}
.rmm-index-btn--toggle[aria-expanded="true"] .rmm-index-arrow {
	transform: rotate(180deg);
	color: #555;
}

/* Accordion content panel */
.rmm-index-content {
	border: 1px solid #e5e7eb;
	border-top: none;
	border-radius: 0 0 8px 8px;
	padding: 24px;
	background: #fafafa;
	/* Smooth open/close via JS adding class */
	overflow: hidden;
}
.rmm-index-content[hidden] { display: none; }

/* Animated open state */
.rmm-index-content.rmm-idx-animating {
	display: block;
	animation: rmmIdxOpen .2s ease forwards;
}
@keyframes rmmIdxOpen {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 500px) {
	.rmm-index-btn { padding: 12px 14px; }
	.rmm-index-name { font-size: .9em; }
	.rmm-index-meta { display: none; } /* show only name on tiny screens */
}

/* ================================================================
   ARCHIVE PAGE  (/restaurant-menu/)
   ================================================================ */

.rmm-archive-page {
	max-width: 1000px;
	margin: 0 auto;
	padding: 0 20px 60px;
}

/* Hero */
.rmm-archive-hero {
	padding: 48px 0 36px;
	text-align: center;
}
.rmm-archive-hero__title {
	font-size: 2em;
	margin: 0 0 8px;
}
.rmm-archive-hero__sub {
	color: #888;
	font-size: .95em;
	margin: 0;
}

/* Filter bar */
.rmm-archive-filters {
	border-top: 1px solid #e5e7eb;
	border-bottom: 1px solid #e5e7eb;
	padding: 14px 0;
	margin-bottom: 36px;
}
.rmm-archive-filters__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}
.rmm-filter-group {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.rmm-filter-group__label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: #888;
	white-space: nowrap;
}
.rmm-filter-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.rmm-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 14px;
	border: 1.5px solid #d5d9de;
	border-radius: 20px;
	font-size: .82em;
	font-weight: 600;
	color: #444;
	text-decoration: none;
	background: #fff;
	transition: background .12s, color .12s, border-color .12s;
}
.rmm-pill:hover {
	border-color: var(--pill-hover, #2c6e49);
	color: var(--pill-hover, #2c6e49);
	text-decoration: none;
}
.rmm-pill--active {
	background: #2c6e49;
	border-color: #2c6e49;
	color: #fff;
}

/* Archive entry */
.rmm-archive-list {
	display: flex;
	flex-direction: column;
	gap: 48px;
}
.rmm-archive-entry {
	border-bottom: 2px solid #e5e7eb;
	padding-bottom: 48px;
}
.rmm-archive-entry:last-child {
	border-bottom: none;
}
.rmm-archive-entry__title {
	font-size: 1.5em;
	margin: 0 0 16px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 600px) {
	.rmm-tab-btn {
		padding: 8px 12px;
		font-size: .82em;
	}
	.rmm-tab-panel { padding: 16px; }
	.rmm-item-header { flex-wrap: wrap; }
	.rmm-item-price { margin-left: 0; }
	.rmm-layout-grid .rmm-item-list {
		grid-template-columns: 1fr;
	}
}
