/* "Shop by color" on the linen page (inc/filters.php, bb_colorbar_render): a purple band with the tops of fabric swatches peeking
   in along its bottom edge; one rises when you point at it. On phones the swatches become a grid. Loaded only where it shows. */
.bb-colorbar {
	position: relative;
	margin: 0 0 clamp(20px, 3vw, 36px);
	padding: clamp(22px, 3vw, 34px) clamp(18px, 3vw, 40px) 0;
	overflow: hidden;
	border-radius: var(--bb-radius-lg, 24px);
	background: radial-gradient(100% 120% at 85% 0%, #5e2f63 0%, rgba(94, 47, 99, 0) 60%), linear-gradient(135deg, var(--bb-night, #2a1630) 0%, #3b1c46 100%);
	color: #fff;
	box-shadow: var(--bb-shadow);
}
.bb-colorbar__title { margin: 0 0 .2em; color: #fff; font-family: var(--bb-heading-font, "Barlow Condensed", sans-serif); font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.02; text-transform: uppercase; }
.bb-colorbar__sub { max-width: 60ch; margin: 0; color: rgba(255, 255, 255, .92); font-size: 1.08rem; line-height: 1.5; }
.bb-colorbar__sub a { color: var(--bb-yellow, #fed800); font-weight: 700; text-decoration: underline; text-underline-offset: .18em; }

/* ---- The swatches: each is 100px tall and the band clips its lower 60px, so only the top 40px shows ---- */
.bb-colorbar__list {
	display: flex;
	gap: 8px;
	height: 100px;
	margin: clamp(28px, 4vw, 52px) 0 -60px; /* the last 60px hang below the band and are clipped: only the top 40px of each swatch shows */
	padding: 0;
	list-style: none;
}
.bb-colorbar__list li { flex: 1 1 0; min-width: 0; height: 100px; margin: 0; }
.bb-colorbar__list li:hover, .bb-colorbar__list li:focus-within { z-index: 2; }
.bb-colorbar__link {
	position: relative;
	display: block;
	height: 100%;
	color: #fff;
	text-decoration: none;
	filter: drop-shadow(0 -3px 5px rgba(0, 0, 0, .35));
	transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.bb-colorbar__fabric {
	position: absolute;
	inset: 0;
	display: block;
	color: var(--t, #fff); /* the name's color, chosen for contrast with this swatch */
	border-radius: 10px 10px 0 0;
	/* pinked (zigzag) top edge, as on a cut fabric swatch */
	clip-path: polygon(0 7px, 8.3% 0, 16.6% 7px, 25% 0, 33.3% 7px, 41.6% 0, 50% 7px, 58.3% 0, 66.6% 7px, 75% 0, 83.3% 7px, 91.6% 0, 100% 7px, 100% 100%, 0 100%);
	background:
		repeating-linear-gradient(0deg, rgba(255, 255, 255, .09) 0 1px, transparent 1px 3px),
		repeating-linear-gradient(90deg, rgba(0, 0, 0, .08) 0 1px, transparent 1px 3px),
		linear-gradient(100deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, .14)),
		var(--c, #999);
}
/* The short name (Orange) sits in the visible part; the full name (Orange & coral) is for screen readers and the phone grid. */
.bb-colorbar__short { position: absolute; top: 14px; left: 0; right: 0; display: block; padding: 0 4px; text-align: center; font-size: .82rem; font-weight: 800; letter-spacing: .05em; line-height: 22px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.bb-colorbar__name { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bb-colorbar__link:hover, .bb-colorbar__link:focus-visible { transform: translateY(-26px); }
.bb-colorbar__link:focus-visible { outline: 3px solid #fff; outline-offset: -2px; }
.bb-colorbar__link.is-on { transform: translateY(-20px); }
.bb-colorbar__link.is-on .bb-colorbar__fabric::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--bb-yellow, #fed800); }
.bb-colorbar__link.is-on .bb-colorbar__fabric::before { content: "\2713"; position: absolute; left: 50%; top: 34px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: var(--bb-yellow, #fed800); color: var(--bb-night, #2a1630); font-size: 1rem; font-weight: 900; line-height: 24px; text-align: center; }

@media (max-width: 900px) {
	.bb-colorbar__short { font-size: .7rem; letter-spacing: .02em; }
}

/* ---- Phones: no peeking row, a grid of swatches (each a big tap target) ---- */
@media (max-width: 640px) {
	.bb-colorbar { padding-bottom: clamp(18px, 3vw, 24px); }
	.bb-colorbar__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; height: auto; margin: 16px 0 0; }
	.bb-colorbar__list li { height: auto; }
	.bb-colorbar__link { height: 72px; transform: none; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .35)); }
	.bb-colorbar__fabric { border-radius: 0 0 12px 12px; }
	.bb-colorbar__short { display: none; }
	.bb-colorbar__name { position: absolute; left: 8px; right: 8px; bottom: 8px; width: auto; height: auto; margin: 0; overflow: visible; clip-path: none; text-align: left; line-height: 1.15; font-size: .85rem; font-weight: 800; white-space: normal; }
	.bb-colorbar__link:hover, .bb-colorbar__link:focus-visible, .bb-colorbar__link.is-on { transform: translateY(-3px); }
	.bb-colorbar__link.is-on .bb-colorbar__fabric::before { left: auto; right: 6px; top: 16px; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.bb-colorbar__link { transition: none; }
}

/* Kadence puts an 80px margin above the content; with the band first in it that was a big empty gap under the heading. */
.content-area:has(.bb-colorbar) { margin-top: clamp(20px, 3vw, 32px); }
