/*
Theme Name: ZCorp FSE
Author: ZCorp
Description: Universal Full Site Editing core theme for the WordPress fleet. Ships neutral templates, a token-bound pattern library, style variations, a bundled TOC block, and a JSON-LD/SEO engine. Site branding and copy live in child themes.
Version: 1.4.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Text Domain: zcorp-fse
*/

html {
	scroll-padding-top: 90px;
}

:root {
	--theme-radius: 6px;
	--theme-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
	--theme-surface: var(--wp--preset--color--white);
	--theme-border-color: var(--wp--preset--color--border);
	--theme-accent: var(--wp--preset--color--accent);
}

header.wp-block-template-part {
	position: sticky !important;
	top: 0 !important;
	z-index: 9999 !important;
	width: 100%;
}

.wp-site-blocks > header.wp-block-template-part {
	position: sticky !important;
	top: 0 !important;
	z-index: 9999 !important;
}

/* ==========================================================================
   ZCorp Utility & Component Styles
   Color roles: text on warning-gold and on inverse surfaces (hero, pre-footer, footer) uses the
   inverse / on-inverse / on-inverse-muted slugs, which stay dark / light in every palette, never
   foreground, white, muted, or deep-slate (a dark child palette flips those).
   ========================================================================== */

/* Accordion Component (details.zc-accordion) */
details.zc-accordion {
	border: 1px solid var(--wp--preset--color--border, #e5e7eb);
	border-radius: 8px;
	padding: 1rem 1.25rem;
	margin-bottom: 1rem;
	background-color: var(--wp--preset--color--white, #ffffff);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

details.zc-accordion summary {
	font-weight: 600;
	font-size: 1.05rem;
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: var(--wp--preset--color--foreground, #0E1111);
	user-select: none;
}

details.zc-accordion summary::-webkit-details-marker {
	display: none;
}

details.zc-accordion summary::after {
	content: "+";
	font-size: 1.25rem;
	line-height: 1;
	font-weight: 400;
	color: var(--wp--preset--color--accent, #4F309E);
	transition: transform 0.2s ease;
	margin-left: 0.75rem;
}

details.zc-accordion[open] {
	border-color: var(--wp--preset--color--resource-tint, #ede9fe);
	box-shadow: 0 4px 12px rgba(79, 48, 158, 0.06);
}

details.zc-accordion[open] summary {
	margin-bottom: 0.75rem;
	border-bottom: 1px solid var(--wp--preset--color--light-neutral, #f3f4f6);
	padding-bottom: 0.75rem;
}

details.zc-accordion[open] summary::after {
	content: "\2212";
}

/* Pill Badges & Suggestion Tags */
.zc-pill-tag {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.25;
	background-color: var(--wp--preset--color--resource-tint, #ede9fe);
	color: var(--wp--preset--color--accent, #4F309E);
	text-decoration: none;
	border: 1px solid transparent;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.zc-pill-tag:hover {
	background-color: var(--wp--preset--color--accent, #4F309E);
	color: var(--wp--preset--color--white, #ffffff);
}

.zc-metric-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.625rem;
	border-radius: 6px;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.025em;
	background-color: var(--wp--preset--color--warning-gold, #f7d94f);
	color: var(--wp--preset--color--inverse, #0f172a);
}

/* Breadcrumbs Navigation Component */
.zc-breadcrumbs-nav {
	font-size: var(--wp--preset--font-size--small, 0.9rem);
	line-height: 1.4;
	margin-bottom: 1.25rem;
}

.zc-breadcrumbs-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	list-style: none;
	padding: 0;
	margin: 0;
	gap: 0.5rem;
}

.zc-breadcrumb-item {
	display: inline-flex;
	align-items: center;
}

.zc-breadcrumb-link {
	color: var(--wp--preset--color--accent, #4F309E);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.15s ease;
}

.zc-breadcrumb-link:hover {
	text-decoration: underline;
}

.zc-breadcrumb-separator {
	margin-left: 0.5rem;
	color: var(--wp--preset--color--muted, #9ca3af);
	user-select: none;
}

.zc-breadcrumb-text {
	color: var(--wp--preset--color--foreground, #0E1111);
	font-weight: 600;
}

/* Pattern utilities for declarations block supports cannot express */
.zc-max-w-620 {
	max-width: 620px;
}

.zc-max-w-800 {
	max-width: 800px;
}

.zc-max-w-560 {
	max-width: 560px;
}

.zc-max-w-300 {
	max-width: 300px;
}

.zc-opacity-20,
hr.wp-block-separator.zc-opacity-20 {
	opacity: 0.2;
}

.zc-list-plain {
	list-style: none;
}

/* The palette slug "border" generates .has-border-color as a text-color utility, which collides with
   the class WordPress adds to any block that has a custom border color. Only an element that also has
   .has-text-color actually chose "border" as its text color. */
body .has-border-color:not(.has-text-color) {
	color: inherit !important;
}

/* An element with a real text-color preset keeps it even when it also has a custom border color. */
body .has-background-color.has-border-color {
	color: var(--wp--preset--color--background) !important;
}
body .has-foreground-color.has-border-color {
	color: var(--wp--preset--color--foreground) !important;
}
body .has-accent-color.has-border-color {
	color: var(--wp--preset--color--accent) !important;
}
body .has-white-color.has-border-color {
	color: var(--wp--preset--color--white) !important;
}
body .has-warning-gold-color.has-border-color {
	color: var(--wp--preset--color--warning-gold) !important;
}
body .has-deep-slate-color.has-border-color {
	color: var(--wp--preset--color--deep-slate) !important;
}
body .has-resource-tint-color.has-border-color {
	color: var(--wp--preset--color--resource-tint) !important;
}
body .has-light-neutral-color.has-border-color {
	color: var(--wp--preset--color--light-neutral) !important;
}
body .has-muted-color.has-border-color {
	color: var(--wp--preset--color--muted) !important;
}
body .has-success-color.has-border-color {
	color: var(--wp--preset--color--success) !important;
}
body .has-success-soft-color.has-border-color {
	color: var(--wp--preset--color--success-soft) !important;
}
body .has-warning-color.has-border-color {
	color: var(--wp--preset--color--warning) !important;
}
body .has-warning-soft-color.has-border-color {
	color: var(--wp--preset--color--warning-soft) !important;
}
body .has-danger-color.has-border-color {
	color: var(--wp--preset--color--danger) !important;
}
body .has-danger-soft-color.has-border-color {
	color: var(--wp--preset--color--danger-soft) !important;
}
body .has-inverse-color.has-border-color {
	color: var(--wp--preset--color--inverse) !important;
}
body .has-on-inverse-color.has-border-color {
	color: var(--wp--preset--color--on-inverse) !important;
}
body .has-on-inverse-muted-color.has-border-color {
	color: var(--wp--preset--color--on-inverse-muted) !important;
}

/* Pattern table and list presets (cell-level styles block markup cannot store) */
.zc-table-compact th,
.zc-table-compact td {
	padding: 0.6rem 0.75rem;
}

.zc-table-compact th {
	background: var(--wp--preset--color--light-neutral);
}

.zc-table-compact mark {
	font-weight: 600;
}

.zc-table-roomy th,
.zc-table-roomy td {
	padding: 0.75rem 1rem;
}

.zc-table-roomy thead tr {
	background: var(--wp--preset--color--light-neutral);
}

.zc-table-roomy th {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--wp--preset--color--foreground);
}

.zc-table-roomy tbody {
	font-size: 0.875rem;
	line-height: 1.5;
}

.zc-list-check li {
	margin-bottom: 0.75rem;
	display: flex;
	align-items: flex-start;
}

/* Sticky sidebar column in the 70/30 templates (core/column has no position support). */
.zc-sticky-col {
	position: sticky;
	top: 90px;
	align-self: flex-start;
}
