/*
 * Founder and Provider directory cards: the same behaviour as the /members/
 * cards.
 *
 * - The whole card above the footer opens the profile: the name link is
 *   stretched over the card.
 * - Hovering anywhere in that area turns the name orange.
 * - Other links in the card (LinkedIn, website) and the footer (Send
 *   Message) sit above it and keep working on their own.
 *
 * Request cards get the same rules from the HP Requests plugin.
 */
.hp-founder--view-block,
.hp-provider--view-block {
	position: relative;
}

.hp-founder--view-block .hp-founder__name a::after,
.hp-provider--view-block .hp-provider__name a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.hp-founder--view-block .hp-founder__name a:hover,
.hp-provider--view-block .hp-provider__name a:hover {
	color: var(--prim, #ff8957);
}

/* Links other than the name and image, and the whole footer, stay on top.
   The image link goes to the same page, so it stays underneath. */
.hp-founder--view-block a:not(.hp-founder__name a):not(.hp-founder__image a),
.hp-provider--view-block a:not(.hp-provider__name a):not(.hp-provider__image a),
.hp-founder--view-block .hp-founder__footer,
.hp-provider--view-block .hp-provider__footer {
	position: relative;
	z-index: 2;
}

/*
 * Card details: Block "Details grid" (secondary) and "Details list"
 * (ternary). Centred under the name like the rest of the card.
 *
 * - Details grid: items side by side, wrapping onto a new line when they
 *   run out of room ("Site · Personal · Company").
 * - Details list: one item per line.
 * - Links (website, LinkedIn, ...) are navy and turn orange on hover, with
 *   their icon. Only in these two areas, not in the footer.
 */
.hp-founder--view-block .hp-founder__attributes--secondary,
.hp-provider--view-block .hp-provider__attributes--secondary,
.hp-founder--view-block .hp-founder__attributes--ternary,
.hp-provider--view-block .hp-provider__attributes--ternary {
	margin: 16px 0 0;
	text-align: center;
	font-size: .9375em;
	line-height: 1.5;
}

/* Grid: HivePress's two-column row becomes a centred, wrapping row. */
.hp-founder--view-block .hp-founder__attributes--secondary .hp-row,
.hp-provider--view-block .hp-provider__attributes--secondary .hp-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 20px;
	margin: 0;
}

.hp-founder--view-block .hp-founder__attributes--secondary .hp-row > [class*="hp-col-"],
.hp-provider--view-block .hp-provider__attributes--secondary .hp-row > [class*="hp-col-"] {
	flex: 0 1 auto;
	width: auto;
	max-width: 100%;
	margin: 0;
	padding: 0;
}

/* List: one per line, centred. */
.hp-founder--view-block .hp-founder__attributes--ternary,
.hp-provider--view-block .hp-provider__attributes--ternary {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

.hp-founder--view-block .hp-founder__attributes--secondary .hp-founder__attribute,
.hp-provider--view-block .hp-provider__attributes--secondary .hp-provider__attribute,
.hp-founder--view-block .hp-founder__attributes--ternary .hp-founder__attribute,
.hp-provider--view-block .hp-provider__attributes--ternary .hp-provider__attribute {
	margin: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}

/* Links: navy, orange on hover; icon and text stay together. */
.hp-founder--view-block .hp-founder__attributes--secondary a,
.hp-provider--view-block .hp-provider__attributes--secondary a,
.hp-founder--view-block .hp-founder__attributes--ternary a,
.hp-provider--view-block .hp-provider__attributes--ternary a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--navy, #0d3b66);
	text-decoration: none;
	transition: color .15s ease;
}

.hp-founder--view-block .hp-founder__attributes--secondary a:hover,
.hp-provider--view-block .hp-provider__attributes--secondary a:hover,
.hp-founder--view-block .hp-founder__attributes--ternary a:hover,
.hp-provider--view-block .hp-provider__attributes--ternary a:hover,
.hp-founder--view-block .hp-founder__attributes--secondary a:focus-visible,
.hp-provider--view-block .hp-provider__attributes--secondary a:focus-visible,
.hp-founder--view-block .hp-founder__attributes--ternary a:focus-visible,
.hp-provider--view-block .hp-provider__attributes--ternary a:focus-visible {
	color: var(--prim, #ff8957);
}

.hp-founder--view-block .hp-founder__attributes--secondary a i,
.hp-provider--view-block .hp-provider__attributes--secondary a i,
.hp-founder--view-block .hp-founder__attributes--ternary a i,
.hp-provider--view-block .hp-provider__attributes--ternary a i {
	margin: 0;
	color: inherit;
	font-size: .95em;
}

/*
 * Founder / Provider page sidebar: the same link style as the card details
 * (navy, orange on hover, icon and text together).
 */
.hpp-contact a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--navy, #0d3b66);
	text-decoration: none;
	transition: color .15s ease;
	overflow-wrap: anywhere;
}

.hpp-contact a:hover,
.hpp-contact a:focus-visible {
	color: var(--prim, #ff8957);
}

.hpp-contact a i {
	margin: 0;
	color: inherit;
	font-size: .95em;
}

/*
 * Hide a card's footer when it has nothing in it: no footer attributes and
 * no Send Message (e.g. your own card).
 */
.hp-founder--view-block .hp-founder__footer:not(:has(a, button, .hp-founder__attribute)),
.hp-provider--view-block .hp-provider__footer:not(:has(a, button, .hp-provider__attribute)) {
	display: none;
}

/*
 * Every Founder / Provider attribute (cards, footer and profile sidebar):
 * icon and text side by side, centred, wrapping long values.
 */
.hp-founder__attribute,
.hp-provider__attribute {
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: break-word;
	gap: 6px;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-content: center;
	align-items: center;
}

/*
 * Every Founder / Provider attribute (cards, profile sidebar): icon and
 * value side by side. The icon stays on the first line and a long value
 * wraps beside it instead of dropping below it.
 */
.hp-founder__attribute,
.hp-provider__attribute {
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: break-word;
	gap: 6px;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: baseline;
}

.hp-founder__attribute > i,
.hp-provider__attribute > i {
	flex: 0 0 auto;
}

/*
 * Profile sidebar list: icons in one column, space between rows, and
 * links in semi-bold navy so they stand out from plain text.
 */
.hpp-contact {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.hpp-contact .hpp-contact__item {
	margin: 0;
}

/* Same-width icon box for every row (inside or outside a link). */
.hpp-contact .hpp-contact__item i {
	flex: 0 0 1.25em;
	width: 1.25em;
	margin: 0;
	text-align: center;
	font-size: .95em;
}

.hpp-contact a {
	font-weight: 600;
}

/*
 * Pagination, the same on every directory: Founders, Providers, /members/
 * and Requests. Centred under the cards, DM Sans 16px navy, the current
 * page in bold orange, and chevrons for previous / next.
 *
 * The theme styles its own .pagination links with stronger selectors (e.g.
 * a 1.125rem font size), so the type and colours here use !important.
 */
body .hp-pagination,
body .hp-pagination .pagination,
body .hp-pagination .nav-links,
body .hp-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
	border: 0;
	background: none;
	text-align: center;
}

body .hp-pagination {
	width: 100%;
	margin: 32px 0 0;
}

body .hp-pagination ul.page-numbers li {
	margin: 0;
	padding: 0;
	list-style: none;
	border: 0;
	background: none;
}

body .hp-pagination .page-numbers:not(ul) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	margin: 0;
	padding: 0 8px;
	font-family: 'DM Sans', sans-serif !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	color: var(--navy, #0d3b66) !important;
	background: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	text-decoration: none;
	transition: color .15s ease;
}

body .hp-pagination a.page-numbers:hover,
body .hp-pagination a.page-numbers:focus-visible {
	color: var(--prim, #ff8957) !important;
}

body .hp-pagination .page-numbers.current {
	color: var(--prim, #ff8957) !important;
	font-weight: 700 !important;
}

body .hp-pagination .page-numbers.dots {
	min-width: auto;
	padding: 0 4px;
}

/* Arrows the same size as the page numbers (the theme sizes its own). */
body .hp-pagination .page-numbers i,
body .hp-pagination .page-numbers i::before {
	margin: 0 !important;
	font-size: 16px !important;
	line-height: 1 !important;
	width: auto !important;
	height: auto !important;
	color: inherit !important;
}

/* Previous / next arrows: light blue-grey, orange on hover. */
body .hp-pagination .page-numbers.prev,
body .hp-pagination .page-numbers.next {
	color: #c5d4e8 !important;
}

body .hp-pagination a.page-numbers.prev:hover,
body .hp-pagination a.page-numbers.next:hover,
body .hp-pagination a.page-numbers.prev:focus-visible,
body .hp-pagination a.page-numbers.next:focus-visible {
	color: var(--prim, #ff8957) !important;
}

/*
 * Checkbox fields that aren't required: no required star.
 *
 * HivePress never shows "(optional)" next to a checkbox, and the theme
 * puts a star on every form label without "(optional)", so optional
 * checkboxes (e.g. Free Initial Consultation) looked required. A checkbox
 * whose box is really required (e.g. the terms box) keeps its star.
 */
.hp-form__field--checkbox:not(:has(input[type="checkbox"]:required)) > .hp-field__label::before,
.hp-form__field--checkbox:not(:has(input[type="checkbox"]:required)) > .hp-field__label::after,
.hp-form__field--checkbox:not(:has(input[type="checkbox"]:required)) > .hp-field__label span::before,
.hp-form__field--checkbox:not(:has(input[type="checkbox"]:required)) > .hp-field__label span::after {
	content: none !important;
	display: none !important;
}

.hp-form__field--checkbox:not(:has(input[type="checkbox"]:required)) > .hp-field__label .required {
	display: none !important;
}
