/* ==========================================================================
   CS Resource Library (templates/cs-resource-library.php)
   Standalone stylesheet; only enqueued on this template.
   The hero (.section-heading), cards (.resource), buttons (.btn, .btn-tertiary)
   and section background (.with-bg) come from the theme bundle. This file
   covers the section headings, filter sidebar, pagination and layout, using
   the same values as the theme's resources page.
   ========================================================================== */

/* Section heading ("All Resources", "Upcoming Events")
   ========================================================================== */

.cs-library__head {
	padding-bottom: 7px;
	margin-bottom: 40px;
	border-bottom: 1px solid #000;
}

.cs-library__head h2 {
	margin: 0;
}

/* Announcement bar (fragments/cs-resources/alert.php)
   ========================================================================== */

/* The section above has 96px top padding (60px on tablet/phone); pull the bar up so
   the space above and below it match. */
.cs-alert {
	display: flex;
	align-items: center;
	gap: 20px;
	margin: -56px 0 40px;
	padding: 22px 30px;
	border-left: 6px solid #45d6e5;
	background-color: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.cs-alert__icon {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	padding: 9px;
	border-radius: 50%;
	background-color: #00548b;
	color: #fff;
	box-sizing: border-box;
}

.cs-alert__body {
	flex: 1 1 auto;
	min-width: 0;
}

.cs-alert__label {
	display: inline-block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #00548b;
}

.cs-alert__text {
	font-size: 18px;
	line-height: 1.5;
	color: #000;
}

.cs-alert__text > * {
	margin: 0;
}

.cs-alert__text > * + * {
	margin-top: 8px;
}

.cs-alert__text a {
	color: #00548b;
}

.cs-alert__link {
	flex: 0 0 auto;
	white-space: nowrap;
}

/* Layout
   ========================================================================== */

.cs-library__inner {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

/* Two columns beside the sidebar; the theme's 3-up cards are too narrow here. */
.cs-library__content .resource {
	width: 50%;
}

/* .resources has -10px gutters; keep cards aligned with the sidebar top. */
.cs-library__content .resources {
	margin-top: -10px;
	padding-bottom: 40px;
}

.cs-library__no-results {
	padding: 38px 30px;
	background-color: #fff;
}

.cs-library__no-results p {
	margin: 0;
}

/* Resource meta: type, date (and categories on the single page) above the title,
   topics as tags below it
   ========================================================================== */

.cs-resource__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	margin: 0 0 12px;
	padding: 0;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #00548b;
}

.cs-resource__type {
	padding: 4px 10px;
	background-color: #45d6e5;
	color: #000;
}

.cs-resource__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.cs-resource__cats li {
	margin: 0;
	padding: 3px 10px;
	background-color: rgba(105, 97, 89, 0.1);
	font-size: 12px;
	line-height: 1.5;
	color: #000;
}

.cs-resource__cats li:before {
	display: none;
}

/* Filters
   ========================================================================== */

.cs-filter {
	padding: 30px;
	background-color: #fff;
}

.cs-filter__keyword {
	display: block;
	width: 100%;
	height: 50px;
	padding: 0 16px;
	border: 1px solid #cacaca;
	border-radius: 0;
	background: #fff;
	font-family: 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 16px;
	color: #000;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}

.cs-filter__keyword:focus {
	border-color: #45d6e5;
	outline: none;
}

.cs-filter__group {
	margin: 24px 0 0;
	padding: 0 0 20px;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.2);
	min-width: 0;
}

.cs-filter__group:not(.is-open) {
	padding-bottom: 4px;
}

.cs-filter__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0 0 16px;
	border: 0;
	background: none;
	font-family: 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	color: #000;
	text-align: left;
	cursor: pointer;
}

.cs-filter__toggle:after {
	content: '';
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	margin: 0 4px 4px 12px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.4s;
}

.cs-filter__group:not(.is-open) .cs-filter__toggle:after {
	margin-bottom: 0;
	transform: rotate(-45deg);
}

.cs-filter__group:not(.is-open) .cs-filter__body {
	display: none;
}

.cs-filter__options {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cs-filter__options li {
	margin: 0;
	padding: 0 0 10px;
}

.cs-filter__options li:before {
	display: none;
}

.cs-filter__options label {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-size: 16px;
	line-height: 1.4;
	cursor: pointer;
}

/* Matches the theme's .checkbox (grey border, 5px radius, blue tick), scaled for the sidebar. */
.cs-filter__options input[type='checkbox'] {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin: 0;
	border: 1px solid #cacaca;
	border-radius: 5px;
	background: #fff;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.cs-filter__options input[type='checkbox']:checked {
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 17'%3E%3Cpath d='M2 8.375L7.74468 14L20 2' fill='none' stroke='%2300548B' stroke-width='4'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.cs-filter__options input[type='checkbox']:focus-visible {
	outline: 2px solid #45d6e5;
	outline-offset: 2px;
}

.cs-filter__bulk {
	display: flex;
	justify-content: space-between;
	margin-top: 4px;
}

.cs-filter__bulk button {
	padding: 0;
	border: 0;
	background: none;
	font-family: 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 14px;
	font-weight: 700;
	color: #00548b;
	cursor: pointer;
	transition: color 0.4s;
}

.cs-filter__bulk button:hover {
	color: #000;
}

.cs-filter__submit {
	width: 100%;
	margin-top: 30px;
	cursor: pointer;
}

/* Pagination (same look as the theme's .paging)
   ========================================================================== */

.cs-paging {
	display: flex;
	justify-content: center;
	align-items: flex-end;
	flex-wrap: wrap;
	max-width: 640px;
	margin: 0 auto;
	padding-top: 27px;
	border-top: 1px solid rgba(0, 0, 0, 0.7);
}

.cs-paging .page-numbers {
	display: block;
	margin: 0 3px;
	padding: 1px 4px;
	border-bottom: 2px solid transparent;
	font-size: 18px;
	line-height: 1.4;
	color: rgba(0, 0, 0, 0.7);
	text-decoration: none;
	transition: all 0.4s;
}

.cs-paging a.page-numbers:hover {
	color: #00548b;
}

.cs-paging .page-numbers.current {
	font-weight: 700;
	color: #00548b;
	border-color: #00548b;
}

.cs-paging .prev,
.cs-paging .next {
	padding: 5px;
	border: 0;
}

.cs-paging .prev {
	margin-right: 10px;
}

.cs-paging .next {
	margin-left: 10px;
}

/* Bottom text + Upcoming Events
   ========================================================================== */

/* The listing section above already supplies the top spacing. */
.cs-library + .cs-events {
	padding-top: 0;
}

.cs-events__text {
	max-width: 900px;
	margin-bottom: 60px;
}

.cs-events__items {
	padding-bottom: 0;
}

.cs-event__label {
	align-self: flex-start;
	margin-bottom: 16px;
	padding: 6px 12px;
	background-color: #45d6e5;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #000;
}

.cs-events__actions {
	display: flex;
	justify-content: flex-end;
	padding-top: 36px;
}

/* Single resource (single-app_cs_resource.php)
   ========================================================================== */

.cs-resource-heading .cs-resource__meta {
	margin-bottom: 20px;
}

.cs-resource-heading .cs-resource__meta span:not(.cs-resource__type):before {
	content: '/';
	margin-right: 14px;
}

.cs-resource__author {
	margin: 20px 0 0;
	font-size: 18px;
	font-weight: 700;
}

.cs-resource-single {
	padding: 60px 0 80px;
}

.cs-resource-single__entry > :first-child {
	margin-top: 0;
}

.cs-resource-single__entry img {
	max-width: 100%;
	height: auto;
}

.cs-resource-single__entry blockquote {
	margin: 30px 0;
	font-size: 20px;
	line-height: 1.5;
}

.cs-resource-single__entry blockquote cite {
	display: block;
	margin-top: 10px;
	font-size: 16px;
	font-style: normal;
	font-weight: 700;
}

.cs-resource-single__actions {
	margin: 40px 0;
}

.cs-resource-single__terms {
	margin-top: 30px;
}

.cs-resource-single__terms h5 {
	margin: 0 0 12px;
}

.cs-resource-single__back {
	margin: 50px 0 0;
}

.cs-related .cs-library__head {
	margin-top: 0;
}

/* Responsive
   ========================================================================== */

@media (max-width: 1023px) {
	.cs-alert {
		margin: -30px 0 30px;
	}

	.cs-library__inner {
		grid-template-columns: 1fr;
	}

	.cs-library__content .resources {
		margin-top: 0;
	}

	.cs-library__content .resource {
		width: 100%;
	}
}

@media (max-width: 767px) {
	.cs-alert {
		flex-wrap: wrap;
		align-items: flex-start;
		gap: 14px 16px;
		padding: 20px;
	}

	.cs-alert__body {
		flex-basis: calc(100% - 56px);
	}

	.cs-alert__text {
		font-size: 16px;
	}

	.cs-alert__link {
		margin-left: 56px;
	}

	.cs-filter {
		padding: 24px 20px;
	}

	.cs-library__head {
		margin-bottom: 26px;
	}
}
