/*
 * NCP Search 0.5.0 — RECO-1 rows, pills, options, set bar. The cards are the search card (ncp-s2-card.css); this file
 * adds only what a recommendation needs. ⚠ Never black on orange: the quick-add is white on the accent; the reason chip is
 * dark ink on a pale neutral. Every state is a word as well as a colour.
 */

/* the holdout: buckets under the store's share see the theme only (marked before paint — nothing shifts) */
.ncp-reco-held .ncp-reco,
.ncp-reco-held .ncp-reco-slot,
.ncp-reco-held .ncp-reco-options,
.ncp-reco-held .ncp-reco-setbar { display: none !important; }

.ncp-reco { margin: 32px 0; clear: both; }
.ncp-reco__title { font-size: 1.25rem; line-height: 1.3; margin: 0 0 12px; font-weight: 600; }
.ncp-reco__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(200px, 1fr);
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	padding-bottom: 4px;
}
.ncp-reco__track > .s2-card { scroll-snap-align: start; min-width: 0; }
.ncp-reco--compact .ncp-reco__track { grid-auto-columns: minmax(160px, 1fr); gap: 12px; }
.ncp-reco--compact .ncp-reco__title { font-size: 1rem; }
@media (max-width: 700px) {
	.ncp-reco__track { grid-auto-columns: 72%; }
}

.s2-card--reco .s2-card__media { position: relative; }
.ncp-reco__reason {
	display: inline-block;
	max-width: 100%;
	font-size: 0.75rem;
	line-height: 1.3;
	padding: 2px 8px;
	margin-bottom: 6px;
	border-radius: 999px;
	background: #f1f3f5;
	color: #1f2933;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* the round quick-add — white on the store's accent, never black on orange */
.ncp-reco__add {
	position: absolute;
	right: 8px;
	bottom: 8px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--s2-accent, #F47C21);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.ncp-reco__add:focus-visible { outline: 2px solid #1f2933; outline-offset: 2px; }
.ncp-reco__add[aria-busy="true"] { opacity: 0.6; }
.ncp-reco__add.is-added::after { content: "\2713"; position: absolute; font-size: 11px; top: -2px; right: -2px; background: #fff; color: #1f6f3f; border-radius: 50%; width: 16px; height: 16px; line-height: 16px; text-align: center; }

.ncp-reco__why { background: none; border: 0; padding: 0; margin: -6px 0 10px; font-size: 0.8rem; color: inherit; text-decoration: underline; cursor: pointer; }

/* personal rows: the slot keeps its height before paint only for a shopper with Preferences on */
.ncp-reco-slot { min-height: 0; }
.ncp-pref .ncp-reco-slot { min-height: 440px; }
.ncp-pref .ncp-reco-slot.is-empty { min-height: 0; }

/* the pills — plain links */
.ncp-reco-pills__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ncp-reco-pill {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid #d0d5dd;
	border-radius: 999px;
	text-decoration: none;
	color: inherit;
	font-size: 0.9rem;
	min-height: 44px;
	box-sizing: border-box;
	line-height: 26px;
}
.ncp-reco-pill:hover, .ncp-reco-pill:focus-visible { border-color: currentColor; }

/* the other options, as chips in the buy area */
.ncp-reco-options { margin: 12px 0 16px; display: grid; gap: 8px; }
.ncp-reco-options__axis { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ncp-reco-options__label { font-size: 0.85rem; font-weight: 600; margin-right: 4px; }
.ncp-reco-chip { padding: 4px 10px; border: 1px solid #d0d5dd; border-radius: 6px; font-size: 0.85rem; text-decoration: none; color: inherit; }
.ncp-reco-chip.is-current { border-color: currentColor; font-weight: 600; }

/* the set bar */
.ncp-reco-setbar {
	position: sticky;
	bottom: 0;
	z-index: 20;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	margin: 16px 0;
	background: #fff;
	color: #1f2933;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}
.ncp-reco-setbar[hidden] { display: none; }
.ncp-reco-setbar__total { font-weight: 700; margin-left: auto; }
.ncp-reco-setbar__cart { font-weight: 600; text-decoration: underline; color: inherit; }
