/* ===========================================================================
   automated.css — machine-authored includes, loaded once on initial pageload
   (referenced from wrappers/topwrapper.j2). Namespace per feature.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   Nav icon guard (NOT feature-specific).
   The sidebar/header inline <svg> carry no width/height attributes and rely on
   scoped rules in ehr_sidebar.css / ehr_header.css. If one of those is stale or
   unapplied after a deploy, the SVGs fall back to a huge default size and the
   menu buttons balloon ("hilariously large"). This file loads LAST, so pin the
   sizes here as a hard safety net.
   --------------------------------------------------------------------------- */
.ehr-sidebar-link > svg          { width: 18px;  height: 18px; flex: 0 0 auto; }
.ehr-sidebar-link .ehr-arrow     { width: 16px;  height: 16px; flex: 0 0 auto; }
.ehr-sidebar-link .ehr-arrow svg { width: 100%;  height: 100%; }
.ehr-quick-btn svg               { width: 18px;  height: 18px; }
.ehr-sidebar-toggle svg          { width: 25px;  height: 25px; }

/* ---------------------------------------------------------------------------
   HL_20260715 — Sire Hotlist. The table + filter panel reuse the existing
   sirehotlist_* styles (ehr_legacy_07_raceentries.css). Only the pager is ours.
   --------------------------------------------------------------------------- */
.hl_pager { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 10px; }
.hl_page {
	padding: 4px 12px; border: 1px solid #bbb; border-radius: 4px;
	background: #fff; color: #006400; text-decoration: none; font-weight: 600;
}
.hl_page:hover { background: #e8e8d0; }
.hl_page_info { color: #666; }

/* ---------------------------------------------------------------------------
   Cost-color scaffold for HL_20260715. WIRED into the .j2 2026-07-25 via the
   cost_tier() macro there.
   Human direction 2026-07-19: cost color is price-based only (ignore
   discount_factor_*), RED = high price, BLUE = low price, legend screenshot
   shows a 13-swatch gradient over roughly [25 .. 1000+] credits (matches SP
   constants NT_BPLow=25 / NT_CRHigh=1000 in sp_zovernight_sire_prices).
   Colors below are a first-pass eyeball match to the legend screenshot, NOT
   pixel-exact.
   Price->tier breakpoints: LOG scale, 13 stops at a constant 1.328x ratio
   (40 ** (1/13)) over [25 .. 1000] -- lower bounds 25/33/44/59/78/103/137/
   182/242/321/426/566/752. Chosen over linear because the price distribution
   is bottom-heavy; even 75-credit steps would leave tiers 6-12 nearly empty
   and make most sires look identical. The boundary list lives in the .j2
   macro -- keep the two in sync if either changes.
   --------------------------------------------------------------------------- */
.cost-tier-0  { background: #2222dd; color: #fff; } /* lowest price */
.cost-tier-1  { background: #3a3ae8; color: #fff; }
.cost-tier-2  { background: #5a5af0; color: #fff; }
.cost-tier-3  { background: #7fe0ff; color: #04425a; }
.cost-tier-4  { background: #cfe0ff; color: #1a2a4a; }
.cost-tier-5  { background: #fbf9c9; color: #4a4020; }
.cost-tier-6  { background: #faf3a0; color: #4a4020; }
.cost-tier-7  { background: #f9ec78; color: #4a3a10; }
.cost-tier-8  { background: #ffe14d; color: #4a3a10; }
.cost-tier-9  { background: #ffc233; color: #4a2a05; }
.cost-tier-10 { background: #ef7c10; color: #2a1400; }
.cost-tier-11 { background: #c43c08; color: #fff; }
.cost-tier-12 { background: #9b0f0f; color: #fff; } /* highest price */

/* Every price cell is bold — the white-on-red top tiers were hard to read at the
   original weight, and bolding the whole gradient keeps the column consistent rather
   than making only the hot end look emphasised. Tiers 10-12 were also darkened for
   white-text contrast (was #ff9a1f / #ff6a1f / #ff2020). */
[class*="cost-tier-"] { font-weight: bold; }

/* ---------------------------------------------------------------------------
   Per-role availability glyphs for HL_20260715 (2yo / 3yo / 4yo / DS / DDS).
   Status codes are PRECOMPUTED in ehorseracing_procs.sp_zovernight_sire_prices
   and surfaced by zzy_website_fn_json_sire_hotlist as y2/y3/y4/ds/dds:
     10 = coming very soon      5 = active, confirmed 2+ yrs out (blue)
      1 = available now (green) 0 = expiring soon <= 12/28 (red)
     -1 = can't acquire, can still use (red)      -10 = unavailable (blank)
   Codes 5 and 10 only ever appear for y2; y4 only ever emits -1 or -10.
   0 and -1 are both red today but keep SEPARATE classes on purpose -- the DB
   holds them as distinct values, so a light/dark red split is a CSS-only
   change right here, with no .j2 edit.
   --------------------------------------------------------------------------- */
.sirestat           { display:inline-block; width:1.1em; text-align:center; font-weight:bold; line-height:1; }
/* Merged 2yo/3yo column: renders "23" / "2" / "3" / blank. No fixed width (unlike
   .sirestat) because the cell holds one or two digits. Each digit carries its own
   sirestat_* colour class, so "2" can be green while "3" is red in the same cell. */
/* Boxed so the characters read as discrete chips rather than a run-together string
   ("23D" vs 2 | 3 | D). The border is currentColor, so each chip's outline picks up
   that role's own status colour automatically — and the blank spacer, being
   transparent, draws an invisible box that still holds the column width. */
.sireage            { display:inline-block; min-width:1.05em; padding:1px 3px; margin:0 1px;
                      border:1px solid currentColor; border-radius:3px;
                      font-weight:bold; line-height:1.15; text-align:center; }

/* Chip fills — four states, grouped by what the user can DO rather than by raw code:
     -1        PINK    exists, but you cannot acquire it
     10 / 5    BLUE    not yet — coming very soon (10) or confirmed 2+ yrs out (5)
     0         AMBER   available, but expiring soon (<= 12/28)
     1         GREEN   available now
   Deliberately coarser than the six codes, but 0 is kept SEPARATE from 1 on purpose:
   "expiring soon" is the one distinction that changes whether you act today, and folding
   it into plain green hides a deadline. 5 sits with 10 because both mean "not yet".
   Splitting any of these back apart is a CSS-only change — the codes stay distinct in
   the DB and in the JSON.
   Scoped to .sireage so the (currently unused) .sirestat glyph colours stay untouched. */
.sireage.sirestat_neg1 { background:#ffd9e8; border-color:#dd85aa; color:#7c2549; }
.sireage.sirestat_10,
.sireage.sirestat_5    { background:#d8ecfd; border-color:#7db2dd; color:#154b73; }
.sireage.sirestat_0    { background:#ffeccc; border-color:#dda94e; color:#6b4405; }
.sireage.sirestat_1    { background:#dcf3dc; border-color:#7cc27c; color:#1d5e1d; }
.sirestat_10        { color:#2222dd; border-bottom:2px dotted #2222dd; }  /* coming very soon */
.sirestat_5         { color:#2222dd; }  /* blue  - active, confirmed 2+ yrs out */
.sirestat_1         { color:#1a8a1a; }  /* green - available now */
.sirestat_0         { color:#cc2020; }  /* red   - expiring soon */
.sirestat_neg1      { color:#cc2020; }  /* red   - can't acquire, can still use */
.sirestat_blank     { color:transparent; }
.sirestat_soon      { display:inline-block; background:#2222dd; color:#fff; border-radius:3px;
                      padding:1px 3px; font-size:9px; font-weight:bold; letter-spacing:.5px; line-height:1.2; }

/* Credits-column markers.
   X = EXPIRED. The SP zeroes BOTH the credit and the point price when
   lastyear < curYear-20 (sire) / curYear-40 (dds), so expired == credit price
   0 AND point price 0. A sire with no credit price but a live point price is
   a POINT sire -- always available, never gets the X (neutral dash instead).
   --------------------------------------------------------------------------- */
/* X was red-on-white, which read as just another number at a glance. Black cell with a
   yellow X so it reads as a hard stop. Centred, not right-aligned — it isn't a number,
   and centring separates it from the price columns it sits among. */
.sirecred_x         { background:#111; color:#ffd21f; font-weight:bold; text-align:center;
                      letter-spacing:1px; }
.sirecred_pointonly { color:#999; }

/* Role not acquirable at all -> muted block, no value. Distinct from the X: X means
   "there is a price but you can't take it" (ceiling / expired), grey means "this role
   isn't on offer", so there's nothing to quote.
   Deliberately kept in the same warm family as the zebra stripe below, one step darker,
   so it reads as a quiet gap rather than a warning. It has to stay separable from BOTH
   row states — white (#fff) and striped (#f8f6f1) — which is what sets the floor on how
   light this can go. */
.sirecred_na        { background:#e5e0d5; }

/* Avail column is wider than a price cell — it can hold three boxed characters. */
.sireavail_col      { width:74px; max-width:74px; }

/* ---------------------------------------------------------------------------
   Zebra striping. Each logical row is TWO <tr> (visible row + hidden detail row),
   so main rows are the odd children and every other one is 4n+3. The detail row is
   left alone — it carries its own #f9f9f9 from the legacy sheet.
   The legacy `.sirehotlist_table tr:hover` is (0,2,1) and would LOSE to the stripe
   below at (0,2,2), so hover is restated here at matching specificity, after it.
   --------------------------------------------------------------------------- */
.sirehotlist_table tbody tr:nth-child(4n+3) { background: #f8f6f1; }
.sirehotlist_table tbody tr:hover           { background: #eee9de; }
