/*
Theme Name: OA Blank
Theme URI: https://oui.software
Author: oui.software
Author URI: https://oui.software
Description: Blank standalone starter theme for Elementor (free and Pro), built on the OA templating design system. Minimal markup, every location replaceable by the Elementor Pro Theme Builder, design tokens as CSS variables and theme.json, and a one-click import of the OA templating Elementor kit.
Version: 1.0.4
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oa-blank
Domain Path: /languages
Tags: elementor, blank, one-column, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

/*
 * Reset + base typography. Values come from assets/css/oa-tokens.css (--oui-*),
 * and defer to Elementor's global colors/fonts (--e-global-*) once a kit sets them.
 * Every selector is wrapped in :where() so Elementor kit and widget styles always win.
 */
:root {
	--oa-text: var(--e-global-color-text, var(--oui-color-text));
	--oa-primary: var(--e-global-color-primary, var(--oui-color-primary));
	--oa-font-body: var(--e-global-typography-text-font-family, var(--oui-font-family-body)), system-ui, sans-serif;
	--oa-font-heading: var(--e-global-typography-primary-font-family, var(--oui-font-family-heading)), system-ui, sans-serif;
}

:where(*, *::before, *::after) { box-sizing: border-box; }
:where(html) { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
:where(body) {
	margin: 0;
	background: var(--oui-color-surface);
	color: var(--oa-text);
	font-family: var(--oa-font-body);
	font-size: var(--oui-type-body-size);
	font-weight: var(--oui-type-body-weight);
	line-height: var(--oui-type-body-line-height);
	-webkit-font-smoothing: antialiased;
}
:where(h1, h2, h3, h4, h5, h6) { margin: 0 0 var(--oui-space-4); font-family: var(--oa-font-heading); }
:where(h1) { font-size: var(--oui-type-h1-size); font-weight: var(--oui-type-h1-weight); line-height: var(--oui-type-h1-line-height); }
:where(h2) { font-size: var(--oui-type-h2-size); font-weight: var(--oui-type-h2-weight); line-height: var(--oui-type-h2-line-height); }
:where(h3) { font-size: var(--oui-type-h3-size); font-weight: var(--oui-type-h3-weight); line-height: var(--oui-type-h3-line-height); }
:where(h4, h5, h6) { font-size: var(--oui-type-h4-size); font-weight: var(--oui-type-h4-weight); line-height: var(--oui-type-h4-line-height); }
:where(p, ul, ol, dl, blockquote, figure, pre, table) { margin: 0 0 var(--oui-space-4); }
:where(small) { font-size: var(--oui-type-small-size); }
:where(a) { color: var(--oa-primary); text-underline-offset: 0.15em; }
:where(a:hover) { color: var(--oui-color-primary-hover); }
:where(img, svg, video, iframe) { max-width: 100%; height: auto; }
:where(img) { vertical-align: middle; }
:where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(table) { border-collapse: collapse; width: 100%; }
:where(th, td) { padding: var(--oui-space-2) var(--oui-space-3); border-bottom: 1px solid var(--oui-color-border); text-align: start; }
:where(hr) { border: 0; border-top: 1px solid var(--oui-color-border); margin: var(--oui-space-6) 0; }

/* Accessibility */
:where(:focus-visible) { outline: 2px solid var(--oa-primary); outline-offset: 2px; }
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; margin: 0; z-index: 100000;
	top: var(--oui-space-2); left: var(--oui-space-2); padding: var(--oui-space-3) var(--oui-space-4);
	background: var(--oui-color-surface); color: var(--oa-text); box-shadow: var(--oui-shadow-md);
}

/* WordPress core classes */
:where(.alignleft) { float: left; margin: 0 var(--oui-space-5) var(--oui-space-4) 0; }
:where(.alignright) { float: right; margin: 0 0 var(--oui-space-4) var(--oui-space-5); }
:where(.aligncenter) { display: block; margin-inline: auto; }
:where(.wp-caption-text, .gallery-caption) { font-size: var(--oui-type-small-size); color: var(--oui-color-text-muted); }
:where(.sticky, .bypostauthor) { display: block; }

/* Theme fallbacks (only used when Elementor Pro does not render the location) */
:where(.site-header, .site-footer, .site-main:not(.site-main--full)) {
	width: min(100% - 2 * var(--oui-layout-gutter), var(--oui-layout-container));
	margin-inline: auto;
}
:where(.site-main:not(.site-main--full)) { padding-block: var(--oui-space-7); }
:where(.site-header, .site-footer) {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: var(--oui-space-4); padding-block: var(--oui-space-5);
}
:where(.site-footer) { border-top: 1px solid var(--oui-color-border); font-size: var(--oui-type-small-size); color: var(--oui-color-text-muted); }
:where(.site-title) { font-family: var(--oa-font-heading); font-weight: var(--oui-font-weight-bold); font-size: var(--oui-type-h4-size); margin: 0; }
:where(.site-title a) { color: inherit; text-decoration: none; }
:where(.site-description) { margin: 0; color: var(--oui-color-text-muted); font-size: var(--oui-type-small-size); }
:where(.site-navigation ul) { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--oui-space-2) var(--oui-space-5); }
:where(.site-navigation a) { display: inline-block; padding-block: var(--oui-space-2); text-decoration: none; }
:where(.site-navigation .sub-menu) { display: none; }
/* Mobile menu: only once assets/js/navigation.js has enhanced the header (no JS = menu stays visible and wraps) */
:where(.menu-toggle) {
	display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem;
	border: 1px solid var(--oui-color-border); border-radius: var(--oui-radius-md, 8px); background: transparent; color: inherit; cursor: pointer;
}
:where(.menu-toggle__bars), :where(.menu-toggle__bars)::before, :where(.menu-toggle__bars)::after {
	content: ""; display: block; width: 1.2rem; height: 2px; background: currentColor; position: relative;
}
:where(.menu-toggle__bars)::before { position: absolute; top: -6px; }
:where(.menu-toggle__bars)::after { position: absolute; top: 6px; }
/* Show/hide rules use real specificity (not :where) so plugin button styles can't override them. */
.site-header .menu-toggle { display: none; }
@media (max-width: 767px) {
	.site-header.has-menu-toggle .menu-toggle { display: inline-flex; }
	.site-header.has-menu-toggle .site-navigation { flex-basis: 100%; display: none; }
	.site-header.has-menu-toggle .site-navigation.is-open { display: block; }
	:where(.site-header.has-menu-toggle .site-navigation ul) { flex-direction: column; gap: 0; }
}
:where(.entry + .entry) { margin-top: var(--oui-space-7); padding-top: var(--oui-space-7); border-top: 1px solid var(--oui-color-border); }
:where(.entry-meta, .post-tags) { color: var(--oui-color-text-muted); font-size: var(--oui-type-small-size); }
:where(.pagination, .post-navigation .nav-links) { display: flex; justify-content: space-between; gap: var(--oui-space-4); margin-top: var(--oui-space-7); }
:where(.comment-list) { list-style: none; padding: 0; }
:where(.comment-list .children) { list-style: none; padding-inline-start: var(--oui-space-6); }
:where(.search-form) { display: flex; gap: var(--oui-space-2); }
:where(input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="password"], textarea) {
	width: 100%; padding: var(--oui-space-3); border: 1px solid var(--oui-color-border); border-radius: var(--oui-radius-md); background: var(--oui-color-surface);
}
:where(button, input[type="submit"], .button) {
	display: inline-block; min-height: 44px; padding: var(--oui-space-3) var(--oui-space-5); border: 0; border-radius: var(--oui-radius-md);
	background: var(--oa-primary); color: var(--oui-color-on-primary); font-weight: var(--oui-type-button-weight); cursor: pointer; text-decoration: none;
}
