/**
 * Food26 Reader Photos: "Made by Readers", square photos with the reader's name and stars, an add tile, the empty text;
 * and (1.1.0, at the end) the feed look. The stars come from the ratings stylesheet (food26-ratings). Rules use two
 * classes; the Style tab's controls three.
 */
.food26-reader-photos {
	--food26-rp-primary: var(--inoforest-color-primary, #b23a1e);
	--food26-rp-heading: var(--inoforest-color-heading, #2b1a12);
	--food26-rp-muted: var(--inoforest-custom-muted, #6e5f55);
	margin: 0;
}

.food26-reader-photos__head {
	margin-bottom: 18px;
}

.food26-reader-photos .food26-reader-photos__head h2 {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 4px;
	font-size: clamp(1.5rem, 2.4vw, 1.8rem);
}

.food26-reader-photos__head h2 :is(i, svg) {
	color: var(--food26-rp-primary);
}

.food26-reader-photos__head h2 svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.food26-reader-photos .food26-reader-photos__head p {
	margin: 0;
	color: var(--food26-rp-muted);
}

/* position: relative keeps the screen-reader text in the captions inside the strip when it scrolls on phones */
.food26-reader-photos .food26-reader-photos__list {
	position: relative;
	display: grid;
	grid-template-columns: repeat(var(--food26-rp-columns, 5), minmax(0, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.food26-reader-photos__item {
	margin: 0;
}

.food26-reader-photos .food26-reader-photos__item figure {
	margin: 0;
}

.food26-reader-photos__item a {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background-color: var(--inoforest-custom-warm, #f3e9dc);
	border-radius: 16px;
}

.food26-reader-photos .food26-reader-photos__item img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.food26-reader-photos__item a:hover img,
.food26-reader-photos__item a:focus-visible img {
	transform: scale(1.06);
}

.food26-reader-photos .food26-reader-photos__item figcaption {
	display: grid;
	justify-items: start;
	gap: 2px;
	margin-top: 8px;
	font-size: 0.85rem;
	color: var(--food26-rp-heading);
}

.food26-reader-photos .food26-reader-photos__item .food26-comment-rating {
	margin: 0;
}

.food26-reader-photos .food26-reader-photos__item .food26-rating-stars {
	font-size: 0.75rem;
}

.food26-reader-photos .food26-reader-photos__add a {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	color: var(--food26-rp-primary);
	background-color: var(--inoforest-custom-primary-light, #fbeae4);
	border: 2px dashed color-mix(in srgb, var(--food26-rp-primary) 40%, transparent);
	transition: background-color 0.3s, color 0.3s;
}

.food26-reader-photos .food26-reader-photos__add a:hover,
.food26-reader-photos .food26-reader-photos__add a:focus-visible {
	color: #fff;
	background-color: var(--food26-rp-primary);
}

.food26-reader-photos__add i {
	font-size: 2rem;
	line-height: 1;
}

.food26-reader-photos .food26-reader-photos__first {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin: 0;
	padding: 22px 24px;
	color: var(--food26-rp-heading);
	background-color: var(--inoforest-color-surface, #faf4ec);
	border: 1px dashed var(--inoforest-color-border, #ece2d6);
	border-radius: 16px;
}

.food26-reader-photos__first i {
	font-size: 1.5rem;
	color: var(--food26-rp-primary);
}

.food26-reader-photos .food26-reader-photos__first a {
	font-weight: 700;
	color: var(--food26-rp-primary);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.food26-reader-photos__hint {
	margin: 0;
}

/* Phones: the strip scrolls sideways, about two and a half photos in view */
@media (max-width: 767px) {
	.food26-reader-photos .food26-reader-photos__list {
		grid-template-columns: none;
		grid-auto-columns: 42%;
		grid-auto-flow: column;
		overflow-x: auto;
		padding-bottom: 6px;
		scroll-snap-type: x mandatory;
	}

	.food26-reader-photos__item {
		scroll-snap-align: start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.food26-reader-photos .food26-reader-photos__item img,
	.food26-reader-photos .food26-reader-photos__add a {
		transition: none;
	}
}

/* The feed look (1.1.0): square tiles that open the reader's review, the reader and the recipe over each photo under a
   dark gradient, a primary shade with an icon on hover, a button under the tiles. */
.food26-reader-photos {
	--food26-rp-feed-columns: 6;
	--food26-rp-feed-gap: 14px;
}

.food26-reader-photos .food26-reader-photos__grid {
	display: grid;
	grid-template-columns: repeat(var(--food26-rp-feed-columns), minmax(0, 1fr));
	gap: var(--food26-rp-feed-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.food26-reader-photos__cell {
	min-width: 0;
	margin: 0;
}

.food26-reader-photos .food26-reader-photos__tile {
	position: relative;
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background-color: var(--inoforest-custom-warm, #f3e9dc);
	border-radius: 16px;
}

/* Two classes to beat Elementor's `.elementor img` reset. */
.food26-reader-photos__tile img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.food26-reader-photos__tile:is(:hover, :focus-visible) img {
	transform: scale(1.08);
}

.food26-reader-photos .food26-reader-photos__caption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	display: grid;
	gap: 2px;
	padding: 50px 14px 14px;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
	overflow-wrap: anywhere;
	background: linear-gradient(to top, color-mix(in srgb, var(--inoforest-custom-dark, #22150f) 85%, transparent), transparent);
}

.food26-reader-photos .food26-reader-photos__caption small {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.78rem;
	font-weight: 500;
}

.food26-reader-photos .food26-reader-photos__overlay {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-size: 30px;
	color: #fff;
	background-color: color-mix(in srgb, var(--food26-rp-primary) 70%, transparent);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.food26-reader-photos__overlay svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.food26-reader-photos__tile:is(:hover, :focus-visible) .food26-reader-photos__overlay {
	opacity: 1;
}

.food26-reader-photos .food26-reader-photos__more {
	display: flex;
	justify-content: center;
	margin-top: 30px;
}

.food26-reader-photos .food26-reader-photos__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-sizing: border-box;
	min-height: 54px;
	padding: 14px 30px;
	font-size: 0.975rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--food26-rp-heading);
	text-decoration: none;
	background-color: transparent;
	border: 2px solid var(--inoforest-color-border, #ece2d6);
	border-radius: 999px;
	transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.food26-reader-photos .food26-reader-photos__button:is(:hover, :focus-visible) {
	color: #fff;
	background-color: var(--inoforest-custom-primary-dark, #8e2c15);
	border-color: var(--inoforest-custom-primary-dark, #8e2c15);
}

.food26-reader-photos__button svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

@media (prefers-reduced-motion: reduce) {
	.food26-reader-photos__tile img,
	.food26-reader-photos .food26-reader-photos__overlay,
	.food26-reader-photos .food26-reader-photos__button {
		transition: none;
	}

	.food26-reader-photos__tile:is(:hover, :focus-visible) img {
		transform: none;
	}
}
