/**
 * Blocksy -> Core Framework bridge.
 *
 * Blocksy writes its Customizer values as fixed numbers (px, rgba) into uploads/blocksy/css/global.css.
 * Here every one of them is pointed at a Core Framework variable, so the theme follows the CF palette,
 * type scale, spacing, radii and shadows. The Blocksy palette itself is already CF (color1 = var(--primary) ...).
 * Selectors carry "html"/"body" so they win over global.css whatever the load order (LiteSpeed combines CSS).
 * Loaded only while Blocksy is the active theme (TC_Design::enqueue_blocksy_bridge).
 */

/* Base: text, links, buttons, forms, spacing */
html:root {
	--theme-font-size: var(--text-m);
	--theme-selection-text-color: var(--light);
	--theme-selection-background-color: var(--primary);
	--theme-content-spacing: var(--space-m);
	--theme-content-vertical-spacing: var(--space-2xl);

	--theme-button-font-size: var(--text-s);
	--theme-button-font-weight: 600;
	--theme-button-padding: var(--btn-space);
	--theme-button-text-initial-color: var(--light);
	--theme-button-text-hover-color: var(--light);
	--theme-button-background-initial-color: var(--primary);
	--theme-button-background-hover-color: var(--primary-d-2);
	--theme-button-border-radius: var(--radius-full);

	--theme-form-field-border-initial-color: var(--border-primary);
	--theme-form-field-border-focus-color: var(--tertiary);
	--theme-form-selection-field-active-color: var(--primary);
	--theme-form-field-border-radius: var(--radius-s);
}

/* Headings (same scale as frontend.css) */
html body h1 { --theme-font-size: var(--text-2xl); --theme-line-height: 1.2; }
html body h2 { --theme-font-size: var(--text-xl); --theme-line-height: 1.25; }
html body h3 { --theme-font-size: var(--text-l); --theme-line-height: 1.3; }
html body h4 { --theme-font-size: var(--text-m); --theme-line-height: 1.35; }
html body h5 { --theme-font-size: var(--text-m); --theme-line-height: 1.4; }
html body h6 { --theme-font-size: var(--text-s); --theme-line-height: 1.4; }
html body figcaption { --theme-font-size: var(--text-s); }
html body :is(pre, code, samp, kbd) { --theme-font-size: var(--text-s); }
html body .wp-block-pullquote { --theme-font-size: var(--text-xl); }
html body .ct-breadcrumbs { --theme-font-size: var(--text-xs); }
html body .ct-sidebar .widget-title { --theme-font-size: var(--text-l); }

/* Header */
html body[data-header] .ct-header [data-id="logo"] .site-title {
	--theme-font-size: var(--text-xl);
	--theme-line-height: 1.3;
	--theme-link-initial-color: var(--text-title);
}
html body[data-header] .ct-header [data-id="menu"] > ul > li > a {
	--theme-font-size: var(--nav-link-size);
	--theme-link-initial-color: var(--text-body);
}
html body[data-header] .ct-header [data-id="menu"] .sub-menu {
	--dropdown-divider: 1px solid var(--primary-l-1);
	--theme-box-shadow: var(--shadow-l);
	--theme-border-radius: 0 0 var(--radius-s) var(--radius-s);
	background-color: var(--primary);
}
html body[data-header] .ct-header [data-id="menu"] .sub-menu .ct-menu-link {
	--theme-font-size: var(--text-s);
	--theme-link-initial-color: var(--light);
	--theme-link-hover-color: var(--secondary);
}
html body[data-header] .ct-header [data-row*="middle"] { background-color: var(--bg-surface); }
html body[data-header] [data-id="trigger"] { --theme-icon-size: var(--text-l); --theme-icon-color: var(--text-title); }

/* Mobile menu (off-canvas) and search window: navy panel, light text */
html body[data-header] #offcanvas { --theme-box-shadow: var(--shadow-xl); }
html body[data-header] #offcanvas .ct-panel-inner { background-color: var(--primary); }
html body[data-header] [data-id="mobile-menu"] {
	--theme-font-size: var(--text-l);
	--theme-link-initial-color: var(--light);
	--theme-link-hover-color: var(--secondary);
	--theme-link-active-color: var(--secondary);
}
html body[data-header] #offcanvas .ct-toggle-close { --theme-icon-color: var(--light); }
html body[data-header] #search-modal { background-color: var(--primary); }
html body[data-header] #search-modal .ct-search-form {
	--theme-link-initial-color: var(--light);
	--theme-form-text-initial-color: var(--light);
	--theme-form-text-focus-color: var(--light);
	--theme-form-field-border-initial-color: var(--primary-l-2);
	--theme-form-field-border-focus-color: var(--secondary);
	--theme-button-text-initial-color: var(--primary);
	--theme-button-text-hover-color: var(--primary);
	--theme-button-background-initial-color: var(--secondary);
	--theme-button-background-hover-color: var(--secondary-l-1);
	--theme-form-border-radius: var(--radius-full);
}
html body[data-header] #search-modal .ct-search-results { --theme-font-size: var(--text-s); }

/* Footer */
html body[data-footer] [data-id="copyright"] { --theme-font-size: var(--text-s); --theme-line-height: 1.5; }
html body[data-footer] .ct-footer [data-row*="bottom"] .widget-title { --theme-font-size: var(--text-m); }
html body[data-footer] .ct-footer [data-row*="bottom"] > div { --container-spacing: var(--space-m); }

/* Archive and single headers, entry cards */
html body[data-prefix] .entry-header .page-title { --theme-font-size: var(--post-title-size); }
html body[data-prefix] .entry-header .entry-meta { --theme-font-size: var(--text-xs); }
html body[data-prefix] .entry-card .entry-title { --theme-font-size: var(--text-l); }
html body[data-prefix] .entry-card .entry-meta { --theme-font-size: var(--text-xs); }
html body[data-prefix] .entry-card {
	background-color: var(--bg-surface);
	--theme-box-shadow: var(--shadow-s);
	--theme-border-radius: var(--radius-m);
}
html body[data-prefix] .hero-section[data-type="type-2"] { background-color: var(--bg-body); }
