/* ============================================================
   Featured sellers — the paid placement rail.

   Replaces the Instagram-stories treatment (a 60px avatar circle with the
   name cut to ten characters) that made a PAID slot the weakest thing on
   /sellers/: the free listings immediately below it get a full portrait, a
   name, an age, a flag and an online dot. A seller who has paid should
   never be rendered more weakly than one who has not.

   🚨 Why this file is almost free of !important, and must stay that way.

   The markup wears ONLY snifffr-fsell-* classes. It deliberately does not
   carry the plugin's `item-list`, `featured-members-list` or
   `featured-member-item` — see functions/featured-sellers-rail/. Those three
   strings are targeted by ~144 lines across custom.css,
   snifffr-mobile-redesign.css and snifffr-desktop-redesign.css: a grid
   layout, three different hard-coded card widths, fixed row heights and
   `scroll-snap-type: x mandatory`, nearly all of it !important and all of it
   written for that 60px circle. While this markup wore those names, every
   rule here had to out-shout one of them, and this file carried 85
   !important declarations to say what a handful say now.

   So if you find yourself adding !important here, check first whether one of
   those class names has crept back into the markup. The only block below
   that still earns it is the wrapper un-pinning, because those rules hit the
   widget's own container, which is not ours to rename.
   ============================================================ */

:root {
	--fsell-ink: #332e4d;
	--fsell-muted: #6E6880;
	/* 🚨 #D63384, not the #E65C95 used elsewhere on the site: this one sits
	   under white text, and white on #E65C95 is 2.8:1 — below AA. This is
	   4.5:1. #E65C95 stays for decoration only, where it bears no text. */
	--fsell-pink: #D63384;
	--fsell-pink-soft: #E65C95;
	--fsell-rail-bg: #FBF7FA;
	--fsell-line: #F0E6EC;
	--fsell-online: #2EB872;
}

/* ── un-pinning the widget's containers ───────────────────────
   The one place !important is still earned. custom.css pins these to the
   height of the row this replaces:

     .page-template-page-seller .bp-featured-members-widget { height:130px !important }
     .seller-page-row .promsell .buyers_feat_widget_mobile  { height:115px }  ≤991.98px

   A portrait card is ~160px tall, so both crop it. These are the widget's
   own wrappers, so renaming is not available — they have to be answered
   directly. `body` leads the first selector because the rule it beats is
   (0,2,0) AND !important; (0,2,1) wins outright rather than by load order. */
body.page-template-page-seller .bp-featured-members-widget,
body .bp-featured-members-widget,
body .buyers_feat_widget_mobile,
body .buyers_feat_widget_desk,
body .promsell .widget.buddypress {
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
}

/* ── the rail ─────────────────────────────────────────────── */

.snifffr-fsell-rail {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 12px;
	margin: 0;
	/* No side padding anywhere: the first card lines up with whatever
	   heading or label sits above the row — "Promoted" on /sellers/,
	   "☆ Featured Sellers" in the activity sidebar. The row used to carry
	   14px here, which read as a gap down the left because nothing else in
	   those blocks was inset by it. Horizontal breathing room is the
	   container's job; the row's job is to reach both edges so it can
	   scroll to them. */
	padding: 4px 0 10px;
	list-style: none;
	width: 100%;
	overflow-x: auto;
	overflow-y: visible;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;

	/* 🚨 No scroll snapping, ever. `x mandatory` cancels programmatic
	   scrolling outright, which breaks the pager the activity sidebar
	   attaches to this row, and it stops the row resting at 0 so the first
	   card slides under the prev arrow. The same pairing froze the shop
	   shelf. */
	scroll-snap-type: none;

	/* Fade the right edge only: the row starts at its left, so a left fade
	   would just dim the first card for no reason. */
	-webkit-mask-image: linear-gradient(to right, #000 0%, #000 92%, transparent 100%);
	mask-image: linear-gradient(to right, #000 0%, #000 92%, transparent 100%);
}

.snifffr-fsell-rail::-webkit-scrollbar {
	width: 0;
	height: 0;
	display: none;
}

/* ── the item ─────────────────────────────────────────────── */

.snifffr-fsell-item {
	flex: 0 0 auto;
	width: min(28vw, 105px);
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;

	/* 🚨 Not optional. A flex item defaults to min-width:auto, which resolves
	   to its MIN-CONTENT size, and min-width beats max-width — so the
	   sidebar's 101px was computed and then quietly ignored, leaving the card
	   stuck at 110. The name carries its own ellipsis, so there is nothing to
	   protect by refusing to shrink. */
	min-width: 0;
}

@media (min-width: 992px) {
	.snifffr-fsell-item {
		/* Fixed rather than viewport-relative: this rail also renders in the
		   activity sidebar, where a vw width would overflow the column. */
		width: 124px;
	}
}

/* ── the card ─────────────────────────────────────────────── */

.snifffr-fsell-card {
	display: flex;
	flex-direction: column;
	/* 🚨 flex:1, never height:100%. A percentage height against a flex item
	   whose own cross size is still being resolved is circular, and the
	   browser settles it by letting the photo shrink — the portrait came out
	   as a 72px letterbox. */
	flex: 1 1 auto;
	min-width: 0;
	background: #fff;
	border: 1px solid var(--fsell-line);
	border-radius: 14px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	/* 🚨 .bp-featured-members-widget sets text-align:center. The name is a
	   block so it inherited that, while the age/flag row is a flex container
	   and ignored it — so the two lines of the same card disagreed, the name
	   centred over a left-aligned sub. Set here rather than on the name so
	   anything added to the card later starts out aligned too. */
	text-align: left;
	box-shadow: 0 2px 8px -4px rgba(79, 68, 112, 0.18);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.snifffr-fsell-card:hover,
.snifffr-fsell-card:focus-visible {
	transform: translateY(-3px);
	border-color: var(--fsell-pink-soft);
	box-shadow: 0 12px 24px -10px rgba(214, 51, 132, 0.40);
}

.snifffr-fsell-card:focus-visible {
	outline: 2px solid var(--fsell-pink);
	outline-offset: 2px;
}

/* ── the photo ────────────────────────────────────────────── */

.snifffr-fsell-photo {
	position: relative;
	display: block;
	width: 100%;
	overflow: hidden;
	background: var(--fsell-rail-bg);

	/* 🚨 An explicit height, NOT aspect-ratio. `aspect-ratio` paired with a
	   percentage width contributes NOTHING to intrinsic height, so the flex
	   row sized itself before the photo's real height was known and the
	   portrait resolved as a letterbox. Derived from the same expression as
	   the card's width, less its 1px border each side, so the crop is exact.

	   1.15 rather than a full 4:5 — at 1.25 the card stood taller than the
	   organic grid card beside it and the rail shouted over the directory. */
	height: calc((min(28vw, 105px) - 2px) * 1.15);
	flex: 0 0 auto;
}

@media (min-width: 992px) {
	/* 🚨 Must come AFTER the rule above. A media query adds no specificity —
	   both are (0,1,0) — so this is decided purely by source order. Kept in
	   step with the 124px card: (124 - 2) × 1.15. */
	.snifffr-fsell-photo {
		height: 140px;
	}
}

.snifffr-fsell-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
	margin: 0;
	border: 0;
	border-radius: 0;
	transition: transform 0.35s ease;
}

.snifffr-fsell-card:hover .snifffr-fsell-photo img {
	transform: scale(1.04);
}

/* The paid mark. A star, not the word "Featured" — every surface this rail
   appears on already carries a "Promoted" or "Featured Sellers" heading
   directly above it, and repeating the word on each card is noise where the
   photo should be doing the work. */
.snifffr-fsell-star {
	position: absolute;
	top: 5px;
	left: 5px;
	width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--fsell-pink-soft), var(--fsell-pink));
	color: #fff;
	box-shadow: 0 2px 6px rgba(214, 51, 132, 0.45);
	pointer-events: none;
}

.snifffr-fsell-star svg {
	display: block;
}

.snifffr-fsell-online {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--fsell-online);
	border: 2px solid #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	pointer-events: none;
}

/* ── the meta ─────────────────────────────────────────────── */

.snifffr-fsell-meta {
	display: block;
	padding: 6px 8px 7px;
}

.snifffr-fsell-name {
	display: block;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--fsell-ink);
	/* The plugin's template cut the name to ten characters, so "Blazinbabe…"
	   and "BooBookies…" said almost nothing. Clipping in CSS instead lets the
	   whole name show whenever it fits. */
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color 0.15s ease;
}

.snifffr-fsell-card:hover .snifffr-fsell-name {
	color: var(--fsell-pink);
}

.snifffr-fsell-sub {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 1px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--fsell-muted);
}

/* The country helper returns a flag-icons <span class="fi">, not an <img>:
   it paints a background image and takes its box from the font, so it is
   pinned here rather than left to collapse inside the flex row. */
.snifffr-fsell-sub .fi {
	flex: 0 0 auto;
	display: inline-block;
	width: 14px;
	height: 11px;
	border-radius: 2px;
	background-size: cover;
	background-position: center;
}

/* ── the empty place in the rail ──────────────────────────── */

/* The same treatment the shop shelf uses for its empty slot, so paid
   placement reads as one idea across the site. It takes its width from
   .snifffr-fsell-item and its top band's height from .snifffr-fsell-photo,
   so it stays in step with the real cards at every breakpoint without
   repeating a single number. */
.snifffr-fsell-slot {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	border: 2px dashed #EBB9CF;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.55);
	text-decoration: none;
	color: var(--fsell-pink);
	overflow: hidden;
	transition: border-color 0.18s ease, background 0.18s ease;
}

.snifffr-fsell-slot:hover,
.snifffr-fsell-slot:focus-visible {
	border-color: var(--fsell-pink);
	background: #fff;
}

.snifffr-fsell-slot:focus-visible {
	outline: 2px solid var(--fsell-pink);
	outline-offset: 2px;
}

/* Stands in for the photo and is deliberately the same height — see the note
   in featured-sellers-rail.php. The activity sidebar's pager arrows are
   centred on the row, so they land here rather than on the words. */
.snifffr-fsell-slot-top {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #FDF4F8;
}

.snifffr-fsell-slot-mark {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 99px;
	background: #FBEAF2;
	color: var(--fsell-pink);
}

/* Matches .snifffr-fsell-meta's padding so the two card types line up. */
.snifffr-fsell-slot-body {
	display: block;
	padding: 6px 8px 7px;
	text-align: center;
}

.snifffr-fsell-slot-title {
	display: block;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	/* "Get featured", not "Feature your profile": at 101px in the activity
	   sidebar the longer phrase wrapped to three lines and pushed the price
	   out of the card. */
	white-space: nowrap;
}

.snifffr-fsell-slot-sub {
	display: block;
	margin-top: 1px;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--fsell-muted);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* ── the activity sidebar ─────────────────────────────────── */

/* 🚨 .buyers_feat_widget_desk ONLY, never .buyers_feat_widget_mobile. Both
   wrappers render this same widget, but the pager attaches to the desk one
   alone — activity/index.php does
   `document.querySelectorAll('.buyers_feat_widget_desk')`. The mobile wrapper
   is what /sellers/, the home page and the activity mobile panes use.

   This column once had a pager, and the row carried 38px of side padding to
   stay clear of its arrows — which read as a gap down the left. The pager is
   gone (see activity/index.php), so the row takes the flush padding set
   above like everywhere else. Only the gap differs here, because the column
   is narrow enough that 12px costs a visible slice of the third card. */
.buyers_feat_widget_desk .snifffr-fsell-rail {
	gap: 10px;
}

/* Sized so TWO whole cards fit between those arrows with room to spare:
   316px of rail, less 76px of padding, is 240; two 101px cards plus the 10px
   gap is 212. At the 124px used elsewhere only 1.8 fit, so the second was
   always sliced. */
.buyers_feat_widget_desk .snifffr-fsell-item {
	width: 101px;
}

/* (101 - 2) × 1.15 — the same relation every other breakpoint keeps. */
.buyers_feat_widget_desk .snifffr-fsell-photo {
	height: 114px;
}

@media (prefers-reduced-motion: reduce) {
	.snifffr-fsell-card,
	.snifffr-fsell-photo img {
		transition: none;
	}
	.snifffr-fsell-card:hover,
	.snifffr-fsell-card:hover .snifffr-fsell-photo img {
		transform: none;
	}
}

/* ============================================================
   The band — a dark ground under the rail.

   Introduced for /activity/, where the featured-sellers rail and the
   featured-items shelf read as the same thing; now also /sellers/, where the
   paid strip sits directly above the organic grid and used the same card as
   a seller who paid nothing. Both problems have the same answer: put the
   paid rail on a dark ground and let the photo fill the tile, so the card
   stops rhyming with whatever it sits next to.

   🚨 It lives HERE, in the rail module, rather than in either page's own
   stylesheet, because two surfaces now use it and a copy in each would drift
   the first time one was adjusted. What differs between surfaces is a skin,
   so it is expressed as custom properties a page can reset — never as a
   second copy of the rules.

   Nothing below applies unless an ancestor carries .snifffr-fsell-band, which
   only the two page modules emit. The rail renders on /buyers/ and the home
   page untouched.
   ============================================================ */

.snifffr-fsell-band {
	/* ONE purple, on every surface. This shipped as two — plum on /activity/
	   and navy on /sellers/ — on the argument that each page had a different
	   colour problem to solve. That argument was wrong in the way clever
	   arguments usually are: it optimised each page and gave one component
	   two identities, so a seller met the same rail in two colours depending
	   on where she found it.

	   🚨 And both were too dark. The plum sat at L=0.028 and read as a slab
	   punched out of a light, airy page — the same objection
	   snifffr-featured-shop-items.css records about its own first attempt at
	   a dark ground. This is L=0.070, two and a half times lighter, and
	   still carries white at 8.8:1.

	   There is no per-surface override of these any more. If a page ever
	   needs one again, that is the moment to ask whether it is really the
	   same component.

	   #4F4470 is not a new colour: it is THE site's dark-surface purple,
	   already used 37 times, which snifffr-blog-redesign.css names the
	   "footer purple" and reaches for on dark surfaces "for visual
	   continuity". A paid rail is exactly that case, so the band stops being
	   a bespoke hex and starts being the colour this site already uses when
	   it goes dark. */
	--fsell-band-bg: #4F4470;
	/* A touch darker than the band, so a portrait narrower than the tile
	   reads as sitting ON something rather than dissolving into it. */
	--fsell-band-card: #42395E;
	/* 🚨 Lightened from #FF9FC6 with the ground. This accent carries real
	   text — "See all" on /activity/, "Promote profile" on /sellers/ — at
	   11px uppercase, and #FF9FC6 lands at 4.61:1 here. That passes AA, but
	   by 0.11, which is not a margin worth defending on small text. #FFB8D6
	   is 5.5:1. The star and the slot's dashed edge take the same value so
	   there is one accent, not an accent and a text colour that drift. */
	--fsell-band-accent: #FFB8D6;
	/* Bare channels, not a colour: the scrim needs three alphas of it. */
	--fsell-band-scrim: 16, 10, 26;
	/* The tile's height. 1.43 is the old photo-plus-meta total expressed
	   against the card's width, so adopting the band does not move the row's
	   height. Each surface resets it where its cards are a fixed width. */
	--fsell-tile-h: calc(min(28vw, 105px) * 1.43);

	background: var(--fsell-band-bg);
	border-radius: 16px;
}

/* 3px top and bottom is headroom for the card's hover lift, which the band
   would otherwise clip. No side padding: the band insets the row on the left
   and lets it run off on the right, where the rail's own mask fade dissolves
   the last card into the ground. A row that stops short of the edge looks
   finished; this one plainly continues. */
.snifffr-fsell-band .snifffr-fsell-rail {
	padding: 3px 0;
}

.snifffr-fsell-band .snifffr-fsell-item {
	/* An explicit height, because the photo is about to leave the flow and
	   stop contributing any. */
	height: var(--fsell-tile-h);
}

/* ── the card, as a tile ──────────────────────────────────────────────
   The white footer is what made this rhyme with its neighbours, so it goes:
   the photo fills the tile and the meta sits on a scrim over it. The photo
   gains ~33px in a tile marginally SHORTER than the card it replaces.

   🚨 Everything here is scoped under .snifffr-fsell-card, never
   .snifffr-fsell-photo alone. The empty-slot card carries
   .snifffr-fsell-photo too — that is how it borrows the real card's height —
   so a bare .photo rule would absolutely-position the slot's top band over
   its own text. */

.snifffr-fsell-band .snifffr-fsell-card {
	position: relative;
	display: block;
	/* A ground for the gap a portrait narrower than the tile would leave, and
	   for the moment before the image decodes. */
	background: var(--fsell-band-card);
	border: 0;
	border-radius: 12px;
	box-shadow: none;
}

.snifffr-fsell-band .snifffr-fsell-card:hover,
.snifffr-fsell-band .snifffr-fsell-card:focus-visible {
	box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.55);
}

.snifffr-fsell-band .snifffr-fsell-card:focus-visible {
	outline: 2px solid var(--fsell-band-accent);
	outline-offset: 2px;
}

.snifffr-fsell-band .snifffr-fsell-card .snifffr-fsell-photo {
	position: absolute;
	inset: 0;
	/* Cancels the calc() height set at three breakpoints above. With top and
	   bottom both pinned, auto fills the tile. */
	height: auto;
	background: transparent;
}

/* The scrim. Drawn on the photo rather than behind the text so it covers the
   full tile width while the text stays inset — and so it is painted even on a
   tile with no photograph at all, which is the case that would otherwise put
   white text on a pale monogram avatar. */
.snifffr-fsell-band .snifffr-fsell-card .snifffr-fsell-photo::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 66px;
	background: linear-gradient(
		to top,
		rgba(var(--fsell-band-scrim), 0.94) 0%,
		rgba(var(--fsell-band-scrim), 0.62) 44%,
		rgba(var(--fsell-band-scrim), 0) 100%
	);
	pointer-events: none;
}

.snifffr-fsell-band .snifffr-fsell-card .snifffr-fsell-meta {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 0 8px 7px;
}

.snifffr-fsell-band .snifffr-fsell-card .snifffr-fsell-name {
	color: #fff;
}

.snifffr-fsell-band .snifffr-fsell-card:hover .snifffr-fsell-name {
	/* The base rule turns this pink on hover, which was right on a white
	   footer and is a contrast drop on a scrim. */
	color: #fff;
}

.snifffr-fsell-band .snifffr-fsell-card .snifffr-fsell-sub {
	margin-top: 2px;
	color: rgba(255, 255, 255, 0.86);
}

/* ── the empty place in the rail ──────────────────────────────────────
   On both surfaces this card sits near a SECOND dashed pink offer — the shop
   shelf's "Feature your item" on /activity/, and on /sellers/ the pink of the
   whole page. On the band it inverts: pink on a translucent white fill, white
   title. The other stays pink-on-white. Same idea, plainly two offers. */

.snifffr-fsell-band .snifffr-fsell-slot {
	align-items: center;
	justify-content: center;
	gap: 9px;
	border-color: rgba(255, 184, 214, 0.62);
	border-radius: 12px;
	/* .10 rather than .07: a translucent white reads fainter on the lighter
	   ground, and this card is an offer, not a gap. */
	background: rgba(255, 255, 255, 0.10);
}

.snifffr-fsell-band .snifffr-fsell-slot:hover,
.snifffr-fsell-band .snifffr-fsell-slot:focus-visible {
	border-color: var(--fsell-band-accent);
	background: rgba(255, 255, 255, 0.13);
}

.snifffr-fsell-band .snifffr-fsell-slot:focus-visible {
	outline: 2px solid var(--fsell-band-accent);
	outline-offset: 2px;
}

/* 🚨 Three classes deep on purpose. This element carries
   .snifffr-fsell-photo as well, which is set to a fixed height at (0,2,0) by
   `.buyers_feat_widget_desk .snifffr-fsell-photo` above; (0,3,0) settles it
   without depending on source order. With the card no longer split into a
   photo band and a text band, the slot stops needing one either. */
.snifffr-fsell-band .snifffr-fsell-slot .snifffr-fsell-slot-top {
	flex: 0 0 auto;
	height: auto;
	background: none;
}

.snifffr-fsell-band .snifffr-fsell-slot .snifffr-fsell-slot-mark {
	width: 32px;
	height: 32px;
	background: rgba(255, 184, 214, 0.18);
	color: var(--fsell-band-accent);
}

.snifffr-fsell-band .snifffr-fsell-slot .snifffr-fsell-slot-body {
	padding: 0 8px;
}

.snifffr-fsell-band .snifffr-fsell-slot .snifffr-fsell-slot-title {
	color: #fff;
}

.snifffr-fsell-band .snifffr-fsell-slot .snifffr-fsell-slot-sub {
	color: rgba(255, 255, 255, 0.78);
}

@media (prefers-reduced-motion: reduce) {
	.snifffr-fsell-band .snifffr-fsell-card,
	.snifffr-fsell-band .snifffr-fsell-slot {
		transition: none;
	}
	.snifffr-fsell-band .snifffr-fsell-card:hover {
		box-shadow: none;
	}
}
