/**
 * eHealthDC Resource Library
 *
 * Structure only. Every brand value lives in the token block below — override
 * those in the theme (or Elementor's custom CSS) rather than editing selectors.
 * Type is deliberately inherited from the theme; nothing here sets a font-family.
 */

.ehdc-resources {
	/* Color */
	--ehdc-ink: #1c1c22;
	--ehdc-ink-muted: #545460;
	--ehdc-accent: #003a70;
	--ehdc-accent-ink: #ffffff;
	--ehdc-line: #0121a630;
	--ehdc-line-strong: #9aa0ab;
	--ehdc-surface: #ffffff;
	--ehdc-surface-sunk: #f4f6f9;
	--ehdc-focus: #0f6cbd;
	--ehdc-primary: #0121A6;
	--ehds-font-header: "Barlow Semi Condensed", Sans-serif;
	/* Geometry */
	--ehdc-radius: 6px;
	--ehdc-gap: 1.5rem;
	--ehdc-card-min: 17rem;

	/* Type scale */
	--ehdc-fs-eyebrow: 0.65rem;
	--ehdc-fs-small: 0.875rem;
	--ehdc-fs-title: 1.0625rem;

	color: var(--ehdc-ink);
}

.ehdc-resources *,
.ehdc-resources *::before,
.ehdc-resources *::after {
	box-sizing: border-box;
}

.ehdc-resources .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.ehdc-resources :focus-visible {
	outline: 2px solid var(--ehdc-focus);
	outline-offset: 2px;
}

/* -------------------------------------------------------------- controls */

.ehdc-controls {
	display: grid;
	grid-template-columns: 1fr;
	align-items: end;
	margin-bottom: 1rem;
}

@media (min-width: 48rem) {
	.ehdc-controls {
		grid-template-columns: 1.4fr repeat(3, 1fr) auto;
	}
}

.ehdc-label {
	display: block;
	margin-bottom: 0.375rem;
	font-size: var(--ehdc-fs-eyebrow);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ehdc-ink-muted);
}

.ehdc-search {
	position: relative;
}

.ehdc-search input {
	width: 100%;
	padding: 0.6875rem 2.5rem 0.6875rem 0.75rem;
	font: inherit;
	color: inherit;
	background: var(--ehdc-surface);
	border: 1px solid var(--ehdc-line);
	border-radius: var(--ehdc-radius);
	appearance: none;
	min-height: 48px;
}

.ehdc-search input::-webkit-search-cancel-button {
	cursor: pointer;
}

.ehdc-search__icon {
	position: absolute;
	top: 50%;
	right: 0.75rem;
	width: 1.125rem;
	height: 1.125rem;
	transform: translateY(-50%);
	pointer-events: none;
	color: var(--ehdc-ink-muted);
}

.ehdc-search__icon svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}
.ehdc-controls__sort.ehdc-resources__sort {
	width: 184px;
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
}

.ehdc-controls__sort.ehdc-resources__sort label.ehdc-label {
	width: 100px;
	margin: 0;
}

.ehdc-controls__sort select {
	width: 100%;
	padding: 0.6875rem 0.75rem;
	font: inherit;
	color: inherit;
	background: var(--ehdc-surface);
	border: 1px solid var(--ehdc-line);
	border-radius: var(--ehdc-radius);
	font-size:14px;
}

/* ----------------------------------------------------------------- facets */

.ehdc-facet {
	position: relative;
}

@media (min-width:768px) {
	.ehdc-facet {
		padding-left: 1rem;
	}
}

@media (max-width:767px) {
	.ehdc-facet {
		margin-top: 10px;
	}
	.ehdc-card__title {
	font-size: 16px;
	line-height: 20px;
}
}

.ehdc-facet__toggle {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	width: 100%;
	padding: 0.6875rem 0.75rem;
	font: inherit;
	line-height: 1.3;
	text-align: left;
	color: inherit;
	cursor: pointer;
	background: var(--ehdc-surface);
	border: 1px solid var(--ehdc-line);
	border-radius: var(--ehdc-radius);
	min-height: 48px;
}
button.ehdc-facet__toggle:hover, button.ehdc-facet__toggle:focus {
	background: var(--ehdc-surface-sunk) !important;
	color: #1c1c22;
}
.ehdc-facet.has-selection .ehdc-facet__toggle {
	border-color: var(--ehdc-accent);
}

.ehdc-facet__value {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ehdc-facet__badge {
	flex: 0 0 auto;
	min-width: 1.375rem;
	padding: 0.0625rem 0.375rem;
	font-size: var(--ehdc-fs-eyebrow);
	font-weight: 700;
	text-align: center;
	color: var(--ehdc-accent-ink);
	background: var(--ehdc-accent);
	border-radius: 999px;
}

.ehdc-facet__caret {
	flex: 0 0 auto;
	width: 0.75rem;
	height: 0.5rem;
	transition: transform 0.15s ease;
}

.ehdc-facet__caret svg {
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
	margin-top: 1px;
	display: block;
}

.ehdc-facet__toggle[aria-expanded="true"] .ehdc-facet__caret {
	transform: rotate(180deg);
}

.ehdc-facet__panel {
	position: absolute;
	z-index: 20;
	top: calc(100% + 0.25rem);
	left: 0;
	width: max(100%, 16rem);
	max-height: 18rem;
	overflow-y: auto;
	padding: 0.375rem;
	background: var(--ehdc-surface);
	border: 1px solid var(--ehdc-line-strong);
	border-radius: var(--ehdc-radius);
	box-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
}

.ehdc-facet__panel[hidden] {
	display: none;
}

.ehdc-facet__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ehdc-check {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	padding: 0.4375rem 0.5rem;
	font-size: var(--ehdc-fs-small);
	line-height: 1.35;
	cursor: pointer;
	border-radius: 4px;
}

.ehdc-check:hover {
	background: var(--ehdc-surface-sunk);
}

.ehdc-check input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.ehdc-check__box {
	position: relative;
	flex: 0 0 auto;
	width: 1rem;
	height: 1rem;
	background: var(--ehdc-surface);
	border: 1px solid var(--ehdc-line-strong);
	border-radius: 3px;
}

.ehdc-check input:checked + .ehdc-check__box {
	background: var(--ehdc-accent);
	border-color: var(--ehdc-accent);
}

.ehdc-check input:checked + .ehdc-check__box::after {
	content: "";
	position: absolute;
	top: 1px;
	left: 4px;
	width: 4px;
	height: 8px;
	border: solid var(--ehdc-accent-ink);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.ehdc-check input:focus-visible + .ehdc-check__box {
	outline: 2px solid var(--ehdc-focus);
	outline-offset: 2px;
}

.ehdc-check__text {
	flex: 1 1 auto;
}

.ehdc-check__count {
	flex: 0 0 auto;
	font-size: var(--ehdc-fs-eyebrow);
	color: var(--ehdc-ink-muted);
	font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ chips */

.ehdc-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin-bottom: 1rem;
}

.ehdc-chips__label {
	font-size: var(--ehdc-fs-small);
	color: var(--ehdc-ink-muted);
}

.ehdc-chip {
	display: inline-flex;
	gap: 0.4375rem;
	align-items: center;
	padding: 0.3125rem 0.625rem;
	font: inherit;
	font-size: var(--ehdc-fs-small);
	line-height: 1.2;
	color: inherit;
	cursor: pointer;
	background: var(--ehdc-surface-sunk);
	border: 1px solid var(--ehdc-line);
	border-radius: 999px;
}

.ehdc-chip:hover {
	border-color: var(--ehdc-line-strong);
}

.ehdc-chip__x {
	font-size: 1.125em;
	line-height: 1;
	color: var(--ehdc-ink-muted);
}

.ehdc-chips__clear {
	padding: 0.3125rem 0;
	font: inherit;
	font-size: var(--ehdc-fs-small);
	color: var(--ehdc-accent);
	text-decoration: underline;
	cursor: pointer;
	background: none;
	border: 0;
}
button.ehdc-chips__clear:hover {
	background: none !important;
	color: #a3a925;
	text-decoration: underline;
}
/* ------------------------------------------------------------------- meta */

.ehdc-resources__meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
	padding-bottom: 0.75rem;
	margin-top: 30px;
}

.ehdc-resources__count {
	margin: 0;
	font-size: var(--ehdc-fs-small);
	color: var(--ehdc-ink-muted);
}

/* --------------------------------------------------------------- results */

.ehdc-resources__results {
	position: relative;
	min-height: 8rem;
}

.ehdc-resources__results:focus {
	outline: none;
}

.ehdc-resources.is-loading .ehdc-resources__results {
	opacity: 0.45;
	transition: opacity 0.15s ease;
	pointer-events: none;
}

.ehdc-grid {
	display: grid;
	gap: var(--ehdc-gap);
	grid-template-columns: repeat(auto-fill, minmax(var(--ehdc-card-min), 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.ehdc-card {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	padding: 1.25rem;
	background: var(--ehdc-surface);
	border: 1px solid var(--ehdc-line);
	border-radius: var(--ehdc-radius);
	min-height: 230px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.ehdc-card__eyebrow {
align-self: flex-start;
margin: 0;
padding: 0.25rem 0.5rem;
font-size: var(--ehdc-fs-eyebrow);
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--ehdc-primary);
background: #d6f3fa;
border-radius: 999px;
margin-bottom: 20px;
}

.ehdc-card__title {
	margin: 0;
	line-height: 1.35;
	text-wrap: balance;
	font-family: var(--ehds-font-header);
	font-size: 22px;
	font-weight: 700;
	text-decoration: none;
	line-height: 26px;
	color: var(--ehdc-primary);
	padding-bottom: 10px;
}
.ehdc-card__title a {
	color: var(--e-global-color-ec728d3);
	text-decoration: none;
	font-family: var(--ehds-font-header);
}

.ehdc-card__title a:hover,
.ehdc-card__title a:focus-visible {
	text-decoration: underline;
}

.ehdc-card__date {
	margin: -0.25rem 0 0;
	font-size: var(--ehdc-fs-eyebrow);
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ehdc-ink-muted);
}

.ehdc-card__excerpt {
	margin: 0;
	font-size: var(--ehdc-fs-small);
	line-height: 1.5;
	color: var(--ehdc-ink-muted);
}

.ehdc-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: auto 0 0;
	padding: 0.875rem 0 0;
	list-style: none;
	border-top: 1px solid var(--ehdc-line);
}

.ehdc-card__action {
	font-size: var(--ehdc-fs-small);
font-weight: 600;
color: var(--ehdc-accent);
text-decoration: none;
color: var(--e-global-color-ec728d3) !important;
text-decoration: none !important;
font-family: var(--ehds-font-header);
text-transform: uppercase;
}
a.ehdc-card__action:hover {
	color: var(--ehdc-primary) !important;
}

.ehdc-card__action:hover,
.ehdc-card__action:focus-visible {
	text-decoration: underline;
}

/* ------------------------------------------------------------------ empty */

.ehdc-empty {
	padding: 3rem 1.5rem;
	text-align: center;
	background: var(--ehdc-surface-sunk);
	border-radius: var(--ehdc-radius);
}

.ehdc-empty__title {
	margin: 0 0 0.375rem;
	font-weight: 700;
}

.ehdc-empty__body {
	margin: 0 0 1rem;
	color: var(--ehdc-ink-muted);
}

.ehdc-btn {
	display: inline-block;
	padding: 0.625rem 1.25rem;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	border-radius: var(--ehdc-radius);
}

.ehdc-btn--primary {
	color: var(--ehdc-accent-ink);
	background: var(--ehdc-accent);
	border: 1px solid var(--ehdc-accent);
}

/* ------------------------------------------------------------- pagination */

.ehdc-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	justify-content: center;
	align-items: center;
	margin-top: 2rem;
}

.ehdc-page {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	font-size: var(--ehdc-fs-small);
	color: var(--ehdc-primary) !important;
	text-decoration: none;
	background: var(--ehdc-surface);
	border: 1px solid var(--ehdc-line);
	border-radius: var(--ehdc-radius);
}

a.ehdc-page:hover {
	border-color: var(--ehdc-line-strong);
}

.ehdc-page.is-current {
	font-weight: 700;
	color: var(--ehdc-accent-ink) !important;
	background: var(--ehdc-primary);
	border-color: var(--ehdc-primary);
}

.ehdc-page--gap {
	min-width: auto;
	padding: 0 0.25rem;
	background: none;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.ehdc-resources *,
	.ehdc-resources *::before,
	.ehdc-resources *::after {
		transition-duration: 0.01ms !important;
	}
}
