/*
 * The guided walk (guide.js), in the configurator and on the admin screens.
 * Its colours follow the configurator's own where they are set, and fall
 * back to WordPress's own blue in the admin.
 *
 * It sits on top of whatever the theme and other plugins put on the page -
 * sticky headers, cookie bars, chat buttons - so it takes the highest layer
 * there is, and sets for itself what a theme's own button and paragraph
 * styles would otherwise change: case, spacing, shadows, sizes.
 */

.pomp-guide-bubble,
.pomp-guide-bubble * {
	box-sizing: border-box;
	text-transform: none;
	letter-spacing: normal;
	text-shadow: none;
}

.pomp-guide-bubble p {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-family: inherit;
}

.pomp-guide-bubble button {
	width: auto;
	min-width: 0;
	height: auto;
	min-height: 0;
	box-shadow: none;
	background-image: none;
	text-decoration: none;
	transform: none;
}

.pomp-guide-ring {
	position: fixed;
	z-index: 2147483000;
	border: 2px solid var(--pomp-accent, #2271b1);
	border-radius: 10px;
	box-shadow: 0 0 0 9999px rgba(20, 16, 14, 0.45);
	pointer-events: none;
	transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease;
}

.pomp-guide-bubble {
	position: fixed;
	z-index: 2147483001;
	box-sizing: border-box;
	width: min(340px, calc(100vw - 24px));
	padding: 16px 18px 14px;
	border-radius: 12px;
	background: #ffffff;
	color: #16120f;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
	font: 400 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-align: left;
	transition: left .25s ease, top .25s ease;
}

/* On a phone: across the screen, at the bottom, or at the top when what it
   points at is down there (guide.js decides). */
.pomp-guide-bubble.is-docked {
	left: 12px !important;
	right: 12px;
	top: auto !important;
	bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	width: auto;
}

.pomp-guide-bubble.is-docked.is-top {
	top: calc(12px + env(safe-area-inset-top, 0px)) !important;
	bottom: auto;
}

.pomp-guide-bubble__count {
	margin: 0 0 4px;
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #6b625c;
	font-variant-numeric: tabular-nums;
}

.pomp-guide-bubble__title {
	margin: 0 28px 6px 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

.pomp-guide-bubble__text {
	margin: 0;
}

.pomp-guide-bubble__actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 14px;
}

.pomp-guide-bubble button {
	margin: 0;
	padding: 7px 14px;
	border-radius: 6px;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

/* Two classes deep: a theme's [type="button"] rule weighs as much as one
   class, and would otherwise paint Next in the theme's own button colour. */
.pomp-guide-bubble .pomp-guide-bubble__back {
	border: 1px solid #d8d0ca;
	background: #ffffff;
	color: #16120f;
}

.pomp-guide-bubble .pomp-guide-bubble__next {
	border: 1px solid var(--pomp-accent, #2271b1);
	background: var(--pomp-accent, #2271b1);
	color: #ffffff;
}

.pomp-guide-bubble .pomp-guide-bubble__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	background: none;
	color: #6b625c;
	font-size: 22px;
	font-weight: 400;
}

.pomp-guide-bubble button:focus-visible {
	outline: 2px solid var(--pomp-accent, #2271b1);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.pomp-guide-ring,
	.pomp-guide-bubble {
		transition: none;
	}
}

/*
 * The button that starts it on a desktop: a pill in the page's bottom left
 * corner, in the shop's accent colour. It grows with the screen, from the
 * size of an ordinary button on a laptop to a larger one on a wide monitor,
 * and so does its distance from the corner. It sits under the guide itself,
 * and rises above a cookie notice or any other bar fixed along the bottom
 * (the configurator sets --pomp-guide-lift to that bar's height).
 */
body .pomp-guide-float {
	position: fixed;
	left: clamp(16px, 1.6vw, 40px);
	bottom: calc(clamp(16px, 1.6vw, 40px) + var(--pomp-guide-lift, 0px) + env(safe-area-inset-bottom, 0px));
	z-index: 99990;
	display: inline-flex;
	align-items: center;
	gap: .5em;
	box-sizing: border-box;
	width: auto;
	min-width: 0;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: .75em 1.5em .75em 1.1em;
	border: 0;
	border-radius: 999px;
	background: var(--pomp-accent, #ed3833);
	background-image: none;
	color: #ffffff;
	font-family: var(--pomp-text, inherit);
	font-size: clamp(15px, calc(.45vw + 9px), 24px);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	text-shadow: none;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
	cursor: pointer;
	transition: bottom .25s ease, transform .15s ease, box-shadow .15s ease;
}

body .pomp-guide-float:hover {
	background: var(--pomp-accent, #ed3833);
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 10px 26px rgba(0, 0, 0, .24);
}

body .pomp-guide-float:focus-visible {
	outline: 3px solid var(--pomp-accent, #ed3833);
	outline-offset: 3px;
}

.pomp-guide-float__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.35em;
	height: 1.35em;
	border: 2px solid currentColor;
	border-radius: 50%;
	font-size: .85em;
	line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
	body .pomp-guide-float,
	body .pomp-guide-float:hover {
		transition: none;
		transform: none;
	}
}

@media print {
	body .pomp-guide-float {
		display: none;
	}
}

/* Up, then Down, written across a phone's screen while the Guide shows
   the sheet of options being dragged (configurator.js, sheetDemo()). */
.pomp-guide-hint {
	position: fixed;
	top: 30%;
	left: 50%;
	z-index: 2147483600;
	padding: 10px 22px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .8);
	color: #ffffff;
	font: 700 22px/1.2 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	letter-spacing: .02em;
	text-transform: none;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transform: translate(-50%, 6px);
	transition: opacity .2s ease, transform .2s ease;
}

.pomp-guide-hint.is-on {
	opacity: 1;
	transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
	.pomp-guide-hint {
		transition: none;
	}
}

/* The button that starts it on a phone, at the top of the panel. */
.pomp-guide-launch {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 12px;
	padding: 4px 10px;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 13px;
	line-height: 1.4;
	cursor: pointer;
	opacity: .75;
}

.pomp-guide-launch:hover,
.pomp-guide-launch:focus-visible {
	opacity: 1;
}
