/*
Theme Name: Training Puppies
Description: Block theme for this site, copied from the migration kit starter. Tokens live in theme.json; this file only references them.
Version: 0.1.0
Starter: 0.2.1
Requires at least: 6.9
Tested up to: 7.1
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: training-puppies-block
*/

/*
 * Every colour, size, family and spacing below is a theme.json token (PLAYBOOK R36, AGENT-BRIEF §3.1):
 * 0 literal colours in this file. Class names carry the site prefix (R6).
 */

/*
 * Phone steps of the heading sizes (custom.font-size-step). Set on body so they win over :root in any load order.
 * Size slugs have no digits: WordPress 7.1 writes preset "h1" as --wp--preset--font-size--h-1 but resolves
 * "var:preset|font-size|h1" (theme.json, Site Editor > Styles) to --h1, so headings fell back to the body size
 * (found 2026-11-11 in starter 0.2.0; renamed to title / section / subsection with the owner's OK).
 */
@media (max-width: 781px) {
	body {
		--wp--preset--font-size--title: var(--wp--custom--font-size-step--title-phone);
		--wp--preset--font-size--section: var(--wp--custom--font-size-step--section-phone);
		--wp--preset--font-size--subsection: var(--wp--custom--font-size-step--subsection-phone);
		--wp--preset--font-size--lead: var(--wp--custom--font-size-step--lead-phone);
	}
}

/*
 * Header and footer parts rebuild the live 0.5.34 markup with groups and paragraphs: no flow-layout gaps and no
 * paragraph margins there (live used ul/li/span). Loaded before assets/css/legacy/, so live rules of equal weight win.
 */
/* Page frame as live: header, main and footer touch (no block gap between them), and the template-part wrappers
   make no box, so the header stays sticky against the whole page (live: a direct child of <body>). */
body .wp-site-blocks > * {
	margin-block: 0;
}

.tp-part {
	display: contents;
}

/* Footer link lists: the core Navigation wrapper (role none) makes no box; its list is the live ul. */
.tp-site-footer nav[role="none"] {
	display: contents;
}

/* The copyright line is a paragraph here, a span on live (tp-v3.css: .tp-footer-bottom span). */
.tp-footer--v3 .tp-footer-bottom .tp-footer-copy {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
}

.tp-site-header .is-layout-flow > *,
.tp-site-footer .is-layout-flow > *,
.tp-site-header p,
.tp-site-footer p {
	margin-block: 0;
}

/* Live 0.5.34 base (Hello Elementor reset.css), kept for parity (Mode A): border-box sizing everywhere, and text
   antialiased on macOS. */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	-webkit-font-smoothing: antialiased;
}

/*
 * Keyboard focus (level 3), the live base (Hello Elementor reset.css): a 2px outline with a 4px light ring; the live
 * rules (assets/css/legacy/) turn the outline into the 3px focus colour in header, main, footer and the skip link.
 */
[tabindex]:not([tabindex="-1"]):focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	box-shadow: 0 0 0 4px var(--wp--custom--color--on-action);
	outline: 2px solid var(--wp--custom--legacy--color--black);
	outline-offset: 2px;
}

/*
 * Page gutters and anchor offset as on live 0.5.34 (--tp-gutter 48/24/16, breakpoints 1023/767 px,
 * scroll-padding-top 80/72 px below the sticky header). Root padding feeds every constrained layout: 48px (spacing 70)
 * in theme.json; the steps below use ":root body" so they win over WordPress's "body" rule in any load order.
 */
html {
	scroll-padding-top: calc(80px + var(--wp-admin--admin-bar--height, 0px));
}

@media (max-width: 1023px) {
	:root body {
		--wp--style--root--padding-left: var(--wp--preset--spacing--50);
		--wp--style--root--padding-right: var(--wp--preset--spacing--50);
	}
}

@media (max-width: 767px) {
	:root body {
		--wp--style--root--padding-left: var(--wp--preset--spacing--40);
		--wp--style--root--padding-right: var(--wp--preset--spacing--40);
	}

	html {
		scroll-padding-top: calc(72px + var(--wp-admin--admin-bar--height, 0px));
	}
}

/* ---------- Header and footer (parts/header.html, parts/footer.html) ---------- */

.tpb-head {
	background: var(--wp--preset--color--surface-alt);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.tpb-head-in,
.tpb-foot-in {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
	padding: var(--wp--preset--spacing--40);
}

.tpb-head .wp-block-site-title a,
.tpb-foot .wp-block-site-title a {
	color: var(--wp--preset--color--heading);
	text-decoration: none;
}

.tpb-foot {
	margin-top: var(--wp--preset--spacing--80);
	background: var(--wp--preset--color--surface-alt);
	border-top: 1px solid var(--wp--preset--color--border);
	font-size: var(--wp--preset--font-size--small);
}

.tpb-foot-copy {
	color: var(--wp--preset--color--text-muted);
}

/* ---------- Main ---------- */

/* Converted pages (Phase 2): inline content Elementor printed straight inside a wrapper is held by a paragraph that
   takes no box of its own, so the live layout is unchanged (convert/convert-guides.php). */
.tpb-contents {
	display: contents;
}

.tpb-main {
	padding-block: var(--wp--preset--spacing--60);
}

/* ---------- Site plugin blocks (tpb-site-core): breadcrumb, On this page, byline ---------- */

.tpb-breadcrumb p {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--text-muted);
}

.tpb-crumb-sep {
	margin-inline: var(--wp--preset--spacing--10);
}

.tpb-toc {
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--surface);
	border-left: 3px solid var(--wp--preset--color--accent);
	border-radius: var(--wp--custom--radius--small);
}

.tpb-toc-list {
	margin: 0;
	padding-left: var(--wp--preset--spacing--50);
}

.tpb-byline {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--text-muted);
}

/* ---------- Page types (templates/page-*.html, patterns/type-*.php) ---------- */

.tpb-contact-box {
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--medium);
}

:is(.tpb-type-legal, .tpb-type-guide) .tpb-toc {
	margin-block: var(--wp--preset--spacing--50);
}

/* FAQ group (pattern "FAQ section" or group style "FAQ"; schema in tpb-site-core/faq-schema.php). */
:is(.tpb-faq, .is-style-tpb-faq) .wp-block-details {
	padding-block: var(--wp--preset--spacing--30);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

:is(.tpb-faq, .is-style-tpb-faq) .wp-block-details summary {
	font-weight: 700;
	color: var(--wp--preset--color--heading);
	cursor: pointer;
}
