.zw-page-subnav {
	position: sticky;
	top: calc(var(--zw-sticky-header-h, 0px) + var(--wp-admin--admin-bar--height, 0px));
	z-index: 40;
	width: 100%;
	background: #fff;
	border-bottom: 1px solid #e8edf2;
	box-shadow: 0 1px 0 rgb(2 39 56 / 3%);
	font-family: var(--zw-font-sans, system-ui, sans-serif);
}

@media (max-width: 768px) {
	.zw-page-subnav {
		top: calc(var(--zw-sticky-header-h, 5.5rem) + var(--wp-admin--admin-bar--height, 0px));
	}
}

.zw-page-subnav.alignfull {
	max-width: none;
}

.zw-page-subnav__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
	width: min(94%, var(--zw-wide, 1600px));
	min-height: 58px;
	margin-inline: auto;
}

.zw-page-subnav__tabs {
	min-width: 0;
	flex: 1 1 auto;
}

.zw-page-subnav__list {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0.15rem;
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.zw-page-subnav__list::-webkit-scrollbar {
	display: none;
}

.zw-page-subnav__list > li {
	flex: 0 0 auto;
}

.zw-page-subnav__tab {
	position: relative;
	z-index: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 58px;
	padding: 0.65rem 1.05rem;
	color: #4b5563;
	font-size: 0.95rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	line-height: 1.2;
	white-space: nowrap;
	text-decoration: none;
	border-radius: 0;
	background: transparent;
	transition: color 0.3s ease;
	overflow: hidden;
}

.zw-page-subnav__tab::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 0%;
	background: #027788;
	z-index: -1;
	transition: all 0.3s ease;
}

.zw-page-subnav__tab:hover,
.zw-page-subnav__tab:focus-visible {
	color: #fff;
	outline: none;
}

.zw-page-subnav__tab:hover::before,
.zw-page-subnav__tab:focus-visible::before {
	height: 100%;
}

.zw-page-subnav__tab.is-active {
	color: #fff;
	font-weight: 700;
}

.zw-page-subnav__tab.is-active::before {
	height: 100%;
}

.zw-page-subnav__crumb {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	flex: 0 0 auto;
	color: #8a94a6;
	font-size: 0.8125rem;
	line-height: 1.2;
	white-space: nowrap;
}

.zw-page-subnav__home {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	color: #6b7280;
	border-radius: 8px;
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.zw-page-subnav__home:hover,
.zw-page-subnav__home:focus-visible {
	color: #027788;
	background: rgb(2 119 136 / 8%);
	outline: none;
}

.zw-page-subnav__sep {
	opacity: 0.7;
}

.zw-page-subnav__parent {
	color: #6b7280;
	text-decoration: none;
	transition: color 0.2s ease;
}

.zw-page-subnav__parent:hover,
.zw-page-subnav__parent:focus-visible {
	color: #027788;
	outline: none;
}

.zw-page-subnav__current {
	color: #5b6575;
	font-weight: 500;
}

@media (max-width: 720px) {
	.zw-page-subnav__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		min-height: 0;
		padding-block: 0.15rem 0.55rem;
	}

	.zw-page-subnav__tab {
		min-height: 48px;
		padding-inline: 0.85rem;
		font-size: 0.875rem;
	}

	.zw-page-subnav__crumb {
		justify-content: flex-end;
		padding-inline: 0.15rem;
	}
}

/* Block editor: keep bar in flow (sticky fights the canvas iframe). */
.zw-page-subnav.is-editor-preview {
	position: relative;
	top: auto;
}
