/*
 * CERIC Resource Library — client feedback updates (v1.11.0).
 *
 * Loaded after library.css. library.css carries manual edits made on staging,
 * so new rules go here instead of into that file.
 */

/* Explore the Full Catalogue */
.ceric-rl-page-inner .ceric-rl-hero-cta {
	gap: 14px;
	min-width: 320px;
	height: 60px;
	padding: 0 16px 0 28px;
	background: #fff;
	color: var(--rl-orange-text);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 0.01em;
	border: 2px solid #fff;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ceric-rl-page-inner .ceric-rl-hero-cta svg {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	padding: 8px;
	border-radius: 50%;
	background: var(--rl-orange);
	color: #fff;
	transition: transform 0.2s ease;
}

.ceric-rl-page-inner .ceric-rl-hero-cta:hover,
.ceric-rl-page-inner .ceric-rl-hero-cta:focus-visible {
	background: var(--rl-ink);
	border-color: var(--rl-ink);
	color: #fff;
	opacity: 1;
	transform: translateY(-2px);
	box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
}

.ceric-rl-page-inner .ceric-rl-hero-cta:hover svg,
.ceric-rl-page-inner .ceric-rl-hero-cta:focus-visible svg {
	transform: translateY(3px);
}

.ceric-rl-page-inner .ceric-rl-hero-cta:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

/* Reset Filtering */
.ceric-rl-page-inner .ceric-rl-reset {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: auto;
	min-width: 200px;
	height: 52px;
	padding: 0 22px;
	background: var(--rl-orange);
	color: var(--rl-ink);
	font-size: 18px;
	font-weight: 600;
	border: 2px solid var(--rl-orange);
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ceric-rl-page-inner .ceric-rl-reset svg {
	flex-shrink: 0;
	transition: transform 0.3s ease;
}

.ceric-rl-page-inner .ceric-rl-reset:hover,
.ceric-rl-page-inner .ceric-rl-reset:focus-visible {
	background: #fff;
	color: var(--rl-orange-text);
}

.ceric-rl-page-inner .ceric-rl-reset:hover svg {
	transform: rotate(-120deg);
}

.ceric-rl-page-inner .ceric-rl-reset:focus-visible {
	outline: 2px solid var(--rl-ink);
	outline-offset: 2px;
}

/* Collapsible Theme / Competency groups */
.ceric-rl-group-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

.ceric-rl-group-head .ceric-rl-check-parent {
	flex: 1 1 auto;
	min-width: 0;
}

.ceric-rl-page-inner .ceric-rl-group-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	margin: -4px -6px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
}

.ceric-rl-page-inner .ceric-rl-group-toggle:hover,
.ceric-rl-page-inner .ceric-rl-group-toggle:focus-visible {
	background: var(--rl-bg);
}

.ceric-rl-group-toggle svg {
	transition: transform 0.2s ease;
}

.ceric-rl-aoi-group.is-collapsed .ceric-rl-group-toggle svg {
	transform: rotate(-90deg);
}

.ceric-rl-aoi-group.is-collapsed .ceric-rl-aoi-children {
	display: none;
}

/* library.css spaces groups for their open state; collapsed rows sit closer. */
.ceric-rl-aoi-group.is-collapsed {
	margin-bottom: 24px;
}

.ceric-rl-aoi-group.is-collapsed .ceric-rl-check-parent {
	margin-bottom: 0;
}

/* Accessible hovers: text stays dark, an orange underline marks the hover. */
.ceric-rl-page-inner .ceric-rl-featured-title:hover,
.ceric-rl-page-inner .ceric-rl-featured-title:focus-visible,
.ceric-rl-page-inner .ceric-rl-card-title:hover,
.ceric-rl-page-inner .ceric-rl-card-title:focus-visible,
.ceric-rl-page-inner .ceric-rl-saved-title:hover,
.ceric-rl-page-inner .ceric-rl-saved-title:focus-visible,
.ceric-rl-page-inner .ceric-rl-browse-all:hover,
.ceric-rl-page-inner .ceric-rl-browse-all:focus-visible {
	color: var(--rl-ink);
	text-decoration: underline;
	text-decoration-color: var(--rl-orange-text);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

/* View my bookmarks */
.ceric-rl-page-inner .ceric-rl-bookmarks-link {
	background: #78a8c3;
	color: #000;
}

.ceric-rl-page-inner .ceric-rl-bookmarks-link:hover,
.ceric-rl-page-inner .ceric-rl-bookmarks-link:focus {
	background: #78a8c3;
	color: #000;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Theme tiles carousel */
.ceric-rl-carousel {
	display: flex;
	align-items: center;
	gap: 16px;
}

.ceric-rl-page-inner .ceric-rl-tiles.is-carousel {
	flex: 1 1 auto;
	min-width: 0;
	display: grid;
	grid-template-columns: none;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 4 * 25px) / 5);
	gap: 25px;
	padding: 4px 0;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.ceric-rl-tiles.is-carousel::-webkit-scrollbar {
	display: none;
}

.ceric-rl-tiles.is-carousel .ceric-rl-tile {
	scroll-snap-align: start;
}

.ceric-rl-page-inner .ceric-rl-carousel-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1.5px solid var(--rl-ink);
	border-radius: 50%;
	background: #fff;
	color: var(--rl-ink);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ceric-rl-page-inner .ceric-rl-carousel-btn:hover:not(:disabled),
.ceric-rl-page-inner .ceric-rl-carousel-btn:focus-visible {
	background: var(--rl-ink);
	color: #fff;
}

.ceric-rl-page-inner .ceric-rl-carousel-btn:disabled {
	opacity: 0.3;
	cursor: default;
}

.ceric-rl-carousel.is-static .ceric-rl-carousel-btn {
	display: none;
}

/* Competency tiles: one per group */
.ceric-rl-page-inner .ceric-rl-tiles.is-count-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Saved resources: back link */
.ceric-rl-page-inner .ceric-rl-back-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 32px;
	color: var(--rl-ink);
	font-size: 18px;
	font-weight: 600;
	text-decoration: none;
}

.ceric-rl-page-inner .ceric-rl-back-link:hover,
.ceric-rl-page-inner .ceric-rl-back-link:focus-visible {
	color: var(--rl-ink);
	text-decoration: underline;
	text-decoration-color: var(--rl-orange-text);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

@media (max-width: 1400px) {
	.ceric-rl-page-inner .ceric-rl-tiles.is-carousel {
		grid-auto-columns: calc((100% - 2 * 25px) / 3);
	}
}

@media (max-width: 900px) {
	.ceric-rl-page-inner .ceric-rl-tiles.is-carousel {
		grid-auto-columns: calc((100% - 25px) / 2);
	}

	.ceric-rl-page-inner .ceric-rl-tiles.is-count-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.ceric-rl-page-inner .ceric-rl-hero-cta {
		min-width: 0;
		width: 100%;
		font-size: 18px;
	}

	.ceric-rl-carousel {
		gap: 8px;
	}

	.ceric-rl-page-inner .ceric-rl-tiles.is-carousel {
		grid-auto-columns: 100%;
	}

	.ceric-rl-page-inner .ceric-rl-carousel-btn {
		width: 36px;
		height: 36px;
	}

	.ceric-rl-page-inner .ceric-rl-tiles.is-count-4 {
		grid-template-columns: 1fr;
	}
}

/* Match Themes / Competencies filter headings to Cost and other facets */
.ceric-rl-page-inner .ceric-rl-facet[data-facet="aoi"] .ceric-rl-facet-toggle span,
.ceric-rl-page-inner .ceric-rl-facet[data-facet="comp"] .ceric-rl-facet-toggle span {
	font-weight: 500;
	color: inherit;
}
