/**
 * ERC document library: public Library and lounge Documents Library.
 * Light surfaces only. Contrast targets WCAG 2.2 AA.
 */

.erc-library,
.erc-library-cards,
.erc-doc,
.erc-doc-card,
.erc-doc-row {
	--lib-navy: #282a67;
	--lib-navy-hover: #3d3f79;
	--lib-pink: #e01a4f;
	--lib-text: #000000;
	--lib-muted: #6c6f80;
	--lib-paper: #f4f4f6;
	--lib-sand: #f4f4f6;
	--lib-white: #ffffff;
	--lib-line: #e3e4ea;
	color: var(--lib-text);
}

.erc-library :focus-visible,
.erc-doc :focus-visible,
.erc-doc-card :focus-visible {
	outline: 3px solid var(--lib-navy);
	outline-offset: 2px;
}

.erc-library__heading {
	margin: 0;
	color: var(--lib-navy);
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 700;
	line-height: 1.2;
}

.erc-library__panel-title {
	margin: 0 0 8px;
	color: var(--lib-navy);
	font-size: 1.25rem;
	font-weight: 700;
}

.erc-library__hint {
	margin: 0 0 20px;
	color: var(--lib-muted);
}

.erc-library__search,
.erc-library__years,
.erc-library__section,
.erc-library__empty,
.erc-library__featured {
	width: 100%;
	margin: 0 0 32px;
}

.erc-library__search {
	padding: 24px;
	border: 1px solid var(--lib-line);
	border-radius: 16px;
	background: var(--lib-white);
}

.erc-library__fields {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 0.7fr) minmax(0, 0.7fr) auto;
	gap: 16px;
	align-items: end;
}

.erc-library__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.erc-library__field span {
	color: var(--lib-navy);
	font-size: 0.8125rem;
	font-weight: 700;
}

.erc-library__field input,
.erc-library__field select {
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid var(--lib-line);
	border-radius: 10px;
	background: var(--lib-paper);
	color: var(--lib-text);
	font: inherit;
}

.erc-library__submit,
.erc-doc__download,
.erc-doc-card__download {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 10px 20px;
	border: 0;
	border-radius: 999px;
	background: var(--lib-navy);
	color: var(--lib-white);
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

.erc-library__submit:hover,
.erc-doc__download:hover,
.erc-doc-card__download:hover {
	background: var(--lib-navy-hover);
	color: var(--lib-white);
}

.erc-library__count {
	margin: 16px 0 0;
	color: var(--lib-muted);
	font-size: 0.9375rem;
}

.erc-library__clear {
	color: var(--lib-pink);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.erc-info-hub-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	width: min(100%, var(--container-max, 1280px));
	margin: 0 auto 28px;
	padding: 4px 0 16px;
	border-bottom: 1px solid var(--lib-line, rgba(40, 42, 103, 0.18));
}

.erc-info-hub-nav__back {
	display: inline-flex;
	align-items: center;
	padding: 10px 16px;
	border-radius: 999px;
	background: var(--lib-navy, #282a67);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

.erc-info-hub-nav__back:hover,
.erc-info-hub-nav__back.is-current {
	filter: brightness(0.92);
	color: #fff;
}

.erc-info-hub-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.erc-info-hub-nav__list a {
	display: inline-flex;
	align-items: center;
	padding: 10px 16px;
	border: 1px solid var(--lib-line, rgba(40, 42, 103, 0.22));
	border-radius: 999px;
	background: var(--lib-white, #fff);
	color: var(--lib-navy, #282a67);
	font-weight: 700;
	text-decoration: none;
}

.erc-info-hub-nav__list a:hover,
.erc-info-hub-nav__list a[aria-current="page"] {
	background: var(--lib-navy, #282a67);
	border-color: var(--lib-navy, #282a67);
	color: #fff;
}

.erc-library__years {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	position: sticky;
	top: 12px;
	z-index: 2;
	padding: 8px 0;
	background: var(--lib-white);
}

.erc-library__year-jump {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 6px 14px;
	border: 1px solid var(--lib-line);
	border-radius: 999px;
	background: var(--lib-white);
	color: var(--lib-navy);
	font-weight: 700;
	text-decoration: none;
}

.erc-library__year-jump span {
	color: var(--lib-muted);
	font-weight: 500;
	font-size: 0.8125rem;
}

.erc-library__year-jump.is-active,
.erc-library__year-jump:hover {
	background: var(--lib-navy);
	color: var(--lib-white);
	border-color: var(--lib-navy);
}

.erc-library__year-jump.is-active span,
.erc-library__year-jump:hover span {
	color: rgba(255, 255, 255, 0.8);
}

.erc-library__section {
	scroll-margin-top: 88px;
	margin-bottom: 48px;
}

.erc-library__section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--lib-line);
}

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

.erc-library__loop--featured {
	margin-top: 8px;
}

.erc-library__loop--featured .erc-doc-card,
.erc-library__loop--featured .erc-doc-card--member {
	background: var(--lib-white);
	border: 1px solid var(--lib-line);
	border-left: 4px solid var(--lib-pink);
	box-shadow: none;
}

.erc-library--lounge .erc-library__loop:not(.erc-library__loop--featured) {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.erc-doc-card--member {
	background: var(--lib-white);
	border-color: var(--lib-navy);
}

.erc-doc-card__login {
	color: var(--lib-pink);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.erc-doc-card {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	padding: 20px;
	border: 1px solid var(--lib-line);
	border-radius: 16px;
	background: var(--lib-white);
}

.erc-doc-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	margin: 0 0 10px;
	color: var(--lib-muted);
	font-size: 0.8125rem;
}

.erc-doc-card__type {
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--lib-sand);
	color: var(--lib-navy);
	font-weight: 700;
}

.erc-doc-card__title {
	margin: 0 0 8px;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
}

.erc-doc-card__title a {
	color: var(--lib-navy);
	text-decoration: none;
}

.erc-doc-card__title a:hover {
	color: var(--lib-pink);
}

.erc-doc-card__excerpt {
	margin: 0 0 16px;
	color: var(--lib-muted);
	flex: 1;
}

.erc-doc-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin: 0;
}

.erc-doc-card__view {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 8px 16px;
	border: 1px solid var(--lib-navy);
	border-radius: 999px;
	background: var(--lib-white);
	color: var(--lib-navy);
	font-weight: 700;
	text-decoration: none;
}

.erc-doc-card__view:hover {
	background: var(--lib-navy);
	color: var(--lib-white);
}

.erc-doc-card__download {
	min-height: 40px;
	padding: 8px 16px;
	font-size: 0.875rem;
}

.erc-library__empty {
	padding: 24px;
	border-radius: 16px;
	background: var(--lib-sand);
}

.erc-doc {
	margin: 0 0 32px;
}

.erc-doc__facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 16px;
	margin: 0 0 24px;
	padding: 20px;
	border: 1px solid var(--lib-line);
	border-radius: 16px;
	background: var(--lib-white);
}

.erc-doc__facts dt {
	margin: 0 0 4px;
	color: var(--lib-muted);
	font-size: 0.75rem;
	font-weight: 700;
}

.erc-doc__facts dd {
	margin: 0;
	color: var(--lib-navy);
	font-weight: 700;
}

.erc-doc__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 20px;
	align-items: center;
	margin: 0 0 24px;
}

.erc-doc__download {
	padding: 12px 28px;
	font-size: 1.0625rem;
}

.erc-doc__download span {
	font-weight: 500;
	opacity: 0.9;
}

.erc-doc__open {
	color: var(--lib-navy);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.erc-doc__viewer {
	margin: 0 0 24px;
	border: 1px solid var(--lib-line);
	border-radius: 16px;
	overflow: hidden;
	background: var(--lib-sand);
	min-height: 70vh;
}

.erc-doc__viewer iframe {
	display: block;
	width: 100%;
	height: 70vh;
	border: 0;
	background: var(--lib-white);
}

.erc-doc__fallback,
.erc-doc__back {
	margin: 0 0 24px;
}

.erc-doc__back a {
	color: var(--lib-pink);
	font-weight: 700;
}

.erc-doc__files {
	margin: 0 0 24px;
	padding: 20px;
	border: 1px solid var(--lib-line);
	border-radius: 16px;
	background: var(--lib-white);
}

.erc-doc__files-title {
	margin: 0 0 12px;
	color: var(--lib-navy);
	font-size: 1.125rem;
}

.erc-doc__files ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.erc-doc__files li + li {
	margin-top: 8px;
}

.erc-doc__files a {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	color: var(--lib-navy);
	font-weight: 700;
}

.erc-doc__files span {
	color: var(--lib-muted);
	font-weight: 500;
}

@media (max-width: 960px) {
	.erc-library__fields,
	.erc-library__loop,
	.erc-library--lounge .erc-library__loop {
		grid-template-columns: 1fr;
	}

	.erc-library__years {
		position: static;
		flex-wrap: nowrap;
		overflow-x: auto;
		padding-bottom: 4px;
	}

	.erc-doc__viewer,
	.erc-doc__viewer iframe {
		min-height: 50vh;
		height: 50vh;
	}
}

.erc-rules-list {
	--lib-navy: #282a67;
	--lib-pink: #e01a4f;
	--lib-text: #000000;
	--lib-muted: #6c6f80;
	--lib-line: #e3e4ea;
	color: var(--lib-text);
}

.erc-rules-doc {
	padding: 20px 0;
	border-bottom: 1px solid var(--lib-line, #e3e4ea);
}

.wpex-card .erc-rules-doc {
	padding: 0;
	border: 0;
	background: transparent;
}

.erc-rules-doc__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0 0;
}

.erc-rules-doc__action.erc-info-hub-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	margin: 0;
	padding: 10px 16px;
	border: 1px solid #e3e4ea;
	border-radius: 12px;
	background: #ffffff !important;
	color: #282a67 !important;
	font-family: "Darker Grotesque", system-ui, sans-serif;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: none;
}

.erc-rules-doc__action.erc-info-hub-nav__link:hover,
.erc-rules-doc__action.erc-info-hub-nav__link:focus-visible {
	border-color: #282a67;
	background: #ffffff !important;
	color: #282a67 !important;
	text-decoration: none;
}

.erc-rules-doc__action .erc-info-hub-nav__svg {
	flex: 0 0 auto;
	display: block;
}

.erc-rules-doc__title {
	margin: 0 0 6px;
	color: var(--lib-navy, #282a67);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
}

.erc-rules-doc__meta,
.erc-rules-doc__lock {
	margin: 0 0 12px;
	color: var(--lib-muted, #6c6f80);
	font-size: 0.9375rem;
}

.erc-rules-doc__lock {
	margin-bottom: 0;
}

.erc-rules-doc__lock a {
	color: #282a67;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.erc-rules-list .vcex-button {
	margin: 0 12px 8px 0;
	border-radius: 999px;
	font-weight: 600;
}

.erc-rules-list :focus-visible {
	outline: 3px solid var(--lib-navy, #282a67);
	outline-offset: 2px;
}

.erc-library__cats {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px;
	width: 100%;
	margin: 0 0 28px;
	padding: 0;
	background: none;
	position: static;
}

.erc-library__cat-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1 1 280px;
	max-width: 420px;
	min-width: 0;
}

.erc-library__cat-field span {
	color: var(--lib-navy);
	font-size: 0.8125rem;
	font-weight: 700;
}

.erc-library__cat-field select {
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid var(--lib-line);
	border-radius: 10px;
	background: var(--lib-white);
	color: var(--lib-text);
	font: inherit;
	font-weight: 600;
}

.erc-library__cats-submit {
	min-height: 48px;
}

.erc-library-cards .wpex-post-cards-grid,
.erc-library-cards .wpex-row {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.erc-library-cards .wpex-post-cards-entry,
.erc-library-cards .wpex-card,
.erc-library-cards .wpex-card-inner,
.erc-library-cards .vc_row,
.erc-library-cards .vc_column,
.erc-library-cards .vc_column-inner {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.erc-doc-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px 32px;
	padding: 20px 24px;
	border: 1px solid var(--lib-line);
	border-radius: 16px;
	background: var(--lib-white);
	box-shadow: none;
}

.erc-doc-row__main {
	min-width: 0;
	flex: 1 1 auto;
}

.erc-doc-row .erc-doc-card__meta {
	margin-bottom: 8px;
}

.erc-doc-row .erc-doc-card__title {
	margin: 0;
	color: var(--lib-navy);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
}

.erc-doc-row .erc-doc-card__title a {
	color: var(--lib-navy);
	text-decoration: none;
}

.erc-doc-row .erc-doc-card__title a:hover {
	color: var(--lib-pink);
}

.erc-doc-row .erc-doc-card__excerpt {
	margin: 8px 0 0;
	color: var(--lib-muted);
	font-size: 0.9375rem;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.erc-doc-row .erc-doc-card__actions {
	flex: 0 0 auto;
	justify-content: flex-end;
	margin: 0 0 0 auto;
	gap: 8px;
}

.erc-library-cards .erc-doc-row a.erc-doc-card__view,
.erc-library-cards .erc-doc-row a.erc-doc-card__download {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 8px 16px;
	border: 1px solid var(--lib-navy);
	border-radius: 999px;
	background: var(--lib-white);
	color: var(--lib-navy);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: none;
}

.erc-library-cards .erc-doc-row a.erc-doc-card__view:hover,
.erc-library-cards .erc-doc-row a.erc-doc-card__download:hover {
	background: var(--lib-sand);
	color: var(--lib-navy);
}

.erc-library-cards .erc-doc-row a.erc-doc-card__login {
	max-width: 220px;
	color: var(--lib-pink);
	font-weight: 700;
	text-align: right;
}

@media (max-width: 720px) {
	.erc-library__cat-field {
		flex-basis: 100%;
		max-width: none;
	}

	.erc-library__cats-submit {
		width: 100%;
	}

	.erc-doc-row {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		padding: 16px;
	}

	.erc-doc-row .erc-doc-card__actions {
		margin-left: 0;
		justify-content: flex-end;
	}

	.erc-library-cards .erc-doc-row a.erc-doc-card__login {
		max-width: none;
		text-align: right;
	}
}

/* erc-doc-image
   Logo and other image files: show the picture under the download. */
.erc-doc__image {
	margin: 0 0 24px;
}

.erc-doc__image img {
	display: block;
	max-width: min(100%, 420px);
	height: auto;
}
