/* Layout-only frontend styles. Theme and WooCommerce styles handle visual design. */

.restaurant-meals-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.restaurant-meal-card {
	display: flex;
	flex-direction: column;
}

.restaurant-meal-card__image-link,
.restaurant-meal-card__image {
	display: block;
	width: 100%;
}

.restaurant-meal-card__content,
.restaurant-wizard-panels,
.restaurant-filters__body,
.restaurant-delivery-days {
	display: grid;
}

.restaurant-meal-card__actions .button {
	width: 100%;
}

.restaurant-meal-card__actions .button.loading {
	pointer-events: none;
}

.restaurant-wizard-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
	list-style: none;
	padding-left: 0;
	margin: 0 0 1rem;
	gap: 0;
}

.restaurant-wizard-steps li {
	position: relative;
	margin: 0;
	padding: 0.6rem 0.75rem;
	border: 0;
	background: transparent;
	color: #c5c5c5;
	text-align: center;
	line-height: 1.3;
}

.restaurant-wizard-steps li + li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 25%;
	bottom: 25%;
	width: 1px;
	background: #d9d9d9;
}

.restaurant-wizard-steps li.is-complete {
	color: #000;
}

.restaurant-wizard-steps li.is-active {
	color: var(--brens-primary, #fbb03b);
	font-weight: 600;
}

.restaurant-wizard-panel {
	display: none;
}

.restaurant-wizard-panel.is-active {
	display: block;
}

.restaurant-wizard-input {
	width: 100%;
}

.restaurant-wizard-notice {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-radius: 0.4rem;
	border: 1px solid #e8cf8a;
	background: #fff7df;
}

.restaurant-wizard-notice p {
	margin: 0;
}

.restaurant-wizard-notice p + p {
	margin-top: 0.35rem;
}

.restaurant-delivery-location {
	position: relative;
}

.restaurant-location-suggestions {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% - 2px);
	z-index: 20;
	background: #fff;
	border: 1px solid #d9d9d9;
	max-height: 14rem;
	overflow-y: auto;
}

.restaurant-location-suggestions__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.restaurant-location-suggestion {
	display: block;
	width: 100%;
	padding: 0.5rem 0.75rem;
	text-align: left;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.restaurant-location-suggestion:hover,
.restaurant-location-suggestion:focus {
	background: #f5f5f5;
}

.restaurant-menu-qty input {
	max-width: 7rem;
}

.restaurant-wizard-actions {
	display: flex;
	justify-content: space-between;
}

.restaurant-meal-plans-wizard,
.restaurant-catering-wizard {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
	gap: 1rem;
	align-items: start;
}

.restaurant-meal-plans-wizard > .restaurant-wizard-steps,
.restaurant-catering-wizard > .restaurant-wizard-steps {
	grid-column: 1 / -1;
}

.restaurant-meal-plans-wizard > .restaurant-wizard-panels,
.restaurant-meal-plans-wizard > .restaurant-wizard-actions,
.restaurant-catering-wizard > .restaurant-wizard-panels,
.restaurant-catering-wizard > .restaurant-wizard-actions {
	grid-column: 1;
}

.restaurant-meal-plans-wizard > .restaurant-summary-sidebar,
.restaurant-catering-wizard > .restaurant-summary-sidebar {
	grid-column: 2;
	grid-row: 2 / span 2;
	position: sticky;
	top: 1rem;
	padding: 1rem;
	border: 1px solid #ddd;
	border-radius: 0.5rem;
	background: #fff;
}

.restaurant-meal-plans-wizard.is-summary-step,
.restaurant-catering-wizard.is-summary-step {
	grid-template-columns: 1fr;
}

.restaurant-meal-plans-wizard.is-summary-step > .restaurant-summary-sidebar,
.restaurant-catering-wizard.is-summary-step > .restaurant-summary-sidebar {
	display: none;
}

.restaurant-summary-sidebar__items {
	margin: 0;
	padding-left: 1rem;
}

.restaurant-summary-sidebar__total {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid #e5e5e5;
}

.restaurant-mobile-cta,
.restaurant-summary-modal {
	display: none;
}

.restaurant-summary-modal {
	position: fixed;
	inset: 0;
}

.restaurant-summary-modal.is-open {
	display: block;
}

.restaurant-summary-modal__backdrop {
	position: absolute;
	inset: 0;
}

.restaurant-summary-modal__dialog {
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	width: min(36rem, 100%);
	max-height: 80vh;
	overflow: auto;
}

.restaurant-summary-modal__close {
	position: absolute;
	right: 0;
	top: 0;
}

.restaurant-selected-meals-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: 0.75rem;
}

.restaurant-selected-meal-card {
	border: 1px solid #d9d9d9;
	border-radius: 0.375rem;
	padding: 0.75rem;
	background: #fff;
}

.restaurant-summary-panel {
	padding: 1rem;
	border: 1px solid #d9d9d9;
	border-radius: 0.5rem;
	background: #fff;
}

.restaurant-summary-panel h4,
.restaurant-summary-panel h5 {
	margin-top: 0;
	margin-bottom: 0.75rem;
}

.restaurant-summary-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.restaurant-summary-item {
	border: 1px solid #e8e8e8;
	border-radius: 0.375rem;
	padding: 0.75rem;
	background: #fafafa;
	display: grid;
	gap: 0.25rem;
}

.restaurant-summary-item strong,
.restaurant-summary-item h6 {
	margin: 0;
	font-size: 0.82rem;
	line-height: 1.3;
}

.restaurant-summary-item span {
	font-size: 0.95rem;
	line-height: 1.35;
}

.restaurant-selected-meals-summary {
	margin-top: 0.5rem;
}

.restaurant-summary-mobile-trigger {
	display: none !important;
}

.restaurant-selected-meal-card__title {
	margin: 0 0 0.35rem;
	font-size: 1rem;
}

.restaurant-selected-meal-card__price {
	margin: 0;
}

@media (max-width: 768px) {
	.restaurant-wizard-steps {
		grid-template-columns: 1fr;
	}

	.restaurant-wizard-steps li + li::before {
		left: 0;
		right: 0;
		top: 0;
		bottom: auto;
		width: auto;
		height: 1px;
	}

	.restaurant-meal-plans-wizard,
	.restaurant-catering-wizard {
		grid-template-columns: 1fr;
	}

	.restaurant-meal-plans-wizard > .restaurant-summary-sidebar,
	.restaurant-catering-wizard > .restaurant-summary-sidebar {
		grid-column: 1;
		grid-row: auto;
		position: static;
	}

	.restaurant-filters:not(.is-open) .restaurant-filters__body {
		display: none;
	}

	.restaurant-mobile-cta {
		display: block;
		position: sticky;
		bottom: 0;
	}

	.restaurant-mobile-cta__button {
		width: 100%;
	}

	[data-summary-sidebar] {
		display: none;
	}

}
