/**
 * modules/ogace/assets/css/ogace-theme-compat.css
 * ============================================================================
 * OGACE Network ↔ Online Global Association THEME COMPATIBILITY LAYER
 *
 * The plugin ships some surfaces (the "webapp"/PWA shell, the "vibe" shell and
 * the social-share widget) in a dark cyberpunk palette. On the light Online
 * Guide Association theme that dark navy/near-black background clashes ("crash")
 * with the page. This layer remaps those component CSS variables to the light
 * OGACE brand palette so every plugin surface sits cleanly on the light theme.
 *
 * It only re-points existing CSS custom properties — no markup, no text, no
 * feature is changed. Uses a :root:root selector (specificity 0,0,2) so it wins
 * over the component :root blocks (0,0,1) regardless of load order — no
 * !important needed.
 *
 * Brand: navy #001D6C · deep red #b01c2e · gold #EAB308.
 * @since 2026-07-29
 */

:root:root {
	/* ── OGACE brand anchors ───────────────────────────────────────────── */
	--oga-navy:  #001D6C;
	--oga-red:   #b01c2e;
	--oga-gold:  #EAB308;
	--oga-paper: #ffffff;
	--oga-ink:   #14181f;
	/* Single "unique white truth" — one canonical pure white plus one
	 * canonical whisper-of-grey for the rare case a surface genuinely
	 * needs to read as a layer above the page (a hover state, a nested
	 * row). Every near-white shade in this file used to be its own
	 * slightly-different value (#f6f8fc, #eef2fa, #e5ecf7, #f1f5f9…) —
	 * consolidated down to these two so "white" means one exact thing
	 * everywhere in the plugin, and any remaining depth comes from a
	 * shared hairline border instead of five competing off-whites. */
	--oga-paper-subtle: #fafbfc;
	--oga-border: #e5e9f0;

	/* ── Unified graph-layer accents (G0–G4) — used for icon/tag colours ─ */
	--ogace-g0: #0f9d8c; /* Geo      */
	--ogace-g1: #c08a00; /* Human    */
	--ogace-g2: #3552c4; /* AI       */
	--ogace-g3: #b01c2e; /* Economic */
	--ogace-g4: #7a3ff2; /* Autonomous */

	/* ── Webapp / PWA shell (ogw): dark navy → the canonical white system ─
	 * bg0/bg1/bg2 (page + primary + card surfaces) are all the one true
	 * white; bg3/bg4 (hover / nested / active states — the only cases that
	 * need to read as "one layer up") share the one canonical subtle tone
	 * instead of two different blue-tinted greys. */
	--ogw-bg0: #ffffff;
	--ogw-bg1: #ffffff;
	--ogw-bg2: #ffffff;
	--ogw-bg3: var(--oga-paper-subtle);
	--ogw-bg4: var(--oga-paper-subtle);
	--ogw-fg0: #001D6C;   /* was #ffffff (white on dark) */
	--ogw-fg1: #1a2b52;
	--ogw-fg2: #5a6a86;
	--ogw-fg3: #8493ad;
	--ogw-gold:   #EAB308;
	--ogw-link:   #b01c2e;
	--ogw-link-h: #001D6C;
	/* membership tiers kept, lightly brand-aligned */
	--ogw-t-free:       #0f9d8c;
	--ogw-t-pro:        #c08a00;
	--ogw-t-agency:     #3552c4;
	--ogw-t-enterprise: #7a3ff2;

	/* ── Vibe shell (ogv): lighten the navy backgrounds, keep ink as text ─
	 * NOTE: --ogv-navy-deep and --ogv-paper are also used as *text/icon*
	 * colours in a few spots (dock centre icon, prompt "@" separator, card
	 * labels) — not just backgrounds. An earlier pass set both to near-white,
	 * which made that text invisible against the light theme. Fixed below:
	 * --ogv-navy-deep stays dark (it's the icon colour on a bright gradient
	 * chip) and --ogv-paper becomes dark ink (it's used as body/label text
	 * colour throughout vibe.css, never as a background). */
	--ogv-navy:      #ffffff;
	--ogv-navy-2:    #ffffff;
	--ogv-navy-deep: #001D6C;
	--ogv-paper:     #14181f;
	--ogv-ink:       #14181f;
	--ogv-gold:      #EAB308;
	--ogv-cyan:      #0f9d8c;   /* was neon #00e5ff */
	--ogv-mint:      #0f9d8c;
	--ogv-magenta:   #b01c2e;   /* was neon magenta */
	--ogv-warn:      #d97706;

	/* ── Social-share widget → force its light-mode values ────────────── */
	--ogace-share-bg:     #ffffff;
	--ogace-share-bg-2:   var(--oga-paper-subtle);
	--ogace-share-fg:     #0f172a;
	--ogace-share-muted:  #64748b;
	--ogace-share-accent: #b01c2e;
}

/* ── OGACE Theme-Safe Frame — the reusable seam pattern ─────────────────────
 * Any OGACE surface that intentionally keeps a different background than
 * the active theme (a dark shell, a data-dense panel, etc.) should carry
 * this class instead of inventing its own transition. It frames the panel
 * with a rounded top edge, a brand gold→red seam accent, and a soft shadow,
 * so the change in background always reads as one deliberate design choice
 * — never a plugin/theme colour clash. First used on the footer Sitemap
 * layer (see ogace-footer-layers.php); apply it to any new module surface
 * that needs the same treatment so every feature stays consistent with
 * whatever partner theme is active. */
.ogace-frame{
	border-radius: 20px 20px 0 0;
	margin-top: 8px;
	box-shadow: 0 -6px 24px rgba(0,29,108,.10);
	position: relative;
}
.ogace-frame::before{
	content: "";
	position: absolute; top: 0; left: 50%; transform: translateX(-50%);
	width: 64px; height: 3px; border-radius: 0 0 3px 3px;
	/* Reads the partner-accent variables when ogace-frame-layout.css /
	   a partner's ogace_frame_partner_accent_v1 filter is active; falls
	   straight back to the OGACE brand gold→red pair when it isn't, so
	   this rule works with or without the Frame Layout backend enabled. */
	background: linear-gradient(90deg, var(--oga-frame-accent-start, var(--oga-gold,#EAB308)), var(--oga-frame-accent-end, var(--oga-red,#b01c2e)));
}
/* Flatter variant for panels that sit mid-page rather than at a hard seam
 * (e.g. an inline widget) — a thin outline instead of a shadow + no accent. */
.ogace-frame--flat{ border-radius: 14px; margin-top: 0; box-shadow: 0 0 0 1px rgba(0,29,108,.08); }
.ogace-frame--flat::before{ display: none; }

/* ── Container safety net ───────────────────────────────────────────────
 * If any plugin wrapper still paints a hard dark background inline, gently
 * normalise the common wrappers to the light paper + navy ink so text stays
 * readable on the light theme. Scoped to plugin wrappers only. */
.ogace-webapp,
.ogace-vibe,
.ogw-shell,
.ogv-shell,
.ogace-social-share {
	background-color: var(--oga-paper);
	color: var(--oga-ink);
}

/* ── Icon rendering consistency (emoji-based icons across the plugin) ──── */
.ogace-icon,
[class*="ogace-"] .icon,
.ogace-agent-icon,
.oga-footer-page-icon,
.ogace-assoc-icon {
	font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
	font-style: normal;
	line-height: 1;
	display: inline-block;
}

/* Layer tag colours (G0–G4) — consistent across theme + plugin */
.ogace-layer-g0, .layer-g0 { color: var(--ogace-g0); }
.ogace-layer-g1, .layer-g1 { color: var(--ogace-g1); }
.ogace-layer-g2, .layer-g2 { color: var(--ogace-g2); }
.ogace-layer-g3, .layer-g3 { color: var(--ogace-g3); }
.ogace-layer-g4, .layer-g4 { color: var(--ogace-g4); }

@media (prefers-color-scheme: dark) {
	/* Respect an explicit dark-mode opt-in on the plugin's own shell only. */
	.ogace-vibe[data-theme="dark"],
	.ogace-webapp[data-theme="dark"] {
		background-color: #0a1628;
		color: #d5e1f3;
	}
}

/* ══════════════════════════════════════════════════════════════════════════
 * OGACE DESIGN CENTER — header · body · footer alignment            (v109130.1)
 * ---------------------------------------------------------------------------
 * This file already loads LAST (ogace-theme-compat.php, priority 99), so this
 * closing section only *unifies* the plugin's three main surfaces onto one
 * shared, centered measure with consistent rhythm. It changes no colours, no
 * markup, and no feature — every surface keeps its own identity (the dark
 * footer, the terminal nav, the framed panels), just aligned and centered.
 * Everything is scoped to the plugin's own wrapper classes.
 * ═══════════════════════════════════════════════════════════════════════ */
:root:root { --ogace-shell-max: 1200px; }

/* Reusable centered container — any plugin surface can adopt it. */
.ogace-shell {
	max-width: var(--ogace-shell-max);
	margin-inline: auto;
	padding-inline: 16px;
}

/* ── Header / navigation ───────────────────────────────────────────────── */
.ogace-nav {
	max-width: var(--ogace-shell-max);
	margin-inline: auto;
}
.ogace-nav__prompt { text-align: center; }
/* Center the pill row when it wraps; leave the scrolling --bar variant
 * left-anchored so it still scrolls from the start. */
.ogace-nav:not(.ogace-nav--bar) .ogace-nav__list { justify-content: center; }

/* ── Body — clean, centered reading rhythm ─────────────────────────────── */
/* Framed panels keep their full-bleed seam; inner content that opts into
 * .ogace-shell gets a comfortable, centered measure. */
.ogace-frame > .ogace-shell,
.ogace-webapp .ogace-shell,
.ogace-vibe .ogace-shell { padding-inline: clamp(12px, 3vw, 24px); }

/* Consistent heading rhythm across plugin surfaces (line-height + balanced
 * wraps only — sizes and the footer's gold heads are untouched). */
.ogace-nav h1, .ogace-nav h2, .ogace-nav h3,
.ogace-webapp h1, .ogace-webapp h2, .ogace-webapp h3,
.ogace-vibe h1, .ogace-vibe h2, .ogace-vibe h3,
.ogama-footer h4 {
	line-height: 1.25;
	text-wrap: balance;
}

/* ── Footer — align to the same centered measure as the header ─────────── */
.ogama-footer .ogama-footer-inner {
	max-width: var(--ogace-shell-max);
}
/* End OGACE Design Center */


/* ══════════════════════════════════════════════════════════════════════════
 * OGACE WHITE-BACKGROUND OVERRIDE — Vibe module full-bleed surfaces (v3.10.2)
 * ---------------------------------------------------------------------------
 * modules/vibe/assets/css/vibe.css paints several full-bleed surfaces with
 * literal hardcoded dark colours inside multi-stop gradients (not the CSS
 * custom properties above), so the variable remap alone can't reach them.
 * This section repaints those specific surfaces light, replaces the dark
 * aurora + scanline background with a faint two-tone gradient + hairline
 * vignette suited to a bright backdrop, and disables the scanline overlay
 * (screen-blend cyan lines only read against dark). No markup, class, or
 * feature is touched — this file still loads LAST (priority 99) so it
 * always wins.
 * ═══════════════════════════════════════════════════════════════════════ */

body.ogv-vibe {
	background:
		radial-gradient(at 18% 0%, color-mix(in oklab, var(--oga-gold) 6%, transparent) 0px, transparent 45%),
		radial-gradient(at 100% 100%, color-mix(in oklab, var(--oga-navy) 4%, transparent) 0px, transparent 50%),
		var(--oga-paper);
	background-attachment: fixed;
	animation: none;
	color: var(--oga-ink);
}
/* Dark-mode scanline overlay — hides on the light theme. */
body.ogv-vibe::before {
	display: none;
}
/* Vignette: keep, but as a barely-there edge fade instead of the heavy dark-mode version. */
body.ogv-vibe::after {
	background: radial-gradient(ellipse at center, transparent 70%, color-mix(in oklab, var(--oga-navy) 4%, transparent) 100%);
}
/* Bento/feature cards: white surface, soft border + shadow instead of a
 * dark glass gradient, so the accent border still reads as the "card". */
.ogv-card {
	background: var(--oga-paper);
	border-color: color-mix(in oklab, var(--c, var(--ogv-gold)) 28%, var(--oga-border));
	box-shadow: 0 1px 2px rgba(0,29,108,.06);
}
.ogv-card__label { color: var(--oga-ink); opacity: .68; }
/* Prompt / pill chips: faint dark wash instead of near-invisible white-on-white. */
.ogv-pill {
	background: rgba(0,29,108,.05);
	border-color: rgba(0,29,108,.12);
}
.ogv-pill:hover { background: rgba(234,179,8,.10); }
/* Ticker strip. */
.ogv-ticker {
	background: var(--oga-paper-subtle);
	border-color: var(--oga-border);
}
/* Toast notifications. */
.ogv-toast {
	background: var(--oga-paper);
	box-shadow: 0 10px 30px rgba(0,29,108,.14), 0 0 0 1px var(--oga-border);
}
/* Bottom mobile dock. */
.ogv-dock {
	background: var(--oga-paper);
	box-shadow: 0 -6px 20px rgba(0,29,108,.10), 0 0 0 1px var(--oga-border);
}
html[data-vibe="off"] body.ogv-vibe { background: var(--oga-paper); }


/* ══════════════════════════════════════════════════════════════════════════
 * OGACE RESPONSIVE GAP NORMALIZATION                                (v3.10.2)
 * ---------------------------------------------------------------------------
 * A safety net over the plugin's own grid/list layouts. Most already use
 * `repeat(auto-fill/auto-fit, minmax(...))`, which reflows on its own, but
 * their `gap` values are hardcoded per-file (ranging 8px–20px) and a few
 * still force a fixed column count on small screens. This section: (1) keeps
 * every known content grid on one tidy column below 480px so cards never get
 * squeezed unreadably thin, (2) scales gaps down a notch on phones so rows
 * don't look sparse on a narrow viewport, and (3) stops horizontal overflow
 * from any oversized child (image/table/iframe) so no surface ever gains a
 * sideways scrollbar or a ragged edge on a small device. Scoped to the
 * plugin's own known container classes — nothing outside it is touched.
 * ═══════════════════════════════════════════════════════════════════════ */

/* Prevent horizontal overflow "gaps" on small screens from oversized media. */
.ogace-shell img, .ogace-shell iframe, .ogace-shell table,
.ogace-webapp img, .ogace-webapp iframe, .ogace-webapp table,
.ogace-vibe img, .ogv-vibe img, .ogv-vibe iframe, .ogv-vibe table,
.ogace-frame img, .ogace-frame iframe, .ogace-frame table {
	max-width: 100%;
	height: auto;
}

/* One fluid gap for every known content grid — replaces the old separate
 * tablet/phone breakpoint overrides. clamp() already shrinks on its own as
 * the viewport narrows, so a single declaration keeps every grid's gap
 * compact and consistent at any width without three copies of the rule. */
.ogace-wc ul.products,
.ogace-temples__grid,
.ogace-pillar__grid,
.ogace-legal-index,
.oga-shop-row,
.oga-pr-grid,
.oga-nos-panels,
.oga-nos-grid,
.ogv-bento {
	gap: var(--ogace-space-sm);
}

/* Phone: still collapse to one column so cards never get squeezed thin
 * (a layout change, not just spacing — clamp() alone can't do this part). */
@media (max-width: 480px) {
	.ogace-wc ul.products,
	.ogace-temples__grid,
	.ogace-pillar__grid,
	.ogace-legal-index,
	.oga-shop-row,
	.oga-pr-grid,
	.oga-nos-panels,
	.oga-nos-grid {
		grid-template-columns: 1fr !important;
	}
	.ogv-bento { grid-template-columns: repeat(2, 1fr); }
	.ogace-shell, .ogace-frame > .ogace-shell,
	.ogace-webapp .ogace-shell, .ogace-vibe .ogace-shell {
		padding-inline: 12px;
	}
}
/* End OGACE Responsive Gap Normalization */


/* ══════════════════════════════════════════════════════════════════════════
 * OGACE HEADER / BODY / FOOTER ORGANIZATION                        (v3.10.2)
 * ---------------------------------------------------------------------------
 * The plugin has no single injected <header>/<footer> — it hands the active
 * theme a nav shortcode ([ogace_nav]), a hero/header block on Vibe pages
 * (.ogv-hero), a set of body content surfaces (cards/grids/panels/frames),
 * and one unified footer stack (#ogace-footer-stack, four ordered layers —
 * see ogace-footer-layers.php). Each piece was already internally consistent;
 * this section makes the THREE ZONES consistent with each other: same max
 * width, same fluid side padding, and a shared vertical-rhythm scale so nav →
 * content → footer never touch or leave a lopsided gap, on any device.
 * ═══════════════════════════════════════════════════════════════════════ */

:root:root {
	/* Fluid vertical-rhythm scale — one spacing system for all three zones.
	 * Tightened for a denser, more compact rhythm (was 12–56px, now 8–36px). */
	--ogace-space-sm: clamp(8px, 1.4vw, 12px);
	--ogace-space-md: clamp(14px, 2.6vw, 20px);
	--ogace-space-lg: clamp(22px, 4vw, 36px);
}

/* ── HEADER ── nav shortcode + Vibe hero, whichever a page uses. ────────── */
.ogace-nav {
	padding-block: var(--ogace-space-sm);
	position: relative;
	z-index: 20; /* sits above body content, below the mobile dock (9985+). */
}
.ogv-hero {
	margin-block: 0 var(--ogace-space-md);
}

/* ── BODY ── every known content surface gets the same breathing room,
 * so cards/grids/panels/frames stack with even, predictable gaps instead of
 * each module's own ad-hoc margin. `+ *` only adds space *between* adjacent
 * blocks — never before the first one or after the last, so nav/footer
 * spacing above is never doubled up. */
.ogv-bento,
.ogace-pillar__grid, .ogace-temples__grid, .ogace-legal-index,
.oga-shop-row, .oga-pr-grid, .oga-nos-panels, .oga-nos-grid,
.ogace-wc ul.products {
	margin-block: var(--ogace-space-md);
}
/* .ogace-frame keeps its own tight 8px seam gap above (it's designed to
 * look attached to whatever precedes it) — only add breathing room below. */
.ogace-frame, .ogace-frame--flat {
	margin-block-end: var(--ogace-space-md);
}
.ogace-nav + .ogv-bento, .ogace-nav + .ogv-hero,
.ogv-hero + .ogv-bento {
	margin-block-start: var(--ogace-space-sm);
}

/* ── FOOTER ── unified stack gets clear separation from whatever body
 * content precedes it. Its Sitemap layer manages its own inner width
 * (.ogace-footer-page__inner) rather than reusing .ogace-shell, and it was
 * set 120px wider (1320px) than the header/body's shared measure (1200px)
 * — a small but real misalignment where the footer's edge didn't line up
 * with the header/body's edge above it. Reined in to the same measure. */
#ogace-footer-stack {
	margin-top: var(--ogace-space-lg);
}
.ogace-footer-page__inner {
	max-width: var(--ogace-shell-max);
}
/* End OGACE Header / Body / Footer Organization */
