/* TTW Personalised, blankets - the size guide pop-up.
   1.1.0: Peter's design (each store's sizes drawn to scale with a baby, child or adult, cards, cm / in, "Choose").
   1.0.0's look (the Sizing Guide page's own content) is kept below for a store without size data. */

/* ---------- the pop-up ---------- */
.ttwp-sg {
	border: 0;
	padding: 0;
	margin: auto;
	background: transparent;
	width: min(680px, calc(100vw - 32px));
	max-width: none;
	max-height: none;
	overflow: visible;
	color: #5a5149;
}
.ttwp-sg.ttwp-sg--new { width: min(780px, calc(100vw - 32px)); }
.ttwp-sg::backdrop { background: rgba(43, 32, 24, .55); }

.ttwp-sg-box {
	box-sizing: border-box;
	background: #fff;
	border-radius: 18px;
	padding: 0 30px 24px;
	max-height: 86vh;
	max-height: 86dvh;
	overflow: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	text-align: left;
	outline: none;
}
/* 1.1.1: as tall as the window allows (24px clear above and below) - at 90% the
   guide was a pixel too tall for a 872px-high window, so the footer sat on the
   bottom cards */
.ttwp-sg--new .ttwp-sg-box {
	padding: 0;
	border-radius: 22px;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	box-shadow: 0 24px 64px rgba(20, 12, 6, .28);
}

html.ttwp-sg-open,
html.ttwp-sg-open body { overflow: hidden; }

.ttwp-sg .ttwp-sg-x {
	flex: 0 0 34px;
	box-sizing: border-box;
	width: 34px;
	height: 34px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f2ece2;
	color: #3b2a20;
	font: 400 15px/34px Arial, sans-serif;
	text-align: center;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
	cursor: pointer;
}
.ttwp-sg .ttwp-sg-x:hover { background: #e8dfd2; }
.ttwp-sg .ttwp-sg-x:focus-visible { outline: 2px solid #7035ec; outline-offset: 2px; }

/* ---------- 1.1.0: the designed guide (pop-up and [ttwp_size_guide]) ---------- */
.ttwp-sg-guide { color: #5a5149; font-family: inherit; }
.ttwp-sg--new .ttwp-sg-guide { padding: 0 32px; }

.ttwp-sg-guide .ttwp-sg-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 4px 0 0;
}
.ttwp-sg--new .ttwp-sg-guide .ttwp-sg-top {
	position: sticky;
	top: 0;
	z-index: 3;
	margin: 0 -32px;
	padding: 18px 32px 8px;
	background: #fff;
}
.ttwp-sg-guide .ttwp-sg-kicker {
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #a35f4b;
}
.ttwp-sg-guide .ttwp-sg-tools { display: flex; align-items: center; gap: 12px; }
.ttwp-sg-guide .ttwp-sg-units {
	display: inline-flex;
	gap: 2px;
	padding: 4px;
	border-radius: 999px;
	background: #f3eee7;
}
.ttwp-sg-guide .ttwp-sg-units button {
	box-sizing: border-box;
	height: 36px;
	min-width: 48px;
	min-height: 0;
	margin: 0;
	padding: 0 12px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #5a5149;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
	cursor: pointer;
}
.ttwp-sg-guide .ttwp-sg-units button[aria-pressed="true"] {
	background: #fff;
	color: #040728;
	box-shadow: 0 1px 3px rgba(20, 12, 6, .18);
}
.ttwp-sg--new .ttwp-sg-guide .ttwp-sg-x {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	font: inherit;
}
.ttwp-sg-guide .ttwp-sg-h {
	clear: none;
	margin: 6px 0 0;
	padding: 0;
	font-family: inherit;
	font-size: 30px;
	font-weight: 600;
	line-height: 1.15;
	color: #040728;
	text-transform: none;
	letter-spacing: 0;
}
.ttwp-sg-guide .ttwp-sg-intro {
	margin: 8px 0 0;
	padding: 0;
	font-size: 15px;
	line-height: 1.5;
	color: #5a5149;
}

/* the six drawings, all to one scale */
.ttwp-sg-guide .ttwp-sg-lineup {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 18px;
	padding: 16px 16px 12px;
	border-radius: 16px;
	background: #faf6f0;
}
.ttwp-sg-guide .ttwp-sg-row {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 12px;
	align-items: end;
}
.ttwp-sg-guide .ttwp-sg-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	min-width: 0;
	min-height: 0;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: inherit;
	font: inherit;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
	cursor: pointer;
}
.ttwp-sg-guide .ttwp-sg-art {
	--h: 128px;
	position: relative;
	display: block;
	height: var(--h);
	width: calc(var(--h) * var(--r, .7));
	max-width: 100%;
}
.ttwp-sg-guide .ttwp-sg-blanket {
	position: absolute;
	bottom: 0;
	border-radius: 2px;
	background: #f3e6de;
	box-shadow: inset 0 0 0 1px #dcc9bd;
	transition: background-color .15s, box-shadow .15s;
}
.ttwp-sg-guide .ttwp-sg-art img.ttwp-sg-fig {
	position: absolute;
	left: 0;
	bottom: 0;
	display: block;
	width: auto;
	min-width: 0;
	max-width: none;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}
.ttwp-sg-guide .ttwp-sg-name {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	color: #5a5149;
	text-align: center;
}
.ttwp-sg-guide .ttwp-sg-bar {
	display: block;
	width: 28px;
	height: 3px;
	border-radius: 2px;
	background: transparent;
}
.ttwp-sg-guide .ttwp-sg-item.is-sel .ttwp-sg-blanket { background: #ede5ff; box-shadow: inset 0 0 0 2px #7035ec; }
.ttwp-sg-guide .ttwp-sg-item.is-sel .ttwp-sg-name { color: #5b2dc9; font-weight: 700; }
.ttwp-sg-guide .ttwp-sg-item.is-sel .ttwp-sg-bar { background: #7035ec; }
.ttwp-sg-guide .ttwp-sg-item.is-na { opacity: .4; }
.ttwp-sg-guide .ttwp-sg-scale { font-size: 12px; line-height: 1.3; color: #6e645b; }

/* a card per size */
.ttwp-sg-guide .ttwp-sg-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-top: 14px;
	/* 1.7.1: room under the bottom row for a ring drawn outside a card (the keyboard's, 4px out): the
	   footer starts where the grid ends and is drawn over anything below it (Peter, 25 Oct: "the size
	   guide, bottom row border is still cut off"). The footer's top padding is 6px less: no taller. */
	padding-bottom: 6px;
}
.ttwp-sg-guide .ttwp-sg-card {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	min-width: 0;
	min-height: 0;
	width: auto;
	height: auto;
	margin: 0;
	padding: 12px 16px 14px;
	border: 0;
	border-radius: 14px;
	background: #fff;
	color: inherit;
	font: inherit;
	text-align: left;
	text-transform: none;
	letter-spacing: 0;
	white-space: normal;
	/* 1.1.1: the card's line is drawn inside the card, so the footer can't cover its bottom edge */
	box-shadow: inset 0 0 0 1px #e7ddd1;
	cursor: pointer;
	transition: box-shadow .15s;
}
.ttwp-sg-guide .ttwp-sg-card:hover { box-shadow: inset 0 0 0 1px #cdbfb0; }
.ttwp-sg-guide .ttwp-sg-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; }
.ttwp-sg-guide .ttwp-sg-card-name { font-size: 16px; font-weight: 600; line-height: 1.25; color: #040728; }
.ttwp-sg-guide .ttwp-sg-badge {
	display: none;
	padding: 2px 9px;
	border-radius: 999px;
	background: #f1ebfd;
	color: #5b2dc9;
	font-size: 12px;
	font-weight: 600;
	line-height: 16px; /* 1.1.1: no taller than the name, so "Your pick" doesn't make its row 2px taller */
	white-space: nowrap;
}
.ttwp-sg-guide .ttwp-sg-dims {
	font-size: 22px;
	font-weight: 600;
	line-height: 1.2;
	color: #040728;
	font-variant-numeric: tabular-nums;
}
.ttwp-sg-guide .ttwp-sg-chip {
	padding: 4px 10px;
	border-radius: 999px;
	background: #f6e9e3;
	color: #8a4b3a;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
}
.ttwp-sg-guide .ttwp-sg-line { font-size: 13.5px; line-height: 1.45; color: #5a5149; }
.ttwp-sg-guide .ttwp-sg-na { display: none; font-size: 12px; line-height: 1.3; color: #6e645b; }
.ttwp-sg-guide .ttwp-sg-card.is-sel,
.ttwp-sg-guide .ttwp-sg-card.is-sel:hover { box-shadow: inset 0 0 0 2px #7035ec; }
.ttwp-sg-guide .ttwp-sg-card.is-sel .ttwp-sg-badge { display: inline-block; }
.ttwp-sg-guide .ttwp-sg-card.is-na { opacity: .6; cursor: default; }
.ttwp-sg-guide .ttwp-sg-card.is-na .ttwp-sg-na { display: block; }

/* cm / in */
.ttwp-sg-guide[data-unit="cm"] .ttwp-u-in,
.ttwp-sg-guide[data-unit="in"] .ttwp-u-cm { display: none; }

.ttwp-sg-guide .ttwp-sg-foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	padding: 12px 0 8px; /* 1.7.1: was 18px on top (the cards' 6px below) */
}
.ttwp-sg--new .ttwp-sg-guide .ttwp-sg-foot {
	position: sticky;
	bottom: 0;
	z-index: 3;
	margin: 0 -32px;
	padding: 8px 32px 22px; /* 1.7.1: was 14px on top (the cards' 6px below) */
	background: #fff;
}
/* 1.1.1: when the window is too short for the whole guide, a line and a soft
   shadow on the footer (and on the top bar once scrolled) show the cards carry
   on underneath, instead of looking cut off. size-guide.js sets the classes. */
.ttwp-sg--new .ttwp-sg-guide .ttwp-sg-top,
.ttwp-sg--new .ttwp-sg-guide .ttwp-sg-foot { transition: box-shadow .15s; }
.ttwp-sg--new.ttwp-sg--scrolled .ttwp-sg-guide .ttwp-sg-top { box-shadow: 0 1px 0 #efe7db, 0 8px 14px -10px rgba(20, 12, 6, .3); }
.ttwp-sg--new.ttwp-sg--more .ttwp-sg-guide .ttwp-sg-foot { box-shadow: 0 -1px 0 #efe7db, 0 -8px 14px -10px rgba(20, 12, 6, .3); }
.ttwp-sg-guide .ttwp-sg-note { margin: 0; max-width: 400px; font-size: 12.5px; line-height: 1.45; color: #6e645b; }
.ttwp-sg-guide .ttwp-sg-cta {
	box-sizing: border-box;
	height: 48px;
	min-height: 0;
	margin: 0 0 0 auto;
	padding: 0 26px;
	border: 0;
	border-radius: 999px;
	background: #7035ec;
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
	white-space: nowrap;
	box-shadow: none;
	cursor: pointer;
}
.ttwp-sg-guide .ttwp-sg-cta:hover { background: #5b2dc9; }
.ttwp-sg-guide .ttwp-sg-cta[hidden] { display: none; }

.ttwp-sg-guide button:focus-visible { outline: 2px solid #7035ec; outline-offset: 2px; }
/* 1.7.1: in the pop-up, that ring only once the keyboard moves about the guide (Tab, arrows, Enter ...;
   size-guide.js: ttwp-sg--keys). Not after a click: the theme's Bootstrap rings every clicked button
   (button:focus, outline 5px auto). Not after Shift, Cmd or Ctrl alone either: Chrome rings the clicked
   card then - a screenshot shortcut drew a second ring round "Your pick" (Peter's 25 Oct screenshot). */
.ttwp-sg-guide button:focus:not(:focus-visible),
.ttwp-sg:not(.ttwp-sg--keys) .ttwp-sg-guide button:focus-visible { outline: none; }

/* on a page of its own ([ttwp_size_guide]) */
.ttwp-sg-page { margin: 0 auto; max-width: 860px; }

/* phones: a sheet from the bottom, a list of sizes */
@media (max-width: 600px) {
	.ttwp-sg.ttwp-sg--new {
		width: 100vw;
		max-width: 100vw;
		margin: auto 0 0;
	}
	.ttwp-sg--new .ttwp-sg-box {
		border-radius: 20px 20px 0 0;
		max-height: 92vh;
		max-height: 92dvh;
	}
	.ttwp-sg--new .ttwp-sg-guide { padding: 0 16px; }
	.ttwp-sg--new .ttwp-sg-guide .ttwp-sg-top { margin: 0 -16px; padding: 12px 16px 8px; }
	.ttwp-sg-guide .ttwp-sg-h { font-size: 24px; line-height: 1.2; }
	.ttwp-sg-guide .ttwp-sg-intro { font-size: 14px; }
	.ttwp-sg-guide .ttwp-sg-lineup { margin-top: 14px; padding: 14px 10px 10px; gap: 8px; }
	.ttwp-sg-guide .ttwp-sg-row { gap: 4px; }
	.ttwp-sg-guide .ttwp-sg-art { --h: 72px; }
	.ttwp-sg-guide .ttwp-sg-name { display: none; }
	.ttwp-sg-guide .ttwp-sg-bar { width: 20px; }
	.ttwp-sg-guide .ttwp-sg-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 14px; }
	.ttwp-sg-guide .ttwp-sg-card {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		column-gap: 10px;
		row-gap: 6px;
		align-items: center;
		padding: 12px 14px 14px;
	}
	.ttwp-sg-guide .ttwp-sg-card-top { grid-column: 1; grid-row: 1; justify-content: flex-start; flex-wrap: wrap; }
	.ttwp-sg-guide .ttwp-sg-dims { grid-column: 2; grid-row: 1; font-size: 16px; white-space: nowrap; }
	.ttwp-sg-guide .ttwp-sg-chip,
	.ttwp-sg-guide .ttwp-sg-line,
	.ttwp-sg-guide .ttwp-sg-na { grid-column: 1 / -1; justify-self: start; }
	.ttwp-sg-guide .ttwp-sg-foot { flex-direction: column; align-items: stretch; gap: 10px; }
	.ttwp-sg--new .ttwp-sg-guide .ttwp-sg-foot { margin: 0 -16px; padding: 8px 16px 20px; } /* 1.7.1: was 14px on top */
	.ttwp-sg-guide .ttwp-sg-cta { height: 50px; margin: 0; font-size: 16px; }
}

/* ---------- 1.0.0's guide: the Sizing Guide page's own blocks ---------- */
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-head {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 10px;
	padding: 30px 0 10px;
	background: #fff;
}
.ttwp-sg .ttwp-sg-title {
	clear: none;
	margin: 0;
	padding: 0;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.3;
	color: #3b2a20;
	text-transform: none;
	letter-spacing: 0;
}
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 18px;
	row-gap: 4px;
	font-size: 14.5px;
	line-height: 1.55;
	color: #5a5149;
}
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body > * { grid-column: 1 / -1; }
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body > .wp-block-columns { display: contents; }
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body .wp-block-column { grid-column: auto; min-width: 0; margin: 0 0 14px; }
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body .wp-block-columns,
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body .has-text-color,
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body .has-background { color: inherit !important; background: none !important; }
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body h2,
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body h3,
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body h4 {
	margin: 4px 0 8px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
	color: #3b2a20;
	text-transform: none;
	letter-spacing: 0;
}
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body p { margin: 0 0 10px; color: #7a6f66; }
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body p strong,
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body p b { color: #3b2a20; }
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body .wp-block-column p { margin: 0 0 3px; font-size: 13.5px; line-height: 1.45; }
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body .wp-block-column h2,
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body .wp-block-column h3,
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body .wp-block-column h4 { margin: 8px 0 2px !important; font-size: 16px !important; line-height: 1.3 !important; }
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body figure { margin: 0 0 8px; }
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body .wp-block-gallery { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; }
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body .wp-block-gallery > .wp-block-image,
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body .wp-block-gallery > figure { flex: 1 1 100%; width: 100%; margin: 0; }
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body img { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 10px; }
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body .alignfull,
.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body .alignwide {
	width: auto !important;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}
@media (max-width: 600px) {
	.ttwp-sg:not(.ttwp-sg--new) { width: calc(100vw - 24px); }
	.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-box { padding: 0 16px 16px; border-radius: 14px; max-height: 88vh; max-height: 88dvh; }
	.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-head { padding: 18px 0 8px; }
	.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body .wp-block-column h2,
	.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body .wp-block-column h3,
	.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body .wp-block-column h4 { font-size: 15px !important; }
	.ttwp-sg .ttwp-sg-title { font-size: 20px; }
	.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
	.ttwp-sg:not(.ttwp-sg--new) .ttwp-sg-body .wp-block-column p { font-size: 13px; }
}
