/*
	Custom styles migrated from documentation-pwa (src/stylesheets/*) and
	@eg-markdown-renderer/core/styles/*, translated to flat CSS using EGDS
	design tokens from /css/tokens/theme.css.

	EGDS component CSS is auto-extracted separately (see src/scripts/extract-egds.sh
	and src/hugo/layouts/partials/egds-css.html). This file holds only hand-maintained
	styling and must be linked AFTER the EGDS partial so it can override it.

	Breakpoints follow the EGDS scale — 576px (medium), 992px (large), 1200px
	(extra_large) — matching tokens/theme.css's --breakpoint__*__min. Those tokens
	cannot be referenced from a media query: @media conditions may not read custom
	properties, so every query here repeats the pixel value literally. Queries are
	min-width, mobile-first, like the extracted EGDS components; prefer adding a
	responsive uitk-* class in markup over a new query, since layout-grid and
	spacing already ship breakpoint variants.
*/

/* ---- App shell layout (documentation-pwa/src/stylesheets/style.scss) ----
	Locks the layout to the viewport height so #page-header stays fixed and the
	only scroll region is .document (see below). */
html,
body,
#app-documentation-pwa,
#app-layer-manager,
#app-layer-base {
	height: 100%;
}

#home-page-layout {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
}

#page-body {
	display: flex;
	height: 100%;
	overflow: hidden;
}

/* .document == doc-pwa #document (@extend .document-base): the single scroll
	region, so the header above it stays put. */
.document {
	background-color: var(--background_color__base);
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	overflow-y: auto;
	width: 100%;
}

/* Grid fills the scroll region so the footer's align-self:end reaches the
	bottom (EGDS ships flex-grow:1 on this grid; the hand-authored markup omits
	it, leaving the footer floating under the content). */
.document > .uitk-layout-grid {
	flex-grow: 1;
}

/* Article column clamp (documentation-pwa/src/stylesheets/document.scss:31,
	$article-max-width). Inert below roughly 1876px of viewport, where the
	6-of-10 grid track is already narrower than 60rem. doc-pwa guards this with
	:not(.reference) for API-reference pages, which span cols 2-10 and carry no
	TOC; docspace has no reference article variant, so the guard would match
	nothing here and is omitted rather than ported dead. */
.article {
	max-width: 60rem;
}

/* ---- Header (documentation-pwa/src/stylesheets/header.scss, variables.scss,
	search.scss, utils.scss) ---- */
/* One header serves both of the old stack's variants. Below the large breakpoint these
	rules reproduce #page-header-mobile (header.scss:33-35, page-header-mobile.tsx): a
	100px bar whose top row is a single flex line — logo, then the products menu and three
	icon-only controls pushed right — and the large block restores #page-header's 113px
	three-column grid (page-header-desktop.tsx).

	The two grouping divs become display: contents below the breakpoint so their children
	join that one flex line. Flattening them in markup instead would break the desktop
	grid, where the point of the groups is that [logo + products], [search] and
	[language + sign in] each occupy one of three equal columns — two items cannot share a
	column side by side. DOM order already matches the old stack's mobile order, so no
	reordering is needed. */
:root {
	/* header.scss's $header-height-mobile, raised to $header-height in the large block
		below. toc.js reads this rather than carrying its own copy — the scroll-spy
		subtracts the header, and two constants would drift apart.

		Declared here, ahead of that block: at equal specificity the later declaration
		wins whether or not it sits in a media query, so a base :root further down the
		file would silently beat the override and pin the header to its mobile height. */
	--page-header-block-size: 100px;
}

#page-header {
	background-color: var(--background_color__base);
	border-block-end: 1px solid var(--border_color__muted);
	min-height: var(--page-header-block-size);
}

#page-header .uitk-layout-grid {
	align-items: center;
	display: flex;
	/* The grid's inline column-gap still applies once this is a flex container, but the
		old stack's mobile row has none — each control carries its own padding instead. */
	column-gap: 0;
}

#page-header .uitk-layout-grid > .uitk-layout-flex {
	display: contents;
}

/* EGDS gives .uitk-menu display: inherit, so flattening the row above hands the language
	switcher's wrapper display: contents too — and an element with no box is no containing
	block, which leaves the wrapper's own position: relative inert. Its absolutely
	positioned dropdown then resolves against <body>, where inset-block-start: 100% puts
	it a full viewport below the header instead of under the trigger. Naming a display
	restores the box; flex matches what the wrapper computes above the breakpoint. */
#page-header .uitk-layout-grid > .uitk-layout-flex > .uitk-menu {
	display: flex;
}

/* The logo's flex item takes the slack, pushing the menu and the icons to the trailing
	edge. It is the item, not #logo-section one level inside it, that the flattened row
	lays out. */
#page-header .logo-item {
	flex-grow: 1;
}

/* The controls hold their size and the logo absorbs the shrink, so a narrow phone keeps
	48/48/44px touch targets rather than squeezing them. */
#page-header .uitk-layout-grid > .uitk-layout-flex > *:not(.logo-item),
#page-header .search-box-desktop {
	flex-shrink: 0;
}

/* The search key-hint and the language chevron carry no text, so these can go. */
#page-header .search-shortcut,
#page-header [data-testid="language-selection-button"] .uitk-icon-trailing {
	display: none;
}

/* The old stack's mobile language control is a large icon-only trigger whose glyph
	carries uitk-icon-large and uitk-icon-default-theme, measuring 24px in the default
	fill colour; its desktop control is the small text button docspace renders at every
	width, whose glyph is 16px and takes the button's action blue. Both ends are set
	explicitly here because the upstream size does not reduce to a single token — the
	trigger's own classes imply 18px and 32px, yet it lands on the plain icon default. */
#page-header [data-testid="language-selection-button"] .uitk-icon-leading {
	/* Both variables: block-size reads --egds-icons__size__block ahead of the general
		one, and .uitk-button-small sets it, so the general variable alone leaves the
		glyph 24px wide and 16px tall. */
	--egds-icons__size: var(--icon__m__sizing);
	--egds-icons__size__block: var(--icon__m__sizing);
	color: var(--fill_color__default);
}

/* The trigger button carries an inline width: 100%, which no rule here can outrank, so
	the target is sized through .search — its containing block — and the button resolves
	its own 100% to 48px. Sizing the grid item instead leaves the button 24px wide inside
	a 48px box, which looks right and halves the tap target.

	:not(.active) so the expand-on-focus width below still applies. An id in this
	selector outranks .search.active on ID count alone, whatever the class count or
	source order, and would pin the box shut the day that class is wired up. */
#page-header .search-box-desktop .search:not(.active) {
	width: 48px;
}

#page-header [data-testid="language-selection-button"] {
	block-size: 48px;
	inline-size: 48px;
	justify-content: center;
}

#page-header .sign-in,
#page-header .account-menu-trigger {
	block-size: 44px;
	inline-size: 44px;
	justify-content: center;
	min-inline-size: 0;
}

/* The old stack's mobile auth control is a transparent icon trigger, not the primary
	button (sign-in-button.tsx:19-39 renders EGDSMenuIconTrigger). EGDS paints the primary
	fill with ::before and ::after — the button's own background is already none — so the
	fill is removed by dropping those, which also means restoring it at the breakpoint
	needs only EGDS's own content value and no colour token. The glyph then takes the
	default text colour, matching the reference's rgb(25, 30, 59). */
#page-header .sign-in::before,
#page-header .sign-in::after,
#page-header .account-menu-trigger::before,
#page-header .account-menu-trigger::after {
	content: none;
}

#page-header .sign-in-icon {
	fill: var(--text_color__default);
}

/* The signed-in account trigger takes the same mobile icon / desktop button
	shape (authenticated-user-menu-mobile.tsx vs -desktop.tsx), except that the
	desktop button keeps its account_circle glyph beside the account name. */
#page-header .account-menu-icon {
	fill: var(--text_color__default);
}

/* Stripped of the card's fill and rounding, the pill becomes a bare 48px icon target. */
#page-header .search-box-desktop .uitk-card {
	background: none;
	border-radius: 0;
	padding: 0;
}

#page-header .search-box-desktop button {
	block-size: 48px;
}

/* The products menu (navigation-dropdown-menu.html). Below the breakpoint the old stack
	renders NavigationMenuMobile: 285px wide, pinned to the trigger's trailing edge, one
	column, items in the 300 and 100 type sizes. At it, NavigationMenuDesktop: 600px from
	the leading edge, two columns, the label taking the button's own size and the
	description the 200 size. The old mobile menu overhangs the viewport's leading edge
	whenever the trigger ends less than 285px in; the max-inline-size and js/menu.js keep
	it on screen instead. */
#page-header .navigation-menu-container {
	inset-inline-end: 0;
	inset-inline-start: auto;
	max-inline-size: calc(100vw - 16px);
	width: 285px;
}

/* The grid sits inside the header row, whose #page-header .uitk-layout-grid rule above
	flattens every grid in the header to a flex line; this one stays a grid. */
#page-header .navigation-menu-grid {
	--uitk-layoutgrid-columns: repeat(1, minmax(0, 1fr));
	align-items: normal;
	column-gap: var(--uitk-layoutgrid-column-gap);
	display: grid;
}

#page-header .navigation-menu-item-label {
	font-size: var(--font__size__300);
	line-height: var(--font__line_height__300);
}

#page-header .navigation-menu-item-description {
	--egds-legacy-font-size: var(--font__size__100);
	--egds-legacy-line-height: var(--font__line_height__100);
}

.navigation-menu[open] > summary .navigation-menu-expand-more,
.navigation-menu:not([open]) > summary .navigation-menu-expand-less {
	display: none;
}

@media screen and (min-width: 992px) {
	#page-header .navigation-menu-container {
		inset-inline-end: auto;
		inset-inline-start: 0;
		max-inline-size: none;
		width: 600px;
	}

	#page-header .navigation-menu-grid-two-columns {
		--uitk-layoutgrid-columns: repeat(2, minmax(0, 1fr));
	}

	#page-header .navigation-menu-item-label {
		font-size: inherit;
		line-height: inherit;
	}

	#page-header .navigation-menu-item-description {
		--egds-legacy-font-size: var(--font__size__200);
		--egds-legacy-line-height: var(--font__line_height__200);
	}
}

@media screen and (min-width: 992px) {
	:root {
		--page-header-block-size: 113px;
	}

	#page-header {
		min-height: var(--page-header-block-size);
	}

	#page-header .uitk-layout-grid {
		align-items: normal;
		column-gap: var(--uitk-layoutgrid-column-gap);
		display: grid;
	}

	#page-header .uitk-layout-grid > .uitk-layout-flex {
		display: flex;
	}

	#page-header .logo-item {
		flex-grow: 0;
	}

	#page-header [data-testid="language-selection-button"],
	#page-header .sign-in,
	#page-header .account-menu-trigger {
		block-size: auto;
		inline-size: auto;
	}

	/* The three labels carry is-visually-hidden in the markup, because every glyph in
		this header is aria-hidden and removing the text would leave each collapsed
		control with no accessible name. EGDS only lifts that class on :focus/:active, so
		laying the labels back out at the breakpoint takes a rule; these are its own
		.is-focusable:focus declarations (uitk-egds-foundation.css:226). */
	#page-header .search-label,
	#page-header .sign-in-label,
	#page-header .account-menu-name,
	#page-header [data-testid="language-selection-button"] .uitk-text {
		block-size: auto;
		clip: auto;
		inline-size: auto;
		margin: 0;
		overflow: visible;
		position: static;
	}

	#page-header .search-shortcut,
	#page-header [data-testid="language-selection-button"] .uitk-icon-trailing {
		display: block;
	}

	#page-header [data-testid="language-selection-button"] .uitk-icon-leading {
		--egds-icons__size: var(--button__small__icon__sizing);
		--egds-icons__size__block: var(--button__small__icon__sizing);
		color: inherit;
	}

	#page-header .sign-in-icon {
		display: none;
	}

	#page-header .sign-in::before,
	#page-header .sign-in::after,
	#page-header .account-menu-trigger::before,
	#page-header .account-menu-trigger::after {
		content: "";
	}

	#page-header .search-box-desktop .search:not(.active) {
		width: 300px;
	}

	#page-header .search-box-desktop .uitk-card {
		background: var(--card__secondary__background_color);
		border-radius: var(--card__corner_radius);
		padding: var(--spacing__1x) var(--spacing__3x);
	}

	#page-header .search-box-desktop button {
		block-size: auto;
	}
}

.logo-section {
	text-decoration: none;
}

.logo-section .logo {
	height: 28px;
}

.secondary-header-tabs {
	margin-left: auto;
}

.search-box-desktop .search {
	width: 300px;
}

.search-box-desktop .search.active {
	width: 700px;
}

.search-box-desktop .search-shortcut-icon {
	stroke: var(--border_color__default);
}

.height-full {
	height: 100%;
}

.match-parent-font-color {
	color: inherit;
}

/* documentation-pwa/src/stylesheets/utils.scss. egds-content.html puts these on the
	markdown <strong>, <em> and lists; without them their uitk-type classes win, and
	bold text inside a heading shrinks to 14px. */
.match-parent-font-size {
	font-size: inherit;
}

.match-parent-font {
	font-weight: inherit;
	font-size: inherit;
	color: inherit;
}

/* ---- Navigation tabs (documentation-pwa/src/stylesheets/navbar.scss:1-3,25-27) ----
	The tab strip scrolls rather than wrapping once the tabs outgrow the header. Upstream
	names only the block axis, and the inline axis then computes to auto rather than
	visible — the same spec behaviour relied on for the collapsed sidebar — which is what
	makes the strip scroll sideways. The scrollbar itself is hidden in all three engines.

	navbar.scss's remaining rules are not ported: the first tab's anchor padding is a
	pre-existing gap at every width rather than a breakpoint concern, and .tab-external
	and .hidden-tab need markup classes docspace does not emit. */
.navbar-tabs {
	overflow-y: scroll;
	scrollbar-width: none;
}

.navbar-tabs::-webkit-scrollbar {
	display: none;
}

/* ---- Footer (documentation-pwa/src/stylesheets/footer.scss) ---- */
.footer .markdoc-link,
.footer .uitk-paragraph {
	color: var(--text_color__default);
	font-size: var(--sizing__3x) !important;
	line-height: var(--sizing__4x);
	margin: 0 var(--sizing__1x);
}

.footer .markdoc-link {
	text-decoration: underline;
}

.footer .uitk-paragraph {
	text-decoration: none !important;
}

.footer .uitk-link {
	color: var(--text_color__default);
	text-decoration: underline;
}

/* ---- Markdown renderer (@eg-markdown-renderer/core/styles/base-styles.scss,
	paragraph.scss) ---- */
.md-renderer {
	color: var(--text_color__default);
}

.md-renderer th {
	font-weight: var(--font__weight__500, 500);
}

.md-renderer th,
.md-renderer td {
	word-break: keep-all;
}

.md-renderer .markdoc-link {
	font-weight: inherit;
	font-size: inherit;
	text-decoration: underline;
}

.md-renderer .uitk-typelist {
	font-weight: inherit;
	line-height: 1.625rem;
}

.md-renderer .md-heading-link {
	color: inherit;
	position: relative;
	text-decoration: none;
}

.md-renderer .md-heading-link:hover::after {
	color: var(--text_color__muted);
	content: '#';
	font-weight: var(--font__weight__400, 400);
	margin-inline-start: var(--spacing__1x);
	opacity: 0.4;
	position: absolute;
}

.paragraph {
	line-height: 1.625rem;
}

/* ---- Button link (@eg-markdown-renderer/core/styles/button-link.scss) ---- */
.md-renderer .button-link button {
	text-align: start;
	gap: 0.5rem;
	margin-block: var(--spacing__1x);
}

.md-renderer .button-link p {
	font-weight: inherit;
	font-size: inherit;
	color: inherit;
	margin-block-start: 0;
}

/* ---- Breadcrumbs (documentation-pwa/src/stylesheets/breadcrumbs.scss) ----
	The extracted uitk-egds-breadcrumbs.css sets no block margin, so without this the
	heading sits 8px closer to the crumbs than upstream.

	That file's other rule, `.uitk-breadcrumbs-item > .uitk-link { text-decoration: none }`,
	is deliberately not ported: breadcrumbs.html emits a bare <a> with no uitk-link class,
	and the link already computes text-decoration: none, so the selector would match
	nothing. */
.uitk-breadcrumbs {
	margin-bottom: 1.5rem;
}

/* ---- EGDS expando trigger (documentation-pwa/src/stylesheets/uitk-overrides.scss:25-27) ----
	Upstream centres every expando trigger's contents globally. Without it the chevron
	aligns to the top of the trigger instead of its middle — invisible on the sidebar's
	nav sections, whose trigger is 18px against a 16px icon, but a 15px error on the
	collapsed "Menu" bar, which is 46px tall.

	sidebar.scss:47-50 pairs this with `justify-content: space-between` on the mobile
	trigger, and that rule is deliberately not ported: it compiles to
	`.sidebar-content-expando-trigger > …` (a SCSS `&-` interpolation off `.sidebar-content`)
	while the markup class is `sidebar-expando-trigger`, so it matches nothing upstream —
	confirmed in the shipped bundle, and doc-pwa's trigger computes justify-content: normal. */
.uitk-expando-trigger-content {
	align-items: center;
}

/* ---- Left navigation sidebar (documentation-pwa/src/stylesheets/sidebar.scss) ----
	Upstream #sidebar @extend .sidebar-content; our section has id="sidebar" but
	not the class, so .sidebar-content rules are scoped under #sidebar here.

	One element serves both of the old stack's sidebars: below the large breakpoint
	these rules reproduce #sidebar-mobile (sidebar.scss:137-173) — a collapsed bar
	overlaying the top of the content — and the large block below restores the
	#sidebar column (sidebar.scss:100-131). */
:root {
	/* sidebar.scss's $collapsed-mobile-sidebar-height; the content offset below
		has to agree with the bar's height, so both read it from here. */
	--sidebar-collapsed-block-size: 46px;
}

#sidebar {
	position: absolute;
	z-index: 2;
	width: 100%;
	max-height: 50vh;
	/* Both axes, as upstream sets them: #sidebar-mobile @extends .sidebar-content's
		overflow: hidden auto and then overrides the block axis (sidebar.scss:1-4,137-146).
		Naming only the block axis is not equivalent — the unset inline axis computes to
		auto, not visible, so the bar would gain a silently scrollable horizontal axis
		with no scrollbar to reveal it (scrollbar-width: none below). */
	overflow-x: hidden;
	overflow-y: scroll;
	border-block-end: 1px solid var(--border_color__muted);
	padding-inline: var(--spacing__4x) !important;
	background-color: var(--background_color__base);
	scroll-padding-top: 1rem;
	--expando-indent: 1rem;
	/* Upstream hides the overlay's scrollbar in all three engines. */
	-ms-overflow-style: none;
	scrollbar-width: none;
}

#sidebar::-webkit-scrollbar {
	display: none;
}

.sidebar-mobile-title {
	align-items: center;
	display: flex;
	height: var(--sidebar-collapsed-block-size);
}

/* The collapsed bar is out of flow, so the content it covers is offset by exactly its
	height — upstream #document-mobile.with-margin (document.scss:19-21). Scoped to a
	document that actually follows a sidebar: baseof.html renders the sidebar partial and
	the main block as siblings of #page-body, and sidebar.html emits nothing outside a
	space, so the hub home and hero pages have no bar to clear and must not be offset. */
#sidebar ~ .document {
	margin-block-start: var(--sidebar-collapsed-block-size);
}

@media screen and (min-width: 992px) {
	#sidebar {
		position: static;
		z-index: auto;
		width: auto;
		max-height: none;
		flex: 0 0 17.25rem;
		flex-grow: 1;
		padding-block: var(--spacing__6x);
		padding-inline: var(--spacing__6x) !important;
		border-block-end: none;
		border-inline-end: 0.5px solid var(--border_color__muted);
		overflow: hidden auto;
		-ms-overflow-style: auto;
		scrollbar-width: auto;
		scrollbar-color: var(--border_color__muted) var(--background_color__base);
	}

	#sidebar::-webkit-scrollbar {
		display: initial;
	}

	#sidebar ~ .document {
		margin-block-start: 0;
	}

	/* Nothing above the breakpoint may reveal the wrapper: the trigger and its rule
		are hidden and the body is forced open even while the <details> is closed, so
		a reader who collapsed the menu on a narrow screen does not lose the column
		on a wide one. */
	#sidebar > .sidebar-menu > details > summary,
	#sidebar > .sidebar-menu > details .sidebar-menu-rule {
		display: none;
	}

	#sidebar > .sidebar-menu > details::details-content {
		content-visibility: visible;
		block-size: auto;
	}

	#sidebar > .sidebar-menu > details:not([open]) > *:not(summary) {
		display: block;
	}
}

#sidebar a {
	text-decoration: none !important;
}

#sidebar .uitk-link,
#sidebar .uitk-link:visited {
	color: var(--text_color__default);
}

#sidebar .uitk-button-tertiary {
	color: var(--text_color__default);
	font-weight: 400;
	justify-content: start;
	text-align: start;
}

#sidebar .uitk-button-tertiary .uitk-layout-flex,
#sidebar .uitk-expando-title {
	width: 100%;
}

#sidebar button {
	font-size: var(--font__size__300);
}

#sidebar .sidebar-active-link {
	color: var(--link__active__text_color);
	font-weight: var(--font__weight__500);
}

#sidebar .sidebar-section .uitk-text {
	color: var(--text_color__default);
}

#sidebar .uitk-expando-trigger-content {
	gap: 0;
}

#sidebar .uitk-expando-list .uitk-expando-list-item {
	width: 100%;
}

#sidebar .uitk-expando-list .uitk-expando-list-item:not(:first-child) {
	margin-block-start: 0 !important;
}

#sidebar .uitk-expando-list .uitk-expando-trigger-icon {
	block-size: 1rem;
	inline-size: 1rem;
	min-inline-size: 1rem;
}

/* The sidebar's native <details> sections have no JS to toggle EGDS's -active
	class, so rotate the chevron on [open]. This lives here (always-loaded) rather
	than expando.css (loaded only when the expando shortcode is present). Base
	rotation/transition come from the EGDS expando CSS. */
#sidebar details[open] > summary > .uitk-expando-trigger-icon {
	transform: rotate(-180deg);
}

[dir="rtl"] #sidebar details[open] > summary > .uitk-expando-trigger-icon {
	transform: rotate(180deg);
}

#sidebar .uitk-expando-body {
	margin-block-start: 0 !important;
}

#sidebar .uitk-spacing-hr {
	border-block-start-width: 0.5px;
	box-sizing: border-box;
	width: 100% !important;
}

/* Section banner — blue product pill at the top of the sidebar */
#sidebar .sidebar-title {
	margin-bottom: var(--spacing__3x);
}

#sidebar .product-placeholder {
	align-items: center;
	background-color: var(--background_color__action__default);
	border-radius: var(--spacing__1x);
	display: flex;
	margin-left: var(--spacing__2x);
	min-block-size: 1.9rem;
	padding: var(--spacing__1x) var(--spacing__2x);
	width: fit-content;
}

/* ---- Card (migrated from @eg-markdown-renderer/core/styles/card.scss) ----
	Lays card content out as a full-height column with header/body/link spread
	top-to-bottom. The `all: inherit` reset neutralizes the nested <p> inside the
	card heading so the header renders as a heading (uitk-heading-6), not a
	paragraph. `.card-container` pads the no-image card variant. */
.card-content-container > .uitk-heading > .uitk-paragraph {
	all: inherit;
}
.card-content-container {
	display: flex;
	flex-direction: column;
	height: 100%;
	justify-content: space-between;
}
.card-content-container a {
	text-decoration: none;
}
.card-content-container a:hover {
	text-decoration: underline;
}
.card-container {
	height: 100%;
	padding: var(--spacing__5x);
}

/* ---- Homepage card (migrated from documentation-pwa's unbranded-app-styles
	bundle; verified via curl of the production stylesheet linked from
	https://developers.expediagroup.com/analytics) ----
	Applies to the JSON homepage Card component (render-card.html), not the
	markdown Card shortcode above. height:100% is load-bearing: render-list-items.html's
	row sets align-items:stretch, which stretches each card's own flex-item
	wrapper div to the row's tallest card, but a card's own box (this class) is
	a plain block child of that wrapper and won't inherit the stretched height
	without this rule — cards with less content silently rendered shorter than
	their row siblings. */
.card-layout-container {
	height: 100%;
}
.card-layout-container .card-image {
	transition: all 0.1s ease-in-out;
}
.card-layout-container:hover {
	box-shadow: var(--shadow__medium_elevation);
}
.card-layout-container:hover .card-image {
	filter: brightness(1.1);
	transform: scale(1.01);
}
.card-layout-container.as-a-link {
	cursor: pointer;
}
.card-layout-container a {
	text-decoration: none !important;
}
.card-layout-container a svg {
	transition: all 0.1s ease-in;
}
.card-layout-container a:hover svg {
	transform: translateX(2px);
}

/* The homepage Card's copy takes copyAlignment as text-align-<align>; these come from the
	same unbranded-app-styles stylesheet. */
.text-align-left {
	text-align: left;
}

.text-align-center {
	text-align: center;
}

.text-align-right {
	text-align: right;
}

/* ---- Homepage ListItems and Section widths (@documentation-template-renderer ListItems,
	Section) ----
	Both components render behind <Viewport>: ViewSmall below 992px, ViewLarge from it. The
	partials pass the ViewLarge widths in --template-list-item-width and
	--template-section-width. */
.template-list-item {
	max-width: 100%;
	flex-basis: 100%;
}

.template-section-content {
	width: 100%;
	padding-inline: 0.75rem;
}

@media screen and (min-width: 992px) {
	.template-list-item {
		align-content: center;
		flex: 1 0 var(--template-list-item-width);
		max-width: var(--template-list-item-width);
	}

	.template-section-content {
		width: var(--template-section-width);
		max-width: 1300px;
		padding-inline: 0;
	}
}

/* ---- Message card (migrated from @eg-markdown-renderer/core/styles/message-card.scss) ----
	The per-type colored accent reuses the border drawn by `.uitk-card-has-border::before`
	(defined in uitk-egds-cards.css), recolored per type. `.paragraph`/typelist resets keep
	body text at the card font size, and the header's nested <p> is reset so it renders as a
	heading. Modifier class is the THEME name (info/positive/warning), emitted by messageCard.html. */
.uitk-card-has-border.message-card {
	font-size: var(--font__size__300);
}
.uitk-card-has-border.message-card.info::before {
	border-color: var(--icon__spotlight__info__background_color);
}
.uitk-card-has-border.message-card.positive::before {
	border-color: var(--icon__spotlight__positive__background_color);
}
.uitk-card-has-border.message-card.warning::before {
	border-color: var(--icon__spotlight__warning__background_color);
}
.message-card .paragraph {
	font-size: inherit;
	line-height: 1.42rem;
	margin: 0;
}
.message-card .uitk-typelist {
	gap: 0.25rem;
	line-height: var(--list__2__font_line_height);
	margin-block-start: 0;
}
.message-card .message-card-header {
	margin-block-end: var(--spacing__1x);
}
.message-card .message-card-header .uitk-paragraph {
	all: inherit;
}

/* ---- Banner (migrated from @eg-markdown-renderer/core/styles/banner.scss) ----
	Reset the wrapping <p> so banner text inherits the banner's uitk-type-400 styling
	instead of paragraph styling; inline links inherit color + underline. */
.uitk-banner p {
	all: inherit;
}
.uitk-banner p a {
	color: inherit;
	text-decoration: underline;
}

/* ---- Disclosure menu open state (language-switcher.html, navigation-dropdown-menu.html) ----
	The header's menus are <details> elements, so [open] is their open state.
	static/css/components/uitk-egds-menu.css hides every .uitk-menu-mounted
	container three ways, normally lifted by the React-toggled .uitk-menu-open
	class, which nothing here sets: display: none; opacity: 0 with
	pointer-events: none; and a menu-fade-out animation (fill-mode: forwards)
	ending at opacity 0. A running animation overrides a plain opacity whatever
	the specificity, so animation: none is what lets opacity: 1 take effect.
	Found by clicking in a browser and reading computed styles. */
details.uitk-menu[open] > .uitk-menu-container {
	animation: none;
	display: block;
	opacity: 1;
	pointer-events: auto;
}

/* The trigger is the menu's own chevron, so the browser's disclosure triangle goes. */
details.uitk-menu > summary {
	list-style: none;
}

details.uitk-menu > summary::-webkit-details-marker {
	display: none;
}

/* ---- Markdown images (@eg-markdown-renderer/core/styles/image.scss, overlay.scss) ----
	The image and its overlay are spans where upstream has divs, because images routinely
	sit inside a paragraph and a div there is invalid HTML; display: block gives them
	upstream's boxes back. Two further divergences, both defects upstream: max-width keeps a
	width=N image inside a narrower column (upstream scrolls the whole content section
	sideways on phones), and .link is positioned so the new-tab icon anchors to the image
	(upstream leaves it static, so the icon lands on a distant ancestor's corner). */
.markdown-image {
	display: block;
	max-width: 100%;
	transition: all 0.1s ease-in-out;
}

.markdown-image.center {
	margin-left: auto;
	margin-right: auto;
}

.markdown-image.left {
	margin-left: 0;
	margin-right: auto;
}

.markdown-image.right {
	margin-left: auto;
	margin-right: 0;
}

.markdown-image img {
	display: block;
	margin-left: auto;
	margin-right: auto;
	max-width: 100%;
}

.markdown-image img.rounded {
	border-radius: var(--image__corner_radius);
}

.markdown-image img.inverted {
	filter: invert(1);
}

.markdown-image .image-link-icon {
	opacity: 0;
	transition: opacity 0.2s ease-in-out;
	transition-delay: 0.1s;
}

.markdown-image.link {
	position: relative;
}

.markdown-image.link img {
	border-radius: var(--card__corner_radius);
}

.markdown-image.link:hover {
	filter: brightness(1.07);
	transform: scale(1.007);
}

.markdown-image.link:hover .image-link-icon {
	opacity: 1;
}

[data-image-overlay],
[data-image-overlay] > span {
	display: block;
}

.expanded-overlay {
	align-items: center;
	background-color: rgba(0, 0, 0, 0.8);
	bottom: 0;
	display: flex;
	height: 100vh;
	justify-content: center;
	left: 0;
	position: fixed;
	right: 0;
	top: 0;
	width: 100vw;
	z-index: 1000;
}

.expanded-overlay .markdown-image {
	transition: unset !important;
	width: 100% !important;
}

.expanded-overlay .markdown-image img {
	float: unset !important;
}

/* ---- Side-by-side layout (@eg-markdown-renderer/core/styles/side-by-side-element.scss) ---- */
.side-by-side-flex-item {
	flex-basis: 0;
	min-width: 0;
	width: 100%;
}

/* Descendant selectors, not child ones, matching upstream. */
.md-renderer .side-by-side-flex-item :first-child {
	margin-block-start: 0;
}

.md-renderer .side-by-side-flex-item :last-child {
	margin-block-end: 0;
}

/* Scoped to our own class rather than redefining uitk-layout-flex-flex-direction-row,
	which four other layouts use unconditionally. A max-width query, against this file's
	mobile-first habit, because the markup's row and gap classes are the at-and-above
	state and therefore this query's fallback, so no width goes unstyled; the .98 keeps a
	fractional width between 575 and 576 from matching neither. */
@media screen and (max-width: 575.98px) {
	.md-renderer .side-by-side-row {
		flex-direction: column;
		gap: var(--spacing__6x);
	}
}

/* ---- Code blocks (migrated from @eg-markdown-renderer/core/styles/code.scss) ----
	Deliberately renders code in a dark navy box (dark_1__* tokens) with white text on
	the otherwise-light page — this is a code-block treatment, not site-wide dark mode.
	The upstream `@import 'highlight.js/scss/tomorrow-night-blue'` syntax-color theme is
	intentionally omitted. These rules only take effect once code blocks emit the
	.hljs / .code-block-container markup, which requires a render-codeblock hook that
	docspace does not have yet (it currently highlights via Hugo's Chroma engine). */
.md-renderer .hljs {
	background-color: var(--dark_1__primary_container) !important;
}

.md-renderer code {
	font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
	font-size: 0.85rem;
	hyphens: none;
	line-height: 1.5;
	tab-size: 4;
	text-align: left;
}

.md-renderer :not(pre) > code {
	background: var(--table__cell__selected__background_color);
	border-radius: 0.3em;
	color: var(--text_color__default);
	padding: 0.1em 0.25em;
	white-space: normal;
}

.md-renderer .code-block-container {
	background-color: var(--dark_1__primary_container);
	border-radius: var(--corner_radius__large);
	margin-block: var(--spacing__6x);
	padding: var(--spacing__1x);
	overflow: hidden;
	scrollbar-color: var(--dark_1__border_color__muted) var(--dark_1__primary_container);
}

.md-renderer .code-block-container .code-block-wrapper {
	color: var(--color__neutral__white);
	max-height: 512px;
	overflow: auto;
	padding: var(--spacing__4x);
}

.md-renderer .code-block-container pre code.hljs {
	padding: 0;
}

.md-renderer .code-block-container .code-block {
	margin: 0;
}

.md-renderer .code-block-container .code-block code {
	word-break: break-all !important;
}

.md-renderer .code-block-container .copy-button {
	background-color: var(--dark_1__primary_container);
	border: none;
	display: none;
}

.md-renderer .code-block-container:hover .copy-button,
.md-renderer .code-block-container .copy-button.active {
	display: initial;
}

.md-renderer .code-block-container .copied-button {
	background-color: var(--dark_1__primary_container);
	border: none;
}

/* ---- Bottom navigator (documentation-pwa/src/stylesheets/style.scss,
	utils.scss: .navigation-item, .navigator-link, .width-full) ---- */
.width-full {
	width: 100%;
}

.navigator-link {
	text-decoration: none;
	word-break: break-word !important;
}

.navigator-link:hover {
	text-decoration: underline;
}

/* ---- See also panel (documentation-pwa/src/stylesheets/utils.scss: .link-decoration) ---- */
.link-decoration {
	text-decoration: none;
}

.link-decoration:hover {
	text-decoration: underline;
}

/* ---- Share Feedback and chatbot launcher (documentation-pwa customer-survey.tsx, chatbot-button.tsx) ----
	<ViewSmall> renders the small button and <ViewLarge> the medium one, and
	viewport-context picks the largest view at or below the width, so the swap is at
	LARGE, 992px. */
.share-feedback-medium,
.chatbot-launcher-medium {
	display: none;
}

@media screen and (min-width: 992px) {
	.share-feedback-medium,
	.chatbot-launcher-medium {
		display: inline-flex;
	}

	.share-feedback-small,
	.chatbot-launcher-small {
		display: none;
	}
}

/* ---- Right-hand table of contents (documentation-pwa/src/stylesheets/table-of-content.scss) ----
	`@include scrollbars` expands to the scrollbar-color idiom used elsewhere in this file. */

/* The rail exists only at extra_large: doc-pwa wraps the whole column in
	<ViewExtraLarge> (document-view.tsx:279-294), so below 1200px it is absent and
	the feedback widget appears inline in the article instead. Hidden by default and
	revealed at the breakpoint, never the reverse — a max-width/min-width pair would
	leave a fractional viewport width (1199.5px) matching neither rule. */
.toc-column {
	display: none;
}

@media screen and (min-width: 1200px) {
	.toc-column {
		display: block;
	}

	/* Both feedback copies are in the markup; the rail's takes over here. The class
		is present only when a rail copy was emitted, so a page with no TOC keeps its
		inline copy at every width. */
	.feedback-inline-has-rail {
		display: none;
	}
}

.table-of-content {
	max-block-size: 70vh;
	overflow: auto;
	overscroll-behavior: contain;
	scrollbar-color: var(--border_color__muted) var(--background_color__base);
}

.table-of-content .toc-item {
	color: var(--text_color__muted);
}

.table-of-content .toc-active-link .toc-item {
	color: var(--link__active__text_color);
}

.table-of-content .toc-active-link {
	outline: none;
}

