/**
 * PuppyWeightCal Tools — calculator.css
 *
 * Clean, friendly pet-care styling: white cards, light blue and green
 * accents, rounded corners, generous spacing. Fully responsive and
 * keyboard accessible. Scoped entirely under .pwc-tool so it does not
 * leak into the rest of the theme.
 */

.pwc-tool {
	--pwc-blue: #2f7fc1;
	--pwc-blue-dark: #22629a;
	--pwc-blue-light: #e8f3fb;
	--pwc-green: #43a05a;
	--pwc-green-light: #e9f6ec;
	--pwc-ink: #243b4a;
	--pwc-muted: #5a7182;
	--pwc-border: #d7e6ef;
	--pwc-amber-bg: #fff8e6;
	--pwc-amber-border: #eed9a0;
	--pwc-radius: 14px;

	box-sizing: border-box;
	background: #ffffff;
	border: 1px solid var(--pwc-border);
	border-radius: var(--pwc-radius);
	box-shadow: 0 2px 10px rgba(36, 59, 74, 0.06);
	color: var(--pwc-ink);
	font-family: inherit;
	margin: 1.5em 0;
	padding: 1.25rem;
}

.pwc-tool *,
.pwc-tool *::before,
.pwc-tool *::after {
	box-sizing: inherit;
}

/* ---------- Forms ---------- */

.pwc-form {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.pwc-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin: 0;
	min-width: 0;
}

.pwc-field-wide {
	grid-column: 1 / -1;
}

fieldset.pwc-field {
	border: 1px dashed var(--pwc-border);
	border-radius: var(--pwc-radius);
	padding: 1rem;
}

fieldset.pwc-field legend {
	color: var(--pwc-ink);
	font-weight: 600;
	padding: 0 0.4rem;
}

.pwc-field-row {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.pwc-tool label {
	font-size: 0.92rem;
	font-weight: 600;
}

.pwc-tool input[type="number"],
.pwc-tool input[type="search"],
.pwc-tool select {
	appearance: none;
	background: #ffffff;
	border: 1px solid var(--pwc-border);
	border-radius: 10px;
	color: var(--pwc-ink);
	font: inherit;
	min-height: 44px; /* Comfortable touch target. */
	padding: 0.55rem 0.7rem;
	width: 100%;
}

.pwc-tool input:focus,
.pwc-tool select:focus,
.pwc-tool button:focus {
	outline: none;
}

.pwc-tool input:focus-visible,
.pwc-tool select:focus-visible,
.pwc-tool button:focus-visible {
	border-color: var(--pwc-blue);
	outline: 3px solid rgba(47, 127, 193, 0.35);
	outline-offset: 1px;
}

.pwc-hint {
	color: var(--pwc-muted);
	font-size: 0.88rem;
	margin: 0.4rem 0 0;
}

/* ---------- Buttons ---------- */

.pwc-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.pwc-button {
	border: 1px solid transparent;
	border-radius: 999px;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	min-height: 44px;
	padding: 0.6rem 1.3rem;
}

.pwc-button-primary {
	background: var(--pwc-blue);
	color: #ffffff;
}

.pwc-button-primary:hover {
	background: var(--pwc-blue-dark);
}

.pwc-button-ghost {
	background: transparent;
	border-color: var(--pwc-border);
	color: var(--pwc-ink);
}

.pwc-button-ghost:hover {
	border-color: var(--pwc-blue);
	color: var(--pwc-blue-dark);
}

/* ---------- Results ---------- */

.pwc-error {
	background: #fdecea;
	border: 1px solid #f2b8b0;
	border-radius: 10px;
	color: #8c2f22;
	grid-column: 1 / -1;
	margin: 0;
	padding: 0.6rem 0.8rem;
}

.pwc-results {
	background: var(--pwc-green-light);
	border-radius: var(--pwc-radius);
	margin-top: 1.25rem;
	padding: 1rem 1.1rem;
}

.pwc-results h3,
.pwc-results h4 {
	margin: 0.6em 0 0.4em;
}

.pwc-results h3:first-child {
	margin-top: 0;
}

.pwc-result-main {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0 0 0.5rem;
}

.pwc-result-facts {
	list-style: none;
	margin: 0 0 0.5rem;
	padding: 0;
}

.pwc-result-facts li {
	margin: 0.25rem 0;
}

.pwc-chart {
	background: #ffffff;
	border: 1px solid var(--pwc-border);
	border-radius: 10px;
	display: block;
	height: 300px;
	max-width: 100%;
	width: 100%;
}

.pwc-table {
	border-collapse: collapse;
	width: 100%;
}

.pwc-table th,
.pwc-table td {
	border-bottom: 1px solid var(--pwc-border);
	padding: 0.45rem 0.6rem;
	text-align: left;
}

.pwc-table thead th {
	background: var(--pwc-blue-light);
}

/* ---------- Disclaimer ---------- */

.pwc-disclaimer {
	background: var(--pwc-amber-bg);
	border: 1px solid var(--pwc-amber-border);
	border-radius: 10px;
	color: #6b5a1e;
	font-size: 0.88rem;
	margin: 1.25rem 0 0;
	padding: 0.7rem 0.9rem;
}

/* ---------- Breed size guide ---------- */

.pwc-guide-controls {
	align-items: end;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.pwc-guide-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.pwc-chip {
	background: var(--pwc-blue-light);
	border: 1px solid transparent;
	border-radius: 999px;
	color: var(--pwc-blue-dark);
	cursor: pointer;
	font: inherit;
	font-size: 0.92rem;
	font-weight: 600;
	min-height: 40px;
	padding: 0.4rem 1rem;
}

.pwc-chip:hover {
	border-color: var(--pwc-blue);
}

.pwc-chip.is-active {
	background: var(--pwc-blue);
	color: #ffffff;
}

.pwc-guide-search {
	min-width: 220px;
}

.pwc-breed-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.pwc-breed-card {
	background: #ffffff;
	border: 1px solid var(--pwc-border);
	border-radius: var(--pwc-radius);
	padding: 1rem;
}

.pwc-breed-card[hidden] {
	display: none;
}

.pwc-breed-name {
	font-size: 1.05rem;
	margin: 0 0 0.4rem;
}

.pwc-breed-size {
	margin: 0 0 0.5rem;
}

.pwc-badge {
	background: var(--pwc-green-light);
	border-radius: 999px;
	color: #256b38;
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 0.15rem 0.65rem;
	text-transform: uppercase;
}

.pwc-breed-range {
	color: var(--pwc-muted);
	font-size: 0.92rem;
	line-height: 1.5;
	margin: 0;
}

.pwc-breed-range strong {
	color: var(--pwc-ink);
}

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
	.pwc-tool {
		padding: 1rem;
	}

	.pwc-form {
		grid-template-columns: 1fr;
	}

	.pwc-result-main {
		font-size: 1.1rem;
	}

	.pwc-guide-controls {
		align-items: stretch;
		flex-direction: column;
	}
}
