/* eclarc pick -- the "can't choose?" cell that closes a ragged archive grid.
   Source: /mnt/c/dev/eclarc/pick/. Loaded by eclarc-pick.php on product archives.

   The cell wears the grid item's own classes, so it inherits the hairlines, the 4:5
   image box and the caption row. Everything inside the image box is absolutely
   positioned, so the box is held open the way .ec-photo cells are: a 4:5 padding
   spacer divided by --span (one column's height however many it spans), plus a vw
   floor on phones, where a spacer alone has collapsed on real iOS Safari. The rows are
   left to the theme, like every other cell's; pick.js clones a real caption so they
   size the same. */

.etheme-product-grid > .ec-pick .ec-pick__stage {
	position: relative;
	overflow: hidden;
	aspect-ratio: auto !important;
	height: auto !important;
	background: #fff;
}

.etheme-product-grid > .ec-pick .ec-pick__stage::before {
	content: '';
	display: block;
	padding-top: calc(125% / var(--span, 1));
}

/* idle: a wall of the products on this page */
.ec-pick__tiles {
	position: absolute;
	inset: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: repeat(2, minmax(0, 1fr));
	gap: 8px;
	padding: 18px;
	cursor: pointer;
}

.ec-pick__tiles img {
	width: 100%;
	height: 100%;
	min-height: 0;
	object-fit: contain;
}

/* the reel and the result */
.ec-pick__shot {
	position: absolute;
	inset: 0;
	display: block;
	visibility: hidden;
}

.ec-pick__shot img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ec-pick:not([data-state="idle"]) .ec-pick__tiles,
.ec-pick:not([data-state="idle"]) .ec-pick__spin {
	display: none;
}

.ec-pick:not([data-state="idle"]) .ec-pick__shot {
	visibility: visible;
}

.ec-pick[data-state="landed"] .ec-pick__shot img {
	animation: ec-pick-land .32s cubic-bezier(.2, .9, .3, 1.25);
}

@keyframes ec-pick-land {
	from { transform: scale(.9); }
	to   { transform: scale(1); }
}

/* controls: black rectangles and white hairline chips, nothing else */
.etheme-product-grid .ec-pick .ec-pick__spin,
.etheme-product-grid .ec-pick .ec-pick__again {
	position: absolute;
	margin: 0;
	border-radius: 0 !important;
	box-shadow: none !important;
	font-family: 'Hanken Grotesk', Helvetica, Arial, sans-serif !important;
	font-size: 10px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	letter-spacing: .2em !important;
	text-transform: uppercase !important;
	cursor: pointer;
	min-height: 0;
	height: auto;
	width: auto;
}

.etheme-product-grid .ec-pick .ec-pick__spin {
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	padding: 15px 26px 15px calc(26px + .2em) !important;
	border: 1px solid #000 !important;
	background: #000 !important;
	color: #fff !important;
}

.etheme-product-grid .ec-pick .ec-pick__spin:hover,
.etheme-product-grid .ec-pick .ec-pick__spin:focus-visible {
	background: #fff !important;
	color: #000 !important;
}

.etheme-product-grid .ec-pick .ec-pick__again {
	display: none;
	left: 12px;
	top: 12px;
	width: 32px;
	height: 32px;
	padding: 0 !important;
	font-size: 15px !important;
	letter-spacing: 0 !important;
	border: 1px solid #000 !important;
	background: #fff !important;
	color: #000 !important;
}

.etheme-product-grid .ec-pick[data-state="landed"] .ec-pick__again {
	display: block;
}

.etheme-product-grid .ec-pick .ec-pick__again:hover,
.etheme-product-grid .ec-pick .ec-pick__again:focus-visible {
	background: #000 !important;
	color: #fff !important;
}

.ec-pick__name a {
	color: inherit;
	text-decoration: none;
}

.ec-pick:not([data-state="landed"]) .ec-pick__price {
	visibility: hidden;
}

.ec-pick[data-state="spinning"] .ec-pick__name {
	color: #9a9a97;
}

.ec-pick .ec-pick__live {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	margin: 0;
	padding: 0;
}

@media (max-width: 767px) {
	.etheme-product-grid .ec-pick .ec-pick__spin {
		padding: 13px 20px 13px calc(20px + .2em) !important;
	}
	.etheme-product-grid > .ec-pick .ec-pick__stage {
		min-height: 58vw;
	}
	.etheme-product-grid .ec-pick .ec-pick__again {
		left: 8px;
		top: 8px;
	}
}
