/* HH Tracker component styles. Every value comes from tokens.css; class prefix hh-.
   Every card and block is white (`card`) with `shadow-card` on the white page; colour lives in buttons, badges, numbers, icons and swatches. */

.hh-root { font-family: var(--font-sans); color: var(--ink); background: var(--page); font-size: 1rem; line-height: 1.5rem; -webkit-font-smoothing: antialiased; }
.hh-root *, .hh-root *::before, .hh-root *::after { box-sizing: border-box; }
.hh-icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Focus: 2px robin-deep ring with a 2px eggshell gap, on everything focusable */
.hh-root :focus-visible { outline: 2px solid var(--robin-deep); outline-offset: 2px; }

/* ---------- Button ---------- */
.hh-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--tap-min); padding: 0 var(--space-6); border-radius: var(--radius-md); border: 1px solid transparent; font: 600 1rem/1.5rem var(--font-sans); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
/* All buttons use the lavender from the logo (owner's decision, October 2026).
   Filled buttons: lavender with a white 19px bold label. White on lavender is only about 4.1:1,
   so the label must stay 19px bold: at that size it counts as large text (WCAG AA needs 3:1). */
.hh-btn--primary, .hh-btn--lavender { background: var(--lavender); color: var(--page); font-size: 1.1875rem; font-weight: 700; }
.hh-btn--primary:hover, .hh-btn--lavender:hover { background: var(--lavender-deep); }
/* Secondary and outline: white with a lavender edge and deep-lavender text */
.hh-btn--secondary, .hh-btn--outline { background: var(--card); border-color: var(--lavender); color: var(--lavender-deep); }
.hh-btn--secondary:hover, .hh-btn--outline:hover { background: var(--lavender-tint); }
.hh-btn--danger { background: var(--card); border-color: var(--rust); color: var(--rust); }
.hh-btn--danger:hover { background: var(--rust-tint); }
.hh-btn--ghost { background: transparent; color: var(--forest); padding: 0 var(--space-3); }
.hh-btn--ghost:hover { background: var(--olive-tint); color: var(--forest); }
.hh-btn--block { display: flex; width: 100%; }
.hh-btn:disabled, .hh-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* Floating quick-add button (bottom right on phone) */
.hh-fab { width: 56px; height: 56px; border-radius: var(--radius-pill); background: var(--lavender); color: var(--page); border: 0; display: grid; place-items: center; box-shadow: var(--shadow-sheet); cursor: pointer; }
.hh-fab .hh-icon { width: 28px; height: 28px; }

/* ---------- Text field ---------- */
.hh-field { display: flex; flex-direction: column; gap: var(--space-1); }
.hh-field__label { font: 500 0.875rem/1.25rem var(--font-sans); color: var(--ink); }
.hh-field__hint { font: 400 0.8125rem/1.125rem var(--font-sans); color: var(--ink-muted); }
.hh-field__error { font: 400 0.8125rem/1.125rem var(--font-sans); color: var(--rust); display: flex; gap: var(--space-1); align-items: center; }
.hh-input { min-height: var(--tap-min); padding: 0 var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--card); color: var(--ink); font: 400 1rem/1.5rem var(--font-sans); width: 100%; }
.hh-input::placeholder { color: var(--ink-muted); }
.hh-input--invalid { border-color: var(--rust); border-width: 2px; }

/* ---------- Egg stepper (daily egg entry) ---------- */
.hh-stepper { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: var(--space-3); }
.hh-stepper__btn { width: 64px; height: 64px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.hh-stepper__btn .hh-icon { width: 28px; height: 28px; }
.hh-stepper__value { flex: 1; text-align: center; font-family: var(--font-display); font-weight: 600; font-size: 3rem; line-height: 3.25rem; color: var(--marans); font-variant-numeric: tabular-nums; }
.hh-stepper__unit { display: block; font: 500 0.875rem/1.25rem var(--font-sans); color: var(--ink-muted); }

/* ---------- Egg colour chip ---------- */
.hh-chip { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 36px; padding: 0 var(--space-3) 0 var(--space-2); border-radius: var(--radius-pill); background: var(--card); border: 1px solid var(--hairline); font: 500 0.875rem/1.25rem var(--font-sans); color: var(--ink); }
button.hh-chip { min-height: var(--tap-min); cursor: pointer; }
/* Selected chip: lavender, to match the buttons (October 2026) */
.hh-chip[aria-pressed="true"] { background: var(--lavender-tint); border-color: var(--lavender); }
.hh-egg { width: 16px; height: 21px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; flex: none; }
.hh-egg--lg { width: 28px; height: 36px; }
.hh-egg--blue { background: var(--egg-blue); }
.hh-egg--green { background: var(--egg-green); }
.hh-egg--olive { background: var(--egg-olive); }
.hh-egg--grey { background: var(--egg-grey); box-shadow: inset 0 0 0 1px var(--border); }
.hh-egg--chocolate { background: var(--egg-chocolate); }
.hh-egg--brown { background: var(--egg-brown); }
.hh-egg--cream { background: var(--egg-cream); box-shadow: inset 0 0 0 1px var(--border); }
.hh-egg--pink { background: var(--egg-pink); box-shadow: inset 0 0 0 1px var(--border); }
.hh-egg--white { background: var(--egg-white); box-shadow: inset 0 0 0 1px var(--border); }

/* ---------- Status badge ---------- */
.hh-badge { display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px var(--space-2); border-radius: var(--radius-sm); font: 600 0.8125rem/1.125rem var(--font-sans); }
.hh-badge .hh-icon { width: 14px; height: 14px; stroke-width: 2.5; }
.hh-badge--success { background: var(--olive-tint); color: var(--olive-deep); }
.hh-badge--warning { background: var(--yolk-tint); color: var(--yolk-deep); }
.hh-badge--danger { background: var(--rust-tint); color: var(--rust); }
.hh-badge--info { background: var(--robin-tint); color: var(--ink); }
.hh-badge--neutral { background: var(--straw); color: var(--ink-muted); }
.hh-badge--due { background: var(--yolk); color: var(--ink); }

/* ---------- Card ---------- */
.hh-card { background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: var(--space-4); }
.hh-card__eyebrow { font: 500 0.875rem/1.25rem var(--font-sans); color: var(--ink-muted); margin: 0; }
.hh-card__title { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; line-height: 1.625rem; margin: 0; color: var(--ink); }

/* ---------- Stat card (today's eggs) ---------- */
.hh-stat { display: flex; flex-direction: column; gap: var(--space-2); }
.hh-stat__value { font-family: var(--font-display); font-weight: 600; font-size: 3rem; line-height: 3.25rem; color: var(--marans); font-variant-numeric: tabular-nums; margin: 0; }
.hh-stat__trend { display: inline-flex; align-items: center; gap: var(--space-1); font: 600 0.875rem/1.25rem var(--font-sans); }
.hh-stat__trend--up { color: var(--olive-deep); }
.hh-stat__trend--down { color: var(--yolk-deep); }
.hh-colourbar { display: flex; height: 12px; border-radius: var(--radius-pill); overflow: hidden; gap: 2px; background: var(--card); }
.hh-colourbar > span { display: block; height: 100%; }

/* ---------- Incubator countdown ---------- */
.hh-countdown { background: var(--card); }
.hh-countdown__day { font-family: var(--font-display); font-weight: 600; font-size: 3rem; line-height: 3.25rem; color: var(--marans); margin: 0; }
.hh-countdown__of { font: 500 1rem/1.5rem var(--font-sans); color: var(--ink); }
.hh-progress { position: relative; height: 12px; border-radius: var(--radius-pill); background: var(--straw); overflow: visible; }
.hh-progress__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--radius-pill); background: var(--robin-deep); }
.hh-progress__mark { position: absolute; top: -4px; width: 4px; height: 20px; border-radius: 2px; background: var(--marans); transform: translateX(-2px); }
.hh-progress__labels { position: relative; height: 18px; font: 400 0.8125rem/1.125rem var(--font-sans); color: var(--ink); }
.hh-progress__labels span { position: absolute; transform: translateX(-50%); white-space: nowrap; }

/* ---------- Bird row ---------- */
.hh-bird { display: flex; align-items: center; gap: var(--space-3); min-height: 72px; padding: var(--space-3) var(--space-4); background: var(--card); border-bottom: 1px solid var(--hairline); text-decoration: none; color: inherit; }
.hh-bird__photo { width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--straw); flex: none; display: grid; place-items: center; color: var(--ink-muted); overflow: hidden; }
.hh-bird__body { flex: 1; min-width: 0; }
.hh-bird__name { font: 600 1rem/1.5rem var(--font-sans); margin: 0; }
.hh-bird__band { font-variant-numeric: tabular-nums; color: var(--robin-deep); }
.hh-bird__meta { font: 400 0.8125rem/1.125rem var(--font-sans); color: var(--ink-muted); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hh-bird__end { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-1); }

/* ---------- Bottom navigation (phone) ---------- */
.hh-nav { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--card); border-top: 1px solid var(--hairline); padding: var(--space-1) var(--space-1) var(--space-2); }
.hh-nav__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; border-radius: var(--radius-md); font: 500 0.75rem/1rem var(--font-sans); color: var(--ink-muted); text-decoration: none; }
.hh-nav__item .hh-icon { width: 24px; height: 24px; }
.hh-nav__item[aria-current="page"] { color: var(--ink); }
/* Current page: lavender pill with a white icon, matching the lavender buttons */
.hh-nav__item[aria-current="page"] .hh-nav__pill { background: var(--lavender); color: var(--page); }
.hh-nav__pill { display: grid; place-items: center; width: 56px; height: 30px; border-radius: var(--radius-pill); }

/* ---------- App header ---------- */
.hh-header { display: flex; align-items: center; gap: var(--space-2); min-height: 64px; padding: var(--space-2) var(--space-4); background: var(--card); border-bottom: 1px solid var(--hairline); }
.hh-header__mark { width: 32px; height: 32px; border-radius: 7px; background: var(--forest); color: var(--eggshell); display: grid; place-items: center; font-family: var(--font-display); /* stays Fraunces, to match the app icon */ font-weight: 600; font-size: 1.3125rem; letter-spacing: -.04em; line-height: 1; }
.hh-header__name { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; line-height: 1.625rem; color: var(--forest); flex: 1; }

/* ---------- Milestone (celebration) ---------- */
.hh-milestone { background: var(--card); box-shadow: var(--shadow-card); border-radius: var(--radius-lg); padding: var(--space-4); display: flex; gap: var(--space-3); align-items: flex-start; }
.hh-milestone__label { font: 600 0.8125rem/1.125rem var(--font-sans); color: var(--lavender-deep); margin: 0; text-transform: none; }
.hh-milestone__title { font-family: var(--font-brand); font-weight: 600; font-size: 1.75rem; line-height: 2.125rem; color: var(--ink); margin: 0; }
.hh-milestone__body { font: 400 1rem/1.5rem var(--font-sans); color: var(--ink); margin: var(--space-1) 0 0; }
