/*
 * The account chrome (themes lane, 2026-11-04; docs/estate/ACCOUNT_EXPERIENCE_BAR.md, R-088). Loaded with the account frame
 * and the community pages (nexus_account_enqueue, nexus_community_page). Tokens only: no colour, size or font is a literal
 * except the geometry of the two cover patterns. Dark by default, Light from the kit's tokens, the accent is the network's.
 *
 * It owns what every child theme must agree on, so the community plugin's markup (#nxc-member[data-head][data-nav]) sits the
 * same in Ohio, BuddyX Pro, Cariera, MyListing, Campoal and the native theme:
 *   1. the sticky stack variables (the estate header, then the 48 px bar, then the tab bar): --nx-acct-bar-h and friends;
 *   2. a plain cover (surface and hairline, no pattern) for a member with no cover image;
 *   3. motion: 150 to 200 ms ease-out, reduced motion honoured;
 *   4. guards: nothing a theme prints may float over the account rail or squeeze its two columns.
 */

/* 1. The sticky stack. --nxh-visible-bottom is where the estate header's visible edge is (0 once it has scrolled away); the
      48 px compact header sticks there, the tab bar under it. A plugin or theme never hard-codes an offset: it uses these. */
:root {
	--nx-acct-bar-h: 3rem;
	--nx-acct-tabs-h: 2.75rem;
	/* the larger of the estate header's visible edge and the WordPress admin bar (fixed above everything, 0 when absent) */
	--nx-acct-bar-top: max(var(--nxh-visible-bottom, 0px), var(--wp-admin--admin-bar--height, 0px));
	--nx-acct-tabs-top: calc(max(var(--nxh-visible-bottom, 0px), var(--wp-admin--admin-bar--height, 0px)) + var(--nx-acct-bar-h));
	--nx-acct-stack-h: calc(var(--nx-acct-bar-h) + var(--nx-acct-tabs-h));
	--nx-ease-out: cubic-bezier(.16, .84, .3, 1);
}

/* An anchor or a focused control never lands under the stack. */
#nxc-member :is([id], :target) { scroll-margin-block-start: calc(var(--nx-acct-bar-top) + var(--nx-acct-stack-h) + .5rem); }

/* 3. Motion that explains: one duration pair and one curve for the account chrome; none when the visitor asks for none. */
#nxc-member :is(a, button, summary, [role="tab"], .nxc-cover, .nxc-avatar) {
	transition-property: color, background-color, border-color, box-shadow, opacity, transform;
	transition-duration: var(--nx-motion-fast);
	transition-timing-function: var(--nx-ease-out);
}
#nxc-member :is(.nxc-head, .nxc-strip, .nxc-main, .nxc-body) { animation-timing-function: var(--nx-ease-out); }
@media (prefers-reduced-motion: reduce) {
	:root { --nx-motion-fast: .01ms; --nx-motion-base: .01ms; }
	#nxc-member *, #nxc-member *::before, #nxc-member *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* 2. Covers without an image. Owner 2026-11-06 ("no hex in header background"; OWNER_DESIGN_ACCEPTANCE line 3: no hexagon
      or pattern behind any header or hero): a cover with no image is the page surface with a hairline under it, whatever
      data-pattern it carries (hex, field, or a member's saved preset). No pattern, no accent wash; the content in front of
      it carries the page. */
:is(.nxc-cover, .nx-cover)[data-pattern] {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background-color: var(--nx-bg-surface, var(--nx-bg-canvas));
	background-image: none;
	border-block-end: 1px solid var(--nx-border-hairline, transparent);
}
:is(.nxc-cover, .nx-cover)[data-pattern]::before { content: none; display: none; }

/* 4. Guards. Themes print floating furniture of their own; on an account or community page it sits over the rail and the
      content, so it steps aside: Ohio's vertical "Scroll to top" bar and its cursor-follow dot (also hidden site-wide where the
      estate header is drawn, inc/nexus-theme-fit.php), the other themes' fixed back-to-top and cursor effects. The estate's
      own Back to top and dock remain. */
body:has(#nxc-member) :is(ul.elements-bar > li:has(> .scroll-top), .circle-cursor, .cursor-follower, .mouse-cursor, .cursor-dot, .cursor-outline, .c27-back-to-top, .scroll-to-top, #scroll-to-top, #back-to-top, .back-to-top-theme) {
	display: none !important;
}
/* the two columns: no theme rule squeezes the rail or the main column below their floor */
#nxc-member .nxc-layout { min-inline-size: 0; }
#nxc-member .nxc-main { min-inline-size: 0; }
@media (min-width: 64rem) {
	#nxc-member .nxc-layout { align-items: start; }
}

/* BuddyPress's own horizontal-nav rule (".buddypress-wrap.bp-dir-hori-nav nav") puts a 0 2px 12px #fafafa glow on every <nav>
   in its wrapper: in Dark it drew a white halo round the account rail. Cards in the estate have hairlines, never shadows. */
body #nxc-member:not(#nx-shield):not(#nx-shield):not(#nx-shield) :is(nav, .nxc-nav) { box-shadow: none; }

/* 5. The account tab bar (nav.nxc-acctabs) and the sticky 48 px bar (div.nxc-acctbar) are the community lane's: their base rules live in
      nexus-community account-head.css and sit on the variables above (--nx-acct-bar-top, --nx-acct-tabs-top, --nx-acct-bar-h,
      --nx-acct-stack-h, --nx-ease-out, the motion tokens). The theme adds only what a child theme needs, below. */
@media (prefers-reduced-motion: reduce) { #nxc-member .nxc-acctbar { animation: none; } }
