/* Above-the-fold recipe gallery (loaded early on recipe detail) */
.recipe-image-gallery #recipe-carousel-flex .slides {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
}

.recipe-image-gallery #recipe-carousel-flex .slides > li {
	flex: 0 0 auto;
}

.recipe-media-placeholder {
	min-height: 220px;
	width: 100%;
}

@media (max-width: 991.98px) {
	.recipe-image-gallery #single-slider-flex .flex-viewport {
		max-height: none;
	}

	.recipe-image-gallery #single-slider-flex .slides > li > a {
		display: block;
		overflow: hidden;
		aspect-ratio: 16 / 9;
	}

	.recipe-image-gallery #single-slider-flex .slides img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
	}
}

/* Native selects on recipe pages (Selectric disabled for performance) */
#advance-search .inner-advance-search .form-field select.advance-selectable {
	width: 100%;
	border: 1px solid #d8ddd6;
	border-radius: 999px;
	min-height: 44px;
	padding: 0 2rem 0 1rem;
	background-color: #fff;
	font-size: 0.95rem;
	appearance: auto;
}

#advance-search .inner-advance-search .form-field select.advance-selectable:focus {
	box-shadow: 0 0 0 0.2rem rgba(100, 173, 54, 0.2);
	border-color: #64ad36;
	outline: 0;
}

/* Match main.css mobile search layout (recipe-detail.css loads after main.css). */
@media (max-width: 767.98px) {
	#advance-search .inner-advance-search {
		flex-wrap: wrap;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	#advance-search .inner-advance-search .form-field {
		width: 100%;
		max-width: 100%;
		margin-right: 0;
		margin-bottom: 1rem;
		flex: 0 0 auto;
		min-width: 0;
	}

	#advance-search .inner-advance-search .form-field input,
	#advance-search .inner-advance-search .form-field select.advance-selectable {
		width: 100%;
		box-sizing: border-box;
	}

	#advance-search .inner-advance-search button[type="submit"] {
		width: 100%;
		max-width: 100%;
		align-self: stretch;
		margin-top: 0.25rem;
	}
}

@media (max-width: 767.98px) {
	.recipe-ingredient-controls {
		flex-direction: column;
		align-items: stretch !important;
		gap: 0.75rem !important;
	}

	.recipe-ingredient-controls > .btn-group,
	.recipe-ingredient-controls > form {
		width: 100%;
		justify-content: flex-start;
		flex-wrap: wrap;
	}

	.recipe-ingredient-controls > form {
		display: flex;
		align-items: center;
		gap: 0.5rem;
	}

	.recipe-ingredient-controls > form .form-control {
		flex: 1 1 auto;
		width: auto;
		max-width: 6rem;
	}
}

/* Star rating picker */
.recipe-rating-picker {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
}

.recipe-rating-picker__star {
	border: none;
	background: transparent;
	padding: 0.15rem;
	cursor: pointer;
	line-height: 1;
}

.recipe-rating-picker__star .fa {
	font-size: 1.75rem;
	color: #c5c5c5;
	transition: color 0.15s ease;
	pointer-events: none;
}

.recipe-rating-picker__star:hover .fa,
.recipe-rating-picker__star.is-active .fa,
.recipe-rating-picker__star.is-hover .fa {
	color: #e67e22;
}

.recipe-rating-picker__hint {
	font-size: 0.875rem;
	color: #6c757d;
	margin-left: 0.25rem;
}

@media (min-width: 992px) {
	.slider-recipe-detail .recipe-image-gallery #single-slider-flex .slides > li > a {
		display: block;
		max-height: 386px;
		overflow: hidden;
	}

	.slider-recipe-detail .recipe-image-gallery #single-slider-flex .slides img {
		width: 100%;
		max-height: 386px;
		object-fit: cover;
		object-position: center;
	}
}

.recipe-ingredient-link .recipe-ingredient-link-icon {
	margin-left: 0.3em;
	font-size: 0.85em;
	opacity: 0.8;
}

#recipe-community .btn-primary {
	background-color: #2d6a4f;
	border-color: #2d6a4f;
}

#recipe-community .btn-primary:hover,
#recipe-community .btn-primary:focus {
	background-color: #1b4332;
	border-color: #1b4332;
}

.recipe-detail-body .print-button,
.recipe-detail-body .favorite-btn {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font: inherit;
	color: inherit;
	line-height: inherit;
}

.recipe-detail-body .print-button {
	display: inline;
	margin-right: 0.35rem;
}

.recipe-detail-body .pre-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	list-style: none;
	padding: 0;
	margin: 0 0 0.5rem;
}

.tags-icons .details-social-icons .favorite-btn {
	display: inline-block;
	vertical-align: middle;
}

.favorite-btn {
	transition: all 0.3s ease;
}

.favorite-btn:hover {
	transform: scale(1.2);
}

.favorite-btn.favorited {
	color: #e74c3c;
}

.favorite-btn.favorited i {
	color: #e74c3c;
}

.favorite-btn:not(.favorited) i {
	color: #95a5a6;
}

.favorite-btn:hover i {
	color: #e74c3c;
}
