/**
 * Toolkit step: the first step's section `pt-12 lg:pt-16` with the intro
 * (`max-w-3xl`) right above its rule, the last one's `pb-12 lg:pb-16`
 * after it. A step `border-t py-12 lg:py-16 grid gap-6 lg:grid-cols-12
 * lg:gap-12`: in 4 "Step N" `text-sm font-medium` in the dark red and the
 * heading `mt-2 text-2xl md:text-3xl font-bold tracking-tight`, the
 * material in 8, its text muted at body size.
 *
 * The parts: banner cards `mt-6 grid gap-5 sm:grid-cols-3`, each
 * `rounded-lg border border-border/60 bg-card`, the banner 1200:627, then
 * `p-5` the title `font-bold` and its link `mt-2`, which covers the card
 * (not in the prototype; the border reddens on hover, as a download's); the note `mt-6
 * rounded-lg bg-surface-cool p-5 text-sm`, its title `font-medium`, its
 * paragraphs `mt-2`; the actions `mt-6`, beside a banner `grid gap-6
 * sm:grid-cols-2`, after a logo `flex flex-wrap items-center gap-6` (the
 * logo `h-16 rounded border bg-white p-2`), the buttons `flex flex-wrap
 * gap-3`, the text under them `mt-4 text-sm`; the embed `mt-6 aspect-video
 * rounded-xl border bg-charcoal`; downloads `mt-6 grid gap-3 sm:grid-cols-2`,
 * each `flex gap-3 rounded-lg border border-border/60 bg-card p-4 text-sm
 * font-medium`; links `mt-6` (`mt-4 gap-y-2` under the embed); the
 * sub-heading `mt-10 text-lg font-bold`, its text `mt-2`; the details `mt-4
 * rounded-lg border bg-card px-5`, a second one `mt-3` under the first;
 * the closing link `mt-4`.
 *
 * The form dialog (toolkit-step.js, not in the prototype): up to 1120 by
 * 860 pixels on the dark backdrop of the slideshow, a bar with the title
 * and the close button over the form; the whole screen below 640px.
 */

.sba-c-toolkit-step.sba-c-toolkit-step {
	background-color: var(--sba-surface);
	font-family: var(--sba-font-sans);
}

.sba-c-toolkit-step.sba-c-toolkit-first {
	padding-top: 48px;
}

.sba-c-toolkit-step.sba-c-toolkit-last {
	padding-bottom: 48px;
}

.sba-c-toolkit-step .sba-c-toolkit-intro {
	max-width: 48rem;
}

.sba-c-toolkit-step .sba-c-toolkit-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	padding: 48px 0;
	border-top: 1px solid var(--sba-border);
	scroll-margin-top: 112px;
}

.sba-c-toolkit-step .sba-c-toolkit-number {
	display: block;
	color: var(--sba-red-dark);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
}

.sba-c-toolkit-step .sba-c-toolkit-title {
	margin: 8px 0 0;
	color: var(--sba-charcoal);
	font-family: var(--sba-font-sans);
	font-size: 24px;
	font-weight: var(--sba-heading-weight);
	letter-spacing: var(--sba-heading-tracking);
	line-height: 32px;
}

.sba-c-toolkit-step .sba-c-toolkit-body > :first-child {
	margin-top: 0;
}

.sba-c-toolkit-step :is(.sba-c-toolkit-text, .sba-c-toolkit-sub-text) {
	color: var(--sba-slate);
	font-size: 16px;
	line-height: 24px;
}

/* The text resets leave the margins to the rules after them. */
.sba-c-toolkit-step :is(.sba-c-toolkit-text, .sba-c-toolkit-sub-text, .sba-c-toolkit-action-text, .sba-c-toolkit-note, .sba-c-toolkit-details-text) > *,
.sba-c-toolkit-step .sba-c-toolkit-details-text li {
	margin: 0;
}

.sba-c-toolkit-step :is(.sba-c-toolkit-text, .sba-c-toolkit-sub-text, .sba-c-toolkit-action-text, .sba-c-toolkit-note, .sba-c-toolkit-details-text) :is(p, li) {
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

/* Banner cards. */
.sba-c-toolkit-step .sba-c-toolkit-cards {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
	margin-top: 24px;
}

.sba-c-toolkit-step .sba-c-toolkit-cards article {
	position: relative;
	overflow: hidden;
	border: 1px solid color-mix(in srgb, var(--sba-border) 60%, transparent);
	border-radius: var(--sba-radius);
	background-color: var(--sba-surface);
	transition: border-color var(--sba-duration-hover) ease;
}

/* The card's link covers the card, as a List row's title does. */
.sba-c-toolkit-step .sba-c-toolkit-cards article .sba-c-link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.sba-c-toolkit-step .sba-c-toolkit-cards article:has(.sba-c-link) {
	cursor: pointer;
}

.sba-c-toolkit-step .sba-c-toolkit-cards article:has(.sba-c-link):hover {
	border-color: hsl(var(--sba-red-hsl) / 0.4);
}

.sba-c-toolkit-step .sba-c-toolkit-cards article:has(.sba-c-link):hover .sba-c-link {
	color: var(--sba-red-darker);
	text-decoration: underline;
}

.sba-c-toolkit-step .sba-c-toolkit-cards article .sba-c-link:focus-visible {
	outline: none;
}

.sba-c-toolkit-step .sba-c-toolkit-cards article .sba-c-link:focus-visible::after {
	border-radius: var(--sba-radius);
	outline: 2px solid var(--sba-ring);
	/* Inside: the card clips what overflows it. */
	outline-offset: -2px;
}

.sba-c-toolkit-step .sba-c-toolkit-cards img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	aspect-ratio: 1200 / 627;
	object-fit: cover;
}

.sba-c-toolkit-step .sba-c-toolkit-cards article > div {
	padding: 20px;
}

.sba-c-toolkit-step .sba-c-toolkit-cards h3 {
	margin: 0;
	color: var(--sba-charcoal);
	font-family: var(--sba-font-sans);
	font-size: 16px;
	font-weight: var(--sba-heading-weight);
	letter-spacing: var(--sba-heading-tracking);
	line-height: 24px;
}

.sba-c-toolkit-step .sba-c-toolkit-cards p {
	margin: 8px 0 0;
	font-size: 16px;
	line-height: 22px;
}

/* The note. */
.sba-c-toolkit-step .sba-c-toolkit-note {
	margin-top: 24px;
	padding: 20px;
	border-radius: var(--sba-radius);
	background-color: var(--sba-surface-cool);
	color: var(--sba-slate);
	font-size: 14px;
	line-height: 20px;
	overflow-wrap: break-word;
}

.sba-c-toolkit-step .sba-c-toolkit-note > * + * {
	margin-top: 8px;
}

.sba-c-toolkit-step .sba-c-toolkit-note-title {
	color: var(--sba-charcoal) !important;
	font-weight: 500;
}

/* The actions. */
.sba-c-toolkit-step .sba-c-toolkit-actions {
	margin-top: 24px;
}

.sba-c-toolkit-step .sba-c-toolkit-actions-banner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
	gap: 24px;
}

.sba-c-toolkit-step .sba-c-toolkit-actions-banner > img,
.sba-c-toolkit-step .sba-c-toolkit-banner-link img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	aspect-ratio: 1200 / 627;
	border: 1px solid color-mix(in srgb, var(--sba-border) 60%, transparent);
	border-radius: var(--sba-radius);
	object-fit: cover;
	transition: border-color var(--sba-duration-hover) ease;
}

.sba-c-toolkit-step .sba-c-toolkit-banner-link {
	display: block;
}

.sba-c-toolkit-step .sba-c-toolkit-banner-link:hover img {
	border-color: hsl(var(--sba-red-hsl) / 0.4);
}

.sba-c-toolkit-step .sba-c-toolkit-actions-logo {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px;
}

.sba-c-toolkit-step .sba-c-toolkit-actions-logo > img {
	width: auto;
	height: 64px;
	max-width: 100%;
	padding: 8px;
	border: 1px solid color-mix(in srgb, var(--sba-border) 60%, transparent);
	border-radius: 4px;
	background-color: #fff;
}

.sba-c-toolkit-step .sba-c-toolkit-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.sba-c-toolkit-step .sba-c-toolkit-action-text {
	margin-top: 16px;
	color: var(--sba-slate);
	font-size: 14px;
	line-height: 20px;
}

/* The embed. */
.sba-c-toolkit-step .sba-c-toolkit-embed {
	margin-top: 24px;
	border-color: var(--sba-border);
	background-color: var(--sba-charcoal);
}

/* Downloads. */
.sba-c-toolkit-step .sba-c-toolkit-downloads {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}

.sba-c-toolkit-step .sba-c-toolkit-downloads li {
	margin: 0;
}

.sba-c-toolkit-step .sba-c-toolkit-downloads a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	border: 1px solid color-mix(in srgb, var(--sba-border) 60%, transparent);
	border-radius: var(--sba-radius);
	background-color: var(--sba-surface);
	color: var(--sba-charcoal);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	text-decoration: none;
	transition: color var(--sba-duration-hover) ease, border-color var(--sba-duration-hover) ease;
}

.sba-c-toolkit-step .sba-c-toolkit-downloads a:hover {
	border-color: hsl(var(--sba-red-hsl) / 0.4);
	color: var(--sba-red-dark);
}

.sba-c-toolkit-step .sba-c-toolkit-downloads .sba-i {
	flex: 0 0 auto;
	color: var(--sba-red-dark);
	font-size: 16px;
}

/* Links. */
.sba-c-toolkit-step .sba-c-toolkit-body > .sba-c-links {
	margin-top: 24px;
}

.sba-c-toolkit-step .sba-c-toolkit-embed + .sba-c-links {
	margin-top: 16px;
	row-gap: 8px;
}

/* Sub-heading, details, the closing link. */
.sba-c-toolkit-step .sba-c-toolkit-sub {
	margin: 40px 0 0;
	color: var(--sba-charcoal);
	font-family: var(--sba-font-sans);
	font-size: 18px;
	font-weight: var(--sba-heading-weight);
	letter-spacing: var(--sba-heading-tracking);
	line-height: 28px;
}

.sba-c-toolkit-step .sba-c-toolkit-sub-text {
	margin-top: 8px;
}

.sba-c-toolkit-step .sba-c-toolkit-details {
	margin-top: 16px;
	padding: 0 20px;
	border: 1px solid var(--sba-border);
	border-radius: var(--sba-radius);
	background-color: var(--sba-surface);
}

.sba-c-toolkit-step .sba-c-toolkit-details + .sba-c-toolkit-details {
	margin-top: 12px;
}

.sba-c-toolkit-step .sba-c-toolkit-details summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 0;
	color: var(--sba-charcoal);
	font-family: var(--sba-font-sans);
	font-size: 16px;
	font-weight: 500;
	line-height: 24px;
	list-style: none;
	cursor: pointer;
}

.sba-c-toolkit-step .sba-c-toolkit-details summary::-webkit-details-marker {
	display: none;
}

.sba-c-toolkit-step .sba-c-toolkit-details summary:focus-visible {
	outline: 2px solid var(--sba-ring);
	outline-offset: 2px;
}

.sba-c-toolkit-step .sba-c-toolkit-details summary .sba-i {
	flex: 0 0 auto;
	font-size: 16px;
	transition: transform 0.2s ease;
}

.sba-c-toolkit-step .sba-c-toolkit-details[open] summary .sba-i {
	transform: rotate(180deg);
}

.sba-c-toolkit-step .sba-c-toolkit-details-text {
	padding-bottom: 16px;
	color: var(--sba-slate);
	font-size: 14px;
	line-height: 1.625;
}

.sba-c-toolkit-step .sba-c-toolkit-details-text > * + * {
	margin-top: 16px;
}

.sba-c-toolkit-step .sba-c-toolkit-details-text strong {
	color: var(--sba-charcoal);
	font-weight: 500;
}

.sba-c-toolkit-step .sba-c-toolkit-details-text ul {
	padding-left: 20px;
	list-style: disc;
}

.sba-c-toolkit-step .sba-c-toolkit-details-text li + li {
	margin-top: 4px;
}

.sba-c-toolkit-step .sba-c-toolkit-sub-link {
	margin: 16px 0 0;
	font-size: 16px;
	line-height: 22px;
}

/* The form dialog. */
html.sba-c-form-dialog-open {
	overflow: hidden;
}

.sba-c-form-dialog {
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	background-color: var(--sba-surface);
	color: var(--sba-charcoal);
	font-family: var(--sba-font-sans);
}

.sba-c-form-dialog[open] {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
}

.sba-c-form-dialog::backdrop {
	background-color: rgb(0 0 0 / 0.6);
}

.sba-c-form-dialog-bar {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 12px 12px 20px;
	border-bottom: 1px solid var(--sba-border);
}

.sba-c-form-dialog .sba-c-form-dialog-title {
	flex: 1;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	color: var(--sba-charcoal);
	font-size: 16px;
	font-weight: 500;
	line-height: 24px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Two classes, as the slideshow's buttons: the theme styles every button. */
.sba-c-form-dialog-close.sba-c-form-dialog-close {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 9999px;
	background-color: transparent;
	box-shadow: none;
	color: var(--sba-charcoal);
	font-size: 20px;
	cursor: pointer;
	transition: background-color var(--sba-duration-hover) ease;
}

.sba-c-form-dialog-close.sba-c-form-dialog-close:hover {
	background-color: var(--sba-surface-cool);
}

.sba-c-form-dialog-close.sba-c-form-dialog-close:focus-visible {
	outline: 2px solid var(--sba-ring);
	outline-offset: 2px;
}

.sba-c-form-dialog-stage {
	position: relative;
}

.sba-c-form-dialog .sba-c-form-dialog-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	color: var(--sba-slate);
	font-size: 14px;
	line-height: 20px;
	pointer-events: none;
}

/* Until every category is accepted PrivacyBee hides the form's iframe and
 * puts its placeholder in its place, whose "Agree and load content" loads
 * nothing (toolkit-step.js); the dialog's own notice stands in for it, over
 * the whole stage and above the loading line. */
.sba-c-form-dialog-stage > .privacybee-iframe-placeholder {
	display: none !important;
}

.sba-c-form-dialog-consent {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background-color: var(--sba-surface);
}

.sba-c-form-dialog-consent[hidden] {
	display: none;
}

.sba-c-form-dialog-consent > div {
	max-width: 440px;
	color: var(--sba-slate);
	font-size: 14px;
	line-height: 20px;
	text-align: center;
}

.sba-c-form-dialog-consent p {
	margin: 0 0 16px;
}

.sba-c-form-dialog .sba-c-form-dialog-consent-title {
	margin-bottom: 8px;
	color: var(--sba-charcoal);
	font-size: 18px;
	font-weight: 500;
	line-height: 28px;
}

.sba-c-form-dialog-consent-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 24px;
}

.sba-c-form-dialog-stage iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	background-color: var(--sba-surface);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.sba-c-form-dialog-stage iframe.is-loaded {
	opacity: 1;
}

.sba-c-form-dialog-stage iframe[hidden] {
	display: none;
}

@media (min-width: 640px) {
	.sba-c-toolkit-step .sba-c-toolkit-cards {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.sba-c-toolkit-step .sba-c-toolkit-actions-banner,
	.sba-c-toolkit-step .sba-c-toolkit-downloads {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sba-c-form-dialog {
		width: min(100% - 32px, 1120px);
		height: min(100% - 32px, 860px);
		margin: auto;
		border-radius: var(--sba-radius);
	}
}

@media (min-width: 768px) {
	.sba-c-toolkit-step .sba-c-toolkit-title {
		font-size: 30px;
		line-height: 36px;
	}
}

@media (min-width: 1024px) {
	.sba-c-toolkit-step.sba-c-toolkit-first {
		padding-top: 64px;
	}

	.sba-c-toolkit-step.sba-c-toolkit-last {
		padding-bottom: 64px;
	}

	.sba-c-toolkit-step .sba-c-toolkit-row {
		grid-template-columns: repeat(12, minmax(0, 1fr));
		gap: 48px;
		padding: 64px 0;
	}

	.sba-c-toolkit-step .sba-c-toolkit-head {
		grid-column: span 4;
	}

	.sba-c-toolkit-step .sba-c-toolkit-body {
		grid-column: span 8;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sba-c-toolkit-step .sba-c-toolkit-details summary .sba-i,
	.sba-c-form-dialog-stage iframe {
		transition: none;
	}
}
