/*
 * help.css, the in-product help layer: info dots, the anchored popover (a
 * bottom sheet on small screens), the coach-mark tour spotlight, and the Help
 * Centre page. Built entirely on the public design tokens.
 */

/* ---- Info dot + launcher ------------------------------------------------ */

.help-dot
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.4em;
	height: 1.4em;
	padding: 0;
	margin-left: var(--sp-2);
	border: 1px solid var(--act);
	border-radius: var(--r-pill);
	background: var(--act-wash);
	color: var(--act);
	font-size: 0.82em;
	line-height: 1;
	cursor: pointer;
	vertical-align: middle;
	transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.help-dot:hover
{
	background: var(--act);
	color: #fff;
	transform: translateY(-1px);
}

.help-dot:focus-visible
{
	outline: none;
	box-shadow: var(--ring);
}

.help-launch
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: var(--r-pill);
	color: var(--ink-soft);
	font-size: 1.15rem;
}

.help-launch:hover
{
	background: var(--act-wash);
	color: var(--act);
}

/* A small menu the launcher can raise (browse / replay) */
.help-menu
{
	position: absolute;
	z-index: 90;
	min-width: 210px;
	background: var(--bg-card);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	box-shadow: var(--shadow-pop);
	padding: var(--sp-2);
	display: grid;
	gap: 2px;
}

.help-menu button,
.help-menu a
{
	display: flex;
	align-items: center;
	gap: var(--sp-2);
	width: 100%;
	padding: var(--sp-2) var(--sp-3);
	border: 0;
	border-radius: var(--r-sm);
	background: none;
	color: var(--ink);
	font: inherit;
	font-size: var(--fs-sm);
	text-align: left;
	cursor: pointer;
}

.help-menu button:hover,
.help-menu a:hover
{
	background: var(--bg-dip);
}

/* ---- Popover ------------------------------------------------------------ */

.help-pop-layer
{
	position: fixed;
	inset: 0;
	z-index: 120;
}

.help-pop
{
	position: absolute;
	width: min(340px, calc(100vw - 2 * var(--sp-4)));
	background: var(--bg-card);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	box-shadow: var(--shadow-pop);
	padding: var(--sp-5);
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.14s ease, transform 0.14s ease;
}

.help-pop.is-in
{
	opacity: 1;
	transform: translateY(0);
}

.help-pop-arrow
{
	position: absolute;
	width: 12px;
	height: 12px;
	background: var(--bg-card);
	border-left: 1px solid var(--line);
	border-top: 1px solid var(--line);
	transform: rotate(45deg);
}

.help-pop-head
{
	display: flex;
	align-items: flex-start;
	gap: var(--sp-3);
	margin-bottom: var(--sp-3);
}

.help-pop-ico
{
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: var(--r-md);
	background: var(--sun-wash);
	color: var(--sun);
	font-size: 1.1rem;
}

.help-pop-title
{
	font-family: var(--font-display);
	font-size: var(--fs-lg);
	line-height: 1.15;
	color: var(--ink);
	margin: 0;
}

.help-pop-close
{
	margin-left: auto;
	flex: none;
	width: 1.7rem;
	height: 1.7rem;
	border: 0;
	border-radius: var(--r-pill);
	background: var(--bg-dip);
	color: var(--ink-soft);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.help-pop-close:hover
{
	background: var(--line);
	color: var(--ink);
}

.help-pop-sum
{
	font-size: var(--fs-base);
	color: var(--ink-soft);
	margin: 0 0 var(--sp-3);
}

.help-pop-label
{
	font-size: var(--fs-xs);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ink-faint);
	margin: var(--sp-3) 0 var(--sp-2);
}

.help-pop-steps
{
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: hstep;
	display: grid;
	gap: var(--sp-2);
}

.help-pop-steps li
{
	position: relative;
	padding-left: 1.9rem;
	font-size: var(--fs-sm);
	color: var(--ink);
	counter-increment: hstep;
}

.help-pop-steps li::before
{
	content: counter(hstep);
	position: absolute;
	left: 0;
	top: -1px;
	width: 1.35rem;
	height: 1.35rem;
	border-radius: var(--r-pill);
	background: var(--act-wash);
	color: var(--act);
	font-size: var(--fs-xs);
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.help-pop-tip
{
	display: flex;
	gap: var(--sp-2);
	align-items: flex-start;
	margin-top: var(--sp-4);
	padding: var(--sp-3);
	background: var(--sun-wash);
	border-radius: var(--r-md);
	font-size: var(--fs-sm);
	color: var(--ink);
}

.help-pop-tip .cb-ico
{
	color: var(--sun);
	flex: none;
	margin-top: 1px;
}

.help-pop-actions
{
	display: flex;
	align-items: center;
	gap: var(--sp-3);
	margin-top: var(--sp-4);
}

.help-pop-show
{
	display: inline-flex;
	align-items: center;
	gap: var(--sp-2);
	padding: var(--sp-2) var(--sp-4);
	border: 0;
	border-radius: var(--r-pill);
	background: var(--act);
	color: #fff;
	font: inherit;
	font-size: var(--fs-sm);
	font-weight: 600;
	cursor: pointer;
}

.help-pop-show:hover { background: var(--act-hover); }

.help-pop-more
{
	font-size: var(--fs-sm);
	color: var(--act);
	margin-left: auto;
}

/* Bottom sheet on small screens */
@media (max-width: 600px)
{
	.help-pop
	{
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		top: auto;
		width: 100%;
		border-radius: var(--r-xl) var(--r-xl) 0 0;
		transform: translateY(100%);
		max-height: 82vh;
		overflow-y: auto;
		padding-bottom: max(var(--sp-6), env(safe-area-inset-bottom));
	}

	.help-pop.is-in { transform: translateY(0); }
	.help-pop-arrow { display: none; }
	.help-pop-layer.is-sheet { background: rgba(16, 40, 44, 0.4); }
}

/* ---- Coach-mark tour ---------------------------------------------------- */

.help-coach-layer
{
	position: fixed;
	inset: 0;
	z-index: 130;
}

.help-spot
{
	position: absolute;
	border-radius: var(--r-md);
	box-shadow: 0 0 0 9999px rgba(16, 40, 44, 0.62);
	outline: 2px solid var(--sun);
	outline-offset: 3px;
	transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
}

.help-coach
{
	position: absolute;
	width: min(320px, calc(100vw - 2 * var(--sp-4)));
	background: var(--bg-card);
	border-radius: var(--r-lg);
	box-shadow: var(--shadow-pop);
	padding: var(--sp-5);
	transition: all 0.24s ease;
}

.help-coach-step
{
	font-size: var(--fs-xs);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--sun);
	font-weight: 600;
	margin: 0 0 var(--sp-1);
}

.help-coach-title
{
	font-family: var(--font-display);
	font-size: var(--fs-lg);
	color: var(--ink);
	margin: 0 0 var(--sp-2);
}

.help-coach-body
{
	font-size: var(--fs-sm);
	color: var(--ink-soft);
	margin: 0 0 var(--sp-4);
}

.help-coach-nav
{
	display: flex;
	align-items: center;
	gap: var(--sp-3);
}

.help-coach-dots
{
	display: flex;
	gap: 5px;
	margin-right: auto;
}

.help-coach-dots i
{
	width: 6px;
	height: 6px;
	border-radius: var(--r-pill);
	background: var(--line-strong);
}

.help-coach-dots i.is-on { background: var(--sun); }

.help-coach-skip
{
	border: 0;
	background: none;
	color: var(--ink-faint);
	font: inherit;
	font-size: var(--fs-sm);
	cursor: pointer;
}

.help-coach-skip:hover { color: var(--ink-soft); }

.help-coach-next
{
	padding: var(--sp-2) var(--sp-5);
	border: 0;
	border-radius: var(--r-pill);
	background: var(--act);
	color: #fff;
	font: inherit;
	font-size: var(--fs-sm);
	font-weight: 600;
	cursor: pointer;
}

.help-coach-next:hover { background: var(--act-hover); }

/* ---- Help Centre page --------------------------------------------------- */

.help-centre { padding: var(--sp-8) var(--sp-4) var(--sp-14); }

.help-hero { max-width: 60ch; margin-bottom: var(--sp-8); }

.help-hero h1
{
	font-family: var(--font-display);
	font-size: var(--fs-xl);
	color: var(--ink);
	margin: var(--sp-1) 0 var(--sp-3);
}

.help-lead { font-size: var(--fs-md); color: var(--ink-soft); }

.help-hero-actions
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--sp-3);
	margin-top: var(--sp-5);
}

.help-tour-start
{
	display: inline-flex;
	align-items: center;
	gap: var(--sp-2);
	padding: var(--sp-3) var(--sp-5);
	border: 0;
	border-radius: var(--r-pill);
	background: var(--ink);
	color: var(--ink-on-dark);
	font: inherit;
	font-size: var(--fs-sm);
	font-weight: 600;
	cursor: pointer;
}

.help-tour-start:hover { background: var(--petrol-800); }
.help-tour-start .cb-ico { color: var(--sun); }

.help-search
{
	display: flex;
	align-items: center;
	gap: var(--sp-2);
	flex: 1 1 240px;
	min-width: 220px;
	padding: var(--sp-3) var(--sp-4);
	background: var(--bg-card);
	border: 1px solid var(--line);
	border-radius: var(--r-pill);
	color: var(--ink-faint);
}

.help-search input
{
	border: 0;
	background: none;
	font: inherit;
	font-size: var(--fs-base);
	color: var(--ink);
	width: 100%;
	outline: none;
}

.help-group { margin-bottom: var(--sp-10); }

.help-group h2
{
	font-family: var(--font-display);
	font-size: var(--fs-lg);
	color: var(--ink);
	margin: 0 0 var(--sp-4);
	padding-bottom: var(--sp-2);
	border-bottom: 1px solid var(--line);
}

.help-cards
{
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: var(--sp-4);
}

.help-card
{
	background: var(--bg-card);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	padding: var(--sp-5);
	box-shadow: var(--shadow-card);
}

.help-card h3
{
	display: flex;
	align-items: center;
	gap: var(--sp-2);
	font-family: var(--font-display);
	font-size: var(--fs-md);
	color: var(--ink);
	margin: 0 0 var(--sp-2);
}

.help-card-ico
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.9rem;
	height: 1.9rem;
	flex: none;
	border-radius: var(--r-md);
	background: var(--act-wash);
	color: var(--act);
	font-size: 1rem;
}

.help-card-sum { font-size: var(--fs-sm); color: var(--ink-soft); margin: 0 0 var(--sp-3); }

.help-card-label
{
	font-size: var(--fs-xs);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ink-faint);
	margin: 0 0 var(--sp-2);
}

.help-steps
{
	margin: 0 0 var(--sp-3);
	padding: 0;
	list-style: none;
	counter-reset: hcstep;
	display: grid;
	gap: var(--sp-2);
}

.help-steps li
{
	position: relative;
	padding-left: 1.9rem;
	font-size: var(--fs-sm);
	color: var(--ink);
	counter-increment: hcstep;
}

.help-steps li::before
{
	content: counter(hcstep);
	position: absolute;
	left: 0;
	top: -1px;
	width: 1.35rem;
	height: 1.35rem;
	border-radius: var(--r-pill);
	background: var(--act-wash);
	color: var(--act);
	font-size: var(--fs-xs);
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.help-card-tip
{
	display: flex;
	gap: var(--sp-2);
	align-items: flex-start;
	padding: var(--sp-3);
	background: var(--sun-wash);
	border-radius: var(--r-md);
	font-size: var(--fs-sm);
	color: var(--ink);
	margin: 0;
}

.help-card-tip .cb-ico { color: var(--sun); flex: none; margin-top: 1px; }

.help-empty,
.help-noresults { color: var(--ink-faint); font-size: var(--fs-base); }

@media (prefers-reduced-motion: reduce)
{
	.help-pop,
	.help-spot,
	.help-coach,
	.help-dot { transition: none; }
}
