/* Recipe search popup + nav search button */

.nav_search_btn {
	display: block;
	float: right;
	background: transparent;
	border: none;
	color: var(--rf_gray);
	padding: 10px 14px;
	cursor: pointer;
	line-height: 1;
}

.nav_search_btn:hover,
.nav_search_btn:focus-visible {
	background-color: #ddd;
	color: #000;
	outline: none;
}

.nav_search_btn:focus-visible {
	outline: 2px solid #333;
	outline-offset: -2px;
}

.nav_search_icon {
	display: block;
	vertical-align: middle;
}

.rf_search_popup {
	display: none;
	position: fixed;
	z-index: 1100;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.65);
	padding: 16px 12px;
	box-sizing: border-box;
	overflow-y: auto;
}

.rf_search_popup.is_open {
	display: flex;
	align-items: flex-start;
	justify-content: center;
}

.rf_search_dialog {
	width: 100%;
	max-width: 480px;
	margin: 12vh auto 24px;
	padding: 18px 16px 16px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	position: relative;
	font-family: var(--rf_font_display);
	box-sizing: border-box;
}

.rf_search_close {
	position: absolute;
	top: 4px;
	right: 6px;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	font-size: 1.75em;
	line-height: 36px;
	color: #999;
	cursor: pointer;
	font-family: inherit;
}

.rf_search_close:hover,
.rf_search_close:focus-visible {
	color: var(--rf_orange_dark);
	outline: none;
}

.rf_search_title {
	margin: 0 36px 12px 0;
	font-size: 1.2em;
	color: #666;
	font-weight: 600;
}

.rf_search_input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	font-size: 1.05rem;
	font-family: inherit;
	border: 2px solid #ccc;
	border-radius: 4px;
	color: #333;
}

.rf_search_input:focus {
	border-color: var(--rf_orange_named);
	outline: none;
}

.rf_search_hint {
	margin: 8px 0 0;
	font-size: 0.85rem;
	color: #888;
	min-height: 1.2em;
}

.rf_search_results {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	max-height: min(50vh, 360px);
	overflow-y: auto;
	border: 1px solid #eee;
	border-radius: 4px;
}

.rf_search_results:empty {
	display: none;
}

.rf_search_results li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #f0f0f0;
}

.rf_search_results li:last-child {
	border-bottom: none;
}

.rf_search_results a {
	display: block;
	padding: 12px 14px;
	color: #333;
	text-decoration: none;
	font-family: var(--rf_font_ui);
	font-size: 1rem;
}

.rf_search_results a:hover,
.rf_search_results a:focus-visible,
.rf_search_results a.is_active {
	background: #fdf4e3;
	color: #000;
	outline: none;
}

@media screen and (max-width: 800px) {
	.rf_search_dialog {
		margin-top: 8vh;
	}
}
