/* =============================================================
   Rinnai Recipe Grid
   rinnai-recipe-grid.css
   ============================================================= */

/* ── Root ──────────────────────────────────────────────────── */

.rrg {
	width: 100%;
}

/* ── Loading state ─────────────────────────────────────────── */

.rrg--loading .rrg__grid {
	opacity: 0.4;
	pointer-events: none;
}

/* ── Grid ──────────────────────────────────────────────────── */

.rrg__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 24px;
	row-gap: 24px;
	margin-bottom: 32px;
	transition: opacity 0.2s ease;
}

/* ── Card ──────────────────────────────────────────────────── */

.rrg__card {
	display: block;
	text-decoration: none;
	color: inherit;
	transition: opacity 0.2s ease;
}

/* ── Image ─────────────────────────────────────────────────── */

.rrg__image-wrap {
	width: 100%;
	overflow: hidden;
}

.rrg__image {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.rrg__image-placeholder {
	width: 100%;
	padding-top: 66%;
	background-color: #e0e0e0;
}

/* ── Card footer ───────────────────────────────────────────── */

.rrg__card-footer {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	padding-top: 8px;
	padding-bottom: 8px;
}

.rrg__card-chevron-img {
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	object-fit: contain;
	margin-top: 3px; /* optical alignment with first text line */
}

.rrg__card-chevron-fallback {
	flex-shrink: 0;
	font-size: 14px;
	line-height: 1.4;
	color: #333333;
}

/* ── Title ─────────────────────────────────────────────────── */

.rrg__title {
	font-size: 14px;
	color: #333333;
	line-height: 1.4;
	overflow-wrap: break-word;
	word-break: break-word;
	transition: color 0.2s ease;
}

.rrg__card:hover .rrg__title {
	color: #cc0000;
}

/* ── No results ────────────────────────────────────────────── */

.rrg__no-results {
	grid-column: 1 / -1;
	text-align: center;
	color: #999999;
	padding: 40px 0;
	margin: 0;
}

/* ── Results text ──────────────────────────────────────────── */

.rrg__results {
	font-size: 14px;
	color: #666666;
	text-align: center;
	margin-top: 0;
	margin-bottom: 16px;
}

/* ── Pagination ────────────────────────────────────────────── */

.rrg__pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 4px;
}

.rrg__page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 6px;
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 14px;
	color: #333333;
	border-radius: 4px;
	line-height: 1;
	font-family: inherit;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.rrg__page-btn:hover:not(.is-active):not(.is-disabled) {
	background-color: #f5f5f5;
}

.rrg__page-btn.is-active {
	background-color: #cc0000;
	color: #ffffff;
}

.rrg__page-btn.is-disabled {
	color: #cccccc;
	opacity: 0.4;
	cursor: default;
	pointer-events: none;
}

.rrg__ellipsis {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	font-size: 14px;
	color: #333333;
}

.rrg__page-chevron {
	width: 16px;
	height: 16px;
	object-fit: contain;
	display: block;
}

.rrg__page-chevron-fallback {
	font-size: 16px;
	line-height: 1;
}
