/* Content Library — page-specific styles, enqueued only on
   page-templates/content-library.php (see
   ca_content_library_enqueue_assets() in functions.php). Ported from the
   Claude Design project's "Content Library.dc.html" — that file's own
   <header>/<footer>/font-loading markup is intentionally not reproduced,
   this template uses the theme's shared get_header()/get_footer() +
   main.css instead (same convention as events.css). Relies on the
   --ca-* tokens already declared in main.css. */

.ca-cl * {
	box-sizing: border-box;
}

.ca-cl a {
	text-decoration: none;
}

.ca-cl-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	font-size: 15px;
	padding: 14px 24px;
	border-radius: 12px;
}

.ca-cl-btn--coral {
	background: var(--ca-pink-600);
	color: #fff;
}

.ca-cl-btn--ghost {
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .18);
	color: #fff;
}

/* ---- Hero ---- */

.ca-cl-hero {
	background: var(--ca-ink-800);
	padding: 74px 24px 66px;
}

.ca-cl-hero__inner {
	max-width: 1200px;
	margin-inline: auto;
}

.ca-cl-eyebrow {
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--ca-teams-purple-light);
}

.ca-cl-hero__title {
	margin: 0;
	max-width: 780px;
	font-size: 52px !important;
	font-weight: 700 !important;
	letter-spacing: -.03em;
	line-height: 1.05 !important;
	color: #fff;
}

.ca-cl-hero__accent {
	/* main.css's global `h1, h1 span { font-size: clamp(...) !important }`
	   rule (meant for other pages) would otherwise force this span larger
	   than its own heading — pin it back to the parent's size explicitly. */
	font-size: inherit !important;
	color: var(--ca-teams-purple-light);
}

.ca-cl-hero__subtitle {
	margin: 18px 0 0;
	max-width: 600px;
	font-size: 18px !important;
	font-weight: 500 !important;
	line-height: 1.55 !important;
	color: #b9b8cc;
}

.ca-cl-hero__ctas {
	margin-top: 36px;
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
}

/* ---- "Coming soon" redirect notice ---- */

.ca-cl-notice {
	max-width: 1200px;
	margin: 20px auto 0;
	padding: 12px 20px;
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--ca-lilac-100);
	color: var(--ca-violet-700);
	border: 1.5px solid var(--ca-lilac-200);
	border-radius: 12px;
	font-size: 14px;
	font-weight: 600;
}

/* ---- Tabs bar ---- */

.ca-cl-tabsbar {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(255, 255, 255, .94);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--ca-gray-200);
}

.ca-cl-tabsbar__inner {
	max-width: 1200px;
	margin-inline: auto;
	padding: 16px 0px 0;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.ca-cl-tab {
	/* Native button chrome (WebKit/Safari especially) keeps its own rounded
	   appearance and can silently ignore an author border-radius until
	   -webkit-appearance/appearance is reset first — that's what was
	   curling the active underline's ends despite border-radius:0 below. */
	-webkit-appearance: none;
	appearance: none;
	background: none;
	border: none;
	font-family: inherit;
	font-size: 15px !important;
	font-weight: 700 !important;
	color: var(--ca-gray-500);
	padding: 12px 16px 14px;
	cursor: pointer;
	border-bottom: 2.5px solid transparent;
	transition: color 160ms;
}

/* Salient's global "Button Style: Slightly Rounded" setting applies
   border-*-radius via a long chain of body[data-button-style*="..."]
   selectors, each carrying !important — that beats a plain single-class
   selector on specificity alone even with matching !important. Repeating
   the class is a standard, safe way to out-specificity that chain
   without resorting to an ID or inline style. Every corner is set
   explicitly (not just the shorthand) since Salient sets each corner as
   its own longhand property. */
.ca-cl-tab.ca-cl-tab {
	border-top-left-radius: 0 !important;
	border-top-right-radius: 0 !important;
	border-bottom-left-radius: 0 !important;
	border-bottom-right-radius: 0 !important;
}

.ca-cl-tabsbar__inner .ca-cl-tab:first-child {
	padding-left: 0;
}

.ca-cl-tab:hover {
	color: var(--ca-ink-800);
}

.ca-cl-tab.is-active {
	color: var(--ca-pink-600);
	border-bottom-color: var(--ca-pink-600);
}

/* ---- Main layout ---- */

.ca-cl-main {
	padding: 36px 24px 100px;
}

.ca-cl-layout {
	max-width: 1200px;
	margin-inline: auto;
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 40px;
	align-items: start;
}

.ca-cl-mobile-filter-toggle {
	display: none; /* only relevant inside the mobile accordion */
}

/* ---- Sidebar ---- */

.ca-cl-sidebar {
	position: sticky;
	top: 88px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.ca-cl-sidebar__h {
	margin: 0 0 12px;
	font-size: 12px !important;
	font-weight: 600 !important;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ca-gray-400);
}

.ca-cl-sidebar__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 12px;
}

.ca-cl-sidebar__head .ca-cl-sidebar__h {
	margin: 0;
}

.ca-cl-clear-themes {
	display: block;
	flex: 0 0 auto;
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ca-gray-400);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ca-cl-clear-themes:hover {
	color: var(--ca-gray-500);
}

.ca-cl-chip-row {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

/* Themes can grow long enough to force the whole page taller than the
   sidebar needs to be — cap its height and let it scroll internally
   instead, so the sidebar (and page) stay a predictable length. */
.ca-cl-filter-group[data-cl-filter-group="theme"] .ca-cl-chip-row {
	max-height: 280px;
	overflow-y: auto;
	padding: 6px 4px;
	background: var(--ca-gray-50, #f7f7f9);
	border-radius: 10px;
	scrollbar-width: thin;
	scrollbar-color: var(--ca-teams-purple) transparent;
}

.ca-cl-filter-group[data-cl-filter-group="theme"] .ca-cl-chip-row::-webkit-scrollbar {
	width: 6px;
}

.ca-cl-filter-group[data-cl-filter-group="theme"] .ca-cl-chip-row::-webkit-scrollbar-thumb {
	background: var(--ca-teams-purple);
	border-radius: 999px;
}

.ca-cl-filter-group[data-cl-filter-group="theme"] .ca-cl-chip-row::-webkit-scrollbar-track {
	background: transparent;
}

.ca-cl-chip {
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	text-align: left;
	background: none;
	border: none;
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--ca-ink-800);
	padding: 9px 10px;
	border-radius: 9px;
	cursor: pointer;
}

.ca-cl-chip:hover {
	background: var(--ca-lilac-100);
}

/* Active state colour matches each group's own tile-tag colour (see
   .ca-cl-tile__tag--software / --theme) so the sidebar and the tiles read
   as the same system: Software = pink, Theme = purple. */
.ca-cl-filter-group[data-cl-filter-group="software"] .ca-cl-chip.is-active {
	color: #fff;
	font-weight: 700;
	background: var(--ca-pink-600);
}

.ca-cl-filter-group[data-cl-filter-group="theme"] .ca-cl-chip.is-active {
	color: #fff;
	font-weight: 700;
	background: var(--ca-teams-purple);
}

.ca-cl-checkbox {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border-radius: 5px;
	border: 1.5px solid var(--ca-gray-300);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 10px;
}

.ca-cl-chip.is-active .ca-cl-checkbox {
	background: #fff;
	border-color: #fff;
	color: var(--ca-teams-purple);
}

.ca-cl-checkbox i{
	position: relative;
	top: -0px;
}
/* ---- Results ---- */

.ca-cl-result-label {
	margin: 0 0 22px;
	font-size: 14px !important;
	font-weight: 600 !important;
	color: var(--ca-gray-500);
}

.ca-cl-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.ca-cl-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px 0;
	font-size: 15px !important;
	color: var(--ca-gray-500);
}

.ca-cl-pagination {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	margin-top: 40px;
}

.ca-cl-pagenav {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ca-cl-pagenav__numbers {
	display: flex;
	align-items: center;
	gap: 4px;
}

.ca-cl-pagenav__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: none;
	border: 1.5px solid var(--ca-gray-200);
	color: var(--ca-ink-800);
	font-family: inherit;
	font-weight: 600;
	font-size: 14px;
	padding: 10px 18px;
	border-radius: 999px;
	cursor: pointer;
	transition: border-color .2s, background .2s;
}

.ca-cl-pagenav__btn:hover:not(:disabled) {
	border-color: var(--ca-teams-purple);
	background: var(--ca-lilac-100);
}

.ca-cl-pagenav__btn:disabled {
	opacity: .4;
	cursor: not-allowed;
}

.ca-cl-pagenav__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	background: none;
	border: none;
	border-radius: 50%;
	font-family: inherit;
	font-weight: 600;
	font-size: 14px;
	color: var(--ca-ink-800);
	cursor: pointer;
	transition: background .2s, color .2s;
}

.ca-cl-pagenav__num:hover {
	background: var(--ca-lilac-100);
}

.ca-cl-pagenav__num.is-active {
	background: var(--ca-teams-purple);
	color: #fff;
}

.ca-cl-pagenav__ellipsis {
	color: var(--ca-gray-400);
	padding: 0 4px;
	font-weight: 600;
}

.ca-cl-view-all {
	background: none;
	border: none;
	font-family: inherit;
	font-weight: 600;
	font-size: 14px;
	color: var(--ca-teams-purple);
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.ca-cl-tile.is-hidden,
.ca-cl-chip.is-hidden,
.ca-cl-empty.is-hidden,
.ca-cl-clear-themes.is-hidden,
.ca-cl-pagination.is-hidden,
.ca-cl-pagenav.is-hidden,
.ca-cl-view-all.is-hidden,
.ca-cl-filter-group.is-hidden {
	display: none;
}

/* ---- Tile ---- */

.ca-cl-tile {
	background: #fff;
	border: 1px solid var(--ca-gray-200);
	border-radius: 11px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	color: inherit;
	transition: transform 220ms cubic-bezier(.4, 0, .2, 1), box-shadow 220ms cubic-bezier(.4, 0, .2, 1);
}

/* Sits in the foot row itself (last child) rather than absolutely
   positioned against the tile, so it vertically centers with whatever
   else is in that row (expert/meta pills) instead of floating at a
   fixed corner offset — margin-left:auto pushes it to the far right
   within that flex row. */
.ca-cl-tile__arrow {
	display: flex;
	align-items: center;
	margin-left: auto;
	color: var(--ca-gray-500);
	font-size: 14px;
	transition: color 160ms;
}

.ca-cl-tile:hover .ca-cl-tile__arrow {
	color: var(--ca-pink-600);
}

.ca-cl-tile:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 34px rgba(23, 24, 42, .10);
}

.ca-cl-tile:hover .ca-cl-tile__img {
	transform: scale(1.06);
}

.ca-cl-tile:hover .ca-cl-tile__play {
	opacity: 1;
	transform: scale(1);
}

.ca-cl-tile--soon {
	cursor: default;
}

.ca-cl-tile--soon:hover {
	transform: none;
	box-shadow: none;
}

/* A Live Learning session that has ended — still listed, but greyed out
   and inert (no link/popup, see content-library.php). pointer-events:none
   also switches off every :hover rule above. The datebox is deliberately
   left at full colour so the date still reads at a glance. */
.ca-cl-tile--past {
	background: var(--ca-gray-50);
	box-shadow: none;
	cursor: default;
	pointer-events: none;
}

.ca-cl-tile--past .ca-cl-tile__img {
	filter: grayscale(1);
	opacity: .55;
}

.ca-cl-tile--past .ca-cl-tile__body {
	opacity: .6;
}

.ca-cl-tile--past .ca-cl-tile__arrow {
	display: none;
}

.ca-cl-tile__media {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--ca-lilac-100);
	overflow: hidden;
}

.ca-cl-tile__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 500ms cubic-bezier(.4, 0, .2, 1);
}

.ca-cl-tile__play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 56px;
	height: 56px;
	margin: -28px 0 0 -28px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ca-pink-600);
	color: #fff;
	border-radius: 999px;
	box-shadow: 0 8px 24px rgba(238, 72, 109, .42);
	opacity: 0;
	transform: scale(.85);
	transition: opacity 220ms, transform 220ms;
	pointer-events: none;
}

.ca-cl-tile__badge {
	position: absolute;
	right: 12px;
	bottom: 12px;
	background: rgba(17, 18, 35, .82);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 6px;
}

.ca-cl-tile__badge--soon {
	background: var(--ca-ink-800);
	letter-spacing: .08em;
	padding: 5px 11px;
	border-radius: 999px;
}

.ca-cl-tile__badge--past {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--ca-ink-800);
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: 5px 11px;
	border-radius: 999px;
}

.ca-cl-tile__badge--past i {
	font-size: 11px;
}

.ca-cl-tile__body {
	padding: 22px 22px 24px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.ca-cl-tile__title {
	margin: 0 0 10px;
	font-size: 19px !important;
	font-weight: 700 !important;
	letter-spacing: -.01em;
	line-height: 1.25 !important;
	color: var(--text-strong);
}

.ca-cl-tile__desc {
	margin: 0 0 18px;
	font-size: 14px !important;
	font-weight: 500 !important;
	line-height: 1.3 !important;
	color: var(--ca-gray-500);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	overflow: hidden;
}

.ca-cl-tile__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 16px;
}

.ca-cl-tile__tag {
	display: inline-flex;
	align-items: center;
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: .02em;
	padding: 4px 10px;
	border-radius: 999px;
}

.ca-cl-tile__tag--theme {
	background: var(--ca-teams-purple);
	color: #fff;
}

.ca-cl-tile__tag--software {
	background: var(--ca-pink-600);
	color: #fff;
}

.ca-cl-tile__foot {
	display: flex;
	align-items: center;
	gap: 11px;
	flex-wrap: wrap;
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid var(--ca-gray-200);
}

.ca-cl-tile__avatar {
	width: 34px;
	height: 34px;
	flex: 0 0 auto;
	border-radius: 999px;
	object-fit: cover;
	background: var(--ca-lilac-300);
}

.ca-cl-tile__avatar--placeholder {
	display: block;
}

.ca-cl-tile__expert {
	min-width: 0;
}

.ca-cl-tile__expert-name {
	margin: 0;
	font-size: 13px !important;
	font-weight: 700 !important;
	color: var(--text-strong);
}

.ca-cl-tile__expert-role {
	margin: 1px 0 0;
	font-size: 12px !important;
	font-weight: 600 !important;
	color: var(--ca-gray-500);
}

.ca-cl-tile__meta {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 13px !important;
	font-weight: 700 !important;
	color: var(--ca-gray-500);
}

/* FA6 icons sit slightly high against their own text baseline inside a
   flex row — nudge down 1px, same fix already used for
   .ca-course-audience__check i in course-post.css. */
.ca-cl-tile__meta i {
	position: relative;
	top: 1px;
}

.ca-cl-tile__datebox {
	position: absolute;
	left: 12px;
	top: 12px;
	width: 56px;
	height: 56px;
	border-radius: 12px;
	background: var(--ca-teams-purple);
	color: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	opacity: 0.9;
}

.ca-cl-tile__datebox-day {
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
}

.ca-cl-tile__datebox-month {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .08em;
	margin-top: 2px;
}

/* ---- Bottom CTA ---- */

.ca-cl-cta {
	background: var(--ca-lilac-100);
	padding: 72px 24px;
}

.ca-cl-cta__inner {
	max-width: 700px;
	margin-inline: auto;
	text-align: center;
}

.ca-cl-cta__inner h2 {
	margin: 0 auto;
	max-width: 640px;
	font-size: 38px !important;
	font-weight: 700 !important;
	letter-spacing: -.02em;
	line-height: 1.12 !important;
	color: var(--text-strong);
}

.ca-cl-cta__inner p {
	margin: 16px auto 0;
	max-width: 560px;
	font-size: 17px !important;
	font-weight: 500 !important;
	line-height: 1.6 !important;
	color: var(--ca-gray-600);
}

.ca-cl-cta__inner .ca-cl-btn {
	margin-top: 34px;
	font-weight: 700;
}

/* ---- Responsive ---- */

@media (max-width: 1000px) {
	.ca-cl-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.ca-cl-layout {
		grid-template-columns: 1fr;
	}

	.ca-cl-main{
		padding: 6px 24px 100px;
	}

	/* The toggle bar doubles as the accordion's own heading — full width,
	   flush left/right, bottom border — same visual language as the
	   content-type tabs bar rather than a standalone pill button. */
	.ca-cl-mobile-filter-toggle {
		-webkit-appearance: none;
		appearance: none;
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		background: none;
		border: none;
		border-bottom: 1px solid var(--ca-gray-200);
		color: var(--ca-ink-800);
		font-family: inherit;
		font-size: 15px !important;
		font-weight: 700 !important;
		padding: 16px 0;
		margin-bottom: 0;
		cursor: pointer;
	}

	/* Same specificity-boost as .ca-cl-tab above — Salient's global
	   "slightly rounded" button chain beats a single-class selector even
	   with !important on both sides. */
	.ca-cl-mobile-filter-toggle.ca-cl-mobile-filter-toggle {
		border-top-left-radius: 0 !important;
		border-top-right-radius: 0 !important;
		border-bottom-left-radius: 0 !important;
		border-bottom-right-radius: 0 !important;
	}

	.ca-cl-mobile-filter-toggle.is-active {
		color: var(--ca-pink-600);
	}

	.ca-cl-mobile-filter-toggle i {
		transition: transform 200ms;
	}

	.ca-cl-mobile-filter-toggle[aria-expanded="true"] i {
		transform: rotate(180deg);
	}

	/* Accordion, not a modal — sits inline in the page flow (never fixed,
	   no scrim) so opening it pushes the results grid down instead of
	   covering the page. Closed by default; the toggle bar above is the
	   only way to collapse it — picking a chip inside never does. */
	.ca-cl-sidebar {
		display: none;
		flex-direction: column;
		gap: 20px;
		margin: 0 0 18px;
	}

	.ca-cl-sidebar.is-open {
		display: flex;
	}

	.ca-cl-sidebar .ca-cl-chip-row {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 8px;
		max-height: none;
		overflow-y: visible;
	}

	.ca-cl-sidebar .ca-cl-chip {
		width: auto;
		border: 1.5px solid var(--ca-gray-200);
		border-radius: 999px;
		padding: 7px 14px;
		font-size: 13px;
	}


	.ca-cl-tabsbar__inner {
		justify-content: center;
		gap: 2px;
		padding-top: 10px;
	}

	.ca-cl-tabsbar__inner .ca-cl-tab:first-child {
		padding: 8px 10px 9px;
	}

	.ca-cl-tab {
		font-size: 13px;
		padding: 8px 10px 9px;
	}
}

@media (max-width: 660px) {
	.ca-cl-grid {
		grid-template-columns: 1fr;
	}
}
