/* Puppy weight calculator, v2 — additions on top of calculator.css.
 * Shares the .pt-calc shell and its tokens. Check computed styles in the
 * browser after any change here, not the class names in the markup.
 */

/* ---- form ---------------------------------------------------------------- */

.pt-calc--v2 .pt-calc__fieldset { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.pt-calc--v2 .pt-calc__fieldset legend { padding: 0; }

.pt-calc__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.pt-calc__help { font-size: 14px; color: var(--pt-ink-600); margin: 6px 0 0; }
.pt-calc__help a { color: var(--pt-brand-700); }

.pt-calc__err {
	display: flex; gap: 6px; align-items: flex-start;
	font-size: 14px; line-height: 1.45; color: #B3261E; margin: 6px 0 0;
}
.pt-calc__err[hidden] { display: none; }
.pt-calc__err-icon {
	flex: 0 0 18px; height: 18px; border-radius: 50%; margin-top: 1px;
	background: #B3261E; color: #fff; font-size: 12px; font-weight: 700;
	display: inline-flex; align-items: center; justify-content: center;
}
.pt-calc [aria-invalid="true"] { border-color: #B3261E; }
.pt-calc [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px #F9DEDC; }

.pt-calc--v2 .pt-calc__subfield[hidden] { display: none; }

/* ---- result -------------------------------------------------------------- */

.pt-res__units { display: inline-flex; border: 1px solid var(--pt-ink-300); border-radius: 999px; padding: 2px; margin: 0 0 12px; background: #fff; }
.pt-res__units button {
	min-width: 52px; min-height: 44px; padding: 4px 16px; border: 0; border-radius: 999px;
	background: transparent; color: var(--pt-ink-600); font: inherit; font-size: 15px; cursor: pointer;
}
.pt-res__units button[aria-pressed="true"] { background: var(--pt-brand-700); color: #fff; font-weight: 600; }
.pt-res__units button:focus-visible { outline: 3px solid var(--pt-brand-500); outline-offset: 2px; }

.pt-res__layer { padding: 14px 0; border-top: 1px solid var(--pt-brand-100); }
.pt-res__layer:first-of-type, .pt-res__now { border-top: 0; padding-top: 0; }

.pt-res__status {
	display: flex; gap: 10px; align-items: flex-start;
	font-size: 19px; font-weight: 650; line-height: 1.35; color: var(--pt-ink-900); margin: 0 0 6px;
}
.pt-res__icon {
	flex: 0 0 26px; height: 26px; border-radius: 50%; margin-top: 1px;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 15px; font-weight: 700; color: #fff; background: var(--pt-brand-600);
}
.pt-res--normal .pt-res__icon { background: #1E7A46; }
.pt-res--light .pt-res__icon,
.pt-res--heavy .pt-res__icon { background: #B35C00; }
.pt-res--range .pt-res__icon { background: var(--pt-brand-600); font-family: Georgia, serif; font-style: italic; }

.pt-res__sub { font-size: 16px; margin: 0 0 8px; color: var(--pt-ink-900); }
.pt-res__text { font-size: 15.5px; margin: 0 0 8px; color: var(--pt-ink-900); }
.pt-res__text a, .pt-res__sub a { color: var(--pt-brand-700); }

.pt-res__h { font-size: 16px; font-weight: 650; margin: 0 0 6px; color: var(--pt-ink-900); }
.pt-res__lead { font-size: 17px; font-weight: 600; margin: 0 0 6px; color: var(--pt-brand-700); }

/* ---- worked example label: "EXAMPLE" over the example's inputs */
.pt-calc .pt-calc__demo-label {
	margin: 0 0 12px; font-size: 14px; font-weight: 400; line-height: 1.45;
	text-transform: none; letter-spacing: 0; color: var(--pt-ink-600);
}
.pt-calc__demo-tag {
	display: block; margin: 0 0 2px; font-size: 16px; font-weight: 700;
	text-transform: uppercase; letter-spacing: 0.06em; color: var(--pt-brand-600);
}

/* ---- next weigh-in reminder (under the button, shown after a real result) */
.pt-calc__next {
	margin: 16px 0 0; padding: 14px 16px;
	background: var(--pt-c2-bg); border: 2px solid var(--pt-c2); border-radius: var(--pt-radius);
	color: var(--pt-ink-900);
	scroll-margin-top: 12px;
}
.pt-calc__next[hidden] { display: none; }
.pt-calc .pt-calc__next-head {
	display: flex; gap: 10px; align-items: center; margin: 0 0 6px;
	font-size: 19px; font-weight: 650; line-height: 1.3; color: var(--pt-ink-900);
}
.pt-calc__next-head svg { flex: 0 0 24px; color: var(--pt-c2); }
.pt-calc .pt-calc__next-text { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--pt-ink-900); }   /* = .pt-res__text */

/* ---- chart --------------------------------------------------------------- */

.pt-chart { position: relative; touch-action: pan-y; }
.pt-chart__svg { width: 100%; height: auto; display: block; }
.pt-chart__svg:focus-visible { outline: 3px solid var(--pt-brand-500); outline-offset: 2px; border-radius: 6px; }
.pt-chart__grid { stroke: #E2E7EF; stroke-width: 1; }
.pt-chart__tick { stroke: #B8C2D0; stroke-width: 1; }
.pt-chart__ylab, .pt-chart__xlab { font-size: 12px; fill: #4B5768; font-family: inherit; }
.pt-chart__band { fill: #D6E2F5; }
.pt-chart__middle { fill: #A9C1E8; }
.pt-chart__std { fill: #D97845; opacity: 0.85; }
.pt-chart__path { fill: none; stroke: #14213D; stroke-width: 2; stroke-dasharray: 5 4; }
.pt-chart__adult { stroke: #14213D; stroke-width: 4; stroke-linecap: round; }
.pt-chart__dot { fill: #D97845; stroke: #fff; stroke-width: 2.5; }
.pt-chart__guide { stroke: #4B5768; stroke-width: 1; stroke-dasharray: 2 3; }
.pt-chart__probe { fill: #14213D; }
.pt-chart__hit { fill: transparent; cursor: crosshair; }

.pt-chart__tip {
	min-height: 2.9em; font-size: 14.5px; line-height: 1.45; margin: 6px 0 4px;
	color: var(--pt-ink-900); font-variant-numeric: tabular-nums;
}

.pt-chart__legend {
	display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; padding: 0; margin: 4px 0 8px;
	font-size: 13px; color: var(--pt-ink-600);
}
.pt-chart__legend li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.pt-key { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.pt-key--band { background: #D6E2F5; }
.pt-key--middle { background: #A9C1E8; }
.pt-key--dot { width: 10px; height: 10px; border-radius: 50%; background: #D97845; }
.pt-key--path { height: 0; border-top: 2px dashed #14213D; }
.pt-key--std { width: 6px; height: 12px; background: #D97845; opacity: 0.85; }


/* The worked example: v1 dimmed the whole panel to 0.62 opacity, which put
   the small grey text at about 3.6:1 against its background, under the 4.5:1
   minimum. v2 keeps full contrast and marks the panel as an example with its
   label and a dashed border instead. */
.pt-calc--v2 .pt-calc__result--demo { opacity: 1; border-style: dashed; border-color: var(--pt-ink-300); }

/* Reference figures under the verdict, in the breed tables' vocabulary (2026-10-19). */
.pt-res__reflabel { font-size: 16px; color: var(--pt-ink-600); margin: 0 0 6px; }
.pt-res__ref { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 0 0 12px; }
.pt-res__ref > div { display: grid; gap: 2px; min-width: 0; }
.pt-res__ref dt { font-size: 14px; font-weight: 600; color: var(--pt-brand-600); }
.pt-res__ref dd { margin: 0; font-size: 16px; color: var(--pt-ink-900); font-variant-numeric: tabular-nums; }

/* Breed picker: type-to-filter over the native select (2026-10-21). ------------------ */
.pt-combo { position: relative; }
.pt-calc .pt-combo__input {
	width: 100%;
	font-size: 16px;               /* 16px keeps iOS from zooming on focus */
	font-family: inherit;
	color: var(--pt-ink-900);
	background: #fff;
	padding: 10px 12px;
	border: 1.5px solid var(--pt-ink-300);
	border-radius: var(--pt-radius);
	min-height: 44px;
	box-sizing: border-box;
}
.pt-calc .pt-combo__input::placeholder { color: var(--pt-ink-600); opacity: 1; }
.pt-calc .pt-combo__input:focus { outline: none; border-color: var(--pt-brand-500); box-shadow: 0 0 0 3px var(--pt-brand-100); }
.pt-combo__list {
	position: absolute;
	z-index: 20;
	left: 0;
	right: 0;
	top: calc(100% + 4px);
	max-height: 320px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	margin: 0;
	padding: 4px 0;
	list-style: none;
	background: #fff;
	border: 1px solid var(--pt-ink-300);
	border-radius: var(--pt-radius);
	box-shadow: 0 8px 24px rgba(20, 33, 61, 0.14);
}
.pt-combo__opt {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 8px;
	min-height: 44px;
	box-sizing: border-box;
	padding: 10px 12px;
	margin: 0;
	cursor: pointer;
	font-size: 16px;
	color: var(--pt-ink-900);
}
.pt-combo__opt:hover,
.pt-combo__opt.is-active { background: var(--pt-brand-50); }
.pt-combo__opt[aria-selected="true"] .pt-combo__name { font-weight: 600; }
.pt-combo__note { font-size: 13px; color: var(--pt-ink-600); }
.pt-combo__group,
.pt-combo__empty { padding: 10px 12px 6px; margin: 0; font-size: 13px; color: var(--pt-ink-600); }
.pt-combo__group { border-top: 1px solid #EDF1F7; margin-top: 4px; font-weight: 600; }

/* ---- result in two rows (2026-10-21): verdict beside the form, forecast + chart full width */
.pt-calc--v2 .pt-res__ref { margin-bottom: 0; }
.pt-calc .pt-res__chartlink { margin: 20px 0; }
.pt-calc .pt-res__chartlink + .pt-res__text { margin-top: 0; }
/* The example has no link there, so a note under the figures gets the same 20px the link gets. */
.pt-calc .pt-calc__result--demo .pt-res__ref + .pt-res__text { margin-top: 20px; }

.pt-calc__wide {
	background: var(--pt-brand-50); border: 1px solid var(--pt-brand-100);
	border-radius: 12px; padding: 16px; margin-top: 24px;
}
.pt-calc__wide[hidden] { display: none; }
.pt-calc--v2 .pt-calc__wide--demo { border-style: dashed; border-color: var(--pt-ink-300); }
.pt-calc__wide .pt-res__future { border-top: 0; padding-top: 0; }
@media (min-width: 900px) {
	.pt-calc__wide .pt-res__future { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; }
	.pt-calc__wide .pt-res__future > .pt-res__h,
	.pt-calc__wide .pt-res__future > .pt-res__lead { grid-column: 1 / -1; }
}
/* Phones (one column): the two boxes join into the single card they were before. */
@media (max-width: 699px) {
	.pt-calc--v2 .pt-calc__result[data-answered] { border-bottom: 0; border-radius: 12px 12px 0 0; padding-bottom: 0; }
	.pt-calc__wide { margin-top: 0; border-top: 0; border-radius: 0 0 12px 12px; padding-top: 0; }
	.pt-calc__wide .pt-res__future { border-top: 1px solid var(--pt-brand-100); padding-top: 14px; }
}

/* Homepage (2026-10-22): the calculator's own heading repeats the H1 there. Kept for
   screen readers, hidden on screen; the embed page still shows it. */
body.home .pt-calc--v2 .pt-calc__title {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Phones: the worked example shows only the verdict and the four figures; the
   forecast and the chart appear once a real result is calculated. */
@media (max-width: 699px) {
	.pt-calc__wide.pt-calc__wide--demo { display: none; }
	.pt-calc--v2 .pt-calc__result.pt-calc__result--demo[data-answered] {
		border-bottom-width: 1px; border-bottom-style: dashed; border-radius: 12px; padding-bottom: 16px;
	}
}

/* The verdict sentence is one flex item next to its icon (2026-10-23). */
.pt-res__msg { flex: 1 1 auto; min-width: 0; }
