/*
 * Twist Gifting: blend panels (0.9.0) on A5 Tasting Menus and the Selection Boxes.
 * The carousel and card base come from twist-landing-kit.css (.twg-carousel, .twg-card); this file adds the panel
 * layout (0.14.0: three across, each card as the Pick & Mix blend card with the photo first and the text centred;
 * count badge, plain tile for blends not on the site), the "More info" pop-up and the phone link. Blue #4dbbe6
 * accents, black-fill buttons, Helvetica Neue, square corners throughout (Twist rule).
 */

.twg-bp,
.twg-bp-popup,
.twg-bp-jump {
	--twg-ink: #111610;
	--twg-text: #3a3a3a;
	--twg-muted: #535d60;
	--twg-blue: #4dbbe6;
	--twg-blue-dark: #2ea6d6;
	--twg-pale: #eff8fc;
	--twg-tint: #cdeaf7;
	--twg-line: #dce4e6;
	--twg-focus: #2483a6;
	--twg-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.twg-bp[hidden],
.twg-bp [hidden],
.twg-bp-jump[hidden],
.twg-bp-popup[hidden],
.twg-bp-popup [hidden],
.twg-bp-hidden {
	display: none !important;
}

.twg-bp *,
.twg-bp-popup * {
	border-radius: 0 !important;
}

/* ---------- Panels, in the photo column ---------- */

.twg-bp {
	margin: 0 0 24px;
	font-family: var(--twg-font);
	color: var(--twg-ink);
	/* The page must not scroll to keep the panels or the photos in place when they swap. */
	overflow-anchor: none;
}

html body.twg-panels .product-layout-image {
	overflow-anchor: none;
}

.twg-bp .twg-bp__preview {
	margin: 0 0 16px !important;
	padding: 10px 14px;
	border-left: 3px solid var(--twg-blue);
	background: var(--twg-pale);
	font-size: 14px;
	line-height: 1.5;
	color: var(--twg-text);
}

.twg-bp .twg-bp__title {
	margin: 0 0 20px !important;
	padding: 0 !important;
	font-family: var(--twg-font) !important;
	font-size: 24px !important;
	font-weight: 300 !important;
	line-height: 1.25 !important;
	letter-spacing: -0.01em !important;
	text-transform: none !important;
	color: var(--twg-ink) !important;
}

.twg-bp .twg-bp__title::before {
	content: "";
	display: block;
	width: 40px;
	height: 3px;
	margin-bottom: 12px;
	background: var(--twg-blue);
}

.twg-bp .twg-bp__title:focus {
	outline: none !important;
}

.twg-bp .twg-bp__title:focus-visible,
.twg-bp .twg-carousel__track:focus-visible {
	outline: 3px solid var(--twg-focus) !important;
	outline-offset: 4px !important;
}

/* Three panels across the photo column on desktop (0.14.0, Twist 1 Oct 2026: two across were too big). The arrows
   move a screenful, so three at a time. */
.twg-carousel.twg-carousel--panels {
	--twg-per: 3;
	--twg-gap: 12px;
}

.twg-bp .twg-carousel__nav {
	margin-top: 18px;
}

/* The card in the Pick & Mix style (0.14.0): a square photo, then the name, the caffeine line and the description,
   centred, inside a light line. */
.twg-bp .twg-bp__card {
	border-color: var(--twg-line);
	text-align: center;
}

.twg-bp .twg-bp__img {
	position: relative;
	aspect-ratio: 1 / 1;
	background: #fff;
}

/* Pile and loose-leaf photos fill the square; a product photo is shown whole. */
.twg-bp .twg-bp__img--pile img,
.twg-bp .twg-bp__img--leaf img {
	object-fit: cover;
}

.twg-bp .twg-bp__top {
	padding: 12px 10px 0;
}

/* Names take two lines so the rows stay level across the carousel. */
.twg-bp .twg-carousel .twg-bp__name {
	min-height: 2.5em;
	font-size: 17px !important;
	font-weight: 300 !important;
	line-height: 1.25 !important;
	letter-spacing: 0 !important;
}

.twg-bp .twg-bp__caf {
	margin: 6px 0 0 !important;
	padding: 0 !important;
	font-family: var(--twg-font) !important;
	font-size: 11px !important;
	line-height: 1.4 !important;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--twg-muted) !important;
}

/* How many of the blend the box holds, on the corner of its photo. */
.twg-bp .twg-bp__count {
	position: absolute;
	top: 8px;
	right: 8px;
	min-width: 34px;
	padding: 3px 8px;
	background: var(--twg-blue);
	color: #111;
	font-family: var(--twg-font);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.02em;
	text-align: center;
}

/* Blend not on the site yet: a plain pale tile with a short blue rule, no text. */
.twg-bp .twg-bp__img--none {
	position: relative;
	background: var(--twg-pale);
	box-shadow: inset 0 0 0 1px var(--twg-tint);
}

/* It has no text or button under it: the tile fills the card, level with the full cards beside it. */
.twg-bp .twg-bp__card--plain .twg-bp__img--none {
	flex: 1 1 auto;
}

.twg-bp .twg-bp__img--none::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 48px;
	height: 2px;
	margin: -1px 0 0 -24px;
	background: var(--twg-blue);
}

.twg-bp .twg-bp__body {
	padding: 8px 10px 10px;
}

.twg-carousel .twg-bp__desc {
	display: -webkit-box;
	margin: 0 !important;
	overflow: hidden;
	font-size: 13px !important;
	line-height: 1.5 !important;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
}

/* "More info": the kit's black-fill card button, as a real button (smaller since 0.14.0, for the narrower card). */
.twg-carousel .twg-card__button.twg-bp__more {
	width: 100%;
	height: auto;
	min-height: 40px;
	margin: 0 !important;
	padding: 9px 12px;
	gap: 10px;
	box-shadow: none !important;
	font-family: var(--twg-font) !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	letter-spacing: 0 !important;
	text-align: left;
	text-transform: none !important;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.twg-carousel .twg-card__button.twg-bp__more::after {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}

/* ---------- Phones and tablets: photo column above the options ---------- */

.twg-bp-jump {
	display: none;
}

@media (max-width: 992px) {
	.twg-bp {
		margin-bottom: 20px;
	}

	/* Link under the options to the panels above, followed only when tapped. */
	.twg-bp-jump:not([hidden]) {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		margin: 2px 0 16px;
		font-family: var(--twg-font) !important;
		font-size: 15px;
		font-weight: 500;
		line-height: 1.4;
		color: var(--twg-ink) !important;
		text-decoration: underline !important;
		text-underline-offset: 4px;
	}

	.twg-bp-jump::before {
		content: "";
		flex: none;
		width: 18px;
		height: 18px;
		background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111610' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20V5M6 11l6-6 6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	}
}

.twg-bp-jump:focus-visible {
	outline: 3px solid var(--twg-focus) !important;
	outline-offset: 3px !important;
}

@media (min-width: 768px) and (max-width: 992px) {
	.twg-carousel.twg-carousel--panels {
		--twg-per: 3;
	}
}

@media (max-width: 767px) {
	/* One panel and the edge of the next: swipe for more. */
	.twg-carousel.twg-carousel--panels {
		--twg-gap: 12px;
	}

	/* 72% since 0.14.0 (was 82%): a smaller card, and more of the next one to show there is more to swipe to. */
	.twg-carousel--panels .twg-carousel__track {
		grid-auto-columns: 72%;
	}

	.twg-bp .twg-bp__title {
		font-size: 21px !important;
	}
}

/* ---------- More info pop-up ---------- */

.twg-bp-popup {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(17, 17, 17, 0.4);
	font-family: var(--twg-font);
}

.twg-bp-popup__card {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: calc(100vh - 32px);
	overflow: auto;
	padding: 28px 24px 24px;
	border: 1px solid #d5dadd;
	background: #fff;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
	text-align: center;
	overscroll-behavior: contain;
}

.twg-bp-popup .twg-bp-popup__close {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
	font-family: var(--twg-font) !important;
	font-size: 28px !important;
	font-weight: 300 !important;
	line-height: 40px !important;
	color: var(--twg-ink) !important;
	cursor: pointer;
}

.twg-bp-popup .twg-bp-popup__close:hover {
	color: var(--twg-blue-dark) !important;
}

.twg-bp-popup__img {
	width: 180px;
	height: 180px;
	margin: 8px auto 18px;
	overflow: hidden;
	border: 1px solid #e9ecee;
	background: #fff;
}

.twg-bp-popup__img img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: contain;
}

.twg-bp-popup__img--leaf img {
	object-fit: cover;
}

.twg-bp-popup .twg-bp-popup__name {
	margin: 0 0 6px !important;
	padding: 0 !important;
	font-family: var(--twg-font) !important;
	font-size: 24px !important;
	font-weight: 300 !important;
	line-height: 1.2 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	color: var(--twg-ink) !important;
}

.twg-bp-popup .twg-bp-popup__caf {
	margin: 0 0 10px !important;
	font-size: 13px;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #666;
}

/* The longer text reads from the left; photo, name and caffeine stay centred. */
.twg-bp-popup .twg-bp-popup__desc {
	margin: 0 0 16px !important;
	font-size: 14px;
	line-height: 1.55;
	color: var(--twg-text);
	text-align: left;
}

.twg-bp-popup .twg-bp-popup__desc p {
	margin: 0 0 10px !important;
	padding: 0 !important;
	font-family: var(--twg-font) !important;
	font-size: 14px !important;
	line-height: 1.55 !important;
	color: var(--twg-text) !important;
}

.twg-bp-popup .twg-bp-popup__desc p:last-child {
	margin-bottom: 0 !important;
}

.twg-bp-popup__ingr {
	margin: 0;
	padding: 12px 0;
	border-top: 1px solid #e9ecee;
	text-align: left;
}

.twg-bp-popup .twg-bp-popup__label {
	margin: 0 0 6px !important;
	padding: 0 !important;
	font-family: var(--twg-font) !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	letter-spacing: 0.12em !important;
	text-transform: uppercase !important;
	color: var(--twg-ink) !important;
}

.twg-bp-popup .twg-bp-popup__ingr-text {
	margin: 0 !important;
	font-size: 14px;
	line-height: 1.55;
	color: var(--twg-text);
}

.twg-bp-popup .twg-bp-popup__link {
	display: flex;
	margin-top: 8px;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 12px 16px;
	border: 1px solid #111;
	background: #111;
	font-family: var(--twg-font) !important;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.3;
	color: #fff !important;
	text-decoration: none !important;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.twg-bp-popup .twg-bp-popup__link:hover {
	border-color: #333;
	background: #333;
}

.twg-bp-popup a:focus-visible,
.twg-bp-popup button:focus-visible {
	/* !important: the theme removes outlines from every link. */
	outline: 3px solid var(--twg-focus) !important;
	outline-offset: 3px !important;
}

body.twg-bp-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.twg-bp *,
	.twg-bp-popup * {
		transition: none !important;
		animation: none !important;
	}

	.twg-bp .twg-carousel__track {
		scroll-behavior: auto !important;
	}

	.twg-bp .twg-card:hover .twg-card__image img {
		transform: none;
	}
}
