/*
 * HELP-CENTRE: the help centre at /help/, a topic page and one question's
 * page. The kit prints the search, the topics and the lists; this file only
 * styles them.
 */

/* ---------- Search ---------- */

.wprk-help-centre .wprk-help__search {
	margin-block: 0 var(--wp--preset--spacing--60);
	max-width: 40rem;
}

.wprk-help-centre .wprk-help__label {
	color: var(--wprk-heading);
	display: block;
	font-weight: 600;
	margin-block-end: var(--wp--preset--spacing--20);
}

.wprk-help-centre .wprk-help__field {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
}

.wprk-help-centre .wprk-help__field input[type="search"] {
	background-color: var(--wprk-card-bg);
	border: 1px solid color-mix(in srgb, var(--wprk-heading) 35%, transparent);
	border-radius: var(--wp--custom--radius--md);
	box-sizing: border-box;
	color: var(--wprk-heading);
	flex: 1 1 16rem;
	font: inherit;
	min-height: 3rem;
	min-width: 0;
	padding: 0.7em 0.9em;
}

.wprk-help-centre .wprk-help__field input[type="search"]:focus-visible {
	outline: 2px solid var(--wprk-focus);
	outline-offset: 2px;
}

.wprk-help-centre .wprk-help__field button {
	background-color: var(--wprk-btn-bg);
	border: 0;
	border-radius: var(--wp--custom--button--radius);
	color: var(--wprk-btn-fg);
	cursor: pointer;
	flex: none;
	font: inherit;
	font-weight: var(--wp--custom--button--weight);
	min-height: 3rem;
	padding: 0.7em 1.5em;
}

/* ---------- Results and topics ---------- */

.wprk-help-centre .wprk-help__results {
	margin-block: 0 var(--wp--preset--spacing--60);
	max-width: 48rem;
}

.wprk-help-centre .wprk-help__results > h2,
.wprk-help-centre .wprk-help__topic-title {
	font-size: var(--wp--preset--font-size--x-large);
	margin-block: 0 var(--wp--preset--spacing--30);
}

.wprk-help-centre .wprk-help__topics {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}

.wprk-help-centre .wprk-help__topic {
	background-color: var(--wprk-card-bg);
	border: 1px solid var(--wprk-border);
	border-radius: var(--wp--custom--radius--lg);
	padding: var(--wp--preset--spacing--40);
}

.wprk-help-centre .wprk-help__topic-text {
	color: var(--wprk-muted);
	margin-block: calc(-1 * var(--wp--preset--spacing--20)) var(--wp--preset--spacing--30);
}

/* A list of questions: one hairline under each, the whole row is the link. */
.wprk-help-centre .wprk-help__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wprk-help-centre .wprk-help__list > li {
	border-block-end: 1px solid var(--wprk-border);
	margin: 0;
	padding-block: var(--wp--preset--spacing--20);
}

.wprk-help-centre .wprk-help__list > li:first-child {
	padding-block-start: 0;
}

.wprk-help-centre .wprk-help__list a {
	color: var(--wprk-heading);
	font-weight: 600;
	text-decoration: none;
}

.wprk-help-centre .wprk-help__list a:hover,
.wprk-help-centre .wprk-help__list a:focus-visible {
	text-decoration: underline;
	text-decoration-thickness: 0.06em;
	text-underline-offset: 0.2em;
}

.wprk-help-centre .wprk-help__list p {
	color: var(--wprk-muted);
	margin-block: 0.25em 0;
}

.wprk-help-centre .wprk-help__all,
.wprk-help-centre .wprk-help__back {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	margin-block: var(--wp--preset--spacing--30) 0;
}

/* ---------- A topic page and one question's page: the reading width of an article ---------- */

.wprk-help-topic > *,
.wprk-help-answer > .wprk-help {
	max-width: 48rem;
}

.wprk-help-answer > .wprk-help {
	border-block-start: 1px solid var(--wprk-border);
	margin-block-start: var(--wp--preset--spacing--60);
	padding-block-start: var(--wp--preset--spacing--50);
}
