/* Shared AB TAX Psono UI refinement for the pinned 4.7.2 webclient. */
:root {
	--abtax-psono-primary: #020f18;
	--abtax-psono-line: #dce3e8;
	--abtax-psono-hover: #eef3f7;
}

/* The ConfigLogo remains the original AB TAX SVG; invert its inverse variant for contrast. */
.MuiAppBar-root:has(> .MuiContainer-root > .MuiToolbar-root > a[href="index.html"]) {
	background: var(--abtax-psono-primary) !important;
	color: #fff !important;
	border: 0 !important;
	box-shadow: 0 2px 8px rgb(2 15 24 / 14%) !important;
}

.MuiAppBar-root:has(> .MuiContainer-root > .MuiToolbar-root > a[href="index.html"]) > .MuiContainer-root {
	width: 100% !important;
	max-width: none !important;
	padding-inline: clamp(12px, 2vw, 28px) !important;
}

.MuiToolbar-root:has(> a[href="index.html"]) {
	min-height: 52px !important;
	gap: 8px;
}

.MuiToolbar-root > a[href="index.html"] {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	padding: 8px 12px 8px 0 !important;
}

.MuiToolbar-root > a[href="index.html"] img {
	filter: brightness(0) invert(1);
	max-width: min(183px, 26vw);
}

.MuiToolbar-root > a[href="index.html"] + div {
	display: flex !important;
	flex: 1 1 auto;
	align-items: center;
	min-width: 0;
	gap: 12px;
}

.MuiToolbar-root > a[href="index.html"] + div > div[style*="float: left"] {
	flex: 0 1 auto;
	min-width: 0;
}

.MuiToolbar-root > a[href="index.html"] + div > div[style*="float: right"] {
	flex: 0 0 auto;
	margin-left: auto;
}

.MuiAppBar-root:has(> .MuiContainer-root > .MuiToolbar-root > a[href="index.html"]) .MuiButton-containedPrimary,
.MuiAppBar-root:has(> .MuiContainer-root > .MuiToolbar-root > a[href="index.html"]) .MuiIconButton-colorPrimary {
	background-color: rgb(255 255 255 / 12%);
	color: #fff;
}

.MuiAppBar-root:has(> .MuiContainer-root > .MuiToolbar-root > a[href="index.html"]) .MuiButton-containedPrimary:hover,
.MuiAppBar-root:has(> .MuiContainer-root > .MuiToolbar-root > a[href="index.html"]) .MuiIconButton-colorPrimary:hover {
	background-color: rgb(255 255 255 / 20%);
}

/* Production's desktop navigation is intentionally absent. Staging's visible
   navigation keeps its existing 270px content offset and behavior. */
@media (min-width: 600px) {
	body:not(:has(nav[aria-label="mailbox folders"])) .abtax-base-content {
		width: 100% !important;
		max-width: none !important;
		margin: 0 !important;
		padding: 0 !important;
	}
}

/* The datastore toolbar replaces Psono's separate grey page-title strip. */
body:has(.abtax-datastore-appbar) .MuiPaper-root:has(+ .abtax-base-content) {
	display: none !important;
}

.abtax-datastore-appbar {
	background: #fff !important;
	color: #1b2730 !important;
	border-bottom: 1px solid var(--abtax-psono-line) !important;
	box-shadow: none !important;
}

.abtax-datastore-toolbar {
	min-height: 48px !important;
	padding-inline: 12px !important;
	gap: 12px;
}

.abtax-datastore-search {
	position: static !important;
	flex: 0 1 440px;
	width: min(440px, 46vw);
	min-width: 180px;
	max-width: 100%;
	margin: 0 0 0 auto !important;
	border: 1px solid var(--abtax-psono-line);
	background: #fff !important;
}

.abtax-datastore-search:hover,
.abtax-datastore-search:focus-within {
	background: #fff !important;
	border-color: var(--abtax-psono-primary);
}

.abtax-datastore-search input {
	min-width: 0;
}

.abtax-datastore-view,
.abtax-datastore-tree {
	width: 100% !important;
	max-width: 100% !important;
}

.abtax-datastore-view {
	padding: 0 8px 8px;
}

.abtax-tree-row {
	padding-right: 88px !important;
	border-radius: 4px;
	transition: background-color 120ms ease;
}

.abtax-tree-row:hover,
.abtax-tree-row:focus-visible {
	background-color: var(--abtax-psono-hover) !important;
}

.abtax-tree-row:focus-visible {
	outline: 2px solid var(--abtax-psono-primary) !important;
	outline-offset: -2px;
}

@media (max-width: 599.98px) {
	.MuiToolbar-root:has(> a[href="index.html"]) {
		min-height: 48px !important;
	}

	.MuiToolbar-root > a[href="index.html"] + div {
		gap: 4px;
	}

	.abtax-datastore-toolbar {
		padding-inline: 6px !important;
		gap: 4px;
	}

	.abtax-datastore-search {
		flex-basis: auto;
		width: min(54vw, 300px);
		min-width: 128px;
	}

	.abtax-datastore-view {
		padding-inline: 2px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.abtax-tree-row {
		transition: none;
	}
}
