/* Twist Gifting 0.26.0: the biscuit step (Tea & Biscuits Caddy, Pick & Mix Tea & Biscuits Caddy; Tom's docs of 6 Nov
   2026). Picture tiles in the picker's style: square corners, black outline, black fill when chosen. The plain fields
   the server reads stay in the form, hidden. Square corners throughout (Twist rule). */

.twg-bisc-native--hidden {
	display: none !important;
}

.twg-bisc {
	margin: 28px 0 0;
}

.twg-bisc__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 6px;
}

.twg-bisc__title {
	margin: 0;
	font-family: var(--twg-font);
	font-size: 20px;
	font-weight: 700;
	line-height: 24px;
	letter-spacing: 0;
	text-transform: none;
	color: var(--twg-text);
}

.twg-bisc__counter {
	font-size: 14px;
	line-height: 21px;
	color: var(--twg-muted);
	white-space: nowrap;
}

.twg-bisc__help {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 21px;
	color: var(--twg-muted);
}

.twg-bisc__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
	gap: 10px;
}

.twg-bisc--single .twg-bisc__grid {
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 14px;
}

.twg-bisc__tile {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	border: 1px solid #111;
	border-radius: 0;
	background: #fff;
	color: var(--twg-text);
	text-align: center;
	cursor: pointer;
	-webkit-user-select: none;
	user-select: none;
}

.twg-bisc__tile:hover {
	background: #f4f4f4;
}

.twg-bisc__tile:focus-visible {
	outline: 2px solid #111;
	outline-offset: 3px;
}

.twg-bisc__img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: #fff;
	overflow: hidden;
}

.twg-bisc--single .twg-bisc__img {
	aspect-ratio: 3 / 2;
}

.twg-bisc__img img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	border-radius: 0 !important;
}

.twg-bisc--single .twg-bisc__img img {
	object-fit: contain;
}

.twg-bisc__name {
	display: block;
	padding: 8px 6px 9px;
	border-top: 1px solid #111;
	font-size: 14px;
	font-weight: 700;
	line-height: 18px;
}

.twg-bisc__desc {
	display: block;
	padding: 0 10px 10px;
	font-size: 13px;
	font-weight: 400;
	line-height: 18px;
	color: var(--twg-muted);
}

.twg-bisc__tile.is-selected,
.twg-bisc__tile.is-selected:hover {
	box-shadow: inset 0 0 0 2px #111;
}

.twg-bisc__tile.is-selected .twg-bisc__name {
	background: #111;
	color: #fff;
}

.twg-bisc__tile.is-selected .twg-bisc__desc {
	background: #111;
	color: #ddd;
}

/* How many of one design, when more than one. */
.twg-bisc__badge {
	position: absolute;
	top: -9px;
	left: -9px;
	z-index: 1;
	min-width: 26px;
	height: 26px;
	padding: 0 6px;
	border-radius: 0;
	background: #111;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 26px;
	text-align: center;
}

.twg-bisc__badge[hidden] {
	display: none;
}

.twg-bisc__note {
	min-height: 0;
	margin: 10px 0 0;
}

.twg-bisc__note:empty {
	display: none;
}

/* The six chosen biscuits under the tiles. */
.twg-bisc__chosen {
	margin: 20px 0 0;
}

.twg-bisc__chosen .twg-slots {
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 8px;
}

.twg-bisc__chosen .twg-slot-img {
	aspect-ratio: 1 / 1;
}

.twg-bisc__chosen .twg-slot.is-empty {
	min-height: 96px;
}

.twg-bisc__chosen .twg-slot-body {
	gap: 2px;
	padding: 8px 8px 10px;
}

.twg-bisc__chosen .twg-slot-name {
	font-size: 13px;
	line-height: 17px;
}

.twg-bisc__chosen .twg-slot-remove {
	font-size: 13px;
	line-height: 17px;
}

/* The chosen biscuits on the landing preview card: the collection's photo, or the six designs, beside the blend pile. */
body.twg-landing .twl-preview__biscuits {
	margin: 18px 0 0;
	padding: 16px 0 0;
	border-top: 1px solid var(--twl-line, #e3e3e3);
}

body.twg-landing .twl-preview__biscuits[hidden] {
	display: none;
}

body.twg-landing .twl-preview__bisc-img {
	width: 100%;
	aspect-ratio: 3 / 2;
	margin: 0 0 10px;
	background: #fff;
}

body.twg-landing .twl-preview__bisc-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

body.twg-landing .twl-preview__bisc-name {
	margin: 0 0 4px;
	font-family: var(--twl-font);
	font-size: 20px;
	font-weight: 300;
	line-height: 1.2;
	color: var(--twl-ink, #111);
}

body.twg-landing .twl-preview__bisc-desc {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--twl-muted, #666);
}

body.twg-landing .twl-preview__bisc-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

body.twg-landing .twl-preview__bisc-grid li {
	margin: 0;
	padding: 0;
	font-size: 12px;
	line-height: 1.3;
	text-align: center;
	color: var(--twl-muted, #666);
}

body.twg-landing .twl-preview__bisc-grid img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	margin: 0 0 4px;
	border: 1px solid var(--twl-line, #e3e3e3);
}

body.twg-landing .twl-preview__bisc-x {
	font-weight: 700;
	color: var(--twl-ink, #111);
}
