/**
 * Public Help Center — landing, category and article layouts.
 */

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

.kb-hero {
	background: var(--ma-black);
	padding: 64px 0 72px;
	text-align: center;
}

/* Scoped under .kb so theme sheets loaded later cannot repaint the hero. */
.kb .kb-hero__title {
	color: var(--ma-white);
	font-size: 40px;
	line-height: 1.15;
	font-weight: 600;
	margin: 0 0 28px;
}

.kb .kb-hero__title--with-sub {
	margin-bottom: 10px;
}

/* Scoped past the generic `.kb p` rule for the same reason as the title. */
.kb .kb-hero__sub {
	max-width: 560px;
	margin: 0 auto 28px;
	font-size: 17px;
	line-height: 26px;
	color: var(--ma-gray-500);
}

.kb-hero .kb-search {
	margin: 0 auto;
}

/*
 * Deliberately quiet: staff need to find it, customers should scan past it.
 * Contrast still clears AA against the near-black hero.
 */
.kb .kb-hero__staff {
	margin: 22px 0 0;
	font-size: 13px;
}

.kb .kb-hero__staff a {
	color: var(--ma-gray-500);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: color 200ms ease, border-color 200ms ease;
}

.kb .kb-hero__staff a:hover,
.kb .kb-hero__staff a:focus {
	color: var(--ma-white);
	border-bottom-color: var(--ma-gray-600);
	text-decoration: none;
}

/* ---------- Landing page, laid out like a help center home (Nov 27) ---------- */

/* A taller band and a wide, square-cornered search: the search is the page. */
.kb-hero--hub {
	padding: 72px 0 80px;
}

.kb .kb-hero--hub .kb-hero__title {
	font-size: 44px;
	margin-bottom: 32px;
}

.kb .kb-hero--hub .kb-hero__title--with-sub {
	margin-bottom: 12px;
}

.kb-hero--hub .kb-search {
	max-width: 720px;
}

.kb-hero--hub .kb-search__input {
	height: 60px;
	padding-left: 56px;
	font-size: 18px;
	border-radius: var(--ma-radius-sm);
	box-shadow: none;
}

.kb-hero--hub .kb-search__icon {
	left: 20px;
	width: 22px;
	height: 22px;
}

/* Topics sit on white, straight under the search. */
.kb-topics {
	background: var(--ma-white);
	padding: 56px 0 72px;
}

.kb .kb-topics .kb-section__title {
	margin-bottom: 32px;
}

/* The topic cards keep the hub's own left-aligned card (Logan, Nov 27). */

.kb-help--landing .kb-section--tight {
	padding-top: 0;
}

@media (max-width: 767px) {
	.kb-hero--hub {
		padding: 48px 0 52px;
	}

	.kb .kb-hero--hub .kb-hero__title {
		font-size: 30px;
		margin-bottom: 24px;
	}

	.kb-hero--hub .kb-search__input {
		height: 54px;
		font-size: 16px;
	}

	.kb-topics {
		padding: 40px 0 48px;
	}
}

/* ---------- Most viewed ---------- */

.kb-popular {
	columns: 2;
	column-gap: 48px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.kb-popular li {
	break-inside: avoid;
	margin-bottom: 14px;
}

.kb-popular a {
	font-size: 15px;
	font-weight: 500;
	color: var(--ma-gray-900);
}

.kb-popular a:hover {
	color: var(--ma-red);
}

/* ---------- Contact band ---------- */

/* Left-aligned, like the headings and the cards above it (Logan, Nov 27). */
.kb-contact {
	background: var(--ma-gray-100);
	text-align: left;
	padding: 56px 0 64px;
}

.kb-contact__title {
	font-size: 26px;
	line-height: 34px;
	font-weight: 600;
	margin: 0 0 10px;
}

/* Scoped past the generic `.kb p` margin rule, which would otherwise strip the
   auto side margins and knock this out of centre. */
.kb .kb-contact__text {
	max-width: 680px;
	margin: 0;
	font-size: 17px;
	line-height: 28px;
	color: var(--ma-gray-900);
}

.kb .kb-contact__text a {
	color: var(--ma-black);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.kb .kb-contact__text a:hover,
.kb .kb-contact__text a:focus {
	color: var(--ma-red);
}

/* A phone number must never break across two lines. */
.kb .kb-contact__number {
	white-space: nowrap;
}

.kb-contact__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
}

@media (max-width: 767px) {
	.kb-contact {
		padding: 44px 0;
	}
}

/* ---------- Support form ---------- */

.kb .kb-contact__phone {
	margin: 0 auto 32px;
	font-size: 15px;
	color: var(--ma-gray-700);
}

/* The band is centred; the form inside it is not — left-aligned labels are
   far easier to scan down than centred ones. */
.kb-form {
	max-width: 640px;
	margin: 0 auto;
	text-align: left;
}

.kb-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 20px;
}

.kb-field {
	margin-bottom: 20px;
}

.kb-field__label {
	display: block;
	margin-bottom: 8px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--ma-gray-700);
}

/*
 * 16px is not a style choice: anything smaller makes iOS Safari zoom the
 * viewport on focus, which on a 45%-mobile audience is a real bug.
 */
.kb-field__input {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 12px 16px;
	font-family: inherit;
	font-size: 16px;
	line-height: 24px;
	color: var(--ma-black);
	background: var(--ma-white);
	border: 1px solid var(--ma-gray-300);
	border-radius: var(--ma-radius-sm);
	transition: border-color 200ms ease, box-shadow 200ms ease;
}

.kb-field__input::placeholder {
	color: var(--ma-gray-500);
}

.kb-field__input:focus {
	outline: none;
	border-color: var(--ma-black);
	box-shadow: var(--ma-shadow-inset), 0 0 0 1px var(--ma-black);
}

.kb-field__select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z' fill='%23717375'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 12px 8px;
}

.kb-field__textarea {
	min-height: 120px;
	resize: vertical;
}

.kb-field__hint {
	margin: 6px 0 0;
	font-size: 12px;
	color: var(--ma-gray-600);
}

.kb-field__hint.is-over {
	color: var(--ma-red);
	font-weight: 600;
}

.kb-check {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 8px;
}

.kb-check__box {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--ma-red);
}

.kb .kb-check__label {
	margin: 0;
	font-size: 14px;
	line-height: 20px;
	color: var(--ma-gray-700);
}

.kb-form__actions {
	margin-top: 24px;
}

.kb .kb-form__note {
	margin: 12px 0 0;
	font-size: 13px;
	line-height: 20px;
	color: var(--ma-gray-600);
}

/* Result of a submission, shown above the form after the redirect back. */
.kb .kb-form__result {
	max-width: 640px;
	margin: 0 auto 24px;
	padding: 14px 18px;
	border-radius: var(--ma-radius-sm);
	border-left: 4px solid var(--ma-success);
	background: rgba(0, 166, 153, 0.08);
	color: var(--ma-gray-900);
	font-size: 15px;
	text-align: left;
}

.kb .kb-form__result--error {
	border-left-color: var(--ma-red);
	background: var(--ma-red-light);
}

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.kb-hp {
	position: absolute !important;
	left: -10000px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 767px) {
	.kb-form__row {
		grid-template-columns: 1fr;
	}

	.kb .kb-contact__phone {
		margin-bottom: 24px;
	}
}

/* ---------- Category page ---------- */

.kb-layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 48px;
	align-items: start;
	padding-bottom: 64px;
}

.kb-sidebar__title {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--ma-gray-700);
	margin: 0 0 12px;
}

.kb-sidebar__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.kb-sidebar__list li {
	margin-bottom: 2px;
}

.kb-sidebar__list a {
	display: block;
	padding: 10px 12px;
	border-radius: var(--ma-radius-sm);
	font-size: 15px;
	color: var(--ma-gray-700);
	transition: background-color 200ms ease;
}

.kb-sidebar__list a:hover {
	background: var(--ma-gray-200);
	text-decoration: none;
}

.kb-sidebar__list a[aria-current="true"] {
	background: var(--ma-gray-200);
	color: var(--ma-black);
	font-weight: 500;
}

.kb-page-title {
	font-size: 32px;
	line-height: 42px;
	font-weight: 600;
	margin: 0 0 8px;
}

.kb-page-intro {
	font-size: 18px;
	line-height: 26px;
	color: var(--ma-gray-700);
	margin: 0 0 32px;
}

/* ---------- Category page, redesigned (Nov 27) ---------- */

/* The Help Center bar: slim and black, with only three things in it. */
.kb-helpbar {
	background: var(--ma-black);
	padding: 12px 0;
}

.kb-helpbar__row {
	display: flex;
	align-items: center;
	gap: 24px;
}

.kb .kb-helpbar__home {
	flex: none;
	font-size: 18px;
	font-weight: 600;
	line-height: 1;
	color: var(--ma-white);
	text-decoration: none;
}

.kb .kb-helpbar__home:hover,
.kb .kb-helpbar__home:focus {
	color: var(--ma-white);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.kb-helpbar__search {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	min-width: 0;
}

.kb-helpbar__search .kb-search {
	max-width: 560px;
}

.kb-helpbar__search .kb-search__input {
	height: 44px;
	padding-left: 46px;
	font-size: 15px;
	border-radius: var(--ma-radius-sm);
	box-shadow: none;
}

.kb-helpbar__search .kb-search__icon {
	left: 16px;
	width: 18px;
	height: 18px;
}

/* The page's own header, on white: where you are, then the topic. */
.kb-cathead {
	background: var(--ma-white);
	border-bottom: 1px solid var(--ma-gray-300);
	padding: 0 0 36px;
}

.kb-cathead .kb-breadcrumbs {
	padding: 20px 0 24px;
}

.kb-cathead__main {
	display: flex;
	align-items: center;
	gap: 20px;
}

/* The topic's own icon, white on a red tile. */
.kb-cathead__icon {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: var(--ma-radius-md);
	background: var(--ma-red);
}

.kb-cathead__icon .kb-card__icon {
	width: 34px;
	height: 34px;
	margin: 0;
	background-color: var(--ma-white);
}

.kb-cathead__icon .kb-card__icon--image {
	background: none;
}

.kb .kb-cathead__title {
	margin: 0 0 6px;
	font-size: 36px;
	line-height: 42px;
	font-weight: 600;
	color: var(--ma-black);
}

.kb .kb-cathead__intro {
	max-width: 620px;
	margin: 0;
	font-size: 17px;
	line-height: 26px;
	color: var(--ma-gray-700);
}

/* Under the band the page sits on gray, so the white panels stand out. */
.kb-catbody {
	background: var(--ma-gray-100);
	padding: 40px 0 8px;
}

.kb-help--category .kb-layout {
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: 32px;
}

/* A grid child may not grow past its column (the swipe row of topics would push the page wide). */
.kb-help--category .kb-sidebar,
.kb-help--category .kb-content {
	min-width: 0;
}

/* The other topics, each with its icon. */
.kb-sidebar--panel {
	padding: 20px 12px 12px;
	background: var(--ma-white);
	border: 1px solid var(--ma-gray-300);
	border-radius: var(--ma-radius-md);
}

.kb .kb-sidebar--panel .kb-sidebar__title {
	margin: 0 12px 12px;
}

.kb-sidebar--panel .kb-sidebar__list a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	font-size: 15px;
	line-height: 20px;
	color: var(--ma-gray-800);
	transition: background-color 200ms ease, color 200ms ease;
}

.kb-sidebar--panel .kb-sidebar__list .kb-card__icon {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	background-color: var(--ma-gray-600);
	transition: background-color 200ms ease;
}

.kb-sidebar--panel .kb-sidebar__list a:hover {
	background: var(--ma-gray-100);
	color: var(--ma-black);
}

.kb-sidebar--panel .kb-sidebar__list a[aria-current="true"] {
	background: var(--ma-red-light);
	color: var(--ma-black);
	font-weight: 600;
}

.kb-sidebar--panel .kb-sidebar__list a:hover .kb-card__icon,
.kb-sidebar--panel .kb-sidebar__list a[aria-current="true"] .kb-card__icon {
	background-color: var(--ma-red);
}

/* One white panel of articles: rows, not a stack of separate boxes. */
.kb-list--rows {
	gap: 0;
	background: var(--ma-white);
	border: 1px solid var(--ma-gray-300);
	border-radius: var(--ma-radius-md);
	overflow: hidden;
}

.kb-list--rows .kb-list__item {
	border: 0;
	border-radius: 0;
	box-shadow: none;
	border-bottom: 1px solid var(--ma-gray-200);
	transition: background-color 200ms ease;
}

.kb-list--rows .kb-list__item:last-child {
	border-bottom: 0;
}

.kb-list--rows .kb-list__item:hover {
	box-shadow: none;
	background: var(--ma-gray-100);
}

.kb-list--rows .kb-list__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 20px 24px;
}

.kb-list--rows .kb-list__text {
	min-width: 0;
}

.kb .kb-list--rows .kb-list__title {
	transition: color 200ms ease;
}

/* Hovering marks the title only. The line under it stays as it is. */
.kb .kb-list--rows .kb-list__link,
.kb .kb-list--rows .kb-list__link:hover,
.kb .kb-list--rows .kb-list__link:focus {
	text-decoration: none;
}

.kb .kb-list--rows .kb-list__link:hover .kb-list__title,
.kb .kb-list--rows .kb-list__link:focus .kb-list__title {
	color: var(--ma-red);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.kb .kb-list--rows .kb-list__link:hover .kb-list__summary,
.kb .kb-list--rows .kb-list__link:focus .kb-list__summary {
	color: var(--ma-gray-700);
	text-decoration: none;
}

.kb-list__arrow {
	flex: none;
	width: 20px;
	height: 20px;
	color: var(--ma-gray-500);
	transition: color 200ms ease, transform 200ms ease;
}

.kb-list--rows .kb-list__link:hover .kb-list__arrow,
.kb-list--rows .kb-list__link:focus .kb-list__arrow {
	color: var(--ma-red);
	transform: translateX(3px);
}

@media (max-width: 1024px) {
	.kb-help--category .kb-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	/* On a small screen the topics become one row to swipe, above the list. */
	.kb-sidebar--panel {
		order: -1;
		padding: 12px;
	}

	.kb .kb-sidebar--panel .kb-sidebar__title {
		margin: 0 4px 8px;
	}

	.kb-sidebar--panel .kb-sidebar__list {
		display: flex;
		gap: 8px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.kb-sidebar--panel .kb-sidebar__list::-webkit-scrollbar {
		display: none;
	}

	.kb-sidebar--panel .kb-sidebar__list li {
		flex: none;
		margin: 0;
	}

	.kb-sidebar--panel .kb-sidebar__list a {
		white-space: nowrap;
		border: 1px solid var(--ma-gray-300);
	}

	.kb-sidebar--panel .kb-sidebar__list a[aria-current="true"] {
		border-color: var(--ma-red);
	}
}

@media (max-width: 767px) {
	.kb-catbody {
		padding-top: 24px;
	}

	.kb-list--rows .kb-list__link {
		padding: 16px 18px;
	}
}

/* ---------- Team sign in, search under the title, the page bottom (Nov 27) ---------- */

/* Two buttons of one size under the search: red Contact Us, outlined Team sign in. */
.kb-help-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 24px;
}

.kb .kb-help-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 156px;
	height: 44px;
	padding: 0 20px;
	box-sizing: border-box;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	border: 1px solid transparent;
	border-radius: var(--ma-radius-btn);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.kb .kb-help-btn--red {
	color: var(--ma-white);
	background: var(--ma-red);
	border-color: var(--ma-red);
}

.kb .kb-help-btn--red:hover,
.kb .kb-help-btn--red:focus {
	color: var(--ma-white);
	background: #d91f00;
	border-color: #d91f00;
	text-decoration: none;
}

.kb .kb-help-btn--line {
	color: var(--ma-white);
	background: transparent;
	border-color: rgba(255, 255, 255, 0.5);
}

.kb .kb-help-btn--line:hover,
.kb .kb-help-btn--line:focus {
	color: var(--ma-black);
	background: var(--ma-white);
	border-color: var(--ma-white);
	text-decoration: none;
}

/* The outlined Team sign in button of the bar. */
.kb .kb-staff-btn {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 40px;
	padding: 0 14px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	color: var(--ma-white);
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: var(--ma-radius-btn);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.kb .kb-staff-btn svg {
	width: 16px;
	height: 16px;
}

.kb .kb-staff-btn:hover,
.kb .kb-staff-btn:focus {
	color: var(--ma-black);
	background: var(--ma-white);
	border-color: var(--ma-white);
	text-decoration: none;
}

@media (max-width: 767px) {
	/* Two lines: the name and the button, then the search across. */
	.kb-helpbar__row {
		flex-wrap: wrap;
		justify-content: space-between;
		gap: 12px;
	}

	.kb-helpbar__search {
		order: 3;
		flex: 1 0 100%;
	}

	.kb-helpbar__search .kb-search {
		max-width: none;
	}

	.kb-cathead {
		padding-bottom: 24px;
	}

	.kb-cathead .kb-breadcrumbs {
		padding: 14px 0 18px;
	}

	.kb-cathead__main {
		align-items: flex-start;
		gap: 14px;
	}

	.kb-cathead__icon {
		width: 48px;
		height: 48px;
	}

	.kb-cathead__icon .kb-card__icon {
		width: 26px;
		height: 26px;
	}

	.kb .kb-cathead__title {
		font-size: 26px;
		line-height: 32px;
	}

	.kb .kb-cathead__intro {
		font-size: 16px;
		line-height: 24px;
	}
}

/* The bottom of a category page: the list ends, then a white Contact us band
   with a line above it, so the two gray areas no longer run into each other. */
.kb-help--category .kb-layout {
	padding-bottom: 0;
}

.kb-catbody {
	padding-bottom: 56px;
}

.kb-help--category .kb-contact {
	background: var(--ma-white);
	border-top: 1px solid var(--ma-gray-300);
	padding: 48px 0 56px;
}

@media (max-width: 767px) {
	.kb .kb-help-btn {
		min-width: 140px;
	}

	.kb-catbody {
		padding-bottom: 40px;
	}
}

/* The article styles are in kb-shared.css: internal documents use them too. */

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.kb-layout {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}

@media (max-width: 767px) {
	.kb-hero {
		padding: 44px 0 48px;
	}

	.kb-hero__title {
		font-size: 28px;
	}

	.kb-popular {
		columns: 1;
	}

	.kb-page-title {
		font-size: 26px;
		line-height: 34px;
	}

	.kb-article__body {
		font-size: 16px;
	}
}

/* ---------- Print (SOPs get printed) ---------- */

@media print {
	.kb-hero,
	.kb-contact,
	.kb-breadcrumbs,
	.kb-sidebar,
	.kb-article__footer {
		display: none !important;
	}

	.kb-article {
		max-width: none;
	}

	.kb-article__body a::after {
		content: " (" attr(href) ")";
		font-size: 12px;
		color: #555;
	}
}
