/**
 * Affiliate Theme — theme styles.
 *
 * theme.json carries the design tokens. This file carries only what
 * theme.json cannot express: media queries, pseudo-elements, and
 * structural resets.
 */

.wp-site-blocks > footer {
	margin-block-start: 0;
}

/* -------------------------------------------------------------------------
 * Landing pattern responsiveness
 *
 * The three landing patterns are frozen into post_content at activation and
 * carry literal inline band padding. An inline declaration outranks every
 * normal author rule, so these overrides must be !important. That is the
 * only mechanism that reaches frozen markup.
 *
 * Each selector names the exact literal it corrects, so nothing is ever
 * enlarged and a value the buyer has edited no longer matches and is left
 * alone. That also means these rules are string-coupled to
 * Affiliate_Theme_Theme_landing_pattern_*(). Change a literal there and
 * these stop matching.
 *
 * Padding is named twice. "padding-top:6rem" is the saved markup that the
 * front end serves. The editor canvas writes the same band in the
 * browser's shortest form, "padding: 6rem 1.5rem;", so a second group
 * names each band's whole padding that way. That keeps the editor's Mobile
 * preview true to a phone.
 *
 * There are no font-size rules, on purpose. theme.json turns fluid
 * typography on, so WordPress rewrites every custom font size above 14px
 * into a clamp(), on the front end and in the editor, before a selector
 * could see the literal. That clamp is what shrinks the landing type on a
 * phone. A rule naming a font-size literal can never match.
 *
 * The 480px block must stay below the 781px block: equal specificity,
 * later wins.
 * ---------------------------------------------------------------------- */

@media (max-width: 781px) {
	[style*="padding-top:6rem"]       { padding-top: 3.5rem !important; }
	[style*="padding-bottom:6rem"]    { padding-bottom: 3.5rem !important; }
	[style*="padding-top:5rem"]       { padding-top: 3.5rem !important; }
	[style*="padding-bottom:5rem"]    { padding-bottom: 3.5rem !important; }
	[style*="padding-top:4.5rem"]     { padding-top: 3rem !important; }
	[style*="padding-bottom:4.5rem"]  { padding-bottom: 3rem !important; }
	[style*="padding-top:3rem"]       { padding-top: 2.5rem !important; }
	[style*="padding-bottom:3rem"]    { padding-bottom: 2.5rem !important; }
	[style*="padding-top:2.25rem"]    { padding-top: 2rem !important; }
	[style*="padding-bottom:2.25rem"] { padding-bottom: 2rem !important; }
	[style*="padding-right:2rem"]     { padding-right: 1.5rem !important; }
	[style*="padding-left:2rem"]      { padding-left: 1.5rem !important; }

	/* The same bands in the editor canvas. */
	[style*="padding: 6rem 1.5rem;"],
	[style*="padding: 5rem 1.5rem;"]        { padding-top: 3.5rem !important; padding-bottom: 3.5rem !important; }
	[style*="padding: 4.5rem 1.5rem;"]      { padding-top: 3rem !important; padding-bottom: 3rem !important; }
	[style*="padding: 4.5rem 1.5rem 3rem;"] { padding-top: 3rem !important; padding-bottom: 2.5rem !important; }
	[style*="padding: 3rem 1.5rem;"]        { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
	[style*="padding: 2.25rem 2rem;"]       { padding: 2rem 1.5rem !important; }

	/* Buyer copy is not under our control. A long word must not overflow. */
	h1,
	h2 {
		overflow-wrap: break-word;
	}
}

@media (max-width: 480px) {
	[style*="padding-top:6rem"]       { padding-top: 2.75rem !important; }
	[style*="padding-bottom:6rem"]    { padding-bottom: 2.75rem !important; }
	[style*="padding-top:5rem"]       { padding-top: 2.75rem !important; }
	[style*="padding-bottom:5rem"]    { padding-bottom: 2.75rem !important; }
	[style*="padding-top:4.5rem"]     { padding-top: 2.5rem !important; }
	[style*="padding-bottom:4.5rem"]  { padding-bottom: 2.5rem !important; }
	[style*="padding-top:3rem"]       { padding-top: 2rem !important; }
	[style*="padding-bottom:3rem"]    { padding-bottom: 2rem !important; }
	[style*="padding-top:2.25rem"]    { padding-top: 1.75rem !important; }
	[style*="padding-bottom:2.25rem"] { padding-bottom: 1.75rem !important; }
	[style*="padding-right:2rem"]     { padding-right: 1.25rem !important; }
	[style*="padding-left:2rem"]      { padding-left: 1.25rem !important; }

	/* The same bands in the editor canvas. */
	[style*="padding: 6rem 1.5rem;"],
	[style*="padding: 5rem 1.5rem;"]        { padding-top: 2.75rem !important; padding-bottom: 2.75rem !important; }
	[style*="padding: 4.5rem 1.5rem;"]      { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
	[style*="padding: 4.5rem 1.5rem 3rem;"] { padding-top: 2.5rem !important; padding-bottom: 2rem !important; }
	[style*="padding: 3rem 1.5rem;"]        { padding-top: 2rem !important; padding-bottom: 2rem !important; }
	[style*="padding: 2.25rem 2rem;"]       { padding: 1.75rem 1.25rem !important; }
}