/* =====================================================================
   [ab_resources]: Resources & Useful Links
   ===================================================================== */

/* Search box */
.ab-res-search { margin-top: clamp(28px, 4vw, 40px); }
.ab-res-search[hidden] { display: none; }
.ab-res-search label {
	display: block;
	margin-bottom: 8px;
	font-weight: 700;
	font-size: 17px;
}
.ab-res-search input[type="search"] {
	width: 100%;
	min-height: 56px;
	padding: 14px 18px 14px 50px;
	border: 1.5px solid var(--ab-field-border, #C9D2C6);
	border-radius: 14px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A5856' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 16px center / 20px no-repeat;
	font: inherit;
	font-size: 17px;
	color: var(--ab-ink, #1F2A28);
}
.ab-res-search input[type="search"]:focus { outline: none; border-color: var(--ab-orange-dark, #C25700); box-shadow: var(--ab-focus-ring, 0 0 0 2px #C25700, 0 0 0 6px rgba(255,115,0,.2)); }
.ab-res-search__status { margin: 8px 0 0; min-height: 1.4em; font-size: 15px; color: var(--ab-muted, #4A5856); }

/* Category heading count */
.ab-res-group[hidden] { display: none; }
.ab-res-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 28px;
	margin-left: 8px;
	padding: 0 10px;
	vertical-align: middle;
	border-radius: 999px;
	background: var(--ab-sage, #E7EDE0);
	color: var(--ab-teal, #274B47);
	font-family: var(--ab-font-body, sans-serif);
	font-size: 15px;
	font-weight: 700;
}

/* The list: one white card with rows */
.ab-res-list {
	list-style: none;
	margin: 0;
	padding: 4px 0;
	background: #fff;
	border: 1px solid var(--ab-sage-border, #D3DBCB);
	border-radius: var(--ab-radius-lg, 24px);
	box-shadow: var(--ab-shadow-soft, 0 8px 24px rgba(39,75,71,.05));
	overflow: hidden;
}
.ab-res { margin: 0; border-top: 1px solid #EEF1EA; }
.ab-res:first-child { border-top: 0; }
.ab-res[hidden] { display: none; }

.ab-res summary {
	position: relative;
	display: block;
	padding: 16px 56px 16px 22px;
	cursor: pointer;
	list-style: none;
	transition: background-color .2s ease;
}
.ab-res summary::-webkit-details-marker { display: none; }
.ab-res summary:hover { background: var(--ab-orange-wash, #FFF6EE); }
.ab-res summary:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--ab-orange-dark, #C25700); }
/* + / − in a circle on the right */
.ab-res summary::after {
	content: "+";
	position: absolute;
	right: 18px;
	top: 16px;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1.5px solid #EBCDB2;
	border-radius: 50%;
	color: var(--ab-orange-dark, #C25700);
	font-size: 18px;
	line-height: 1;
}
.ab-res details[open] summary::after { content: "−"; }
.ab-res details[open] summary { background: var(--ab-orange-wash, #FFF6EE); }

.ab-res__name {
	display: block;
	font-family: var(--ab-font-heading, Poppins, sans-serif);
	font-weight: 600;
	font-size: 17px;
	line-height: 1.35;
	color: var(--ab-ink, #1F2A28);
}
.ab-res__preview {
	display: block;
	margin-top: 3px;
	font-size: 16px;
	line-height: 1.5;
	color: var(--ab-muted, #4A5856);
}
.ab-res details[open] .ab-res__preview { display: none; }  /* the full text replaces it */

.ab-res__body {
	padding: 0 22px 18px;
	background: var(--ab-orange-wash, #FFF6EE);
}
.ab-res__info { font-size: 16px; line-height: 1.6; color: var(--ab-ink, #1F2A28); }
.ab-res__info p { margin: 0 0 .7em; }
.ab-res__info > :last-child { margin-bottom: 0; }
.ab-res__info a { overflow-wrap: anywhere; }   /* long web addresses wrap instead of overflowing */
.ab-res__info a { color: var(--ab-teal, #274B47); }
.ab-res__links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.ab-res__links .ab-pill { background: #fff; }

.ab-res-none { margin-top: 24px; font-size: 17px; }
.ab-res-none[hidden] { display: none; }

.ab-res .ab-visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Space between one category's list and the next category's heading */
.page-content > .ab-res-group { margin-top: clamp(48px, 6vw, 72px); }
.ab-res-group > .ab-h2 { margin: 0 0 18px; }
.page-content > .ab-res-search + .ab-res-group { margin-top: clamp(32px, 4vw, 44px); }
.page-content > .ab-res-none + p,
.page-content > .ab-res-group:last-of-type + .ab-res-none + p { margin-top: 40px; }

/* Each resource is its own card, with a small gap between them */
.ab-res-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
}
.ab-res {
	border: 1px solid var(--ab-sage-border, #D3DBCB);
	border-top: 1px solid var(--ab-sage-border, #D3DBCB);
	border-radius: var(--ab-radius-md, 18px);
	background: #fff;
	box-shadow: var(--ab-shadow-soft, 0 8px 24px rgba(39,75,71,.05));
	overflow: hidden;      /* keeps the hover colour inside the rounded corners */
}
.ab-res:first-child { border-top: 1px solid var(--ab-sage-border, #D3DBCB); }


/* ---- Search box inside the "On this page" strip ---- */
.ab-jumpbar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px 24px;
	max-width: calc(var(--ab-container, 1240px) - 80px);
	margin: 0 auto;
}
body.ab .ab-jumpbar__inner .ab-jumps { max-width: none; margin: 0; flex: 0 1 auto; }
.ab-jumpbar .ab-res-search { margin: 0; flex: 0 1 260px; }
.ab-jumpbar .ab-res-search input[type="search"] {
	min-height: 40px;
	padding: 8px 14px 8px 40px;
	border-radius: 999px;
	background-position: 13px center;
	background-size: 17px;
	font-size: 15px;
}
.ab-res-search .ab-visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
@media (max-width: 767px) {   /* phones: search on its own full-width line */
	.ab-jumpbar .ab-res-search { flex: 1 1 100%; }
}

/* Squarer resource cards, close together */
.ab-res { border-radius: 6px; }
.ab-res-list { gap: 7px; }

.page-content > .ab-jumpbar + .ab-res-group { margin-top: clamp(32px, 4vw, 44px); }
