/**
 * Church Gifts & Windows (aoh_gift) — feature styles.
 *
 * Auto-enqueued by the child theme's assets/css/*.css glob (layered on
 * aoh-archive-main), so it inherits the shared design tokens (--aoh-*). Covers
 * the /church-gifts/ browse (essay intro, filter bar, responsive table) and the
 * single gift entry (details list, inscription, citation). Styled for both
 * light and dark via the shared tokens; tables scroll horizontally on narrow
 * viewports instead of breaking the page layout. WCAG-AA color contrast.
 *
 * @package AOH_Archive_Child
 */

/* ---- Browse: header + essay ------------------------------------------------ */
.aoh-gifts {
	max-width: var(--aoh-maxw, 72rem);
	margin-inline: auto;
	padding-block: var(--aoh-space-5, 2rem);
}

.aoh-gifts__title {
	font-family: var(--aoh-font-serif, Georgia, serif);
	margin-bottom: var(--aoh-space-4, 1.5rem);
}

.aoh-gifts__essay {
	max-width: 60ch;
	margin-bottom: var(--aoh-space-6, 3rem);
}

/* ---- Browse: filter bar ---------------------------------------------------- */
.aoh-gifts__filters {
	display: flex;
	flex-wrap: wrap;
	gap: var(--aoh-space-3, 1rem);
	align-items: flex-end;
	padding: var(--aoh-space-4, 1.5rem);
	margin-bottom: var(--aoh-space-4, 1.5rem);
	background: var(--aoh-surface-2, #f3f1ea);
	border: var(--aoh-border-width, 1px) solid var(--aoh-line, #d8d3c6);
	border-radius: var(--aoh-radius, 8px);
}

.aoh-gifts__filter {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	flex: 1 1 12rem;
	min-width: 10rem;
}

.aoh-gifts__filter label {
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--aoh-ink-soft, #4a4638);
}

.aoh-gifts__filter input[type="search"],
.aoh-gifts__filter select {
	width: 100%;
	padding: 0.5rem 0.6rem;
	font-size: 1rem;
	color: var(--aoh-ink, #23201a);
	background: var(--aoh-surface, #fff);
	border: var(--aoh-border-width, 1px) solid var(--aoh-line, #d8d3c6);
	border-radius: var(--aoh-radius-sm, 4px);
}

.aoh-gifts__filter--actions {
	flex: 0 0 auto;
	flex-direction: row;
	align-items: center;
	gap: var(--aoh-space-2, 0.5rem);
}

.aoh-gifts__submit {
	padding: 0.55rem 1.1rem;
	font-size: 1rem;
	font-weight: 700;
	color: var(--aoh-brand-ink, #fff);
	background: var(--aoh-brand, #1b512d);
	border: 0;
	border-radius: var(--aoh-radius-sm, 4px);
	cursor: pointer;
}

.aoh-gifts__submit:hover {
	filter: brightness(1.08);
}

.aoh-gifts__clear {
	font-size: 0.9375rem;
	color: var(--aoh-ink-soft, #4a4638);
}

/* ---- Browse: results table ------------------------------------------------- */
.aoh-gifts__tablewrap {
	overflow-x: auto;
	border: var(--aoh-border-width, 1px) solid var(--aoh-line, #d8d3c6);
	border-radius: var(--aoh-radius, 8px);
}

.aoh-gifts__tablewrap:focus-visible {
	outline: 3px solid var(--aoh-focus, #1a6be0);
	outline-offset: 2px;
}

.aoh-gifts__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.aoh-gifts__table caption {
	text-align: left;
}

.aoh-gifts__table th,
.aoh-gifts__table td {
	padding: 0.6rem 0.8rem;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--aoh-line-soft, #e7e3d8);
}

.aoh-gifts__table thead th {
	position: sticky;
	top: 0;
	background: var(--aoh-surface-2, #f3f1ea);
	color: var(--aoh-ink, #23201a);
	font-weight: 700;
	white-space: nowrap;
	border-bottom: 2px solid var(--aoh-line, #d8d3c6);
}

.aoh-gifts__table tbody tr:hover {
	background: var(--aoh-surface-2, #f3f1ea);
}

.aoh-gifts__church {
	font-weight: 600;
}

.aoh-gifts__num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* Photo-status pills (shared by browse + single). */
.aoh-gifts__photo {
	display: inline-block;
	padding: 0.1rem 0.55rem;
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.5;
	border-radius: 999px;
	border: 1px solid transparent;
	white-space: nowrap;
}

.aoh-gifts__photo--yes {
	color: #0f3d21;
	background: #d8efd8;
	border-color: #9cc9a6;
}

.aoh-gifts__photo--no {
	color: var(--aoh-ink-soft, #4a4638);
	background: var(--aoh-surface-2, #efece3);
	border-color: var(--aoh-line, #d8d3c6);
}

.aoh-gifts__photo--lost {
	color: #6a1414;
	background: #f6dede;
	border-color: #d8a3a3;
}

.aoh-gifts__photo--unknown {
	color: var(--aoh-ink-faint, #6d685a);
	background: transparent;
	border-color: var(--aoh-line, #d8d3c6);
}

/* ---- Single gift entry ----------------------------------------------------- */
.aoh-gift-single .aoh-container {
	max-width: 52rem;
	margin-inline: auto;
	padding-block: var(--aoh-space-5, 2rem);
}

.aoh-gift__place {
	margin-top: 0.25rem;
	font-size: 1.05rem;
	color: var(--aoh-ink-soft, #4a4638);
}

.aoh-gift__details {
	margin-block: var(--aoh-space-4, 1.5rem);
}

.aoh-gift__dl {
	margin: 0;
	display: grid;
	gap: 0;
	border: var(--aoh-border-width, 1px) solid var(--aoh-line, #d8d3c6);
	border-radius: var(--aoh-radius, 8px);
	overflow: hidden;
}

.aoh-gift__row {
	display: grid;
	grid-template-columns: minmax(9rem, 14rem) 1fr;
	gap: var(--aoh-space-3, 1rem);
	padding: 0.6rem 0.9rem;
	border-bottom: 1px solid var(--aoh-line-soft, #e7e3d8);
}

.aoh-gift__row:last-child {
	border-bottom: 0;
}

.aoh-gift__row dt {
	font-weight: 700;
	color: var(--aoh-ink-soft, #4a4638);
	margin: 0;
}

.aoh-gift__row dd {
	margin: 0;
	color: var(--aoh-ink, #23201a);
}

.aoh-gift__verbatim {
	color: var(--aoh-ink-faint, #6d685a);
	font-size: 0.875rem;
}

.aoh-gift__inscription {
	margin-block: var(--aoh-space-5, 2rem);
}

.aoh-gift__inscription-text {
	margin: 0;
	padding: var(--aoh-space-3, 1rem) var(--aoh-space-4, 1.5rem);
	border-left: 4px solid var(--aoh-gold-line, #c9a94f);
	background: var(--aoh-surface-2, #f3f1ea);
	font-family: var(--aoh-font-serif, Georgia, serif);
}

.aoh-gift__verbatim-note {
	margin-top: 0.5rem;
	font-size: 0.8125rem;
	color: var(--aoh-ink-faint, #6d685a);
}

/* Narrow screens: collapse the details grid to stacked rows. */
@media (max-width: 34rem) {
	.aoh-gift__row {
		grid-template-columns: 1fr;
		gap: 0.15rem;
	}
}
