/* Sticky top navbar wrapper used by customers/templates/navbar/restaurantlistnb.html */
.restaurant-list-navbar {
	position: sticky;
	top: 0;
	z-index: 1020;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.9) 100%);
	backdrop-filter: blur(30px) saturate(180%);
	-webkit-backdrop-filter: blur(30px) saturate(180%);
	border-bottom: 1px solid rgba(255, 255, 255, 0.55);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	padding: 12px 0;
}

/* Main horizontal layout: left group (logo + location) and right group (menu button) */
.restaurant-list-navbar-container {
	display: grid;
	grid-template-columns: minmax(0, auto) minmax(160px, 1fr) auto;
	align-items: center;
	gap: 10px;
	padding: 0 1rem;
	width: 100%;
}

/* Left-side cluster containing brand logo and current-location trigger */
.restaurant-list-navbar-left {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	flex: 0 1 auto;
	overflow: hidden;
}

/* Center search area */
.restaurant-list-navbar-center {
	position: relative;
	width: 100%;
	min-width: 180px;
}

.restaurant-list-navbar-right {
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.restaurant-list-menu-button {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	background: rgba(255, 255, 255, 0.9);
	color: #2c3e50;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	transition: all 0.2s ease;
}

.restaurant-list-menu-icon {
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	align-items: center;
	justify-content: center;
}

.restaurant-list-menu-icon span {
	display: block;
	width: 16px;
	height: 2px;
	border-radius: 999px;
	background: #333;
}

.restaurant-list-menu-button:hover {
	background: #ffffff;
	border-color: rgba(0, 0, 0, 0.2);
}

.restaurant-list-offcanvas-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 1998;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.restaurant-list-offcanvas {
	position: fixed;
	top: 0;
	right: -330px;
	width: 330px;
	max-width: 86vw;
	height: 100vh;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
	backdrop-filter: blur(30px) saturate(180%);
	-webkit-backdrop-filter: blur(30px) saturate(180%);
	box-shadow: -12px 0 48px rgba(0, 0, 0, 0.2);
	border-left: 1px solid rgba(255, 255, 255, 0.5);
	z-index: 1999;
	transition: right 0.25s ease;
	display: flex;
	flex-direction: column;
}

.restaurant-list-offcanvas.show {
	right: 0;
}

.restaurant-list-offcanvas-overlay.show {
	opacity: 1;
	pointer-events: auto;
}

.restaurant-list-offcanvas-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	border: none;
	background: transparent;
	color: #2c3e50;
	font-size: 1.2rem;
	cursor: pointer;
}

.restaurant-list-offcanvas-body {
	padding: 24px;
	padding-top: 64px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.restaurant-list-offcanvas-section {
	margin-bottom: 8px;
	padding-bottom: 8px;
}

.restaurant-list-offcanvas-user-info .name {
	font-weight: 600;
	color: #333;
	font-size: 0.95em;
}

.restaurant-list-offcanvas-user-info .type {
	font-size: 0.8em;
	color: #999;
	margin-top: 4px;
}

.restaurant-list-offcanvas-link {
	display: block;
	padding: 12px 0;
	text-decoration: none;
	color: #2c3e50;
	border-bottom: none;
	font-weight: 500;
}

.restaurant-list-offcanvas-link.sign-out {
	color: #dc3545;
	border-bottom: 0;
}

.restaurant-list-navbar-search {
	width: 100%;
	height: 38px;
	padding: 0 12px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.9);
	color: #2c3e50;
	font-size: 0.88rem;
	outline: none;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.restaurant-list-navbar-search:focus {
	border-color: rgba(102, 126, 234, 0.6);
	box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.12);
}

.restaurant-list-search-suggestions {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
	max-height: 240px;
	overflow-y: auto;
	z-index: 1200;
}

.restaurant-list-search-suggestion-item {
	padding: 8px 10px;
	font-size: 0.84rem;
	color: #2c3e50;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
}

.restaurant-list-search-suggestion-image {
	width: 28px;
	height: 28px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
}

.restaurant-list-search-suggestion-image-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.9rem;
	background: rgba(0, 0, 0, 0.05);
}

.restaurant-list-search-suggestion-text {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.restaurant-list-search-suggestion-item + .restaurant-list-search-suggestion-item {
	margin-top: 2px;
}

.restaurant-list-search-suggestion-item:hover {
	background: rgba(102, 126, 234, 0.08);
}

/* Logo link container */
.restaurant-list-navbar-logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	min-width: 0;
}

/* Brand text styling (Roopb) */
.restaurant-list-navbar-logo-text {
	font-size: 1rem;
	font-weight: 700;
	color: #2c3e50;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Back button beside logo */
.restaurant-list-back-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1.5px solid rgba(255, 255, 255, 0.5);
	border-radius: 12px;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.5) 100%);
	color: #2c3e50;
	font-size: 1rem;
	font-weight: 800;
	padding: 0;
	width: 44px;
	height: 44px;
	cursor: pointer;
	line-height: 1;
	white-space: nowrap;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.restaurant-list-back-button:hover {
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.7) 100%);
	border-color: rgba(255, 255, 255, 0.7);
	transform: translateY(-2px) scale(1.05);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.restaurant-list-back-button span {
	font-weight: 800;
	font-size: 1.05rem;
	line-height: 1;
}

/* Clickable current-location control that opens Delivery To modal */
.restaurant-list-location-trigger {
	border: none;
	background: transparent;
	border-radius: 0;
	padding: 2px 0;
	display: inline-flex;
	align-items: flex-start;
	gap: 6px;
	cursor: pointer;
	min-width: 0;
	max-width: 62vw;
	box-shadow: none;
	transition: none;
}

/* Hover feedback for location trigger */
.restaurant-list-location-trigger:hover {
	background: transparent;
}

/* Location pin icon next to address text */
.restaurant-list-location-icon {
	font-size: 0.95rem;
	line-height: 1;
	color: #2c3e50;
	flex-shrink: 0;
	margin-top: 2px;
}

.restaurant-list-location-content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.restaurant-list-deliver-label {
	font-size: 0.68rem;
	font-weight: 700;
	line-height: 1.1;
	color: #2c3e50;
	margin-bottom: 2px;
}

.restaurant-list-location-row {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

/* Current location label text, updated by customers/static/js/restaurantlistnb.js */
#displayLocation {
	font-size: 0.84rem;
	font-weight: 600;
	color: #2c3e50;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.restaurant-list-location-dropdown {
	font-size: 0.92rem;
	font-weight: 800;
	line-height: 1;
	color: #2c3e50;
	flex-shrink: 0;
}

/* Mobile adjustments for compact navbar spacing and text truncation */
@media (max-width: 640px) {
	.restaurant-list-navbar-container {
		grid-template-columns: minmax(0, auto) minmax(120px, 1fr) auto;
		padding: 0 0.75rem;
		gap: 8px;
	}

	.restaurant-list-navbar-center {
		min-width: 120px;
	}

	.restaurant-list-navbar-search {
		height: 34px;
		font-size: 0.82rem;
		padding: 0 10px;
	}

	.restaurant-list-navbar-logo-text {
		display: none;
	}

	.restaurant-list-location-trigger {
		max-width: 50vw;
	}

	.restaurant-list-deliver-label {
		font-size: 0.64rem;
	}

	.restaurant-list-location-dropdown {
		font-size: 0.86rem;
	}

	.restaurant-list-back-button {
		width: 40px;
		height: 40px;
		font-size: 18px;
		border-radius: 12px;
	}

	.restaurant-list-back-button span {
		font-size: 1rem;
	}
}

@media (max-width: 480px) {
	.restaurant-list-navbar-container {
		grid-template-columns: minmax(0, auto) auto;
		gap: 8px;
	}

	.restaurant-list-navbar-center {
		display: none;
	}

	.restaurant-list-back-button {
		width: 40px;
		height: 40px;
		font-size: 18px;
		border-radius: 12px;
	}

	.restaurant-list-menu-button {
		width: 34px;
		height: 34px;
	}

	.restaurant-list-back-button span {
		font-size: 1rem;
	}
}
