/**
 * Condor Base Resets (scoped for championship pages)
 *
 * Extracted from condor/assets/css/base.css -- ONLY the rules needed to
 * make block-based sections render correctly inside the legacy theme.
 * Scoped under .championship-content to avoid affecting the rest of the site.
 *
 * @package USA Ultimate (Legacy)
 */

/* ==========================================================================
   Box Sizing Reset
   Legacy theme doesn't set border-box globally. Block-based patterns
   depend on it for correct padding/border calculations.
   ========================================================================== */

.championship-content *,
.championship-content *::before,
.championship-content *::after {
	box-sizing: border-box;
}

/* ==========================================================================
   Body Font & Line Height
   Legacy body shorthand sets `font: 400 100% / 1 futura-pt, sans-serif`
   which gives line-height: 1. Championship sections need comfortable leading.
   Note: championship.css also sets this on .championship-content directly;
   these rules reinforce it for nested elements.
   ========================================================================== */

.championship-content {
	font-family: var(--wp--preset--font-family--body);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Flow Layout Margin Reset
   WordPress blockGap adds margin-block-start to children of .is-layout-flow.
   Condor sets global blockGap: "0" in theme.json; legacy does not. This
   resets flow-layout margins inside championship content so spacing comes
   from block JSON attributes, not WP defaults.
   ========================================================================== */

.championship-content :where(.is-layout-flow) > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* ==========================================================================
   Section Spacing Scale
   Condor's 4-step fluid spacing system. Needed by news-cards.css and any
   other section that uses var(--section-spacing).
   ========================================================================== */

.championship-content {
	--section-spacing-sm: clamp(1rem, 2vw, 1.5rem);
	--section-spacing-md: clamp(2rem, 3vw, 3rem);
	--section-spacing-lg: clamp(3rem, 5vw, 4.5rem);
	--section-spacing-xl: clamp(4rem, 7vw, 6rem);
	--section-spacing: var(--section-spacing-lg);
}

/* ==========================================================================
   Image Defaults
   Ensure images inside blocks don't overflow their containers.
   ========================================================================== */

.championship-content :where(img) {
	max-width: 100%;
	height: auto;
}

/* ==========================================================================
   Link Defaults
   Legacy `a { color: #002b5c }` turns all links navy. Championship blocks
   expect Condor's red link default. Scoped to (0,2,0) to beat legacy (0,0,1).
   ========================================================================== */

/* Red links ONLY in prose contexts (paragraphs, lists, blockquotes). Scoping
   this way preserves:
   - Post titles (inherit heading color from textColor JSON attribute)
   - Jump-links nav anchors (own styling)
   - Buttons (theme.json styles.elements.button)
   - Card stretched links (inherit from parent) */
.championship-content p a,
.championship-content .wp-block-list a,
.championship-content blockquote a {
	color: var(--wp--preset--color--bright-red);
	text-decoration: underline;
	transition: color 0.2s ease;
}

.championship-content p a:hover,
.championship-content .wp-block-list a:hover,
.championship-content blockquote a:hover {
	color: var(--wp--preset--color--red);
}

/* ==========================================================================
   Text Selection
   ========================================================================== */

.championship-content ::selection {
	background: var(--wp--preset--color--bright-red);
	color: var(--wp--preset--color--white);
	text-shadow: none;
}
