/* Funnel Display (SIL Open Font License 1.1, see fonts/OFL.txt), bundled
 * so no visitor or administrator is sent to Google Fonts. */
@font-face {
	font-family: "Funnel Display";
	font-style: normal;
	font-weight: 500 700;
	font-display: swap;
	src: url("fonts/funnel-display-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Funnel Display";
	font-style: normal;
	font-weight: 500 700;
	font-display: swap;
	src: url("fonts/funnel-display-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* qStom Concierge — colours come from the Chat window tab (inline :root variables) */

:root {
	--qc-primary: #9b3a48;
	--qc-header: #120e15;
	--qc-button-bg: #9b3a48;
	--qc-button-fg: #ffffff;
	--qc-search-bg: #f7f4f5;
	--qc-search-button: #9b3a48;
	--qc-offset: 20px;
}

.qstom-concierge {
	--qc-gradient: linear-gradient(90deg, #c7a0d6, #db6f95 45%, #f0a083);
	--qc-ink: #241c22;
	--qc-muted: #6f6469;
	--qc-soft: #f7f4f5;
	--qc-surface: #ffffff;
	--qc-line: #ece5e7;
	position: fixed;
	right: var(--qc-offset);
	bottom: var(--qc-offset);
	z-index: 99990;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--qc-ink);
}

.qstom-concierge.is-bottom-left {
	right: auto;
	left: var(--qc-offset);
	align-items: flex-start;
}

.qstom-concierge.is-theme-dark {
	--qc-ink: #f1ecee;
	--qc-muted: #b5a9ae;
	--qc-soft: #2a2430;
	--qc-surface: #1c1820;
	--qc-line: #3a3340;
}

@media (prefers-color-scheme: dark) {
	.qstom-concierge.is-theme-auto {
		--qc-ink: #f1ecee;
		--qc-muted: #b5a9ae;
		--qc-soft: #2a2430;
		--qc-surface: #1c1820;
		--qc-line: #3a3340;
	}
}

.qstom-concierge *,
.qstom-concierge *::before,
.qstom-concierge *::after {
	box-sizing: border-box;
}

.qstom-concierge-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.qstom-concierge-svg {
	display: block;
	width: 22px;
	height: 22px;
}

/* Launcher */

.qstom-concierge-launcher {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 52px;
	padding: 0 20px;
	border: 0;
	border-radius: 999px;
	background: var(--qc-button-bg);
	color: var(--qc-button-fg);
	font: inherit;
	font-weight: 600;
	box-shadow: 0 10px 28px rgb(18 14 21 / 0.28);
	cursor: pointer;
	transition: transform 0.15s, filter 0.15s;
}

.qstom-concierge-launcher:hover {
	filter: brightness(0.92);
	transform: translateY(-1px);
}

.qstom-concierge-launcher.is-circle,
.qstom-concierge-launcher.is-square {
	width: 58px;
	height: 58px;
	padding: 0;
}

.qstom-concierge-launcher.is-square {
	border-radius: 16px;
}

.qstom-concierge-launcher img {
	display: block;
	width: 26px;
	height: 26px;
	object-fit: contain;
}

.qstom-concierge.has-no-launcher .qstom-concierge-launcher,
.qstom-concierge.has-no-launcher .qstom-concierge-teaser {
	display: none;
}

.qstom-concierge-launcher:focus-visible,
.qstom-concierge button:focus-visible,
.qstom-concierge textarea:focus-visible {
	outline: 3px solid var(--qc-primary);
	outline-offset: 2px;
}

/* Teaser */

.qstom-concierge-teaser {
	display: flex;
	align-items: flex-start;
	gap: 4px;
	max-width: 260px;
	margin-bottom: 12px;
	padding: 10px 8px 10px 14px;
	border-radius: 16px;
	background: var(--qc-surface);
	color: var(--qc-ink);
	box-shadow: 0 10px 28px rgb(18 14 21 / 0.18);
	animation: qstom-concierge-in 0.2s ease-out;
}

.qstom-concierge-teaser[hidden] {
	display: none;
}

.qstom-concierge-teaser-text {
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.qstom-concierge-teaser-close {
	flex: none;
	border: 0;
	background: none;
	color: var(--qc-muted);
	cursor: pointer;
	padding: 2px;
}

.qstom-concierge-teaser-close .qstom-concierge-svg {
	width: 14px;
	height: 14px;
}

/* Panel */

.qstom-concierge-panel {
	display: flex;
	flex-direction: column;
	width: min(390px, calc(100vw - 24px));
	height: min(580px, calc(100vh - 110px));
	margin-bottom: 12px;
	background: var(--qc-surface);
	border-radius: 20px;
	box-shadow: 0 16px 48px rgb(18 14 21 / 0.28);
	overflow: hidden;
}

.qstom-concierge-panel[hidden] {
	display: none;
}

.qstom-concierge-head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 12px 16px 14px;
	background:
		radial-gradient(260px 140px at 100% 0%, rgb(120 40 95 / 0.45), transparent 70%),
		var(--qc-header);
	color: #fff;
}

.qstom-concierge-head::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: var(--qc-gradient);
}

.qstom-concierge-avatar {
	display: grid;
	place-items: center;
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--qc-primary);
	color: #fff;
}

.qstom-concierge-avatar .qstom-concierge-svg {
	width: 21px;
	height: 21px;
}

.qstom-concierge-head > div {
	flex: 1;
	min-width: 0;
}

.qstom-concierge-head strong {
	font-family: "Funnel Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.qstom-concierge-head > div strong,
.qstom-concierge-head > div span {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.qstom-concierge-head > div span {
	font-size: 12px;
	opacity: 0.8;
}

.qstom-concierge-icon {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: rgb(255 255 255 / 0.12);
	color: #fff;
	cursor: pointer;
}

.qstom-concierge-icon .qstom-concierge-svg {
	width: 16px;
	height: 16px;
}

.qstom-concierge-log {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
	overflow-y: auto;
}

.qstom-concierge-bubble {
	max-width: 85%;
	padding: 9px 13px;
	border-radius: 16px;
	background: var(--qc-soft);
	border: 1px solid var(--qc-line);
	align-self: flex-start;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.qstom-concierge-bubble.is-user {
	align-self: flex-end;
	background: var(--qc-primary);
	border-color: var(--qc-primary);
	color: #fff;
}

.qstom-concierge-bubble a {
	color: inherit;
	text-decoration: underline;
}

.qstom-concierge-cart {
	display: inline-block;
	margin-top: 6px;
	font-weight: 600;
}

.qstom-concierge-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.qstom-concierge-chips button {
	padding: 6px 12px;
	border: 1px solid var(--qc-primary);
	border-radius: 999px;
	background: transparent;
	color: var(--qc-primary);
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}

.qstom-concierge.is-theme-dark .qstom-concierge-chips button {
	color: #fff;
}

.qstom-concierge-chips button:hover {
	background: var(--qc-primary);
	color: #fff;
}

.qstom-concierge-dots {
	display: inline-flex;
	gap: 4px;
	padding: 4px 0;
}

.qstom-concierge-dots i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--qc-muted);
	animation: qstom-concierge-dot 1.2s infinite ease-in-out;
}

.qstom-concierge-dots i:nth-child(2) {
	animation-delay: 0.15s;
}

.qstom-concierge-dots i:nth-child(3) {
	animation-delay: 0.3s;
}

.qstom-concierge-form {
	display: flex;
	gap: 8px;
	padding: 10px 12px;
	border-top: 1px solid var(--qc-line);
}

.qstom-concierge-form textarea {
	flex: 1;
	min-height: 42px;
	max-height: 120px;
	padding: 10px 14px;
	border: 1px solid var(--qc-line);
	border-radius: 14px;
	background: var(--qc-surface);
	color: var(--qc-ink);
	font: inherit;
	resize: none;
}

.qstom-concierge-form textarea:focus {
	border-color: var(--qc-primary);
	outline: 0;
}

.qstom-concierge-send {
	display: grid;
	place-items: center;
	width: 44px;
	border: 0;
	border-radius: 14px;
	background: var(--qc-primary);
	color: #fff;
	cursor: pointer;
}

.qstom-concierge-send:disabled {
	opacity: 0.5;
	cursor: progress;
}

.qstom-concierge-privacy {
	margin: 0;
	padding: 0 14px 10px;
	font-size: 11px;
	color: var(--qc-muted);
}

@media (max-width: 480px) {
	.qstom-concierge {
		right: 12px;
		bottom: 12px;
	}

	.qstom-concierge.is-bottom-left {
		left: 12px;
	}

	.qstom-concierge.is-hidden-on-mobile .qstom-concierge-launcher,
	.qstom-concierge.is-hidden-on-mobile .qstom-concierge-teaser,
	.qstom-concierge-open .qstom-concierge-launcher {
		display: none;
	}
}

@keyframes qstom-concierge-dot {
	0%, 80%, 100% {
		opacity: 0.3;
		transform: translateY(0);
	}

	40% {
		opacity: 1;
		transform: translateY(-3px);
	}
}

@media (prefers-reduced-motion: no-preference) {
	.qstom-concierge-panel {
		animation: qstom-concierge-in 0.18s ease-out;
	}
}

@keyframes qstom-concierge-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
}

/* AI search bar ([qstom_ai_search] or the theme's search form) */

.qstom-ai-search {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 640px;
	padding: 5px 5px 5px 8px;
	border: 1px solid #d9cfd2;
	border-radius: 12px;
	background: var(--qc-search-bg);
	box-sizing: border-box;
}

.qstom-ai-search:focus-within {
	border-color: var(--qc-search-button);
	box-shadow: 0 0 0 3px rgb(155 58 72 / 0.15);
}

.qstom-ai-search-badge {
	flex: none;
	padding: 4px 8px;
	border-radius: 8px;
	background: #1d1d1f;
	color: #fff;
	font: 700 12px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	letter-spacing: 0.02em;
}

.qstom-ai-search input[type="search"] {
	flex: 1;
	min-width: 0;
	height: 38px;
	padding: 0 6px;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	box-shadow: none;
	outline: 0;
}

.qstom-ai-search button {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 38px;
	padding: 0 16px;
	border: 0;
	border-radius: 9px;
	background: var(--qc-search-button);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.qstom-ai-search-arrow {
	display: none;
}

@media (max-width: 600px) {
	.qstom-ai-search-label {
		display: none;
	}

	.qstom-ai-search-arrow {
		display: inline;
	}

	.qstom-ai-search button {
		padding: 0 14px;
	}
}

.qstom-concierge-avatar img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

/* Formatted answers */

.qstom-concierge-bubble {
	white-space: normal;
}

.qstom-concierge-bubble.is-user .qstom-concierge-text {
	white-space: pre-wrap;
}

.qstom-concierge-text p {
	margin: 0 0 6px;
}

.qstom-concierge-text p:last-child {
	margin-bottom: 0;
}

/* Products, posts and pages the assistant names are links (themes often hide underlines) */
.qstom-concierge .qstom-concierge-text a {
	color: var(--qc-primary);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.qstom-concierge.is-theme-dark .qstom-concierge-text a {
	color: inherit;
}

.qstom-concierge .qstom-concierge-text a:hover,
.qstom-concierge .qstom-concierge-text a:focus {
	text-decoration-thickness: 2px;
}

.qstom-concierge-text ul {
	margin: 2px 0 8px;
	padding-left: 18px;
}

.qstom-concierge-text li {
	margin: 2px 0;
}

/* Cards under an answer */

:root {
	--qc-card-button-bg: #9b3a48;
	--qc-card-button-fg: #ffffff;
}

.qstom-card-row {
	display: flex;
	gap: 8px;
	max-width: 100%;
	margin: -2px 0 4px;
	padding: 2px 2px 6px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
}

.qstom-card {
	flex: 0 0 158px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 8px;
	border: 1px solid var(--qc-line);
	border-radius: 14px;
	background: var(--qc-surface);
	scroll-snap-align: start;
	font-size: 13px;
}

.qstom-card-image {
	display: block;
	aspect-ratio: 4 / 3;
	border-radius: 10px;
	overflow: hidden;
	background: var(--qc-soft);
}

.qstom-card-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.qstom-card.is-product .qstom-card-image img {
	object-fit: contain;
	background: #fff;
}

.qstom-card-title {
	color: var(--qc-ink);
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.qstom-card-title:hover {
	text-decoration: underline;
}

.qstom-card-price {
	color: var(--qc-primary);
	font-weight: 700;
}

.qstom-card-price del {
	color: var(--qc-muted);
	font-weight: 400;
	font-size: 12px;
}

.qstom-card-summary {
	margin: 0;
	color: var(--qc-muted);
	font-size: 12px;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.qstom-card-buttons {
	display: flex;
	gap: 6px;
	margin-top: auto;
	padding-top: 4px;
}

.qstom-card-button {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 30px;
	padding: 4px 8px;
	border: 0;
	border-radius: 999px;
	background: var(--qc-card-button-bg);
	color: var(--qc-card-button-fg);
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.qstom-card-button:hover {
	filter: brightness(0.92);
	color: var(--qc-card-button-fg);
}

.qstom-card-button.is-ghost {
	background: transparent;
	color: var(--qc-card-button-bg);
	box-shadow: inset 0 0 0 1px var(--qc-card-button-bg);
}

.qstom-card-button.is-ghost:hover {
	color: var(--qc-card-button-bg);
}

.qstom-card-button.is-disabled,
.qstom-card-button:disabled {
	background: var(--qc-soft);
	color: var(--qc-muted);
	cursor: default;
	filter: none;
}

.qstom-card-row.is-rounded .qstom-card-button {
	border-radius: 8px;
}

.qstom-card-row.is-square .qstom-card-button {
	border-radius: 0;
}

.qstom-concierge-log > *,
.qstom-card > * {
	flex-shrink: 0;
}

.qstom-card {
	flex-basis: 170px;
}

.qstom-card-buttons {
	flex-direction: column;
	gap: 5px;
}

/* Several cards side by side (row): the next card peeks in, the edge fades
   and arrows show while there is more to slide to */

.qstom-card-slider {
	position: relative;
	max-width: 100%;
}

.qstom-card-row.is-row {
	scrollbar-width: none;
}

.qstom-card-row.is-row::-webkit-scrollbar {
	display: none;
}

.qstom-card-slider .qstom-card-row.is-row .qstom-card {
	/* About two and a third cards in view, so the third one shows there is more */
	flex: 0 0 calc((100% - 16px) / 2.35);
	min-width: 128px;
	max-width: 190px;
}

.qstom-card-slider::before,
.qstom-card-slider::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 6px;
	width: 34px;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.15s;
	z-index: 1;
}

.qstom-card-slider::before {
	left: 0;
	background: linear-gradient(90deg, var(--qc-surface), transparent);
}

.qstom-card-slider::after {
	right: 0;
	background: linear-gradient(270deg, var(--qc-surface), transparent);
}

.qstom-card-slider.can-prev::before,
.qstom-card-slider.can-next::after {
	opacity: 1;
}

.qstom-card-nav {
	position: absolute;
	top: 38%;
	z-index: 2;
	display: none;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin-top: -15px;
	padding: 0 0 2px;
	border: 1px solid var(--qc-line);
	border-radius: 50%;
	background: var(--qc-surface);
	box-shadow: 0 2px 8px rgba(18, 14, 21, 0.18);
	color: var(--qc-ink);
	font: 700 20px/1 system-ui, sans-serif;
	cursor: pointer;
}

.qstom-card-nav:hover {
	background: var(--qc-soft);
}

.qstom-card-nav.is-prev {
	left: 2px;
}

.qstom-card-nav.is-next {
	right: 2px;
}

.qstom-card-slider.can-prev .qstom-card-nav.is-prev,
.qstom-card-slider.can-next .qstom-card-nav.is-next {
	display: inline-flex;
}

/* Several cards one under another (list): image on the left, text and
   buttons on the right */

.qstom-card-row.is-list {
	flex-direction: column;
	overflow: visible;
	scroll-snap-type: none;
}

.qstom-card-row.is-list .qstom-card {
	flex: none;
}

.qstom-card-row.is-list .qstom-card.has-image {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr);
	column-gap: 10px;
	row-gap: 3px;
	align-items: start;
}

.qstom-card-row.is-list .qstom-card.has-image > * {
	grid-column: 2;
}

.qstom-card-row.is-list .qstom-card.has-image > .qstom-card-image {
	grid-column: 1;
	grid-row: 1 / span 4;
	align-self: start;
	aspect-ratio: 1 / 1;
}

.qstom-card-row.is-list .qstom-card-summary {
	-webkit-line-clamp: 2;
}

.qstom-card-row.is-list .qstom-card-buttons {
	flex-direction: row;
	flex-wrap: wrap;
}

.qstom-card-row.is-list .qstom-card-button {
	flex: 0 1 auto;
	min-width: 84px;
}

/* Side panel: full height on the right (or left), like a cart drawer */

.qstom-concierge-backdrop {
	position: fixed;
	inset: 0;
	z-index: -1;
	background: rgb(18 14 21 / 0.45);
	animation: qstom-concierge-fade 0.2s ease-out;
}

.qstom-concierge-backdrop[hidden] {
	display: none;
}

.qstom-concierge.is-drawer .qstom-concierge-panel {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	right: 0;
	bottom: 0;
	width: min(440px, 100vw);
	height: auto;
	margin: 0;
	border-radius: 0;
	box-shadow: -12px 0 40px rgb(18 14 21 / 0.25);
	animation: qstom-concierge-slide 0.22s ease-out;
}

.qstom-concierge.is-drawer.is-bottom-left .qstom-concierge-panel {
	right: auto;
	left: 0;
	box-shadow: 12px 0 40px rgb(18 14 21 / 0.25);
	animation-name: qstom-concierge-slide-left;
}

.qstom-concierge.is-drawer .qstom-concierge-head {
	padding-top: 18px;
	padding-bottom: 20px;
}

@keyframes qstom-concierge-slide {
	from {
		transform: translateX(100%);
	}
}

@keyframes qstom-concierge-slide-left {
	from {
		transform: translateX(-100%);
	}
}

@keyframes qstom-concierge-fade {
	from {
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.qstom-concierge.is-drawer .qstom-concierge-panel,
	.qstom-concierge-backdrop {
		animation: none;
	}
}
