/*
 * Register pages: plain, readable defaults. Phase 4 restyles them; colors
 * follow the theme (currentColor and the theme's own presets).
 */

.hcc-main {
	padding-block: var(--wp--preset--spacing--50, 2rem);
}

.hcc-register,
.hcc-record {
	--hcc-rule: color-mix(in srgb, currentColor 18%, transparent);
	--hcc-soft: color-mix(in srgb, currentColor 70%, transparent);
	line-height: 1.55;
}

.hcc-record__crumbs,
.hcc-record__no,
.hcc-listing__no,
.hcc-register__count {
	font-size: 0.875rem;
	color: var(--hcc-soft);
}

.hcc-record__no,
.hcc-listing__no {
	font-family: var(--wp--preset--font-family--mono, ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace);
	letter-spacing: 0.02em;
}

.hcc-record__head {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	align-items: flex-start;
	justify-content: space-between;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--hcc-rule);
}

.hcc-record__name {
	margin: 0.25rem 0;
}

.hcc-record__seal {
	flex: none;
	width: 120px;
	height: 120px;
}

.hcc-record__preview,
.hcc-register__missing,
.hcc-record__ended,
.hcc-record__affiliated {
	padding: 0.75rem 1rem;
	border: 1px solid var(--hcc-rule);
	border-radius: 6px;
}

.hcc-record__summary {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.35rem 1.25rem;
	margin: 1.25rem 0;
}

.hcc-record__summary dt {
	font-weight: 600;
}

.hcc-record__summary dd {
	margin: 0;
	overflow-wrap: anywhere;
}

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

.hcc-record__facts th,
.hcc-record__facts td {
	text-align: left;
	vertical-align: top;
	padding: 0.5rem 0.75rem 0.5rem 0;
	border-bottom: 1px solid var(--hcc-rule);
}

.hcc-record__facts .hcc-fact__date {
	white-space: nowrap;
}

.hcc-record__lines {
	margin-top: 2rem;
	font-size: 0.9rem;
	color: var(--hcc-soft);
}

.hcc-register__search {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: 0.75rem 1rem;
	align-items: end;
	margin: 1.5rem 0;
}

.hcc-field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin: 0;
}

.hcc-field--q {
	grid-column: 1 / -1;
}

.hcc-field input,
.hcc-field select,
.hcc-field button {
	font: inherit;
	padding: 0.5rem 0.65rem;
	min-height: 2.5rem;
}

.hcc-register__results {
	list-style: none;
	padding: 0;
	margin: 0;
}

.hcc-listing {
	display: grid;
	gap: 0.15rem;
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--hcc-rule);
}

.hcc-listing__name {
	font-weight: 600;
	font-size: 1.1rem;
}

.hcc-listing__where {
	color: var(--hcc-soft);
}

.hcc-register__pages {
	display: flex;
	gap: 1rem;
	align-items: center;
	margin: 1.25rem 0;
}

.hcc-register__help {
	margin-top: 2.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--hcc-rule);
}

@media (max-width: 600px) {
	.hcc-record__summary {
		grid-template-columns: 1fr;
	}

	.hcc-record__summary dd {
		margin-bottom: 0.5rem;
	}

	.hcc-record__facts thead {
		display: none;
	}

	.hcc-record__facts tr,
	.hcc-record__facts th,
	.hcc-record__facts td {
		display: block;
		border: 0;
		padding: 0.1rem 0;
	}

	.hcc-record__facts tr {
		padding: 0.6rem 0;
		border-bottom: 1px solid var(--hcc-rule);
	}
}
