/**
 * Base theme styles. Scoped deliberately: everything here styles either
 * the theme's own chrome (header/footer) or the .rm-* classes used by
 * the shortcode template parts — nothing here targets .elementor-*
 * selectors or imposes width/padding on generic content wrappers that
 * would fight an Elementor-built page's own section widths.
 */

:root {
	--rm-color-primary: #c0392b;
	--rm-color-primary-dark: #962d22;
	--rm-color-text: #222222;
	--rm-color-muted: #6b6b6b;
	--rm-color-border: #e5e5e5;
	--rm-color-bg: #ffffff;
	--rm-color-bg-alt: #faf7f5;
	--rm-radius: 10px;
	--rm-container-width: 1200px;
	--rm-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--rm-font-body);
	color: var(--rm-color-text);
	background: var(--rm-color-bg);
	line-height: 1.55;
}

a {
	color: var(--rm-color-primary);
	text-decoration: none;
}
a:hover {
	color: var(--rm-color-primary-dark);
}

.screen-reader-text {
	position: absolute;
	left: -9999px;
}
.skip-link:focus {
	left: 1rem;
	top: 1rem;
	position: fixed;
	background: #fff;
	padding: 0.5rem 1rem;
	z-index: 10000;
}

.rm-container {
	max-width: var(--rm-container-width);
	margin: 0 auto;
	padding: 0 1.25rem;
}

/* -------------------------------------------------------------- */
/* Header / Footer                                                 */
/* -------------------------------------------------------------- */
.site-header {
	border-bottom: 1px solid var(--rm-color-border);
}
.rm-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding-top: 1rem;
	padding-bottom: 1rem;
}
.site-title {
	font-size: 1.375rem;
	font-weight: 700;
	color: var(--rm-color-text);
}
.main-navigation ul {
	list-style: none;
	display: flex;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
}
.rm-header-account {
	display: flex;
	gap: 1rem;
	align-items: center;
	font-size: 0.9rem;
}

.site-footer {
	margin-top: 3rem;
	border-top: 1px solid var(--rm-color-border);
	background: var(--rm-color-bg-alt);
}
.rm-footer-inner {
	padding: 2rem 1.25rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
	font-size: 0.875rem;
	color: var(--rm-color-muted);
}
.footer-navigation ul {
	list-style: none;
	display: flex;
	gap: 1.25rem;
	margin: 0;
	padding: 0;
}

/* -------------------------------------------------------------- */
/* Generic page wrapper (non-Elementor pages only, see page.php)   */
/* -------------------------------------------------------------- */
.rm-page {
	padding: 2rem 0;
}
.rm-page--single {
	/* the_content() itself carries no wrapper — see page.php's docblock */
}
body.rm-elementor-built .rm-page {
	padding: 0; /* Elementor-built content owns all of its own spacing. */
}

/* -------------------------------------------------------------- */
/* Restaurant listing grid                                         */
/* -------------------------------------------------------------- */
.rm-listing__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.5rem;
	margin-top: 1.5rem;
}
.rm-card {
	border: 1px solid var(--rm-color-border);
	border-radius: var(--rm-radius);
	overflow: hidden;
	background: var(--rm-color-bg);
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.rm-card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}
.rm-card__link {
	color: inherit;
	display: block;
}
.rm-card__image img {
	width: 100%;
	height: 180px;
	object-fit: cover;
	display: block;
}
.rm-card__body {
	padding: 1rem;
}
.rm-card__title {
	margin: 0 0 0.25rem;
	font-size: 1.05rem;
}
.rm-card__cuisine {
	margin: 0 0 0.5rem;
	color: var(--rm-color-muted);
	font-size: 0.875rem;
}
.rm-card__rating {
	margin: 0;
	font-size: 0.8rem;
	color: var(--rm-color-muted);
}
.rm-listing__pagination {
	display: flex;
	gap: 1rem;
	justify-content: center;
	margin-top: 2rem;
}
.rm-button {
	display: inline-block;
	padding: 0.6rem 1.25rem;
	border-radius: var(--rm-radius);
	background: var(--rm-color-primary);
	color: #fff;
}
.rm-button:hover {
	background: var(--rm-color-primary-dark);
	color: #fff;
}

/* -------------------------------------------------------------- */
/* Restaurant profile                                               */
/* -------------------------------------------------------------- */
.rm-profile__hero img {
	width: 100%;
	max-height: 360px;
	object-fit: cover;
	border-radius: var(--rm-radius);
}
.rm-profile__header {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	margin: 1.5rem 0;
}
.rm-profile__logo img {
	border-radius: 50%;
	width: 80px;
	height: 80px;
	object-fit: cover;
}
.rm-profile__title {
	margin: 0 0 0.25rem;
}
.rm-favorite-button {
	margin-top: 0.75rem;
	background: none;
	border: 1px solid var(--rm-color-border);
	border-radius: var(--rm-radius);
	padding: 0.4rem 0.9rem;
	cursor: pointer;
	font-size: 0.875rem;
}
.rm-favorite-button.is-favorited {
	border-color: var(--rm-color-primary);
	color: var(--rm-color-primary);
}

.rm-menu-list,
.rm-review-list {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	display: grid;
	gap: 1rem;
}
.rm-menu-item {
	border-bottom: 1px solid var(--rm-color-border);
	padding-bottom: 0.75rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}
.rm-menu-item__price {
	font-weight: 600;
}
.rm-menu-item__description {
	flex-basis: 100%;
	margin: 0.25rem 0 0;
	color: var(--rm-color-muted);
	font-size: 0.875rem;
}
.rm-review {
	border-bottom: 1px solid var(--rm-color-border);
	padding-bottom: 0.75rem;
}
.rm-review__rating {
	color: var(--rm-color-primary);
}

/* -------------------------------------------------------------- */
/* Forms (reservation form, generic)                                */
/* -------------------------------------------------------------- */
.rm-field {
	display: block;
	margin-bottom: 1rem;
}
.rm-field span {
	display: block;
	font-size: 0.8rem;
	color: var(--rm-color-muted);
	margin-bottom: 0.25rem;
}
.rm-field input,
.rm-field select {
	width: 100%;
	max-width: 360px;
	padding: 0.5rem 0.65rem;
	border: 1px solid var(--rm-color-border);
	border-radius: 6px;
	font: inherit;
}
.rm-form-status {
	margin: 0.75rem 0;
	padding: 0.6rem 0.9rem;
	border-radius: 6px;
	font-size: 0.875rem;
}
.rm-form-status.is-success {
	background: #eaf7ee;
	color: #1e7a34;
}
.rm-form-status.is-error {
	background: #fdecea;
	color: #a12622;
}
.rm-gateway-picker {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 0.75rem;
}
.rm-button--gateway {
	background: #fff;
	color: var(--rm-color-text);
	border: 1px solid var(--rm-color-border);
}
.rm-button--gateway:hover {
	border-color: var(--rm-color-primary);
	color: var(--rm-color-primary);
}

/* -------------------------------------------------------------- */
/* Menu item add-to-cart button                                     */
/* -------------------------------------------------------------- */
.rm-add-to-cart {
	margin-top: 0.5rem;
	font-size: 0.8rem;
	padding: 0.4rem 0.8rem;
}

/* -------------------------------------------------------------- */
/* Cart drawer                                                      */
/* -------------------------------------------------------------- */
.rm-cart {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 9999;
	font-size: 0.9rem;
}
.rm-cart__toggle {
	background: var(--rm-color-primary);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 0.75rem 1.25rem;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
	font: inherit;
}
.rm-cart__panel {
	display: none;
	position: absolute;
	bottom: calc(100% + 0.75rem);
	right: 0;
	width: 320px;
	max-height: 70vh;
	overflow-y: auto;
	background: #fff;
	border: 1px solid var(--rm-color-border);
	border-radius: var(--rm-radius);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
	padding: 1rem;
}
.rm-cart__panel.is-open {
	display: block;
}
.rm-cart__restaurant-name {
	font-weight: 600;
	margin: 0 0 0.5rem;
}
.rm-cart__items {
	list-style: none;
	margin: 0 0 0.75rem;
	padding: 0;
}
.rm-cart__item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
	padding: 0.4rem 0;
	border-bottom: 1px solid var(--rm-color-border);
	font-size: 0.85rem;
}
.rm-cart__qty-minus,
.rm-cart__qty-plus {
	border: 1px solid var(--rm-color-border);
	background: #fff;
	border-radius: 4px;
	width: 1.5rem;
	height: 1.5rem;
	cursor: pointer;
}
.rm-cart__coupon {
	display: flex;
	gap: 0.4rem;
	margin: 0.75rem 0;
}
.rm-cart__coupon-input {
	flex: 1;
	padding: 0.4rem 0.6rem;
	border: 1px solid var(--rm-color-border);
	border-radius: 6px;
}
.rm-cart__coupon-message {
	font-size: 0.8rem;
	margin: 0 0 0.5rem;
}
.rm-cart__coupon-message.is-success {
	color: #1e7a34;
}
.rm-cart__coupon-message.is-error {
	color: #a12622;
}
.rm-cart__subtotal {
	font-weight: 600;
	display: flex;
	justify-content: space-between;
}
.rm-cart__checkout {
	width: 100%;
	text-align: center;
	margin-top: 0.5rem;
}

/* -------------------------------------------------------------- */
/* Dashboards (customer + owner)                                    */
/* -------------------------------------------------------------- */
.rm-dashboard__restaurant-picker {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.5rem;
}
.rm-dashboard__restaurant-picker select {
	padding: 0.4rem 0.6rem;
	border: 1px solid var(--rm-color-border);
	border-radius: 6px;
}
.rm-dashboard__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	border-bottom: 1px solid var(--rm-color-border);
	margin-bottom: 1.5rem;
}
.rm-dashboard__tab {
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	padding: 0.6rem 0.25rem;
	cursor: pointer;
	font: inherit;
	color: var(--rm-color-muted);
}
.rm-dashboard__tab.is-active {
	color: var(--rm-color-primary);
	border-bottom-color: var(--rm-color-primary);
}
.rm-dashboard__badge {
	display: inline-block;
	background: var(--rm-color-primary);
	color: #fff;
	border-radius: 999px;
	font-size: 0.7rem;
	padding: 0.05rem 0.4rem;
	margin-left: 0.25rem;
}
.rm-dashboard__panel {
	min-height: 4rem;
}

.rm-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0.75rem 0 1.25rem;
	font-size: 0.9rem;
}
.rm-table th,
.rm-table td {
	text-align: left;
	padding: 0.5rem 0.6rem;
	border-bottom: 1px solid var(--rm-color-border);
}
.rm-table th {
	color: var(--rm-color-muted);
	font-weight: 600;
	font-size: 0.8rem;
}

.rm-dashboard-list {
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 0;
}
.rm-dashboard-list li {
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--rm-color-border);
}
.rm-dashboard-list li.is-unread {
	background: var(--rm-color-bg-alt);
}

.rm-inline-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0.75rem 0 1.5rem;
}
.rm-inline-form input,
.rm-inline-form select {
	padding: 0.45rem 0.6rem;
	border: 1px solid var(--rm-color-border);
	border-radius: 6px;
	font: inherit;
}

.rm-branch-block {
	border: 1px solid var(--rm-color-border);
	border-radius: var(--rm-radius);
	padding: 1rem;
	margin-bottom: 1rem;
}
.rm-table-list li {
	border-bottom: 1px dashed var(--rm-color-border);
}

.rm-status-cell {
	text-transform: capitalize;
}

.rm-wallet-balance {
	font-size: 1.25rem;
}
