/*
Theme Name: WWI Bridge Block
Theme URI: https://webwizards.ca
Author: Web Wizards Inc
Author URI: https://webwizards.ca
Description: Full Site Editing (block theme) companion for the WP AI Site Deployer control panel — the modern alternative to wwi-bridge-classic. Header/footer are real wp_template_part entries (editable live in the Site Editor, and overwritten by this app's own /template-parts sync — see class-wwi-templates.php's upsert_template_part() in the wwi-site-bridge plugin), and pages render through templates/index.html's core/post-content. Like its classic sibling, this theme supplies no design of its own beyond a minimal reset — all real styling comes from the imported site's own CSS, enqueued at runtime from the URL the plugin stores in the wwi_bridge_css_url option (see functions.php).
Version: 1.0.0
Requires at least: 5.9
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wwi-bridge-block
*/

/* Minimal reset only — all real styling comes from the imported site's own
   enqueued CSS (functions.php). This just prevents an unstyled flash of
   default browser/user-agent styles before that loads, and keeps images
   from overflowing their container if the source CSS doesn't cover every
   case. */
*, *::before, *::after {
	box-sizing: border-box;
}

body {
	margin: 0;
}

/* object-fit: cover is a no-op when height is auto (the common case) — it
   only kicks in when the source's own inline style or CSS locks an explicit
   width+height pair that doesn't match the image's natural ratio, cropping
   instead of letting the image distort. */
img {
	max-width: 100%;
	height: auto;
	object-fit: cover;
}

/* Dropdown submenu support for the primary nav, default-WordPress-menu
   style — same rules as wwi-bridge-classic's style.css, kept in sync since
   both themes render menus through the same wp_nav_menu()-based markup
   conventions (".wwi-primary-nav" / ".sub-menu"). See that file's comment
   for the full rationale. */
.wwi-primary-nav .menu-item-has-children {
	position: relative;
}

.wwi-primary-nav .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 100;
	margin: 0;
	padding: 0;
	min-width: 200px;
	list-style: none;
	background: #fff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wwi-primary-nav .menu-item-has-children:hover > .sub-menu,
.wwi-primary-nav .menu-item-has-children:focus-within > .sub-menu {
	display: block;
}

.wwi-primary-nav .sub-menu li {
	display: block;
}

.wwi-primary-nav .sub-menu a {
	display: block;
	padding: 0.6em 1em;
	white-space: nowrap;
	color: inherit;
}

.wwi-primary-nav .sub-menu .sub-menu {
	top: 0;
	left: 100%;
}
