/*
 * PuppyPress – front end styles.
 *
 * Deliberately light: colors and fonts come from the theme. Customize via
 * the custom properties below or disable the file with
 * add_filter( 'puppypress_load_styles', '__return_false' );
 */

.puppypress {
	--puppypress-gap: 1.5rem;
	--puppypress-border: rgba(0, 0, 0, 0.12);
	--puppypress-muted: rgba(0, 0, 0, 0.6);
	--puppypress-surface: rgba(0, 0, 0, 0.03);
	--puppypress-radius: 4px;
}

.puppypress + .puppypress {
	margin-top: calc(var(--puppypress-gap) * 1.5);
}

.puppypress-icon {
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-right: 0.35em;
	vertical-align: -0.125em;
}

.puppypress-empty {
	color: var(--puppypress-muted);
}

.puppypress-nowrap {
	white-space: nowrap;
}

/* Summary line and data list */
.puppypress-summary {
	color: var(--puppypress-muted);
}

.puppypress-summary__sep {
	opacity: 0.5;
}

.puppypress-data {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.4em 1.5em;
	margin: 0 0 var(--puppypress-gap);
}

.puppypress-data dt {
	font-weight: 600;
}

.puppypress-data dd {
	margin: 0;
}

/* Contacts */
.puppypress-contact {
	margin: 0 0 1em;
	padding: 0;
	list-style: none;
}

.puppypress-contact li {
	margin: 0 0 0.2em;
	padding: 0;
	list-style: none;
}

.puppypress-columns {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	gap: var(--puppypress-gap);
}

/* Pedigree */
.puppypress-pedigree {
	overflow-x: auto;
	margin: 0 0 var(--puppypress-gap);
}

.puppypress-pedigree__table {
	width: 100%;
	min-width: 36rem;
	border-collapse: collapse;
}

.puppypress-pedigree__table td {
	width: 33.33%;
	padding: 0.6em 0.8em;
	vertical-align: middle;
	border: 1px solid var(--puppypress-border);
}

.puppypress-pedigree__generation-1 {
	background: var(--puppypress-surface);
}

.puppypress-pedigree__role {
	display: block;
	margin-bottom: 0.3em;
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--puppypress-muted);
}

.puppypress-pedigree__approval {
	display: inline-block;
	margin-top: 0.4em;
	font-size: 0.9em;
}

/* Cards (stud dogs, litters) */
.puppypress-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: var(--puppypress-gap);
	margin: 0 0 var(--puppypress-gap);
}

.puppypress-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--puppypress-border);
	border-radius: var(--puppypress-radius);
}

.puppypress-card__image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.puppypress-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1rem;
}

.puppypress-card__title {
	margin: 0 0 0.5em;
	font-size: 1.15em;
}

.puppypress-card__meta {
	margin: 0 0 1em;
	color: var(--puppypress-muted);
	font-size: 0.95em;
}

.puppypress-card__meta p {
	margin: 0 0 0.3em;
}

.puppypress-card__more {
	margin-top: auto;
	font-weight: 600;
}

/* Filter */
.puppypress-filter {
	margin: 0 0 var(--puppypress-gap);
	padding: 0.8rem 1rem;
	background: var(--puppypress-surface);
	border: 1px solid var(--puppypress-border);
	border-radius: var(--puppypress-radius);
}

.puppypress-filter summary {
	font-weight: 600;
	cursor: pointer;
}

.puppypress-filter__fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: 1rem;
	margin-top: 1rem;
}

.puppypress-filter__field {
	margin: 0;
	padding: 0;
	border: 0;
}

.puppypress-filter__field > label,
.puppypress-filter__field legend {
	display: block;
	margin-bottom: 0.3em;
	padding: 0;
	font-weight: 600;
}

.puppypress-filter__field input[type="text"],
.puppypress-filter__field select {
	width: 100%;
}

.puppypress-filter__field--multi label {
	display: block;
	font-weight: normal;
}

.puppypress-filter__field--checkbox label {
	font-weight: normal;
}

.puppypress-filter__actions {
	display: flex;
	gap: 1rem;
	align-items: center;
	margin: 1rem 0 0;
}

/* Tables */
.puppypress-table-scroll {
	overflow-x: auto;
	margin: 0 0 var(--puppypress-gap);
}

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

.puppypress-table th,
.puppypress-table td {
	padding: 0.6em 0.8em;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--puppypress-border);
}

.puppypress-table__wide {
	width: 40%;
}

.puppypress-table__cover img {
	max-width: 80px;
	height: auto;
}

.puppypress-icons a + a {
	margin-left: 0.6em;
}

/* Litter details */
.puppypress-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
	gap: 0.75rem;
	margin: 0 0 var(--puppypress-gap);
}

.puppypress-gallery img {
	display: block;
	width: 100%;
	height: auto;
}

/* Widgets */
.puppypress-recent__type {
	font-size: 0.85em;
	opacity: 0.75;
}

.puppypress-recent__more {
	display: inline-block;
	margin-top: 0.75em;
}
