/**
 * Burgee Member Directory — public styles.
 *
 * Deliberately restrained: colors and fonts inherit from the theme so the
 * directory reads as part of the site rather than a widget dropped onto it.
 * Only layout, spacing, and the letter nav are opinionated.
 */

.bmd-directory {
	margin: 0 0 2em;
}

.bmd-heading {
	margin: 0 0 0.75em;
}

/* ---------- Alphabet nav ---------- */

.bmd-alphabet {
	margin: 0 0 1.5em;
}

.bmd-alphabet-list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bmd-alphabet-item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bmd-letter {
	display: inline-block;
	min-width: 2em;
	padding: 0.35em 0.5em;
	border: 1px solid currentColor;
	border-radius: 3px;
	font-weight: 600;
	line-height: 1;
	text-align: center;
	text-decoration: none;
}

/* The selected and hovered chips are filled. The fill uses the CanvasText /
   Canvas system colors rather than currentColor: currentColor would paint the
   background in exactly the text color and swallow the label, and system colors
   follow the reader's light/dark preference without hard-coding a palette the
   theme may not want. */
.bmd-letter-current,
a.bmd-letter:hover,
a.bmd-letter:focus {
	background: CanvasText;
	border-color: CanvasText;
	color: Canvas;
	text-decoration: none;
}

.bmd-letter-empty {
	border-style: dashed;
	cursor: default;
	opacity: 0.4;
}

/* ---------- Member groups ---------- */

.bmd-group {
	margin: 0 0 2em;
}

.bmd-group-letter {
	margin: 0 0 0.5em;
	padding-bottom: 0.2em;
	border-bottom: 2px solid currentColor;
}

/* One member per row, full width. A multi-column grid packs more names onto the
   screen but leaves neighbouring entries touching, and it stops being obvious
   which address and phone number belong to which name. */
.bmd-members {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bmd-member {
	position: relative;
	margin: 0;
	padding: 0.55em 0.8em;
	line-height: 1.4;
	list-style: none;
}

/* The soft rounded boundary is drawn on a pseudo-element at low opacity rather
   than as a border on the row itself. currentColor at full strength would be a
   hard box on every theme, and fading it directly is not possible without
   color-mix, which is newer than the browsers this needs to work in. */
.bmd-member::before {
	content: "";
	position: absolute;
	inset: 0;
	border: 1px solid currentColor;
	border-radius: 8px;
	opacity: 0.16;
	pointer-events: none;
}

.bmd-member p {
	margin: 0;
}

/* The bolded name is the one piece of styling the directory insists on, so it
   is set explicitly rather than left to the theme's treatment of <strong>. */
.bmd-member-name {
	font-size: 1.05em;
}

.bmd-member-name strong {
	font-weight: 700;
}

/* Contact details share a line and wrap as a group, each keeping its label with
   its value. The gap alone separates them — a punctuation separator between
   items strands itself at the start of the line whenever the row wraps, and the
   "Phone:"/"Email:" labels already mark where each item begins. */
.bmd-member-contact {
	display: flex;
	flex-wrap: wrap;
	column-gap: 1.25em;
	row-gap: 0.1em;
}

.bmd-label {
	opacity: 0.7;
}

.bmd-empty {
	font-style: italic;
	opacity: 0.8;
}

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

@media (max-width: 480px) {

	.bmd-letter {
		min-width: 1.9em;
		padding: 0.45em 0.4em;
	}

	/* Give each contact detail its own line — side by side they wrap awkwardly
	   at phone-screen widths. */
	.bmd-member-contact {
		display: block;
	}
}
