/*
 * AccountX base layer. Component styles live in Bricks global classes; this file only holds
 * what sits underneath them: a reset that matches the original build (Tailwind preflight)
 * and a few site-wide rules Bricks has no setting for.
 *
 * Fonts, body/heading type, colours and the focus ring are set natively in Bricks:
 * Bricks > Custom Fonts and Bricks > Theme Styles > AccountX.
 */

:root {
	color-scheme: light;
}

/* ---- Reset (matches the original build) ---- */
html {
	-webkit-text-size-adjust: 100%;
	tab-size: 4;
}
body {
	margin: 0;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
*,
::before,
::after {
	border: 0 solid var(--bricks-color-hairline);
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
h1, h2, h3, h4, h5, h6 {
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}
/* Headings: balanced lines; paragraphs: no orphans (no Bricks control for text-wrap). */
h1, h2, h3, h4 {
	text-wrap: balance;
}
p {
	text-wrap: pretty;
}
/* Bricks' base CSS spaces a heading that follows a paragraph (p + h2 { margin-top: 1.2em });
   the design sets every gap itself. */
p + :is(h2, h3, h4, h5, h6) {
	margin-block: 0;
}
a {
	color: inherit;
	text-decoration: inherit;
}
b, strong {
	font-weight: bolder;
}
ol, ul, menu {
	list-style: none;
}
img, svg, video, canvas, iframe, object {
	display: block;
	vertical-align: middle;
}
/* Bricks gives unsized SVGs a 1em minimum; icons here are sized by their classes. */
svg:not([width]),
svg:not([height]) {
	min-width: 0;
	min-height: 0;
}
img, video {
	max-width: 100%;
	height: auto;
}
button, input, select, optgroup, textarea {
	font: inherit;
	letter-spacing: inherit;
	color: inherit;
	background-color: transparent;
	border-radius: 0;
}
button {
	cursor: pointer;
}
::placeholder {
	opacity: 1;
}
summary {
	display: list-item;
}
blockquote, figure {
	margin: 0;
}
label {
	margin-bottom: 0;
}
[hidden]:where(:not([hidden="until-found"])) {
	display: none !important;
}

.tabular {
	font-feature-settings: "tnum" 1, "lnum" 1;
}

::selection {
	background-color: var(--bricks-color-accent);
	color: #ffffff;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--bricks-color-accent-ink);
	outline-offset: 2px;
	border-radius: 4px;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -3rem;
	z-index: 100;
	background: var(--bricks-color-navy);
	color: #ffffff;
	padding: 0.625rem 1rem;
	border-radius: var(--radius-btn, 0.625rem);
	transition: top 0.15s ease;
}
.skip-link:focus {
	top: 1rem;
}

/* <details> accordions: no default triangle. */
summary {
	list-style: none;
}
summary::-webkit-details-marker {
	display: none;
}

/* Sticky header: Bricks wraps the header template in #brx-header, which is only as tall as the
   header, so the sticky must sit on the wrapper. -40px lets the contact bar (h-10) scroll away
   while the white menu bar stays, exactly as the original. */
#brx-header {
	position: sticky;
	top: -40px;
	z-index: 50;
}

/* Call-back pop-up opens as a bottom sheet on phones (as the original). Bricks' own popup rule
   (.brx-popup:not(...):not(...)) outranks the popup's "Align main axis" setting, hence this. */
@media (max-width: 639px) {
	.brx-popup:not(.brx-infobox-popup):has(.callback-form) {
		justify-content: flex-end;
	}
}

/* Scrolling is locked while the mobile menu or a pop-up is open. */
html.ax-lock,
html.ax-lock body {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

@media print {
	.ax-float {
		display: none !important;
	}
}

/* Builder only: Bricks gives empty elements a 90px drop-target box, which blows up the
   decorative circles and icon wrappers (they are empty on purpose). */
:is(span, div).brx-draggable:is(:empty, .brx-empty) {
	min-width: 0;
	min-height: 0;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border-width: 0;
}
