/*
 * Advanced Purchasing V1.1 — theme integration for the nine generated pages.
 * Hand-written (unlike css/purchasing/<page>.css, which is generated from the
 * package). Loaded after the page file on all nine pages.
 */

/*
 * Full bleed. The7 renders templates inside `#main > .wf-wrap` (1300px cap,
 * 50px side padding). The package's sections paint edge to edge and centre
 * their own `.wrap`, so the whole body is released from that column once,
 * here, the same way `.iss-bleed` releases a section (iss-global.css §2).
 * `#page` is overflow:hidden, so the scrollbar's half-width overhang cannot
 * produce a horizontal scrollbar.
 */
.iss-purchasing {
	margin-inline: calc(50% - 50vw);
}

/* The closing `.final` band is the page's floor: no The7 gutter under it (CLAUDE.md §15c rule). */
#main:has(.iss-purchasing) {
	padding-bottom: 0;
}
#main:has(.iss-purchasing) .wf-container-main,
#main:has(.iss-purchasing) .content {
	padding-bottom: 0;
	margin-bottom: 0;
}

/*
 * APNAV-04 Purchasing bar. `position: sticky` never sticks on this site (The7's
 * #page / body overflow — see iss-global.css §24a), so js/purchasing.js docks
 * it with `position: fixed` under the fixed site header once it reaches it,
 * and a spacer holds its place in the flow.
 */
.iss-purchasing .context {
	position: relative;
	top: auto;
}
.iss-purchasing .context.is-docked {
	position: fixed;
	top: var(--iss-ap-dock-top, 71px);
	left: 0;
	right: 0;
	z-index: 900; /* under the site header (1000) and its menus */
}
.iss-purchasing .context-spacer {
	height: 0;
}

/*
 * In-page jumps and deep links. On these pages the target clears the
 * condensed header (71px) AND the docked Purchasing bar (js/purchasing.js sets
 * --iss-context-offset = bar height + 8px). The site-wide html scroll-padding
 * is zeroed here instead of added to: Chrome honours it for clicked links but
 * not when restoring a #fragment on load, so one number in one place is the
 * only way both land the same.
 */
html:has(.iss-purchasing) {
	scroll-padding-top: 0;
}
.iss-purchasing [id],
.iss-purchasing .legacy-alias {
	scroll-margin-top: calc(71px + var(--iss-context-offset, 69px));
}

/*
 * The7's element rules (h1–h6 colour #030b50 / #007dc3, "Roboto Condensed",
 * weight 900) out-rank the package's inherited heading styles, which set only
 * size/spacing on the elements and inherit colour and family from the section.
 * Put the inheritance back at (0,1,0), so every package rule (0,1,1 and up)
 * still wins over it.
 */
.iss-purchasing :where(h1, h2, h3, h4, h5, h6) {
	color: inherit;
	font-family: inherit;
	font-weight: 700;
}

/* The7 pins b/strong to 700; the package relies on the default `bolder` (900 inside 600 labels). */
.iss-purchasing :where(b, strong) {
	font-weight: bolder;
}

/* UA list spacing the package relies on (The7 zeroes ul/ol margins). */
.iss-purchasing :where(ul, ol) {
	margin-block: 1em;
}

/*
 * Overview hero "Live in QAD": the site-wide mint pill (Master Standards V3.5
 * §6.1; iss_live_badge()). iss-global.css §7f paints it only under `.iss-page`,
 * which these pages do not use, so the same treatment is repeated here at the
 * size §7f resolves to on a two-column hero card. Keep in step with §7f.
 */
.iss-purchasing .iss-live.iss-live-tile {
	display: inline-flex;
	flex: 0 1 auto;
	align-items: center;
	justify-content: center;
	gap: 7px;
	max-width: 100%;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid rgba(143, 226, 245, .22);
	background: linear-gradient(180deg, rgba(232, 255, 248, .94), rgba(212, 246, 234, .92));
	box-shadow: 0 8px 20px rgba(16, 145, 100, .16);
	font-family: inherit;
	font-size: 12px;
	font-weight: 900;
	line-height: 1.2;
	letter-spacing: 0;
	text-align: center;
	text-transform: none;
	white-space: normal;
	color: #087b57;
}
.iss-purchasing .iss-live.iss-live-tile .iss-pulse {
	flex: none;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #19c98a;
	box-shadow: 0 0 0 4px rgba(25, 201, 138, .14);
}

/* UA bullets the package relies on (The7 sets list-style: none). */
.iss-purchasing :where(ul) {
	list-style-type: disc;
}
.iss-purchasing :where(li) {
	list-style-type: inherit;
}

/* Feature Library controls: undo The7's form-field margins/line-height (The7 uses ID-weight selectors). */
.iss-purchasing #feature-search {
	margin: 0 !important; /* The7's desktop form rule is !important */
	line-height: inherit;
}
.iss-purchasing #category-select {
	margin: 0 !important;
	line-height: normal;
}
.iss-purchasing :where(summary) {
	display: list-item;
}
