/* ============================================================================
   child-home-sb-match.css  --  2026-08-17
   Pull the CHILD-SITE homepage (default.asp) header + hero block to match
   storeboard.com on desktop, and to match bergencounty.life on mobile.

   Loaded ONLY when default.asp's gate passes:
       IsthisChildWebsite="1"
   AND ChildSiteUIVariant="v3"
   AND G_FEATURE_CHILD_HOME_SB_MATCH
   AND (G_ROOTDOMAIN ends "atyourservice.com" OR ends ".life")
   storeboard.com is IsthisChildWebsite="0", so this file never loads there.

   ---------------------------------------------------------------------------
   WHY THE ODD .25 / .5 / .75 VALUES  (read before "cleaning them up")
   ---------------------------------------------------------------------------
   default.asp scales the whole homepage <body>:

     storeboard.com   -> class="home-fullscale", NO transform at >=1230px
                         (G_FEATURE_HOMEPAGE_FULLSCALE, gated IsthisChildWebsite="0"),
                         and transform:scale(0.8); width:125% at 768-1229px.
     child sites      -> transform:scale(0.8); width:125% at EVERY desktop width.

   So a child site's CSS canvas is 1.25x wider and then painted at 0.8. To land
   the same NUMBER OF SCREEN PIXELS as storeboard.com we must author every px
   value as (storeboard px * 1.25) -- but only above 1230px, because between
   768px and 1229px storeboard.com is ALSO at scale(0.8) and the two already
   agree at 1.0x. Hence the two desktop blocks below, same targets, different
   multiplier. Percentages (.header-wrp padding:0 4%) need no compensation --
   they scale with the canvas on their own.

   Mobile is scale(1.0) on every host (default.asp:500, server-side isMobile),
   so the mobile block is 1:1 with no multiplier.

   Storeboard.com source values these targets are derived from:
     .discoverh1 45px / ls 3px / pb 30px / pl-pr 25px / pt 0   css/default.css:1263
     .SearchPrefs > span 30px / pb 10px / mb 14px              css/default.css:1099
     .searchtextboxNewHome 900x70                              css/default.css:780
     .searchinputtext + #tbSearchFor 34px  (SB-only override)  default.asp:947
     .site-logo>img 61px / padding-top 10px                    css/default.css:669
     .homelogo margin 8px/8px                                  css/default.css:281
     .header-wrp height 70px / margin-bottom 25px              css/default.css:461

   Rollback: G_FEATURE_CHILD_HOME_SB_MATCH = False in inc/global.asp AND
   inc/universal.asp (both roots). Preview: ?sbmatch=1 / ?sbmatch=0.
   ============================================================================ */


/* ---------------------------------------------------------------------------
   DESKTOP >= 1230px  --  storeboard.com values x 1.25
   (child body is scale(0.8), storeboard body is unscaled here)
   --------------------------------------------------------------------------- */
@media only screen and (min-width:1230px){

	/* header shell: 70 -> 87.5, margin-bottom 25 -> 31.25 */
	body .header-wrp{
		height:87.5px !important;
		margin-bottom:31.25px !important;
	}

	/* logo box: margins 8/8 -> 10/10 */
	body .homelogo{
		margin-left:10px !important;
		margin-top:10px !important;
	}

	/* image logos (.life family + any AYS site still on an <img> logo):
	   61 -> 76.25, padding-top 10 -> 12.5. Inert on the AYS sites that render a
	   CSS-text wordmark instead of an <img> -- those are handled further down.
	   margin-top:0 is REQUIRED, not cosmetic: the shared child-site block
	   (default.asp:1010, @media min-width:768px) sets margin-top:11px on this img,
	   and storeboard.com has no margin-top here at all. Left in place it pushed the
	   logo 8.8px down on screen and its bottom edge hung 7.8px BELOW the header
	   band (measured on monmouthcounty.life @1440px). Zeroing it makes the box
	   model identical to storeboard's, so align-items:center lands them the same. */
	body .homelogo .site-logo>img,
	body .homelogo a.site-logo>img{
		height:76.25px !important;
		width:auto !important;
		max-width:none !important;
		padding-top:12.5px !important;
		margin-top:0 !important;
	}

	/* "Discover <X>!" / "Find a Great <X> Near You!"
	   45 -> 56.25, ls 3 -> 3.75, pb 30 -> 37.5, pl/pr 25 -> 31.25, pt 0.
	   pt:0 deliberately drops the AYS padding-top:50px (default.asp:587). */
	body .discoverh1{
		font-size:56.25px !important;
		letter-spacing:3.75px !important;
		padding-top:0 !important;
		padding-bottom:37.5px !important;
		padding-left:31.25px !important;
		padding-right:31.25px !important;
	}

	/* tab row (Feed/Images/Businesses/Videos/Products/Classifieds).
	   30 -> 37.5, pb 10 -> 12.5, mb 14 -> 17.5.
	   Never renders on AYS -- #SearchPrefs is inside an
	   `if session("LockCategory")=""` gate and AYS locks its category. */
	body .SearchPrefs > span{
		font-size:37.5px !important;
		padding-bottom:12.5px !important;
		margin-bottom:17.5px !important;
	}

	/* search box 900x70 -> 1125x87.5. The tab row above tracks this width, so
	   scaling the box scales the tab row's span with it. */
	body .searchtextboxNewHome{
		width:1125px !important;
		height:87.5px !important;
	}

	/* search + placeholder text 34 -> 42.5. The #tbSearchFor half needs the
	   id in the selector to outrank `#tbSearchFor{font-size:25px !important}`
	   (default.asp:855, sbAysHomeLoc). */
	body .searchtextboxNewHome .searchinputtext,
	body .searchtextboxNewHome #tbSearchFor{
		font-size:42.5px !important;
	}

	/* storeboard.com has no margin here; AYS adds 10px (default.asp:590). */
	body #searchFrom{
		margin-top:0 !important;
	}

	/* The AYS CSS-text wordmark (plumbers, movers, attorneys, ... -- the sites
	   with no <img> logo) is deliberately NOT touched here.

	   The x1.25 factor above exists to re-express a storeboard.com px value in
	   the child canvas. The wordmark has no storeboard counterpart -- storeboard's
	   logo is a 61px raster with no font-size equivalent -- so there is nothing to
	   convert, and multiplying it by 1.25 does NOT leave it unchanged: it makes it
	   25% bigger on screen (brand text 41.6px -> 52px). Measured on
	   plumbersatyourservice.com @1440px, that pushed the wordmark + "Powered by
	   STOREBOARD" tagline to ~86px tall inside the 70px header band and it
	   overflowed. Leaving it alone keeps it at ~69px, which fits, and preserves
	   three earlier user asks (2026-08-03 uniform sizing, 2026-08-05 "DOUBLE the
	   brand + tagline", 2026-08-03 Enter-button alignment).
	   Net effect: the wordmark renders exactly as it did before this file, while
	   the header band it sits in grows 56px -> 70px to match storeboard. */
}


/* ---------------------------------------------------------------------------
   DESKTOP 768px - 1229px  --  storeboard.com values x 1.0
   (BOTH storeboard.com and the child sites are scale(0.8) in this range, so
   the raw storeboard numbers already produce an identical rendering)
   --------------------------------------------------------------------------- */
@media only screen and (min-width:768px) and (max-width:1229px){

	body .header-wrp{
		height:70px !important;
		margin-bottom:25px !important;
	}

	body .homelogo{
		margin-left:8px !important;
		margin-top:8px !important;
	}

	body .homelogo .site-logo>img,
	body .homelogo a.site-logo>img{
		height:61px !important;
		width:auto !important;
		max-width:none !important;
		padding-top:10px !important;
		margin-top:0 !important;   /* see the >=1230px block for why */
	}

	body .discoverh1{
		font-size:45px !important;
		letter-spacing:3px !important;
		padding-top:0 !important;
		padding-bottom:30px !important;
		padding-left:25px !important;
		padding-right:25px !important;
	}

	body .SearchPrefs > span{
		font-size:30px !important;
		padding-bottom:10px !important;
		margin-bottom:14px !important;
	}

	body .searchtextboxNewHome{
		width:900px !important;
		height:70px !important;
	}

	body .searchtextboxNewHome .searchinputtext,
	body .searchtextboxNewHome #tbSearchFor{
		font-size:34px !important;
	}

	body #searchFrom{
		margin-top:0 !important;
	}

	/* AYS wordmark left at its own 52/44/26px here -- unscaled, same reasoning
	   as the >=1230px block (and no multiplier needed at this width). */
}


/* ---------------------------------------------------------------------------
   DESKTOP >= 768px  --  normalise the oversized realestateagents wordmark
   (user ask 2026-08-17). No scale multiplier here: the wordmark is not
   scale-compensated anywhere in this file, so one rule covers both desktop
   bands.

   realestateagentsatyourservice.com carries its own per-site block
   (default.asp:1150) setting the --long wordmark to 64px / letter-spacing
   -1.6px, from a 2026-08-05 "doubled" ask. Every other --long AYS site uses
   the shared 44px / -1px (default.asp:1063). At 64px its "Powered by
   STOREBOARD" tagline ended up flush against the "Find a Great …" heading
   (0.2px gap, vs 16-18px on its siblings), so the logo read oversized.

   This is written as a plain --long rule, NOT a host-specific one, because
   CSS cannot select on hostname -- and it does not need to: every other
   --long site is ALREADY 44px, so this is a no-op for them and only
   realestateagents actually moves. Verified on marketingcompanies and
   dermatologists (both already 44px, unchanged).

   Mobile is untouched -- the AYS mobile block (default.asp:1103) pins both
   wordmark variants to 19px, which is the 2026-08-09 "shrink the AYS mobile
   header ~40%" ask and the mobile treatment the user chose to keep.
   --------------------------------------------------------------------------- */
@media only screen and (min-width:768px){
	body .hdr-logo-brand-text.hdr-logo-brand-text--long{
		font-size:44px !important;
		letter-spacing:-1px !important;
	}
}


/* ---------------------------------------------------------------------------
   MOBILE <= 767px  --  bergencounty.life treatment (user pick), NOT storeboard
   Body is scale(1.0) on every host here, so these are 1:1 values.
   bergencounty.life mobile = css/default.css mobile baseline + the 25px
   heading from BergenDiscoverHeadingResize (default.asp:897).
   Effect on .life: no visible change (they land on the values they already
   render, and the other .life sites pick up Bergen's 25px heading).
   Effect on AYS: undoes the AYS-only mobile overrides listed inline below.
   --------------------------------------------------------------------------- */
@media only screen and (max-width:767px){

	/* Bergen's 25px heading, applied family-wide. Also drops the AYS mobile
	   compression (padding-top 8 / padding-bottom 12, default.asp:656) back to
	   the baseline 0 / 20px that Bergen renders. */
	body .discoverh1{
		font-size:25px !important;
		letter-spacing:0 !important;
		padding-top:0 !important;
		padding-bottom:20px !important;
		padding-left:10px !important;
		padding-right:10px !important;
	}

	/* mobile baseline 20px (css/default.css:1687). storeboard.com's 18px is a
	   storeboard-only override and is deliberately NOT copied here. */
	body .SearchPrefs > span{
		font-size:20px !important;
	}

	/* mobile baseline 30px. Undoes the AYS 18px (default.asp:637) and the
	   25px sbAysHomeLoc override (default.asp:857). */
	body .searchtextboxNewHome .searchinputtext,
	body .searchtextboxNewHome #tbSearchFor{
		font-size:30px !important;
	}

	/* mobile baseline 37px. Undoes the AYS 44px (default.asp:840). Inert on the
	   AYS wordmark sites (no <img>). */
	body .homelogo .site-logo>img,
	body .homelogo a.site-logo>img{
		height:37px !important;
		width:auto !important;
		padding-top:10px !important;
	}

	/* undoes AYS #searchFrom margin-top:4px (default.asp:657) */
	body #searchFrom{
		margin-top:0 !important;
	}

	/* undoes AYS .header-wrp margin-bottom:6px (default.asp:1121) -> baseline 10px */
	body .header-wrp{
		margin-bottom:10px !important;
	}

	/* ---- horizontal-scroll fix (2026-08-17, user ask) ----------------------
	   Every child-site home panned ~57-74px sideways on a phone. Pre-existing,
	   NOT caused by this file -- reproduced with ?sbmatch=0 (stylesheet off):
	   box still 525px, clientW 468, HSCROLL true. Measured on a 375x812 Android
	   profile, where the layout viewport is 468px (375 / the 0.8 initial-scale
	   in the viewport meta), so anything authored at a fixed 525px overflows.

	   Two independent offenders, both fixed-px from css/default.css's mobile
	   block, found by walking every element whose right edge cleared clientWidth
	   and whose ancestors were not clipping it:
	     .searchtextboxNewHome  width:525px  (default.css:1496) -> 525px wide.
	       This one also drags the wrapping <table>/<td> out to 525px, so fixing
	       it pulls those back on its own. Sole offender on AYS.
	     .SearchPrefs           width:525px  (default.css:1683) -> the tab row's
	       last tab (#classifiedtab) reached 542px, which is what actually set
	       Bergen's scrollWidth. .life only -- AYS never renders this row
	       (#SearchPrefs sits inside `if session("LockCategory")=""`).

	   max-width keeps the 525px design width wherever it fits and only shrinks
	   below it, so nothing changes on phones wide enough for the original.
	   box-sizing is required: .searchtextboxNewHome carries a 1px border plus
	   padding-left, which would otherwise push a width:100% box back over the
	   edge. The autosuggest panels are pinned too -- they compute to 600px and
	   would overflow the moment they are shown. */
	body .searchtextboxNewHome{
		width:100% !important;
		max-width:525px !important;
		box-sizing:border-box !important;
	}
	body .SearchPrefs{
		width:100% !important;
		max-width:525px !important;
		box-sizing:border-box !important;
	}
	/* The tab row is the ROOT cause on .life, and capping its width alone does
	   not fix it: width:100% resolves against the PARENT, and the parent <td> is
	   itself stretched by the overflowing row, so the cap just re-applies 525px
	   (measured: parent 542 -> row 525 -> still scrolling). The row has to be
	   made to FIT.
	   Its six tabs total ~442px of text at 20px; what pushes it to 542 is the
	   five inline `margin-left:20px` gaps (100px) each tab carries. Zeroing them
	   leaves 442px inside a 468px viewport, and .SearchPrefs is already
	   display:flex + justify-content:space-between (default.css:1095), so the
	   ~26px of slack is redistributed as even gaps -- all six tabs stay on ONE
	   line at the full 20px Bergen size, nothing wraps, nothing is cut off.
	   Chosen over shrinking the font (would break the 20px size the user picked)
	   and over flex-wrap (would drop the row onto two lines).
	   Inert on AYS -- those sites never render #SearchPrefs. */
	body .SearchPrefs > span{
		margin-left:0 !important;
	}
	body #TSsearchResult,
	body #TSsearchForResult{
		max-width:100% !important;
		box-sizing:border-box !important;
	}

	/* NOT touched on mobile, on purpose:
	   - the AYS CSS-text wordmark (19px brand + 13px tagline, default.asp:1103)
	     already renders ~35px tall vs Bergen's 37px image logo, and that size is
	     the 2026-08-09 "shrink the AYS mobile header ~40%" ask;
	   - .flexslider padding-top / .mainDivExplore margin-top -- those position
	     the hero IMAGE, not the text above it, and carry the 2026-08-09
	     "reduce whitespace above the hero by 50%" ask. */
}
