/**
 * Help section (template-help.php, inc/help.php): the help page with the banner, the topic tiles, the most frequent
 * questions, the contact and the documents; the topic pages with the list of topics and the questions as
 * "Szczegóły" blocks. Follows the "Pomoc" mockups (decision 52). Colours: assets/css/tokens.css.
 *
 * Sections: 1. page, 2. search, 3. banner, 4. topic tiles, 5. most frequent questions, 6. contact and documents,
 * 7. topic page, 8. questions, 9. narrower screens.
 */

/* ------------------------------------------------------------------
   1. Page: the whole container, no page sidebar
   ------------------------------------------------------------------ */
.sz-help {
	--sz-help-radius: 10px;
}
.sz-help.content-area {
	float: none;
	width: 100%;
}
.sz-help-page .sz-icon {
	flex: none;
	width: 18px;
	height: 18px;
	fill: none;
	stroke: var(--sz-navy);
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.sz-help h2 {
	margin: 0;
}

/* ------------------------------------------------------------------
   2. Search: the field and the panel of results under it (assets/js/help.js)
   ------------------------------------------------------------------ */
.sz-help-search {
	position: relative;
}
.sz-help-search__field {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 48px;
	padding: 0 14px;
	border: 1.5px solid var(--sz-field);
	border-radius: 8px;
	background: #fff;
	transition: border-color 0.15s ease-out;
}
.sz-help-search__field:focus-within {
	border-color: var(--sz-navy);
}
.sz-help-search__field .sz-icon {
	width: 19px;
	height: 19px;
}
.sz-help-search input[type="search"] {
	flex: 1;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	background: transparent;
	box-shadow: none;
	font-size: 15px;
	color: var(--sz-ink);
	-webkit-appearance: none;
	appearance: none;
}
.sz-help-search input[type="search"]::placeholder {
	color: var(--sz-mute);
	opacity: 1;
}
.sz-help-search input[type="search"]::-webkit-search-cancel-button {
	cursor: pointer;
}
.sz-help-search__panel {
	position: absolute;
	z-index: 30;
	top: calc(100% + 6px);
	right: 0;
	left: 0;
	max-height: min(420px, 60vh);
	overflow-y: auto;
	border: 1px solid var(--sz-line);
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(20, 20, 20, 0.1);
}
.sz-help-search__result {
	display: block;
	padding: 12px 16px;
	border-top: 1px solid var(--sz-line);
	color: var(--sz-ink);
	text-decoration: none;
}
.sz-help-search__result:first-child {
	border-top: 0;
}
.sz-help-search__result:hover,
.sz-help-search__result.is-active {
	background: var(--sz-bg2);
}
.sz-help-search__q {
	display: block;
	font-size: 14.5px;
	line-height: 1.4;
}
.sz-help-search__q mark {
	padding: 0;
	background: #fdf0b8;
	color: inherit;
}
.sz-help-search__topic {
	display: block;
	margin-top: 2px;
	font-size: 12.5px;
	color: var(--sz-mute);
}
.sz-help-search__note {
	margin: 0;
	padding: 12px 16px;
	font-size: 14px;
	line-height: 21px;
	color: var(--sz-ink2);
}
.sz-help-search__note a {
	color: var(--sz-navy);
	text-decoration: underline;
}
.sz-help-search__more {
	margin: 0;
	padding: 10px 16px;
	border-top: 1px solid var(--sz-line);
	background: var(--sz-bg2);
	font-size: 13px;
	color: var(--sz-mute);
}

/* ------------------------------------------------------------------
   3. Banner of the help page: breadcrumbs, heading, lead, search
   ------------------------------------------------------------------ */
.sz-help-banner {
	background: var(--sz-bg2);
}
.sz-help-banner__inner {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 22px;
	padding-bottom: 40px;
}
.sz-help-banner .woocommerce-breadcrumb {
	margin: 0 0 6px;
	padding: 0;
	font-size: 13px;
	line-height: 18px;
}
.sz-help-banner .sz-help-banner__title {
	margin: 0;
	font-size: 36px;
	font-weight: 700;
	line-height: 44px;
	color: var(--sz-ink);
}
.sz-help-banner__lead p {
	margin: 0;
	font-size: 16px;
	line-height: 24px;
	color: var(--sz-ink2);
}
.sz-help-banner .sz-help-search {
	width: 720px;
	max-width: 100%;
	margin-top: 10px;
}
.sz-help-banner .sz-help-search__field {
	height: 54px;
	padding: 0 16px;
}
.sz-help-banner .sz-help-search input[type="search"] {
	font-size: 16px;
}

/* ------------------------------------------------------------------
   4. Topic tiles: 3 in a row, the icon beside the name, the sentence and the number of questions under them
   ------------------------------------------------------------------ */
.sz-help .sz-help-topics {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 32px 0 0;
	padding: 0;
	list-style: none;
}
.sz-help .sz-help-topics li {
	display: flex;
	margin: 0;
}
.sz-help-topic {
	display: grid;
	flex: 1;
	grid-template-columns: auto minmax(0, 1fr);
	grid-template-rows: auto 1fr auto;
	align-items: center;
	gap: 8px 12px;
	padding: 16px 18px;
	border: 1px solid var(--sz-line);
	border-radius: var(--sz-help-radius);
	background: #fff;
	color: var(--sz-ink);
	text-decoration: none;
	transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}
.sz-help-topic:hover {
	border-color: var(--sz-field);
	box-shadow: 0 6px 18px rgba(20, 20, 20, 0.06);
}
.sz-help-topic__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--sz-bg2);
}
.sz-help-page .sz-help-topic__icon .sz-icon {
	width: 19px;
	height: 19px;
}
.sz-help .sz-help-topic__title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--sz-ink);
}
.sz-help-topic__lead {
	grid-column: 1 / -1;
	align-self: start;
	margin: 0;
	font-size: 13.5px;
	line-height: 20px;
	color: var(--sz-ink2);
}
.sz-help-topic__count {
	grid-column: 1 / -1;
	font-size: 12.5px;
	color: var(--sz-mute);
}

/* ------------------------------------------------------------------
   5. Most frequent questions, with the contact and the documents beside them
   ------------------------------------------------------------------ */
.sz-help-home {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	gap: 48px;
	align-items: start;
	margin: 48px 0 56px;
}
.sz-help .sz-help-popular__title {
	margin-bottom: 6px;
	font-size: 24px;
	font-weight: 600;
	line-height: 32px;
	color: var(--sz-ink);
}
.sz-help-popular ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.sz-help-popular li {
	margin: 0;
	border-top: 1px solid var(--sz-line);
}
.sz-help-popular a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 15px 0;
	color: var(--sz-ink);
	text-decoration: none;
}
.sz-help-popular a:hover .sz-help-popular__q {
	color: var(--sz-navy);
	text-decoration: underline;
}
.sz-help-popular__text {
	min-width: 0;
}
.sz-help-popular__q {
	display: block;
	font-size: 15.5px;
	line-height: 1.4;
}
.sz-help-popular__topic {
	display: block;
	margin-top: 2px;
	font-size: 12.5px;
	color: var(--sz-mute);
}
.sz-help-page .sz-help-popular .sz-icon {
	width: 16px;
	height: 16px;
}
.sz-help-home__side {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* ------------------------------------------------------------------
   6. Contact and documents
   ------------------------------------------------------------------ */
.sz-help-contact {
	padding: 20px;
	border-radius: 12px;
	background: var(--sz-bg2);
}
.sz-help-contact.is-wide {
	margin-top: 32px;
	padding: 26px 28px;
}
.sz-help .sz-help-contact__title {
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--sz-ink);
}
.sz-help .is-wide .sz-help-contact__title {
	font-size: 20px;
}
.sz-help-contact__lead {
	margin: 6px 0 0;
	font-size: 14px;
	line-height: 21px;
	color: var(--sz-ink2);
}
.sz-help-contact__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	margin-top: 16px;
}
.is-wide .sz-help-contact__body {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
}
/* Only the form (no phone, no e-mail): on the topic page the button stands next to the title and the lead. */
@media (min-width: 701px) {
	.sz-help-contact.is-wide.is-form-only {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		column-gap: 32px;
		align-items: center;
	}
	.is-wide.is-form-only .sz-help-contact__body {
		grid-column: 2;
		grid-row: 1 / span 2;
		margin-top: 0;
	}
}
.sz-help-contact__ways {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.is-wide .sz-help-contact__ways {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 16px 40px;
}
.sz-help-contact__ways li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
}
.sz-help-contact__icon {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #fff;
}
.sz-help-contact__ways strong {
	display: block;
	font-size: 15px;
	font-weight: 600;
	line-height: 20px;
	color: var(--sz-ink);
}
.sz-help-contact__ways strong a {
	color: inherit;
	text-decoration: none;
}
.sz-help-contact__ways small {
	display: block;
	font-size: 13px;
	line-height: 18px;
	color: var(--sz-mute);
}
.sz-help-contact__form {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 20px;
	border-radius: var(--sz-radius);
	background: var(--sz-navy);
	font-size: 14.5px;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
}
.sz-help-contact__form:hover,
.sz-help-contact__form:focus {
	background: var(--sz-navy-dark);
	color: #fff;
}
.sz-help-docs {
	padding: 18px 20px;
	border: 1px solid var(--sz-line);
	border-radius: var(--sz-help-radius);
}
.sz-help .sz-help-docs__title {
	margin-bottom: 8px;
	font-size: 15px;
	font-weight: 600;
	color: var(--sz-ink);
}
.sz-help-docs ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.sz-help-docs li {
	margin: 0;
}
.sz-help-docs a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 0;
	font-size: 14px;
	color: var(--sz-navy);
	text-decoration: underline;
}
.sz-help-page .sz-help-docs .sz-icon {
	width: 16px;
	height: 16px;
}

/* ------------------------------------------------------------------
   7. Topic page: the list of topics beside the answers
   ------------------------------------------------------------------ */
.sz-help-layout {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: 48px;
	align-items: start;
	margin: 6px 0 56px;
}
.sz-help-side {
	position: sticky;
	/* Under the sticky header of the theme */
	top: 84px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.sz-help-nav ul {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.sz-help-nav li {
	margin: 0;
}
.sz-help-nav a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: var(--sz-radius);
	font-size: 14.5px;
	line-height: 1.3;
	color: var(--sz-ink2);
	text-decoration: none;
}
.sz-help-nav a:hover {
	background: var(--sz-bg2);
	color: var(--sz-ink);
}
.sz-help-nav a[aria-current="page"] {
	background: var(--sz-bg2);
	font-weight: 600;
	color: var(--sz-ink);
}
.sz-help .sz-help-title {
	margin: 0;
	font-size: 34px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--sz-ink);
}
.sz-help-answers p.sz-help-summary {
	margin: 8px 0 24px;
	font-size: 16px;
	line-height: 24px;
	color: var(--sz-ink2);
}

/* ------------------------------------------------------------------
   8. Questions: "Szczegóły" blocks as an accordion
   ------------------------------------------------------------------ */
.sz-help-answers .wp-block-details {
	margin: 0 0 10px;
	border: 1px solid var(--sz-line);
	border-radius: 8px;
	background: #fff;
	/* Clear of the sticky header of the theme */
	scroll-margin-top: 90px;
	transition: box-shadow 0.2s ease-out, border-color 0.2s ease-out;
}
.sz-help-answers .wp-block-details.is-target {
	border-color: var(--sz-navy);
	box-shadow: inset 0 0 0 1px var(--sz-navy);
}
.sz-help-answers summary {
	position: relative;
	padding: 16px 52px 16px 22px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	list-style: none;
	color: var(--sz-ink);
	cursor: pointer;
}
.sz-help-answers summary::-webkit-details-marker {
	display: none;
}
.sz-help-answers summary::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 22px;
	width: 18px;
	height: 18px;
	margin-top: -9px;
	background: var(--sz-chevron) center / contain no-repeat;
	transition: transform 0.15s ease-out;
}
.sz-help-answers details[open] > summary::after {
	transform: rotate(180deg);
}
.sz-help-answers summary:focus-visible {
	border-radius: 8px;
	outline: 2px solid var(--sz-focus);
	outline-offset: 2px;
}
.sz-help-answers .wp-block-details p {
	margin: 0;
	padding: 0 22px 20px;
	font-size: 15px;
	line-height: 24px;
	color: var(--sz-ink2);
}
.sz-help-answers .wp-block-details p a {
	color: var(--sz-navy);
	text-decoration: underline;
}

/* ------------------------------------------------------------------
   9. Narrower screens
   ------------------------------------------------------------------ */
@media (max-width: 1199px) {
	.sz-help-home {
		grid-template-columns: minmax(0, 1fr) 340px;
		gap: 36px;
	}
}

@media (max-width: 992px) {
	.sz-help .sz-help-topics {
		gap: 12px;
	}
	.sz-help-topic {
		padding: 14px 16px;
	}
	.sz-help-home {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}
	.sz-help-home__side {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: start;
	}

	/* Topic page: the search and a scrolled row of topics above the answers */
	.sz-help-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
		margin-top: 0;
	}
	.sz-help-side {
		position: static;
		min-width: 0;
	}
	.sz-help-nav {
		margin: 0 -1em;
	}
	.sz-help-nav ul {
		flex-direction: row;
		gap: 8px;
		padding: 0 1em 4px;
		overflow-x: auto;
		scrollbar-width: none;
	}
	.sz-help-nav ul::-webkit-scrollbar {
		display: none;
	}
	.sz-help-nav li {
		flex: none;
	}
	.sz-help-nav a {
		padding: 8px 14px;
		border-radius: 99px;
		background: var(--sz-bg2);
		font-size: 13.5px;
		white-space: nowrap;
	}
	.sz-help-nav a[aria-current="page"] {
		background: var(--sz-navy);
		color: #fff;
	}
	.sz-help-page .sz-help-nav .sz-icon {
		display: none;
	}
}

@media (max-width: 700px) {
	.sz-help-banner__inner {
		gap: 8px;
		padding-top: 14px;
		padding-bottom: 22px;
	}
	.sz-help-banner .sz-help-banner__title {
		font-size: 26px;
		line-height: 32px;
	}
	.sz-help-banner__lead p {
		font-size: 14.5px;
		line-height: 22px;
	}
	.sz-help-banner .sz-help-search__field {
		height: 48px;
	}
	.sz-help-banner .sz-help-search input[type="search"],
	.sz-help-search input[type="search"] {
		font-size: 16px;
	}

	/* Tiles: 3 in a row, the icon above the name, without the sentence and the count */
	.sz-help .sz-help-topics {
		gap: 8px;
		margin-top: 18px;
	}
	.sz-help-topic {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 8px;
		padding: 14px 6px 12px;
		text-align: center;
	}
	.sz-help-topic__icon {
		width: 40px;
		height: 40px;
	}
	.sz-help-page .sz-help-topic__icon .sz-icon {
		width: 21px;
		height: 21px;
	}
	.sz-help .sz-help-topic__title {
		font-size: 13px;
		overflow-wrap: anywhere;
	}
	.sz-help-topic__lead,
	.sz-help-topic__count {
		display: none;
	}
	.sz-help-home {
		margin: 28px 0 32px;
	}
	.sz-help .sz-help-popular__title {
		font-size: 19px;
		line-height: 26px;
	}
	.sz-help-popular a {
		padding: 13px 0;
	}
	.sz-help-popular__q {
		font-size: 14.5px;
	}
	.sz-help-home__side {
		display: flex;
		align-items: stretch;
	}
	.sz-help-contact.is-wide {
		margin-top: 22px;
		padding: 20px;
	}
	.is-wide .sz-help-contact__body,
	.is-wide .sz-help-contact__ways {
		flex-direction: column;
		align-items: flex-start;
	}

	/* Topic page */
	.sz-help .sz-help-title {
		font-size: 26px;
	}
	.sz-help-answers p.sz-help-summary {
		margin: 6px 0 16px;
		font-size: 14.5px;
		line-height: 22px;
	}
	.sz-help-answers .wp-block-details {
		margin-bottom: 8px;
	}
	.sz-help-answers summary {
		padding: 14px 44px 14px 16px;
		font-size: 14.5px;
	}
	.sz-help-answers summary::after {
		right: 16px;
	}
	.sz-help-answers .wp-block-details p {
		padding: 0 16px 16px;
		font-size: 14px;
		line-height: 22px;
	}
}
