/**
 * Magelon Help Center - front-end styles.
 *
 * Deliberately restrained: inherits the active theme's typography and colours
 * and only lays out the Help Center-specific structures.
 */

.magelon-help-layout {
	max-width: 1100px;
	margin: 0 auto;

	/*
	 * --magelon-help-header-offset is measured at runtime in help-center.js and
	 * clears a fixed or sticky site header. The fallback keeps the layout
	 * sensible without JavaScript and on themes with a header in normal flow.
	 */
	padding: calc(2rem + var(--magelon-help-header-offset, 0px)) 1.25rem 4rem;
}


/* Listing pages: landing, category, tag, search ------------------------------
 *
 * Follows the site's Free Tools hub: a black hero with light display type,
 * white body, light-grey rounded cards with pill tags and "> Go" links.
 * Colours come from the theme's --color-magelon-* tokens, with fallbacks.
 */

.magelon-help-page {
	--mh-black: var(--color-magelon-black, #010101);
	--mh-white: var(--color-magelon-white, #fff);
	--mh-green: var(--color-magelon-green, #c8ff3c);
	--mh-purple: var(--color-magelon-purple, #9600ff);
	--mh-gray: var(--color-magelon-gray, #bbcad2);
	--mh-gray-light: var(--color-magelon-gray-light, #e3e9ec);
	--mh-gray-light2: var(--color-magelon-gray-light2, #edf1f3);
	--mh-gray-dark: var(--color-magelon-gray-dark, #4d4d4d);
	background: var(--mh-white);
	color: var(--mh-black);
}

.magelon-help-container {
	max-width: 90rem;
	margin: 0 auto;
	padding: 0 1.5rem;
}

@media (min-width: 40rem) {
	.magelon-help-container { padding: 0 2rem; }
}

@media (min-width: 64rem) {
	.magelon-help-container { padding: 0 4rem; }
}

.magelon-help-pill {
	display: inline-block;
	align-self: flex-start;
	padding: 0.2rem 0.65rem;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-size: 0.8125rem;
	line-height: 1.3;
	opacity: 0.7;
}

.magelon-help-more {
	display: inline-block;
	color: inherit;
	font-size: 1rem;
	text-decoration: none;
}

.magelon-help-more:hover,
.magelon-help-more:focus-visible {
	color: var(--mh-purple);
}

/* Hero ------------------------------------------------------------------- */

.magelon-help-hero {
	position: relative;
	background: var(--mh-black);
	color: var(--mh-gray-light);
	padding: calc(var(--magelon-help-header-offset, 7.5rem) + 1rem) 0 3rem;
	/* One shared height for the landing and topic heroes: the min-height is a
	   topic hero with a one-line lead, and content sits at the foot so the
	   search bar lands in the same place on every listing page. */
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: calc(var(--magelon-help-header-offset, 7.5rem) + 22rem);
}

.magelon-help-hero > .magelon-help-container {
	width: 100%;
	box-sizing: border-box;
}

@media (min-width: 64rem) {
	.magelon-help-hero {
		padding: calc(var(--magelon-help-header-offset, 7.5rem) + 1.5rem) 0 4rem;
		min-height: calc(var(--magelon-help-header-offset, 7.5rem) + 25rem);
	}
}

/* Sits just below the header, not at the hero's foot, so the nav turns into
   the pill as soon as hero text would slide under it (same as the homepage). */
.magelon-help-hero__sentinel {
	position: absolute;
	top: var(--magelon-help-header-offset, 7.5rem);
	left: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}

.magelon-help-hero__crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1.25rem;
	font-size: 0.9375rem;
	color: var(--mh-gray);
}

.magelon-help-hero__crumbs a {
	color: inherit;
	text-decoration: none;
}

.magelon-help-hero__crumbs a:hover,
.magelon-help-hero__crumbs a:focus-visible {
	color: var(--mh-green);
}

.magelon-help-hero__crumbs [aria-current] {
	color: var(--mh-white);
}

.magelon-help-pill--dark {
	margin-bottom: 0.75rem;
	color: var(--mh-gray-light);
}

.magelon-help-hero__title {
	margin: 0;
	font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem);
	font-weight: 300;
	line-height: 1.02;
	letter-spacing: -0.02em;
	color: var(--mh-white);
	overflow-wrap: anywhere;
}

.magelon-help-hero--landing .magelon-help-hero__title {
	font-size: clamp(2.75rem, 1.6rem + 4vw, 4.5rem);
}

.magelon-help-hero__lead {
	max-width: 60rem;
	margin: 1rem 0 0;
	font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.375rem);
	font-weight: 300;
	line-height: 1.3;
}

.magelon-help-hero__meta {
	margin: 1rem 0 0;
	font-size: 0.9375rem;
	color: var(--mh-gray);
}

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

.magelon-help-search {
	position: relative;
	display: flex;
	align-items: center;
	max-width: 44rem;
	margin: 1.5rem 0 0;
	border-radius: 999px;
	background: var(--mh-white);
	color: var(--mh-black);
	box-shadow: 0 0 0 1px transparent;
	transition: box-shadow 0.2s;
}

.magelon-help-search:focus-within {
	box-shadow: 0 0 0 3px var(--mh-green);
}

.magelon-help-search--large {
	max-width: 52rem;
	margin-top: 2rem;
}

@media (min-width: 64rem) {
	.magelon-help-search--large { margin-top: 2.5rem; }
}

.magelon-help-search__icon {
	position: absolute;
	left: 1.25rem;
	width: 1.25rem;
	height: 1.25rem;
	opacity: 0.55;
	pointer-events: none;
}

.magelon-help-search__field {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.95rem 0.75rem 0.95rem 3.25rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 1rem;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.magelon-help-search--large .magelon-help-search__field {
	padding-top: 1.2rem;
	padding-bottom: 1.2rem;
	font-size: 1.125rem;
}

.magelon-help-search__field::placeholder {
	color: var(--mh-gray-dark);
	opacity: 0.7;
}

.magelon-help-search__submit {
	flex: 0 0 auto;
	margin: 0.35rem;
	padding: 0.65rem 1.4rem;
	border: 0;
	border-radius: 999px;
	background: var(--mh-green);
	color: var(--mh-black);
	font: inherit;
	font-size: 1rem;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.magelon-help-search--large .magelon-help-search__submit {
	padding: 0.85rem 1.75rem;
}

.magelon-help-search__submit:hover,
.magelon-help-search__submit:focus-visible {
	background: var(--mh-black);
	color: var(--mh-white);
}

/* Sections --------------------------------------------------------------- */

.magelon-help-section {
	padding: 3rem 0;
}

@media (min-width: 64rem) {
	.magelon-help-section { padding: 5rem 0; }
}

.magelon-help-section--start {
	padding-bottom: 0;
}

.magelon-help-section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	margin: 0 0 1.5rem;
}

.magelon-help-section__label {
	margin: 0 0 1.5rem;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.3;
}

.magelon-help-section__head .magelon-help-section__label {
	margin: 0;
}

@media (min-width: 64rem) {
	.magelon-help-section__label { font-size: 1.5rem; margin-bottom: 2.5rem; }
	.magelon-help-section__head { margin-bottom: 2.5rem; }
}

/* Start here cards */

.magelon-help-start {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
}

@media (min-width: 40rem) {
	.magelon-help-start { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 80rem) {
	.magelon-help-start { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.magelon-help-start__card {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	padding: 1.5rem;
	border-radius: 1.25rem;
	background: var(--mh-gray-light);
	color: inherit;
	text-decoration: none;
	transition: background 0.2s, color 0.2s, transform 0.2s;
}

@media (min-width: 64rem) {
	.magelon-help-start__card { padding: 2rem; }
}

.magelon-help-start__card:hover,
.magelon-help-start__card:focus-visible {
	background: var(--mh-black);
	color: var(--mh-white);
	transform: translateY(-2px);
}

.magelon-help-start__num {
	font-size: 0.875rem;
	opacity: 0.55;
	font-variant-numeric: tabular-nums;
}

.magelon-help-start__title {
	font-size: 1.5rem;
	font-weight: 300;
	line-height: 1.15;
}

.magelon-help-start__desc {
	flex: 1;
	font-size: 1rem;
	font-weight: 300;
	line-height: 1.4;
	opacity: 0.75;
}

.magelon-help-start__go {
	margin-top: 0.5rem;
}

.magelon-help-start__card:hover .magelon-help-start__go,
.magelon-help-start__card:focus-visible .magelon-help-start__go {
	color: var(--mh-green);
}

/* Topic directory */

.magelon-help-topics {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
}

@media (min-width: 48rem) {
	.magelon-help-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 80rem) {
	.magelon-help-topics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.magelon-help-topic {
	display: flex;
	flex-direction: column;
	padding: 1.5rem;
	border-radius: 1.25rem;
	background: var(--mh-gray-light2);
}

@media (min-width: 64rem) {
	.magelon-help-topic { padding: 2rem; }
}

.magelon-help-topic__title {
	margin: 0.9rem 0 0;
	font-size: 1.625rem;
	font-weight: 300;
	line-height: 1.1;
}

@media (min-width: 64rem) {
	.magelon-help-topic__title { font-size: 2rem; }
}

.magelon-help-topic__title a {
	color: inherit;
	text-decoration: none;
}

.magelon-help-topic__title a:hover,
.magelon-help-topic__title a:focus-visible {
	color: var(--mh-purple);
}

.magelon-help-topic__desc {
	margin: 0.6rem 0 0;
	font-size: 1rem;
	font-weight: 300;
	line-height: 1.4;
	color: var(--mh-gray-dark);
}

.magelon-help-topic__list {
	flex: 1;
	margin: 1.25rem 0 1.25rem;
	padding: 0;
	list-style: none;
	border-top: 1px solid rgba(1, 1, 1, 0.1);
}

.magelon-help-topic__list li {
	margin: 0;
	border-bottom: 1px solid rgba(1, 1, 1, 0.1);
}

.magelon-help-topic__list a {
	display: block;
	padding: 0.6rem 0;
	color: inherit;
	font-size: 1rem;
	line-height: 1.35;
	text-decoration: none;
	transition: color 0.15s, padding 0.15s;
}

.magelon-help-topic__list a:hover,
.magelon-help-topic__list a:focus-visible {
	padding-left: 0.35rem;
	color: var(--mh-purple);
}

/* Category / tag / search listing --------------------------------------- */

.magelon-help-listing {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2.5rem;
	align-items: start;
}

@media (min-width: 64rem) {
	.magelon-help-listing { grid-template-columns: 16rem minmax(0, 1fr); gap: 4rem; }
}

@media (min-width: 80rem) {
	.magelon-help-listing { grid-template-columns: 18rem minmax(0, 52rem); }
}

.magelon-help-listing__main {
	min-width: 0;
}

.magelon-help-sidenav {
	order: 2;
}

@media (min-width: 64rem) {
	.magelon-help-sidenav {
		order: 0;
		position: sticky;
		top: calc(var(--magelon-help-header-offset, 7.5rem) + 1.5rem);
	}
}

.magelon-help-sidenav__label {
	margin: 0 0 0.75rem;
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mh-gray-dark);
}

.magelon-help-sidenav ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.magelon-help-sidenav a {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.55rem 0.9rem;
	border-radius: 0.75rem;
	color: inherit;
	font-size: 0.975rem;
	line-height: 1.3;
	text-decoration: none;
	transition: background 0.15s;
}

.magelon-help-sidenav a:hover,
.magelon-help-sidenav a:focus-visible {
	background: var(--mh-gray-light2);
}

.magelon-help-sidenav a[aria-current] {
	background: var(--mh-black);
	color: var(--mh-white);
}

.magelon-help-sidenav__count {
	opacity: 0.5;
	font-variant-numeric: tabular-nums;
}

.magelon-help-rows {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--mh-gray-light);
}

.magelon-help-row {
	margin: 0;
	border-bottom: 1px solid var(--mh-gray-light);
}

.magelon-help-row__link {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	padding: 1.5rem 0.25rem;
	color: inherit;
	text-decoration: none;
}

@media (min-width: 64rem) {
	.magelon-help-row__link { padding: 1.75rem 0.5rem; }
}

.magelon-help-row__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.4rem;
	min-width: 0;
}

.magelon-help-row__title {
	font-size: 1.375rem;
	font-weight: 300;
	line-height: 1.2;
	transition: color 0.15s;
}

@media (min-width: 64rem) {
	.magelon-help-row__title { font-size: 1.625rem; }
}

.magelon-help-row__desc {
	font-size: 1rem;
	font-weight: 300;
	line-height: 1.45;
	color: var(--mh-gray-dark);
}

.magelon-help-row__arrow {
	flex: 0 0 auto;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0.7rem;
	border-radius: 999px;
	background: var(--mh-gray-light2);
	transition: background 0.2s, color 0.2s, transform 0.2s;
}

.magelon-help-row__link:hover .magelon-help-row__title,
.magelon-help-row__link:focus-visible .magelon-help-row__title {
	color: var(--mh-purple);
}

.magelon-help-row__link:hover .magelon-help-row__arrow,
.magelon-help-row__link:focus-visible .magelon-help-row__arrow {
	background: var(--mh-black);
	color: var(--mh-green);
	transform: translateX(3px);
}

.magelon-help-empty {
	padding: 2.5rem;
	border-radius: 1.25rem;
	background: var(--mh-gray-light2);
	font-size: 1.125rem;
	font-weight: 300;
}

.magelon-help-empty p {
	margin: 0 0 1rem;
}

/* Pagination */

.magelon-help-pagination:empty {
	display: none;
}

.magelon-help-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 2.5rem;
}

.magelon-help-pagination .page-numbers {
	display: inline-block;
	min-width: 2.5rem;
	padding: 0.5rem 0.9rem;
	border-radius: 999px;
	background: var(--mh-gray-light2);
	color: inherit;
	text-align: center;
	text-decoration: none;
}

.magelon-help-pagination .page-numbers.current {
	background: var(--mh-black);
	color: var(--mh-white);
}

/* Closing CTA ----------------------------------------------------------- */

.magelon-help-cta {
	padding: 4rem 0;
	background: var(--mh-black);
	color: var(--mh-gray-light);
}

@media (min-width: 64rem) {
	.magelon-help-cta { padding: 6rem 0; }
}

.magelon-help-cta__eyebrow {
	margin: 0 0 1rem;
	font-size: 1rem;
}

.magelon-help-cta__title {
	max-width: 56rem;
	margin: 0;
	font-size: clamp(1.625rem, 1.1rem + 2.2vw, 3rem);
	font-weight: 300;
	line-height: 1.1;
	color: var(--mh-white);
}

.magelon-help-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2.25rem;
}

.magelon-help-btn {
	display: inline-block;
	padding: 0.8rem 1.6rem;
	border: 1px solid var(--mh-gray);
	border-radius: 999px;
	color: var(--mh-white);
	font-size: 1rem;
	text-decoration: none;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.magelon-help-btn:hover,
.magelon-help-btn:focus-visible {
	border-color: var(--mh-white);
	background: var(--mh-white);
	color: var(--mh-black);
}

.magelon-help-btn--primary {
	border-color: var(--mh-green);
	background: var(--mh-green);
	color: var(--mh-black);
}

.magelon-help-btn--primary:hover,
.magelon-help-btn--primary:focus-visible {
	border-color: var(--mh-white);
}

/* Single ----------------------------------------------------------------- */

.magelon-help-article {
	max-width: 780px;
	margin: 0 auto;
}

.magelon-help-breadcrumb {
	margin: 0 0 1rem;
	font-size: 0.9em;
	opacity: 0.8;
}

.magelon-help-article__title {
	margin: 0 0 0.75rem;
}

.magelon-help-article__meta {
	margin: 0 0 2rem;
	font-size: 0.9em;
	opacity: 0.75;
}

.magelon-help-article__content > * + * {
	margin-top: 1.1em;
}

.magelon-help-tags {
	margin: 2.5rem 0 0;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(128, 128, 128, 0.25);
	font-size: 0.9em;
}

.magelon-help-tags a {
	display: inline-block;
	margin: 0 0.35rem 0.35rem 0;
	padding: 0.2rem 0.6rem;
	border: 1px solid rgba(128, 128, 128, 0.4);
	border-radius: 999px;
	text-decoration: none;
	color: inherit;
}


/* Preview banner --------------------------------------------------------- */

.magelon-help-preview-banner {
	position: sticky;
	top: 0;
	z-index: 99;
	padding: 0.85rem 1.25rem;
	background: #8a5300;
	color: #fff;
	text-align: center;
	font-weight: 600;
}

.magelon-help-preview-banner a {
	color: #fff;
}


/*
 * Typographic scale.
 *
 * Block themes vary in whether they style bare heading elements or only block
 * classes. These rules are scoped to the plugin's own wrappers so they give the
 * Help Center a consistent hierarchy without overriding a theme's styling of
 * anything outside it.
 */

.magelon-help-header__title,
.magelon-help-article__title {
	font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem);
	line-height: 1.15;
	font-weight: 700;
}

.magelon-help-header__description {
	font-size: 1.05rem;
}

.magelon-help-article__content h2 {
	font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.7rem);
	line-height: 1.25;
	font-weight: 700;
	margin-top: 2.25em;
}

.magelon-help-article__content h3 {
	font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
	line-height: 1.3;
	font-weight: 700;
	margin-top: 2em;
}

.magelon-help-article__content ul,
.magelon-help-article__content ol {
	padding-left: 1.4em;
}

.magelon-help-article__content li {
	list-style: revert;
	margin-top: 0.35em;
}

.magelon-help-article__content > *:first-child {
	margin-top: 0;
}
