/* =========================================================================
   stpThemeTap.css — "Sticky Tickets" design system, tablet layer
   -------------------------------------------------------------------------
   Design project : claude.ai/design/p/62aba985-0e8a-4605-bfa0-7a0564090c2d
   Canonical artboards:
     Ticket Table.dc.html  2a desktop / 3a mobile / 4a filters modal
     Enforcement.dc.html   2a mobile  / 2b desktop
     Sidebar.dc.html       1a / 1b / 1c
     Login.dc.html         1a / 1b
   -------------------------------------------------------------------------
   CG-only — loaded from Main::headBase(); MC loads stpMain*.css and never
   sees this file. stpMainTap.css is MC-shared and is NEVER edited: legacy
   tablet values are neutralised by re-declaring them here (this file loads
   after it, so equal specificity wins).
   -------------------------------------------------------------------------
   Breakpoint 1000px matches the framework (mainTab.css:1), deliberately NOT
   stpMainTap.css:1's 1200px, which leaves an orphaned 1000-1200px band.
   Populated by Phase 11 (tasks 11.1-11.8). Empty by design at Phase 1.
   ========================================================================= */

@media screen and (max-width: 1000px) {

	/* =====================================================================
	   11.2  BAND TOKENS — the ONE place the tablet band is re-pointed
	   ---------------------------------------------------------------------
	   DECIDED VALUE: --headBarHeight 60px (plan 11.2). stpMainTap.css:3
	   already says 60px, but it says it at <=1200px and it is MC-shared, so
	   the value is re-declared HERE to make the 1000px band deterministic
	   and self-documenting. Everything header-keyed follows automatically:
	   stpTheme §5.3 (.main / .navLeft margin-top + height), §5.2 (.headerBar
	   height), §4.8 (sticky table header), §5.9 (.popUpBox margin-top),
	   §5.10 (.loading).
	   The 1000-1200px band still resolves to 60px from stpMainTap.css:3 —
	   same number, so the orphaned band the plan chose not to fix (11.1)
	   renders identically either side of 1000px.

	   --stpHeaderPadX/PadY: retuned per constraint P6-D9 (28px side padding
	   is a desktop value). --stpTableHeadHeight is deliberately NOT retuned:
	   4.1's head-row geometry (9px vertical padding + 40px min-height, 12px
	   label) is unchanged in this band, so the 42px sticky box still holds
	   and §4.8's subHead offset stays correct (constraint P4-D5).
	   ===================================================================== */
	:root {
		--headBarHeight: 60px;
		--stpHeaderPadY: 16px;
		--stpHeaderPadX: 22px;
	}


	/* =====================================================================
	   11.2  NEUTRALISE stpMainTap.css (MC-shared — never edited, never
	   deleted). It loads BEFORE this file, so equal specificity + later
	   source order is all that is needed.
	   ---------------------------------------------------------------------
	   stpMainTap.css:7   .headerBar .btn{font-size:.85em; min-width:60px}   (0,2,0)
	   stpMainTap.css:6   .headerBar .btn.clientImg{display:none}            (0,3,0)
	   stpMainTap.css:8   .headerBar .btn.withChild{padding:0 10px}          (0,3,0)  INERT
	   stpMainTap.css:9   .headerBar .btn.withChild .primary{padding:0}      (0,4,0)  INERT
	   stpMainTap.css:10  .headerBar .btn .expand{display:none}              (0,3,0)  INERT

	   The three marked INERT are top-menu rules and Phase 5 removed the top
	   menu (Main::headBarObjects no longer calls getMenuOptions('top')).
	   `.withChild` and `.headerBar ... .expand` have no host in CG any more
	   — the rail's caret is `.navLeft .btn .expand`, which these selectors
	   cannot reach. They are recorded here rather than shadowed with rules
	   that would resolve against nothing.
	   ===================================================================== */

	/* (0,2,0) — restores §5.2's 13px context-bar type over the .85em/60px pair */
	.headerBar .btn {
		font-size: 13px;
		min-width: 0;
	}

	/* (0,3,0) — the client logo is the only branding in a 60px bar now that
	   the top menu is gone; the legacy rule hid it below 1200px. */
	.headerBar .btn.clientImg {
		display: inline-flex;
	}


	/* -------------------------------------------------------------------------
	   11.4  COLLAPSE TAB — keep the header/rail straddle at a 60px bar
	   §5.5 pins the tab at top:32px, tuned as (46px bar - 14px) so it
	   straddles the header/rail seam. Re-derived from the token here so the
	   same relationship holds at 60px (=46px) instead of the tab sitting
	   flush against the bottom of a taller bar. `left` is untouched: the rail
	   keeps its Phase 5 closed icon width in this band (11.3), so the tab
	   still lands on the rail edge. (0,4,0) — equals §5.5.
	   ------------------------------------------------------------------------- */
	.headerBar .btn.sml.navCollapseTab {
		top: calc(var(--headBarHeight, 60px) - 14px);
	}


	/* -------------------------------------------------------------------------
	   11.3  RAIL — NO TOKEN ZEROING IN THIS BAND (deliberate)
	   The rail deliberately keeps --defaultNavLeftWidthClosed at its Phase 5
	   72px icon width here. Zeroing it across the whole tab band would turn a
	   1024px landscape tablet into a 0px drawer with no persistent nav, which
	   plan 11.3 explicitly forbids. Only stpThemeMobile.css (<=640px) zeroes
	   it. Nothing to declare — recorded so nobody "completes" the pair.
	   ------------------------------------------------------------------------- */


	/* -------------------------------------------------------------------------
	   11.2  LOADING OVERLAY — stpMainTap.css:15 flattens §5.10
	   `.loading{width:calc(100%); height:calc(100vh - 10px); margin-top:10px;
	   margin-left:0}` is (0,1,0) and loads after stpTheme.css, so below
	   1200px the overlay ignored the header entirely and covered the bar.
	   Re-declared at (0,1,0) from the tokens. `.loading.expand` (0,2,0) from
	   §5.10 still wins when the rail is open, and main.css:1984
	   `.loading.fullScreen` (0,2,0) still wins for full-screen use.
	   ------------------------------------------------------------------------- */
	.loading {
		width: calc(100% - var(--defaultNavLeftWidthClosed, 72px));
		height: calc(100vh - var(--headBarHeight, 60px));
		margin-top: var(--headBarHeight, 60px);
		margin-left: var(--defaultNavLeftWidthClosed, 72px);
	}


	/* -------------------------------------------------------------------------
	   11.2  TOAST — bottom-left beside the rail
	   main.css:2189 places the toast bottom-left; mainTab.css:73-82 centres
	   it below 1000px. CG keeps it bottom-left on tablets as well (equal
	   (1,1,0) specificity, this file loads later); phones override again in
	   stpThemeMobile.css with a full-width strip.
	   ------------------------------------------------------------------------- */
	/* toasts sit bottom-left beside the rail, as on desktop (mainTab.css:75-82
	   centres them); only phones (stpThemeMobile.css) use a full-width strip */
	#rmsg.toast {
		left: calc(var(--navLeftCurrentWidth, 0px) + 16px);
		right: auto;
		transform: none;
		width: max-content;
		max-width: min(400px, calc(100vw - var(--navLeftCurrentWidth, 0px) - 32px));
	}


	/* -------------------------------------------------------------------------
	   11.5  BAND-LOCAL STICKY + MODAL OFFSETS
	   Mandated by plan 11.5 "in BOTH new layers". These restate §4.8 and §5.9
	   inside the media block: both already read var(--headBarHeight) and so
	   follow the band automatically, but restating them (a) documents the
	   resolved value at the breakpoint and (b) means a future MC-shared rule
	   landing after stpTheme.css at (0,2,0)/(0,1,0) cannot reclaim them.
	   The modal offset drops from the desktop +25px to the +15px the design
	   uses on small screens — the same convention as mainTab.css:34
	   (`.commentThreadPopUp{top: calc(var(--headBarHeight) + 15px)}`).
	   Per constraint P6-D8 this is NOT a second declaration inside
	   stpTheme.css: §5.9 remains the single desktop source and this is the
	   band override.
	   ------------------------------------------------------------------------- */

	/* (0,2,0) — equals main.css:1921 (top:50px) and §4.8 */
	.horizontalScrollable.hsHeader {
		top: var(--headBarHeight, 60px);
	}

	/* (0,2,0) — equals main.css:1718 and §4.8. --stpTableHeadHeight (42px)
	   is unchanged in this band (see the token note above). */
	.formRow.subHead {
		top: calc(var(--headBarHeight, 60px) + var(--stpTableHeadHeight, 44px));
	}

	/* (0,1,0) — equals §5.9 / main.css:479 / stpMain.css:17 */
	.popUpBox {
		margin-top: calc(var(--headBarHeight, 60px) + 15px);
	}

	/* The two V2 variants set `top` instead of margin-top (main.css:734 and
	   main.css:742) and their `margin` shorthand zeroes margin-top at (0,4,0),
	   so the rule above cannot reach them. Same +15px offset, same specificity. */
	.popUpBox.smallV2:not(.locationOptions):not(.small),
	.popUpBox.mediumV2:not(.locationOptions):not(.small) {
		top: calc(var(--headBarHeight, 60px) + 15px);
	}


	/* -------------------------------------------------------------------------
	   11.7  SCROLL AFFORDANCES — ALWAYS-ON, NO JS
	   -------------------------------------------------------------------------
	   Declared in the TAB layer so both touch bands inherit one definition.

	   ACCEPTED AND RECORDED (plan 11.7): both affordances are STATIC. A
	   state-aware fade needs a scroll listener, which HARD RULE 4 forbids, and
	   the framework ships no scroll-shadow helper — so the hint and the fade
	   show even when the table fits the viewport and when it is already
	   scrolled to the end. That is the agreed trade, not a defect.

	   `:has(> .horizontalScrollable)` is a CHILD step on purpose: FormV2 emits
	   the two scrollers as direct children of the wrapper element
	   (FormV2.php:328 / :620 inside the :3067 wrap), so a descendant `:has()`
	   would also match an OUTER collapsable sectionBox and render the hint
	   twice on any page that nests a table inside a collapsable section.

	   The fade is suppressed when a column is pinned right, exactly as §4.7
	   does: the `.stickyAction` cell already terminates the row and a gradient
	   over it just washes out the action glyph. Enforcement HAS a pinned action
	   column, so it gets the hint and no fade — by design.

	   TWO WRAPPER CLASSES, RUNTIME-CONFIRMED: mod/tickets wraps its table in
	   `sectionBox w100` but Phase 10 wraps the Enforcement table in
	   `w100 center stpEnfTableWrap` with NO `sectionBox` class, so a
	   sectionBox-only selector rendered the affordance on Ticket Management and
	   silently skipped Enforcement. Both wrappers are listed. Any later phase
	   that introduces a THIRD table wrapper class must add it here or that
	   table gets no affordance.
	   ------------------------------------------------------------------------- */

	/* (0,3,0) — the positioning context for the fade. Safe: every framework
	   overlay inside a table already carries its own containing block
	   (`.tooltipWrap{position:relative}` main.css:2147, `.cbcon`/.checkmark),
	   and position:relative does not affect position:sticky descendants. */
	.main .sectionBox:has(> .horizontalScrollable),
	.main .stpEnfTableWrap:has(> .horizontalScrollable) {
		position: relative;
	}

	/* "Swipe table ->" hint — markup-free, so no page or framework edit.
	   \2192 is a literal RIGHTWARDS ARROW; the colour is the ONE accent
	   (constraint P1-D4 lists the swipe hint as a sanctioned accent surface). */
	.main .sectionBox:has(> .horizontalScrollable)::before,
	.main .stpEnfTableWrap:has(> .horizontalScrollable)::before {
		content: 'Swipe table \2192';
		display: block;
		font-size: 11.5px;
		font-weight: 600;
		line-height: 1.3;
		letter-spacing: .01em;
		text-align: right;
		color: var(--stpAccent, #c8102e);
		padding: 0 2px 6px;
	}

	/* right-edge fade. (0,4,0) — the :not(:has()) adds one class. */
	.main .sectionBox:has(> .horizontalScrollable):not(:has(.stickyAction))::after,
	.main .stpEnfTableWrap:has(> .horizontalScrollable):not(:has(.stickyAction))::after {
		content: '';
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		width: var(--stpFadeWidth, 30px);
		pointer-events: none;
		background-image: linear-gradient(270deg, var(--stpSurface, #fff), transparent);
		border-radius: 0 var(--stpTableRadius, 18px) var(--stpTableRadius, 18px) 0;
	}

	/* Ticket detail (Phase 18.12): the tabs and the aside stack into one column */
	#lifeCycleWrapper .stpTdSplit {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Ticket detail wraps the violations table inside a content column
	   (heading + totals + table). The swipe/fade pair above would paint
	   the whole column. (1,3,0)/(1,3,1) beat the (0,3,0)/(0,3,1) pair. */
	#lifeCycleWrapper .sectionBox:has(> .horizontalScrollable) {
		position: static;
	}

	#lifeCycleWrapper .sectionBox:has(> .horizontalScrollable)::before,
	#lifeCycleWrapper .sectionBox:has(> .horizontalScrollable)::after {
		content: none;
		display: none;
	}

	/* Reports (Phase 20.10): three link cards per row; same (0,5,1) as stpTheme.css, later file */
	.main.filled section.pageHeaderV2.stpReportsHead .links {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	/* Reports 24.6-f2 (runtime fix): at 800 the 3-up strip clipped "$1,225.00"
	   at the card edge; 2-up across the tablet band (stpThemeMobile.css keeps
	   2-up at 390). (0,3,0) beats stpTheme.css `.kpiStrip-cols3 .kpiStripRow`
	   and main.css:3733 (both (0,2,0)). */
	.stpReports .kpiStrip-cols3 .kpiStripRow {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* Reports 24.6-k/l (runtime fix): below 1000px the one-row filter (two
	   180px dates + ~360px of presets + Apply) no longer fits, and a plain
	   wrap splits the segmented control. The presets take the first row: the
	   form's ::after is a zero-height 100% item ordered after them, which
	   forces the break; the dates (order 1) and Apply (order 2) follow.
	   row-gap is 0 because the empty break line would add a second 12px gap;
	   the dates and Apply carry the 12px as margin-top instead.
	   (0,3,1) / (0,4,2) / (0,5,2) equal the stpTheme.css §12 rules; later file. */
	.main.stpReports form.stpRepFilter {
		row-gap: 0;
	}

	.main.stpReports form.stpRepFilter::after {
		content: "";
		flex: 0 0 100%;
		height: 0;
		order: 0;
	}

	.main.stpReports form.stpRepFilter > section.stpRepFilterRow {
		order: 1;
		margin-top: 12px;
	}

	.main.stpReports form.stpRepFilter > input.formBtn.primary {
		margin-top: 12px;
	}

	/* Enforcement 24.2-r (runtime fix): at 800 with the rail open the card is
	   ~460px wide. The one-line toolbar (stpTheme.css 10.12, nowrap) cut the
	   lot select to "Seed - R" and search to "Searc", and the 10.4 list grid
	   (160 + 200 + 140 minimums + 36px padding) clipped Remaining and the
	   issue buttons. Toolbar: lot select takes row 1, search + count + Issue
	   Ticket share row 2. Same selectors as stpTheme.css 10.12 / 10.4 (later
	   file wins); every property set here is also set by stpThemeMobile.css
	   11.6/11.6c at the same specificity, so 390 is unchanged. */
	.main .sectionBox.stpToolbar.stpEnfToolbar {
		flex-wrap: wrap;
	}

	.main .sectionBox.stpToolbar.stpEnfToolbar #enforcementAreaForm.sectionBox {
		order: 1;
		flex: 1 1 100%;
	}

	.main .sectionBox.stpToolbar.stpEnfToolbar #searchBar.sectionBox {
		order: 2;
		flex: 1 1 200px;
	}

	.stpEnfToolbar .stpToolbarCount {
		order: 3;
	}

	.stpEnfToolbar #stpEnfToolbarIssue {
		order: 4;
	}

	/* list grid: plate keeps its own width, chips shrink and wrap. Remaining +
	   the issue button get a shared 120px floor (not bare auto) so the column
	   lines stay aligned across rows with / without the + button and with the
	   head, like 10.4's 140px floor. Plate stays 24px (24.2-q: 20px is mobile
	   only). (1,2,0) desktop head only (hidden at <=640px); the row rule is
	   (1,1,0) like 10.4 and 11.6 resets all four. */
	#enforcementSessionsForm .stpEnfListHead.stpEnfHeadDesk {
		grid-template-columns: minmax(min-content, 1fr) minmax(0, 1.2fr) minmax(120px, auto);
		column-gap: 10px;
		padding: 12px 14px;
	}

	#enforcementSessionsForm .stpEnfRow {
		grid-template-columns: minmax(min-content, 1fr) minmax(0, 1.2fr) minmax(120px, auto);
		column-gap: 10px;
		padding: 0 14px;
	}

}
