@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

.rl-restaurants-page {
	--rl-bg: #f8fafc;
	--rl-card: #ffffff;
	--rl-border: #e5e7eb;
	--rl-text: #111827;
	--rl-muted: #64748b;
	--rl-green: rgba(21, 128, 61, 0.92);
	--rl-red: rgba(220, 38, 38, 0.92);
	--rl-orange-chip-bg: #fff7ed;
	--rl-orange-chip-border: #fed7aa;
	--rl-orange-chip-text: #9a3412;
	--rl-edge-pad: 16px;
	box-sizing: border-box;
	background: var(--rl-bg);
	min-height: 60vh;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: 12px 0 40px;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--rl-text);
	overflow-x: clip;
}

.rl-restaurants-page *,
.rl-restaurants-page *::before,
.rl-restaurants-page *::after {
	box-sizing: border-box;
}

.rl-restaurants-shell {
	width: 100%;
	max-width: 680px;
	margin: 0 auto;
}

.rl-restaurants-hero {
	padding: 8px var(--rl-edge-pad) 6px;
}

.rl-restaurants-title {
	margin: 0;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -0.3px;
	line-height: 28px;
	color: #0f172a;
}

.rl-restaurants-subtitle {
	margin: 6px 0 10px;
	font-size: 12px;
	font-weight: 500;
	line-height: 17px;
	color: var(--rl-muted);
}

.rl-restaurants-search {
	margin-bottom: 16px;
	padding: 0 var(--rl-edge-pad);
}

.rl-search-label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 14px;
	height: 48px;
	border: 1px solid var(--rl-border);
	border-radius: 14px;
	background: #fff;
	color: #94a3b8;
}

.rl-search-label:focus-within {
	border-color: #cbd5e1;
	box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.05);
}

.rl-search-input {
	flex: 1;
	border: 0;
	outline: none;
	background: transparent;
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	color: var(--rl-text);
}

.rl-search-input::placeholder {
	color: #94a3b8;
}

.rl-restaurants-grid {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 0 var(--rl-edge-pad);
}

.rl-loading,
.rl-empty,
.rl-error {
	text-align: center;
	padding: 48px var(--rl-edge-pad);
	color: var(--rl-muted);
}

.rl-loading-spinner {
	width: 40px;
	height: 40px;
	margin: 0 auto 16px;
	border: 2px solid #e2e8f0;
	border-top-color: #111827;
	border-radius: 50%;
	animation: rl-spin 0.9s linear infinite;
}

@keyframes rl-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Card */
.rl-card {
	position: relative;
	background: var(--rl-card);
	border: 1px solid var(--rl-border);
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rl-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.rl-card:focus-visible {
	outline: 2px solid #111827;
	outline-offset: 2px;
}

.rl-card-media {
	position: relative;
}

.rl-banner {
	position: relative;
	height: 190px;
	overflow: hidden;
	border-top-left-radius: 24px;
	border-top-right-radius: 24px;
	background: #e5e7eb;
}

.rl-banner-track {
	display: flex;
	height: 100%;
	transition: transform 0.45s ease;
	will-change: transform;
}

.rl-banner-slide {
	flex: 0 0 100%;
	height: 100%;
}

.rl-banner-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rl-banner-gradient {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 90px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
	pointer-events: none;
	z-index: 2;
}

.rl-banner-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 10px;
	display: flex;
	justify-content: center;
	z-index: 4;
	pointer-events: none;
}

.rl-banner-dots-inner {
	display: flex;
	gap: 6px;
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.35);
}

.rl-banner-dot {
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.6);
	transition: width 0.2s ease, background 0.2s ease;
}

.rl-banner-dot.is-active {
	width: 16px;
	background: #fff;
}

.rl-card.is-closed .rl-banner::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.3);
	z-index: 3;
}

.rl-status-open {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 5;
	padding: 6px 10px;
	border-radius: 999px;
	background: var(--rl-green);
	color: #fff;
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.2px;
}

.rl-status-closed-ribbon {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 6;
	padding: 8px 12px;
	border-bottom-left-radius: 16px;
	background: var(--rl-red);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.8px;
	display: flex;
	align-items: center;
	gap: 6px;
	box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.25);
}

.rl-status-closed-ribbon::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #fff;
}

.rl-status-unavailable {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 6;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.6);
	color: rgba(255, 255, 255, 0.85);
	font-size: 10px;
	font-weight: 600;
}

.rl-rating-pill {
	position: absolute;
	left: 12px;
	bottom: 10px;
	z-index: 5;
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.35);
	color: #fff;
	font-size: 13px;
	font-weight: 900;
	border: 0;
	cursor: pointer;
}

.rl-logo-wrap {
	position: absolute;
	right: 12px;
	bottom: -22px;
	z-index: 7;
	width: 56px;
	height: 56px;
	padding: 3px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 6px 10px rgba(0, 0, 0, 0.12);
}

.rl-logo-wrap img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	background: #e5e7eb;
}

.rl-card-body {
	padding: 12px 14px 14px;
}

.rl-card-name {
	margin: 0;
	font-size: 18px;
	font-weight: 900;
	line-height: 1.25;
	color: var(--rl-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rl-card-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 8px;
	font-size: 14px;
	font-weight: 700;
	color: var(--rl-text);
}

.rl-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.rl-meta-dot {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: #d1d5db;
}

.rl-offers-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	padding: 0;
	border: 0;
	background: transparent;
	width: 100%;
	text-align: left;
	cursor: pointer;
	font: inherit;
}

.rl-offers-row svg {
	flex-shrink: 0;
}

.rl-offers-text {
	flex: 1;
	min-width: 0;
	font-size: 14px;
	font-weight: 800;
	color: #374151;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rl-coupon-scroller {
	display: flex;
	gap: 10px;
	margin-top: 10px;
	overflow-x: auto;
	padding-bottom: 2px;
	scrollbar-width: none;
}

.rl-coupon-scroller::-webkit-scrollbar {
	display: none;
}

.rl-coupon-chip {
	flex: 0 0 auto;
	padding: 8px 12px;
	border-radius: 999px;
	background: var(--rl-orange-chip-bg);
	border: 1px solid var(--rl-orange-chip-border);
	color: var(--rl-orange-chip-text);
	font-size: 13px;
	font-weight: 800;
	white-space: nowrap;
	cursor: pointer;
}

.rl-coupon-chip:hover {
	border-color: #fb923c;
}

/* Modal */
.rl-modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(15, 23, 42, 0.45);
}

.rl-modal {
	width: min(420px, 100%);
	max-height: min(70vh, 520px);
	overflow: auto;
	background: #fff;
	border-radius: 20px;
	padding: 20px;
	box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.rl-modal h3 {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 800;
}

.rl-modal ul {
	margin: 0;
	padding-left: 18px;
	color: #334155;
}

.rl-modal-actions {
	margin-top: 16px;
	display: flex;
	justify-content: flex-end;
}

.rl-modal-close {
	border: 0;
	border-radius: 999px;
	background: #111827;
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	padding: 10px 16px;
	cursor: pointer;
}

.rl-retry-btn {
	margin-top: 12px;
	border: 0;
	border-radius: 999px;
	background: #111827;
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	padding: 10px 18px;
	cursor: pointer;
}

@media (min-width: 768px) {
	.rl-restaurants-page {
		--rl-edge-pad: 20px;
	}
}

@media (max-width: 480px) {
	.rl-restaurants-page {
		padding-bottom: 32px;
	}

	.rl-restaurants-grid {
		gap: 10px;
	}
}
