/**
 * Century Center Directory
 *
 * Per-category color is passed in as the --ccdir-color custom property on
 * the card or legend item, so nothing here needs a category-specific class.
 * Layout relies on Bootstrap 5 grid and card classes from the theme.
 */

/* ---------------------------------------------------------------------
   Cards
   --------------------------------------------------------------------- */

.ccdir-card {
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: .75rem;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.ccdir-card-header {
	background-color: #000;
	border-bottom: 5px solid var(--ccdir-color, #212529);
	padding: 1rem 1.5rem;
}

.ccdir-card-title {
	color: #fff;
	font-weight: 700;
	letter-spacing: .01em;
}

.ccdir-card-body {
	padding: 1.25rem 1.5rem 1.5rem;
}

/* ---------------------------------------------------------------------
   Listings
   --------------------------------------------------------------------- */

.ccdir-list {
	display: flex;
	flex-direction: column;
	gap: 1.125rem;
}

.ccdir-item {
	display: flex;
	align-items: flex-start;
	gap: .875rem;
}

.ccdir-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 1.875rem;
	height: 1.875rem;
	margin-top: .125rem;
	/* 3px clear of the list edge so the ring is not clipped */
	margin-left: 3px;
	border-radius: 50%;
	background-color: #000;
	color: #fff;
	font-size: .875rem;
	font-weight: 700;
	line-height: 1;
	/* box-shadow rather than border: the ring sits outside the circle
	   instead of eating into it, so the digit keeps its full size. */
	box-shadow: 0 0 0 3px var(--ccdir-color, #212529);
}

.ccdir-badge-empty {
	background-color: transparent;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .2);
}

.ccdir-item-body {
	display: flex;
	flex-direction: column;
	gap: .125rem;
	min-width: 0;
}

.ccdir-name {
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.35;
}

.ccdir-link {
	font-size: .9375rem;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: .15em;
	overflow-wrap: anywhere;
}

.ccdir-link:hover,
.ccdir-link:focus {
	/* Mixed toward black: the raw category color is too light against the
	   card background for the orange and green categories. */
	color: color-mix(in srgb, var(--ccdir-color, #212529) 65%, #000);
}

.ccdir-note {
	font-size: .9375rem;
	font-style: italic;
	opacity: .7;
}

.ccdir-empty {
	font-style: italic;
	opacity: .7;
}

/* ---------------------------------------------------------------------
   Map legend
   --------------------------------------------------------------------- */

.ccdir-legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: .75rem 2.25rem;
	margin: 1.5rem 0;
	padding: 0;
}

.ccdir-legend-item {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.2;
}

.ccdir-legend-dot {
	flex: 0 0 auto;
	width: 1rem;
	height: 1rem;
	border-radius: 50%;
	background-color: var(--ccdir-color, #212529);
}

/* ---------------------------------------------------------------------
   Accessibility
   --------------------------------------------------------------------- */

.ccdir-link:focus-visible {
	outline: 2px solid var(--ccdir-color, #212529);
	outline-offset: 2px;
}
