/* ============================================================
   Print guide: the home page's chat-style product finder
   (inc/print-guide.php, assets/js/print-guide.js). Laid out like a
   chat assistant: plain answers, your own questions in a white
   pill, and one rounded box to type in, on a band of its own.
   ============================================================ */

.soluturn-guide {
	--guide-band: var(--pallete-purple-100, #ebe8f5);
	--guide-glow: var(--pallete-purple-200, #ddd6f3);
	--guide-soft: var(--pallete-purple-50, #f5f4f9);
	--guide-line: rgba(40, 39, 55, 0.12);
	/* A full-width band without widening the page: the shadow paints the
	   sides, the clip keeps it to the section's height. */
	background: radial-gradient(ellipse 70% 60% at 50% 0%, var(--guide-glow), transparent 75%), var(--guide-band);
	box-shadow: 0 0 0 100vmax var(--guide-band);
	clip-path: inset(0 -100vmax);
	color: var(--fg-default, #282737);
	display: grid;
	gap: 24px;
	margin-inline: auto;
	max-width: 760px;
	padding: clamp(56px, 8vw, 104px) 24px;
}

.soluturn-guide,
.soluturn-guide * {
	box-sizing: border-box;
}

/* Heading: a page-weight Display M, under a small purple kicker. */
.soluturn-guide__intro {
	display: grid;
	gap: 12px;
	justify-items: center;
	margin-bottom: 8px;
	text-align: center;
}

.soluturn-guide__kicker {
	align-items: center;
	color: var(--fg-primary, #6f39c6);
	display: inline-flex;
	font-family: "Bricolage Grotesque", Arial, sans-serif;
	font-size: 12px;
	font-weight: 700;
	gap: 6px;
	letter-spacing: 0.12em;
	line-height: 16px;
	margin: 0;
	text-transform: uppercase;
}

.soluturn-guide__kicker svg {
	flex: none;
}

.soluturn-guide .soluturn-guide__title {
	font-family: "Bricolage Grotesque", Arial, sans-serif;
	font-size: var(--type-display-medium-size, 48px);
	font-stretch: var(--type-display-medium-width, 80%);
	font-weight: 800;
	letter-spacing: var(--type-display-medium-tracking, -0.03em);
	line-height: var(--type-display-medium-line-height, 46px);
	margin: 0;
	text-wrap: balance;
}

/* The conversation. Empty, and out of the way, until the first question. */
.soluturn-guide__log {
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-height: min(560px, 64vh);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 4px 2px;
	scrollbar-width: thin;
}

.soluturn-guide__log:empty {
	display: none;
}

.soluturn-guide__msg {
	animation: soluturn-guide-in 0.2s ease-out both;
	font-size: var(--type-body-medium-size);
	line-height: 1.6;
}

.soluturn-guide__msg p {
	margin: 0;
}

.soluturn-guide__msg p + p,
.soluturn-guide__shelf + p,
.soluturn-guide__sizes + p,
.soluturn-guide__buy + p {
	margin-top: 12px;
}

.soluturn-guide__msg strong {
	font-weight: 600;
}

.soluturn-guide__msg p a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.soluturn-guide__msg--user {
	align-self: flex-end;
	background: var(--bg-default, #fff);
	box-shadow: 0 1px 2px rgba(40, 39, 55, 0.06);
	border-radius: 20px;
	max-width: 80%;
	padding: 10px 18px;
}

@keyframes soluturn-guide-in {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: none; }
}

/* Thinking: one pulsing dot. */
.soluturn-guide__thinking {
	animation: soluturn-guide-think 1.1s ease-in-out infinite;
	background: var(--fg-default, #282737);
	border-radius: 50%;
	display: block;
	height: 12px;
	margin: 6px 0;
	width: 12px;
}

@keyframes soluturn-guide-think {
	0%, 100% { transform: scale(0.7); opacity: 0.6; }
	50% { transform: scale(1); opacity: 1; }
}

/* Product cards inside an answer: a row that scrolls sideways, picture
   first, words underneath. */
.soluturn-guide__shelf {
	margin-top: 16px;
	position: relative;
}

.soluturn-guide__cards {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	padding-bottom: 6px;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.soluturn-guide__cards::-webkit-scrollbar {
	display: none;
}

.soluturn-guide__card {
	flex: 0 0 148px;
	scroll-snap-align: start;
}

/* Arrows, for mouse users only, when there's more to see that way. */
.soluturn-guide__nudge {
	align-items: center;
	background: var(--bg-default, #fff);
	border: 1px solid var(--guide-line);
	border-radius: 50%;
	box-shadow: 0 2px 10px rgba(40, 39, 55, 0.14);
	color: var(--fg-default, #282737);
	cursor: pointer;
	display: none;
	height: 36px;
	justify-content: center;
	padding: 0;
	position: absolute;
	top: 80px;
	width: 36px;
	z-index: 1;
}

.soluturn-guide__nudge--back { left: 6px; }
.soluturn-guide__nudge--next { right: 6px; }

@media (hover: hover) and (pointer: fine) {
	.soluturn-guide__shelf.can-back .soluturn-guide__nudge--back,
	.soluturn-guide__shelf.can-next .soluturn-guide__nudge--next {
		display: inline-flex;
	}
}

.soluturn-guide__nudge:hover {
	background: var(--guide-soft);
}

.soluturn-guide__card {
	animation: soluturn-guide-in 0.3s ease-out both;
	animation-delay: calc(var(--i, 0) * 70ms);
	border-radius: 12px;
	color: inherit;
	display: grid;
	gap: 8px;
	grid-template-rows: auto 1fr;
	text-decoration: none;
}

.soluturn-guide__card:focus-visible {
	outline: 2px solid var(--border-focus-primary, #6f39c6);
	outline-offset: 4px;
}

.soluturn-guide__card-img {
	aspect-ratio: 3 / 4;
	background: var(--guide-soft);
	border-radius: 12px;
	display: block;
	height: auto;
	object-fit: cover;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	width: 100%;
}

.soluturn-guide__card:hover .soluturn-guide__card-img {
	box-shadow: 0 6px 18px rgba(40, 39, 55, 0.14);
	transform: translateY(-2px);
}

.soluturn-guide__card-body {
	display: grid;
	gap: 2px;
}

.soluturn-guide__card-name {
	font-size: var(--type-body-small-size);
	font-weight: 600;
	line-height: 1.3;
}

.soluturn-guide__card:hover .soluturn-guide__card-name {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.soluturn-guide__card-why,
.soluturn-guide__card-price {
	color: var(--fg-default-subtle, #5c5a68);
	font-size: var(--type-micro-large-size);
	line-height: 1.3;
}

/* The question box: one rounded field with a round send button inside it.
   The ID beats the site-wide input rules in standards.css. */
.soluturn-guide__form {
	align-items: center;
	background: var(--bg-default, #fff);
	border: 1px solid var(--guide-line);
	border-radius: 32px;
	box-shadow: 0 1px 2px rgba(40, 39, 55, 0.06), 0 12px 32px -8px rgba(65, 45, 106, 0.18);
	display: flex;
	gap: 8px;
	padding: 10px 10px 10px 26px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.soluturn-guide__form:focus-within {
	border-color: var(--pallete-purple-300, #cbbff3);
	box-shadow: 0 1px 2px rgba(40, 39, 55, 0.06), 0 14px 36px -8px rgba(65, 45, 106, 0.26);
}

#soluturn-guide-input {
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	flex: 1;
	font-family: inherit !important;
	font-size: 17px !important;
	height: 44px !important;
	line-height: 24px !important;
	min-height: 0;
	min-width: 0;
	outline: none !important;
	padding: 8px 0 !important;
}

.soluturn-guide__send {
	align-items: center;
	background: var(--fg-default, #282737);
	border: 0;
	border-radius: 50%;
	color: var(--bg-default, #fff);
	cursor: pointer;
	display: inline-flex;
	flex: none;
	height: 44px;
	justify-content: center;
	padding: 0;
	transition: background-color 0.15s ease, opacity 0.15s ease;
	width: 44px;
}

.soluturn-guide__send:hover {
	background: #000;
}

.soluturn-guide__send:focus-visible {
	outline: 2px solid var(--border-focus-primary, #6f39c6);
	outline-offset: 2px;
}

/* Greyed out while the box is empty, like a chat app. */
.soluturn-guide__form:has(#soluturn-guide-input:placeholder-shown) .soluturn-guide__send {
	opacity: 0.25;
}

/* Sizes and prices: a small table, every price a button. */
.soluturn-guide__sizes {
	background: var(--bg-default, #fff);
	border: 1px solid var(--guide-line);
	border-radius: 14px;
	margin-top: 14px;
	max-width: 440px;
	overflow: hidden;
}

.soluturn-guide__sizes table {
	border-collapse: collapse;
	font-size: var(--type-body-small-size);
	line-height: 1.3;
	margin: 0;
	width: 100%;
}

.soluturn-guide__sizes th,
.soluturn-guide__sizes td {
	border: 0;
	border-top: 1px solid var(--guide-line);
	padding: 6px 12px;
	text-align: left;
}

.soluturn-guide__sizes thead th {
	background: var(--guide-soft);
	border-top: 0;
	color: var(--fg-default-subtle, #5c5a68);
	font-size: var(--type-micro-large-size);
	font-weight: 600;
	letter-spacing: 0.04em;
	padding-block: 9px;
	text-transform: uppercase;
}

.soluturn-guide__sizes tbody th {
	font-weight: 600;
	white-space: nowrap;
}

.soluturn-guide__sizes .is-none {
	color: var(--fg-default-muted, #8a8794);
}

.soluturn-guide__price {
	background: transparent;
	border: 1px solid var(--guide-line);
	border-radius: 999px;
	color: var(--fg-default, #282737);
	cursor: pointer;
	font: inherit;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	min-height: 32px;
	min-width: 64px;
	padding: 4px 12px;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.soluturn-guide__price:hover {
	background: var(--bg-primary-emphasis, #6f39c6);
	border-color: transparent;
	color: var(--fg-primary-onEmphasis, #fff);
}

.soluturn-guide__price:focus-visible {
	outline: 2px solid var(--border-focus-primary, #6f39c6);
	outline-offset: 2px;
}

/* Add to cart, then checkout. */
.soluturn-guide__buy {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px;
	margin-top: 14px;
}

.soluturn-guide__add {
	background: var(--bg-primary-emphasis, #6f39c6);
	border: 0;
	border-radius: 999px;
	color: var(--bg-default, #fff);
	cursor: pointer;
	font: inherit;
	font-size: var(--type-body-small-size);
	font-weight: 600;
	min-height: 44px;
	padding: 0 22px;
	transition: background-color 0.15s ease;
}

.soluturn-guide__add:hover:not(:disabled) {
	background: var(--bg-states-primary-emphasis-hover, #573596);
}

.soluturn-guide__add:focus-visible,
.soluturn-guide__go:focus-visible {
	outline: 2px solid var(--border-focus-primary, #6f39c6);
	outline-offset: 2px;
}

.soluturn-guide__add:disabled {
	cursor: default;
	opacity: 0.7;
}

.soluturn-guide__add.is-added {
	background: var(--fg-success, #1f8a4c);
	opacity: 1;
}

.soluturn-guide .soluturn-guide__view {
	color: var(--fg-default-subtle, #5c5a68);
	font-size: var(--type-body-small-size);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.soluturn-guide__next {
	display: flex;
	flex-basis: 100%;
	gap: 10px;
}

.soluturn-guide .soluturn-guide__go {
	align-items: center;
	border: 1px solid var(--guide-line);
	border-radius: 999px;
	color: var(--fg-default, #282737);
	display: inline-flex;
	font-size: var(--type-body-small-size);
	font-weight: 600;
	min-height: 40px;
	padding: 0 18px;
	text-decoration: none;
}

.soluturn-guide .soluturn-guide__go--main {
	background: var(--bg-primary-emphasis, #6f39c6);
	border-color: transparent;
	color: var(--fg-primary-onEmphasis, #fff);
}

.soluturn-guide .soluturn-guide__go {
	background-color: var(--bg-default, #fff);
}

.soluturn-guide .soluturn-guide__go--main:hover {
	background: var(--bg-states-primary-emphasis-hover, #573596);
}

@media (max-width: 600px) {
	.soluturn-guide {
		gap: 20px;
		padding: 56px 16px;
	}

	.soluturn-guide__form {
		padding-left: 20px;
	}

	.soluturn-guide__msg--user {
		max-width: 90%;
	}

	/* On phones the row runs to the screen's edges. */
	.soluturn-guide__cards {
		margin-inline: -16px;
		padding: 0 16px 6px;
		scroll-padding-inline: 16px;
	}

	.soluturn-guide__card {
		flex-basis: 132px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.soluturn-guide__msg,
	.soluturn-guide__card,
	.soluturn-guide__thinking {
		animation: none;
	}

	.soluturn-guide__card-img {
		transition: none;
	}
}
