/**
 * BMHM Directory Listing Styles
 *
 * Mobile-first responsive CSS for the provider directory grid page.
 * Brand tokens defined in provider-profile.css :root (shared).
 *
 * @package BMHM_Provider_Directory
 */

/* --- Reduce theme spacing above/below directory content ---
   The block theme applies margin via inline styles on <main>, so
   !important is required to override them.                       */
body:has(.bmhm-directory) .wp-site-blocks main,
body:has(.bmhm-directory) main.wp-block-group {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

/* --- Break out of WP theme content constraints --- */
.bmhm-directory {
	font-family: var(--bmhm-font-body, 'Cabin', sans-serif);
	color: var(--bmhm-contrast, #000);
	padding: 1.5rem 1rem;
	/* Override WP theme max-width constraints (Twenty Twenty-Five etc.) */
	box-sizing: border-box;
	max-width: none !important;
	width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Also break out of common WP layout containers */
.entry-content .bmhm-directory,
.wp-block-post-content .bmhm-directory,
.is-layout-constrained .bmhm-directory {
	max-width: none !important;
	width: calc(100vw - 2rem) !important;
	margin-left: calc(-50vw + 50%) !important;
	margin-right: calc(-50vw + 50%) !important;
}

.bmhm-directory__container {
	box-sizing: border-box;
	max-width: 100%;
	margin: 0 auto;
	padding: 0 1rem;
}

.bmhm-directory__layout {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

/* --- Disclaimer Banner --- */
.bmhm-disclaimer {
	background-color: var(--bmhm-tertiary, #F6F6F6);
	border-left: 4px solid var(--bmhm-red, #ec3748);
	padding: 0.875rem 1.25rem;
	margin-bottom: 1rem;
	border-radius: 0 var(--bmhm-radius, 8px) var(--bmhm-radius, 8px) 0;
}

.bmhm-disclaimer p {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.6;
	color: #374151;
}

.bmhm-disclaimer__link {
	display: inline-block;
	margin-top: 0.35rem;
	font-weight: 700;
	color: var(--bmhm-secondary, #017d7f);
	white-space: nowrap;
}

/* --- Mobile Filter Toggle Button --- */
.bmhm-directory__filter-toggle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1rem;
	background: var(--bmhm-secondary, #017d7f);
	color: var(--bmhm-base, #fff);
	border: none;
	border-radius: var(--bmhm-radius, 8px);
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	margin-bottom: 1rem;
	transition: background-color 0.15s;
}

.bmhm-directory__filter-toggle:hover {
	background: #015c5e;
}

.bmhm-directory__filter-toggle-icon {
	font-size: 1.125rem;
	line-height: 1;
}

/* --- Sidebar --- */
.bmhm-directory__sidebar {
	background: rgba(255, 255, 255, 0.98);
	border: 1px solid #e6ecef;
	border-radius: 18px;
	padding: 1rem;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

/* --- Mobile slide-out drawer --- */
@media (max-width: 1023px) {
	.bmhm-directory__sidebar {
		position: fixed;
		top: 0;
		left: 0;
		width: 300px;
		max-width: 85vw;
		height: 100vh;
		z-index: 9999;
		overflow-y: auto;
		border-radius: 0;
		transform: translateX(-100%);
		transition: transform 0.25s ease;
		box-shadow: none;
		background-color: var(--bmhm-base, #fff);
		border: none;
	}

	.bmhm-directory__sidebar.is-open {
		transform: translateX(0);
		box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
	}

	.bmhm-directory__overlay {
		display: none;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.4);
		z-index: 9998;
	}

	.bmhm-directory__overlay.is-visible {
		display: block;
	}
}

@media (min-width: 1024px) {
	.bmhm-directory__filter-toggle {
		display: none;
	}

	.bmhm-directory__overlay {
		display: none !important;
	}
}

/* --- Toolbar (count + sort + active filters) --- */
.bmhm-directory__toolbar {
	margin-bottom: 1rem;
}

.bmhm-directory__toolbar-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.bmhm-directory__count {
	font-size: 1rem;
	color: var(--bmhm-secondary, #017d7f);
	font-weight: 700;
	margin: 0;
}

.bmhm-directory__controls {
	display: flex;
	gap: 1rem;
	align-items: center;
	flex-wrap: wrap;
}

.bmhm-directory__sort,
.bmhm-directory__per-page {
	display: flex;
	align-items: center;
}

.bmhm-directory__sort-select,
.bmhm-directory__per-page-select {
	padding: 0.4rem 2rem 0.4rem 0.75rem;
	font-size: 0.8125rem;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 0.5rem center;
	background-size: 10px;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	color: #333;
}

.bmhm-directory__sort-select:focus,
.bmhm-directory__per-page-select:focus {
	outline: none;
	border-color: var(--bmhm-secondary, #017d7f);
	box-shadow: 0 0 0 2px rgba(1, 125, 127, 0.15);
}

.bmhm-directory__active-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin-top: 0.75rem;
}

.bmhm-directory__active-filters:empty {
	margin-top: 0;
}

/* --- Filter Sidebar --- */
.bmhm-filters__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
	padding-bottom: 0.875rem;
	border-bottom: 1px solid #e7ecef;
}

.bmhm-filters__title {
	font-family: var(--bmhm-font-body, 'Cabin', sans-serif);
	font-size: 1.15rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	margin: 0;
	color: #172033;
}

.bmhm-filters__clear {
	background: rgba(236, 55, 72, 0.08);
	border: 1px solid rgba(236, 55, 72, 0.14);
	color: var(--bmhm-red, #ec3748);
	font-size: 0.75rem;
	font-weight: 700;
	cursor: pointer;
	padding: 0.25rem 0.55rem;
	border-radius: 999px;
	line-height: 1.2;
	transition: background-color 0.15s, border-color 0.15s;
}

.bmhm-filters__clear:hover {
	background-color: rgba(236, 55, 72, 0.14);
	border-color: rgba(236, 55, 72, 0.24);
}

.bmhm-filters__section {
	padding: 0.75rem 0;
	margin-bottom: 0;
	border-bottom: 1px solid #edf1f3;
	position: relative;
}

.bmhm-filters__section:last-child {
	border-bottom: none;
}

.bmhm-filters__label {
	display: block;
	font-size: 0.78rem;
	font-weight: 800;
	color: #27364a;
	letter-spacing: -0.01em;
	margin-bottom: 0.5rem;
}

@media (min-width: 1024px) {
	.bmhm-filters__label {
		font-size: 0.84rem;
	}
}

.bmhm-filters__search-input,
.bmhm-filters__select {
	width: 100%;
	min-height: 42px;
	padding: 0.58rem 0.72rem;
	font-size: 0.9rem;
	border: 1px solid #d9e0e5;
	border-radius: 12px;
	background: var(--bmhm-base, #fff);
	color: #182233;
	box-sizing: border-box;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
	transition: border-color 0.15s, box-shadow 0.15s;
}

@media (min-width: 1024px) {
	.bmhm-filters__select {
		font-size: 0.9rem;
	}
}

.bmhm-filters__search-input:focus,
.bmhm-filters__select:focus {
	outline: none;
	border-color: var(--bmhm-secondary, #017d7f);
	box-shadow: 0 0 0 3px rgba(1, 125, 127, 0.12);
}

/* --- Expandable Sections --- */
.bmhm-filters__toggle {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	background: none;
	border: none;
	padding: 0.15rem 0;
	font-size: 0.9rem;
	font-weight: 800;
	color: #27364a;
	cursor: pointer;
	text-align: left;
	letter-spacing: -0.01em;
}

.bmhm-filters__toggle:hover {
	color: var(--bmhm-secondary, #017d7f);
}

.bmhm-filters__toggle:focus {
	outline: none;
}

.bmhm-filters__toggle-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.35rem;
	height: 1.35rem;
	border-radius: 999px;
	background: #f2f6f7;
	font-size: 0.95rem;
	font-weight: 800;
	line-height: 1;
	color: #6d7785;
}

.bmhm-filters__checkbox-group {
	padding-top: 0.65rem;
	max-height: none;
	overflow: visible;
}

/* --- Checkboxes --- */
.bmhm-filters__checkbox {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.42rem 0.3rem;
	border-radius: 9px;
	font-size: 0.86rem;
	color: #303948;
	cursor: pointer;
	line-height: 1.35;
	transition: background-color 0.15s;
	word-break: normal;
}

.bmhm-filters__checkbox:hover {
	background: #f7faf9;
}

@media (min-width: 1024px) {
	.bmhm-filters__checkbox {
		font-size: 0.9rem;
	}
}

.bmhm-filters__checkbox input[type="checkbox"] {
	flex-shrink: 0;
	width: 1.05rem;
	height: 1.05rem;
	accent-color: var(--bmhm-secondary, #017d7f);
	cursor: pointer;
}

.bmhm-filters__checkbox--toggle {
	font-weight: 600;
	font-size: 0.875rem;
	padding: 0.5rem 0;
}

.bmhm-filter-chip-group {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem;
}

.bmhm-filter-chip {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 0.45rem 0.72rem;
	border: 1px solid #d9e0e5;
	border-radius: 100px;
	background: #fff;
	color: #27364a;
	font-size: 0.82rem;
	font-weight: 800;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.bmhm-filter-chip:hover {
	border-color: var(--bmhm-secondary, #017d7f);
	background: rgba(1, 125, 127, 0.06);
}

.bmhm-filter-chip input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.bmhm-filter-chip:has(input[type="checkbox"]:checked) {
	border-color: var(--bmhm-secondary, #017d7f);
	background: var(--bmhm-secondary, #017d7f);
	color: #fff;
	box-shadow: 0 4px 10px rgba(1, 125, 127, 0.16);
}

.bmhm-filter-chip:focus-within {
	outline: 2px solid var(--bmhm-secondary, #017d7f);
	outline-offset: 2px;
}

/* --- Filter Sidebar Multi-Select Widget --- */
.bmhm-filter-multiselect {
	position: relative;
}

.bmhm-filter-multiselect__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin-bottom: 0.375rem;
}

.bmhm-filter-multiselect__pills:empty {
	display: none;
	margin: 0;
}

.bmhm-filter-multiselect__pill {
	display: inline-flex;
	align-items: center;
	gap: 0.125rem;
	background: #e0f2f1;
	color: #017d7f;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.125rem 0.375rem;
	border-radius: 100px;
	border: 1px solid rgba(1, 125, 127, 0.18);
	line-height: 1.3;
}

.bmhm-filter-multiselect__pill-remove {
	background: none;
	border: none;
	color: #017d7f;
	cursor: pointer;
	font-size: 0.875rem;
	line-height: 1;
	padding: 0;
	opacity: 0.6;
}

.bmhm-filter-multiselect__pill-remove:hover {
	opacity: 1;
}

.bmhm-filter-multiselect__search {
	width: 100%;
	min-height: 42px;
	padding: 0.58rem 0.72rem;
	border: 1px solid #d9e0e5;
	border-radius: 12px;
	font-size: 0.9rem;
	background: #fff;
	box-sizing: border-box;
	margin: 0;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.bmhm-filter-multiselect__search:focus {
	outline: none;
	border-color: var(--bmhm-secondary, #017d7f);
	box-shadow: 0 0 0 3px rgba(1, 125, 127, 0.12);
}

.bmhm-filter-multiselect__dropdown {
	position: absolute;
	z-index: 100;
	top: 100%;
	left: 0;
	right: 0;
	max-height: 200px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #d9e0e5;
	border-top: none;
	border-radius: 0 0 12px 12px;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.bmhm-filter-multiselect__option {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.55rem 0.7rem;
	font-size: 0.86rem;
	cursor: pointer;
}

.bmhm-filter-multiselect__option:hover {
	background: #f0f6fc;
}

.bmhm-filter-multiselect__option--selected {
	background: #e0f2f1;
	font-weight: 600;
}

.bmhm-filter-multiselect__check {
	color: #017d7f;
	font-weight: 700;
	font-size: 0.8125rem;
}

/* --- Filter Pills --- */
.bmhm-filter-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.25rem 0.625rem;
	background-color: var(--bmhm-secondary, #017d7f);
	color: var(--bmhm-base, #fff);
	border-radius: 100px;
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.25;
}

.bmhm-filter-pill__label {
	max-width: 150px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bmhm-filter-pill__remove {
	background: none;
	border: none;
	color: inherit;
	font-size: 0.9375rem;
	line-height: 1;
	padding: 0;
	margin-left: 0.125rem;
	cursor: pointer;
	opacity: 0.8;
}

.bmhm-filter-pill__remove:hover {
	opacity: 1;
}

/* --- Mobile Apply Button --- */
.bmhm-filters__actions--mobile {
	margin-top: 1rem;
}

.bmhm-filters__apply {
	display: block;
	width: 100%;
	padding: 0.75rem;
	background: var(--bmhm-secondary, #017d7f);
	color: var(--bmhm-base, #fff);
	border: none;
	border-radius: 6px;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s;
}

.bmhm-filters__apply:hover {
	background: var(--bmhm-secondary-dark, #015c5e);
}

/* ================================================================
   PROVIDER GRID
   ================================================================ */
.bmhm-provider-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

@keyframes bmhm-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50%       { opacity: 0.5; transform: scale(0.75); }
}

/* ================================================================
   PROVIDER CARD — Horizontal layout (photo left, info right)
   ================================================================ */
.bmhm-card {
	background: var(--bmhm-base, #fff);
	border: 1px solid #dfe8ec;
	border-radius: 18px;
	overflow: hidden;
	position: relative;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
	transition: box-shadow 0.2s ease, transform 0.15s ease, border-color 0.15s ease;
}

.bmhm-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--bmhm-red, #ec3748), var(--bmhm-primary, #69c186), var(--bmhm-secondary, #017d7f));
	z-index: 1;
}

.bmhm-card:hover {
	border-color: #cbdce3;
	box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
	transform: translateY(-2px);
}

.bmhm-card__link {
	text-decoration: none;
	color: inherit;
	display: flex;
	align-items: stretch;
	height: 100%;
}

/* Photo column — fixed width left strip */
.bmhm-card__photo-col {
	flex-shrink: 0;
	width: 88px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.15rem 0 1rem 1rem;
}

.bmhm-card__photo {
	width: 62px;
	height: 62px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid #fff;
	box-shadow: 0 0 0 2px rgba(105, 193, 134, 0.55), 0 8px 18px rgba(15, 23, 42, 0.12);
}

.bmhm-card__photo--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--bmhm-primary, #69c186), var(--bmhm-secondary, #017d7f));
	font-family: var(--bmhm-font-heading, 'Libre Baskerville', serif);
	font-size: 1.25rem;
	color: #fff;
	font-weight: 700;
}

/* Info column — fills remaining space */
.bmhm-card__info {
	flex: 1;
	min-width: 0;
	padding: 1rem 1rem 1rem 0.75rem;
	display: flex;
	flex-direction: column;
}

.bmhm-card__name {
	font-family: var(--bmhm-font-heading, 'Libre Baskerville', serif);
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 0.125rem;
	color: var(--bmhm-contrast, #000);
	line-height: 1.3;
}

@media (min-width: 1024px) {
	.bmhm-card__name {
		font-size: 1.125rem;
	}
}

.bmhm-card__pronouns {
	font-size: 0.8125rem;
	color: var(--bmhm-text-muted, #6b7280);
	margin: 0 0 0.125rem;
}

.bmhm-card__credentials {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: 0.125rem 0 0.35rem;
}

.bmhm-card__location {
	font-size: 0.8125rem;
	color: #666;
	margin: 0 0 0.5rem;
}

@media (min-width: 1024px) {
	.bmhm-card__location {
		font-size: 0.9375rem;
	}
}

.bmhm-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	margin-bottom: 0.5rem;
}

.bmhm-card__tag {
	display: inline-block;
	padding: 0.25rem 0.625rem;
	font-size: 0.6875rem;
	font-weight: 600;
	border-radius: 100px;
	background-color: #f0f7f1;
	color: var(--bmhm-secondary, #017d7f);
	letter-spacing: 0.01em;
	white-space: nowrap;
}

@media (min-width: 1024px) {
	.bmhm-card__tag {
		font-size: 0.8125rem;
	}
}

.bmhm-card__tag--bangla {
	background-color: #fcd34d;
	color: #78350f;
	font-weight: 700;
	border: 1px solid #f59e0b;
}

/* --- Accepting Status Badge (card) --- */
.bmhm-card__accepting {
	display: inline-block;
	padding: 0.15rem 0.5rem;
	font-size: 0.6875rem;
	font-weight: 600;
	border-radius: 100px;
	margin-bottom: 0.35rem;
}

.bmhm-card__accepting--accepting {
	background: #e8f5e9;
	color: #2e7d32;
}

.bmhm-card__accepting--accepting::before {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	background: #2e7d32;
	border-radius: 50%;
	margin-right: 0.3rem;
	vertical-align: middle;
	animation: bmhm-pulse 2s ease-in-out infinite;
}

.bmhm-card__accepting--waitlist {
	background: #fff8e1;
	color: #f57f17;
}

.bmhm-card__accepting--not_accepting {
	background: #fce4ec;
	color: #c62828;
}

.bmhm-card__tag--private-pay {
	background: #f3e5f5;
	color: #6a1b9a;
	font-weight: 600;
}

.bmhm-card__offerings {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0.35rem 0 0;
}

.bmhm-card__tag--offering {
	background: #e0f2f1;
	color: #017d7f;
	font-weight: 600;
}

.bmhm-card__detail {
	font-size: 0.8125rem;
	margin: 0.25rem 0;
	color: #555;
	line-height: 1.4;
}

.bmhm-card__label {
	font-weight: 600;
}

.bmhm-card__bio {
	font-size: 0.8125rem;
	margin: 0.25rem 0 0;
	color: #666;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	flex: 1;
}

@media (min-width: 1024px) {
	.bmhm-card__bio {
		font-size: 0.9375rem;
	}
}

.bmhm-card__cta {
	display: inline-block;
	margin-top: 0.5rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--bmhm-secondary, #017d7f);
}

@media (min-width: 1024px) {
	.bmhm-card__cta {
		font-size: 0.9375rem;
	}
}

/* --- Backward compat: header/body/footer from centered layout --- */
.bmhm-card__header,
.bmhm-card__body,
.bmhm-card__footer,
.bmhm-card__header-text {
	display: contents;
}

/* --- No Results --- */
.bmhm-no-results {
	text-align: center;
	padding: 2.5rem 1.25rem;
	background: #f8fbfa;
	border: 1px solid #dfe8ec;
	border-radius: 18px;
}

.bmhm-no-results__title {
	font-family: var(--bmhm-font-body, 'Cabin', sans-serif);
	font-size: 1.35rem;
	font-weight: 800;
	color: #172033;
	margin: 0 0 0.5rem;
	letter-spacing: -0.02em;
}

.bmhm-no-results p {
	color: #555;
	font-size: 1rem;
	line-height: 1.55;
	margin: 0 auto;
	max-width: 520px;
}

.bmhm-no-results__actions {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin-top: 1.25rem;
}

.bmhm-no-results__button {
	border: 1px solid var(--bmhm-secondary, #017d7f);
	border-radius: 999px;
	background: var(--bmhm-secondary, #017d7f);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 800;
	padding: 0.55rem 0.95rem;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.bmhm-no-results__button:hover {
	background: #016466;
	border-color: #016466;
}

.bmhm-no-results__button--secondary {
	background: #fff;
	color: var(--bmhm-secondary, #017d7f);
}

.bmhm-no-results__button--secondary:hover {
	background: rgba(1, 125, 127, 0.07);
	color: var(--bmhm-secondary, #017d7f);
}

/* --- Pagination --- */
.bmhm-pagination {
	display: flex;
	justify-content: center;
	gap: 0.25rem;
	margin-top: 2rem;
	flex-wrap: wrap;
}

.bmhm-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	padding: 0 0.5rem;
	border: 1px solid #ddd;
	border-radius: var(--bmhm-radius, 8px);
	font-size: 0.875rem;
	text-decoration: none;
	color: var(--bmhm-contrast, #000);
	background: var(--bmhm-base, #fff);
	transition: background-color 0.15s ease;
}

.bmhm-pagination .page-numbers:hover {
	background-color: var(--bmhm-tertiary, #F6F6F6);
}

.bmhm-pagination .page-numbers.current {
	background-color: var(--bmhm-secondary, #017d7f);
	color: var(--bmhm-base, #fff);
	border-color: var(--bmhm-secondary, #017d7f);
}

/* --- Loading Spinner --- */
.bmhm-directory__spinner {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 3rem;
}

.bmhm-loading { display: none; text-align: center; padding: 2rem; }
.bmhm-loading.is-active { display: block; }

.bmhm-spinner {
	width: 2rem;
	height: 2rem;
	border: 3px solid var(--bmhm-tertiary, #F6F6F6);
	border-top-color: var(--bmhm-secondary, #017d7f);
	border-radius: 50%;
	animation: bmhm-spin 0.6s linear infinite;
	margin: 0 auto;
}

@keyframes bmhm-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.bmhm-card,
	.bmhm-popular-pill,
	.bmhm-directory__sidebar {
		transition: none;
	}

	.bmhm-card:hover,
	.bmhm-popular-pill:hover {
		transform: none;
	}

	.bmhm-card__accepting--accepting::before,
	.bmhm-spinner {
		animation: none;
	}
}

/* --- Focus Visible --- */
.bmhm-card__link:focus-visible {
	outline: 2px solid var(--bmhm-secondary, #017d7f);
	outline-offset: 2px;
}

.bmhm-filters__clear:focus-visible,
.bmhm-filters__toggle:focus-visible,
.bmhm-directory__filter-toggle:focus-visible,
.bmhm-directory__sort-select:focus-visible,
.bmhm-no-results__button:focus-visible {
	outline: 2px solid var(--bmhm-secondary, #017d7f);
	outline-offset: 2px;
}

/* ================================================================
   POPULAR FILTER PILLS — labeled "Quick filters" row
   ================================================================ */
.bmhm-popular-filters {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	background: linear-gradient(135deg, rgba(236, 55, 72, 0.08), rgba(105, 193, 134, 0.16), rgba(1, 125, 127, 0.08));
	border: 1px solid #dfece7;
	border-radius: 18px;
	padding: 0.95rem 1.1rem;
	margin-bottom: 1.25rem;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.bmhm-popular-filters__title {
	margin: 0;
	font-family: var(--bmhm-font-body, 'Cabin', sans-serif);
	font-size: 1rem;
	font-weight: 800;
	color: #172033;
	letter-spacing: 0.01em;
}

.bmhm-popular-filters__hint {
	margin: 0;
	font-size: 0.8rem;
	line-height: 1.4;
	color: #5b6573;
}

.bmhm-popular-filters__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.bmhm-popular-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 0.9rem;
	border: 1px solid rgba(1, 125, 127, 0.16);
	border-radius: 100px;
	background: rgba(255, 255, 255, 0.92);
	color: #172033;
	font-family: var(--bmhm-font-body, 'Cabin', sans-serif);
	font-size: 0.8125rem;
	font-weight: 800;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
	white-space: nowrap;
}

.bmhm-popular-pill:hover {
	background-color: #fff;
	border-color: rgba(1, 125, 127, 0.32);
	box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
	transform: translateY(-1px);
}

.bmhm-popular-pill--active {
	background: linear-gradient(135deg, var(--bmhm-secondary, #017d7f), #39ad5f);
	border-color: transparent;
	color: var(--bmhm-base, #fff);
	box-shadow: 0 8px 18px rgba(1, 125, 127, 0.22);
}

.bmhm-popular-pill--active:hover {
	background: linear-gradient(135deg, #016466, #2f9c55);
	box-shadow: 0 10px 22px rgba(1, 125, 127, 0.26);
}

.bmhm-popular-pill:focus-visible {
	outline: 2px solid var(--bmhm-secondary, #017d7f);
	outline-offset: 2px;
}

/* ================================================================
   SERVICE LOCATION SEGMENTED TOGGLE
   ================================================================ */
.bmhm-seg-toggle {
	display: inline-flex;
	border: 1.5px solid #ddd;
	border-radius: var(--bmhm-radius, 8px);
	overflow: hidden;
	background: var(--bmhm-tertiary, #F6F6F6);
}

.bmhm-seg-toggle__btn {
	padding: 0.4rem 0.875rem;
	border: none;
	background: transparent;
	font-family: var(--bmhm-font-body, 'Cabin', sans-serif);
	font-size: 0.8125rem;
	font-weight: 600;
	color: #555;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

.bmhm-seg-toggle__btn + .bmhm-seg-toggle__btn {
	border-left: 1px solid #ddd;
}

.bmhm-seg-toggle__btn:hover {
	background-color: rgba(1, 125, 127, 0.06);
}

.bmhm-seg-toggle__btn--active {
	background-color: var(--bmhm-secondary, #017d7f);
	color: var(--bmhm-base, #fff);
}

.bmhm-seg-toggle__btn--active:hover {
	background-color: #016466;
}

.bmhm-seg-toggle__btn:focus-visible {
	outline: 2px solid var(--bmhm-secondary, #017d7f);
	outline-offset: -2px;
}

/* ================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================ */

/* Tablet (768px+): 2-column grid */
@media (min-width: 768px) {
	.bmhm-provider-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Desktop (1024px+): sidebar visible, dynamic grid */
@media (min-width: 1024px) {
	.bmhm-directory {
		padding: 1.5rem;
	}

	.bmhm-directory__layout {
		flex-direction: row;
		gap: 1.5rem;
	}

	.bmhm-directory__sidebar {
		flex: 0 0 260px;
		position: sticky;
		top: 2rem;
		align-self: flex-start;
		max-height: calc(100vh - 4rem);
		overflow-y: auto;
	}

	.bmhm-directory__grid-wrapper {
		flex: 1;
		min-width: 0;
	}

	/* With sidebar, use dynamic grid that auto-fits columns */
	.bmhm-provider-grid {
		grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	}

	.bmhm-filters__actions--mobile {
		display: none;
	}
}

/* ==========================================================================
   Provider CTA Banner — "Are you a provider?" at bottom of directory
   ========================================================================== */

.bmhm-directory__provider-cta {
	background: var(--bmhm-secondary, #017d7f);
	border-radius: var(--bmhm-radius, 8px);
	padding: 1.5rem 2rem;
	margin-top: 2rem;
}

.bmhm-directory__provider-cta-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	max-width: 1400px;
	margin: 0 auto;
}

.bmhm-directory__provider-cta-text {
	color: var(--bmhm-base, #fff);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.bmhm-directory__provider-cta-text strong {
	display: block;
	font-size: 1.0625rem;
	margin-bottom: 0.125rem;
}

.bmhm-directory__provider-cta-actions {
	display: flex;
	gap: 0.75rem;
	flex-shrink: 0;
}

.bmhm-directory__provider-cta-btn {
	display: inline-block;
	padding: 0.625rem 1.25rem;
	border-radius: 6px;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s;
}

.bmhm-directory__provider-cta-btn--primary {
	background: var(--bmhm-base, #fff);
	color: var(--bmhm-secondary, #017d7f);
}

.bmhm-directory__provider-cta-btn--primary:hover {
	background: #e8f5f5;
}

.bmhm-directory__provider-cta-btn--secondary {
	background: rgba(255, 255, 255, 0.15);
	color: var(--bmhm-base, #fff);
	border: 1px solid rgba(255, 255, 255, 0.4);
}

.bmhm-directory__provider-cta-btn--secondary:hover {
	background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 600px) {
	.bmhm-directory__provider-cta-inner {
		flex-direction: column;
		text-align: center;
	}

	.bmhm-directory__provider-cta-actions {
		flex-direction: column;
		width: 100%;
	}

	.bmhm-directory__provider-cta-btn {
		text-align: center;
	}
}

/* --- Info Bubble Primitive ---
 * Used wherever a term (credential, treatment approach, specialty, modality)
 * benefits from a short description on hover/focus/tap.
 *
 * Two usage patterns:
 *  1. Bare trigger: wrap the labeled element itself (e.g. a credential badge)
 *     in .bmhm-info-bubble. The whole element is the trigger; tooltip appears
 *     above it.
 *  2. With (?) icon: pair a label with a sibling .bmhm-info-bubble that
 *     contains only the icon; tooltip appears next to the icon.
 *
 * Accessibility:
 *  - Wrapped in a <button> for keyboard focus support.
 *  - aria-describedby + role="tooltip" wire up screen readers.
 *  - Tab-able; appears on focus as well as hover.
 *  - On touch devices, tap toggles via JS (see assets/js/info-bubble.js).
 */
.bmhm-info-bubble {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.bmhm-info-bubble__trigger {
	border: 0;
	background: transparent;
	padding: 0;
	margin: 0;
	font: inherit;
	color: inherit;
	cursor: help;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.bmhm-info-bubble__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	border-radius: 100px;
	background: rgba(1, 125, 127, 0.15);
	color: var(--bmhm-secondary, #017d7f);
	border: 1px solid rgba(1, 125, 127, 0.3);
	flex-shrink: 0;
	cursor: help;
	margin-left: 0.3rem;
	transition: background-color 0.15s ease;
}

.bmhm-info-bubble__trigger:hover .bmhm-info-bubble__icon,
.bmhm-info-bubble__trigger:focus-visible .bmhm-info-bubble__icon,
.bmhm-info-bubble:hover .bmhm-info-bubble__icon {
	background: var(--bmhm-secondary, #017d7f);
	color: #fff;
}

/* Tooltip content is position:fixed so it escapes ancestor overflow:hidden/auto.
 * (The sidebar uses overflow-y:auto for independent scrolling — without
 * position:fixed, tooltips were getting clipped at the sidebar's right edge.)
 * JS sets top/left coordinates each time the tooltip is shown, computing from
 * the trigger's getBoundingClientRect(). See assets/js/info-bubble.js.
 *
 * The CSS retains opacity/visibility transitions so the hover/focus state
 * works without JS for the show/hide behavior. JS only handles positioning. */
.bmhm-info-bubble__content {
	position: fixed;
	top: 0;
	left: 0;
	width: max-content;
	max-width: 280px;
	padding: 0.55rem 0.75rem;
	background: #1f2937;
	color: #fff;
	font-size: 0.8125rem;
	line-height: 1.35;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	border-radius: 6px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.15s ease, visibility 0.15s ease;
	z-index: 10000;
	white-space: normal;
	text-align: left;
}

/* Triangle pointer. Default points downward (tooltip above the trigger).
 * JS adds .bmhm-info-bubble__content--below when there's no room above. */
.bmhm-info-bubble__content::after {
	content: "";
	position: absolute;
	top: 100%;
	left: var(--bmhm-bubble-arrow-x, 50%);
	transform: translateX(-50%);
	border: 5px solid transparent;
	border-top-color: #1f2937;
}

.bmhm-info-bubble__content--below::after {
	top: auto;
	bottom: 100%;
	border-top-color: transparent;
	border-bottom-color: #1f2937;
}

/* Visibility is driven entirely by JS (info-bubble.js) via the --open class.
 * CSS :hover/:focus-within can't be used because the tooltip is position:fixed
 * and needs JS to compute coordinates before becoming visible — otherwise it
 * flashes at viewport (0,0) before JS catches up.
 *
 * The tooltip content is portaled to document.body on first open (to escape
 * any ancestor stacking context — sticky sidebar, transformed cards). Because
 * the content is no longer a descendant of the bubble, we apply --open to the
 * content element directly rather than relying on a parent selector. */
.bmhm-info-bubble--open .bmhm-info-bubble__content,
.bmhm-info-bubble__content--open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* When the trigger is a credential badge, no extra (?) icon needed —
 * hover the badge itself shows the tooltip. */
.bmhm-credential-badge.bmhm-info-bubble__trigger {
	cursor: help;
}

/* Phones: bubbles can be wider, but clamp to viewport. */
@media (max-width: 600px) {
	.bmhm-info-bubble__content {
		max-width: 75vw;
	}
}
