/**
 * Eruda Toolkit - Document Shelf
 *
 * Type chips and a grid of document cards, each with page 1 of its PDF rising
 * out of a pale cover area like a sheet of paper. A card is one link to the
 * file; one without a link is a plain card marked "Coming soon". Chips are
 * buttons, and Hello Elementor paints buttons pink, so each chip state
 * restates what it relies on.
 */

.edoc {
	--edoc-navy: #0F3961;
	--edoc-muted: #0F3961B3;
	--edoc-green: #07864F;
	--edoc-green-light: #4DCF8D;
	--edoc-hover-line: #07864F4D;
	--edoc-line: #DDE2E6;
	--edoc-card: #fff;
	--edoc-cover-a: #E4EDF1;
	--edoc-cover-b: #F5F6F7;
	--edoc-cols: 4;
	--edoc-gap: 16px;
	--edoc-cover-h: 200px;
	--edoc-radius: 20px;

	font-family: "Plus Jakarta Sans", system-ui, sans-serif;
	color: var(--edoc-navy);
}

.edoc *,
.edoc *::before,
.edoc *::after {
	box-sizing: border-box;
}

/* --------------------------------------------------------------- chips --- */

.edoc__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px;
}

.edoc .edoc__chip,
.edoc .edoc__chip:hover,
.edoc .edoc__chip:focus {
	flex: none;
	margin: 0;
	padding: 9px 16px;
	border: 1px solid var(--edoc-line);
	border-radius: 999px;
	background: #fff;
	box-shadow: none;
	color: var(--edoc-navy);
	font-family: "Plus Jakarta Sans", system-ui, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color .2s, background-color .2s, color .2s;
}

.edoc .edoc__chip:hover {
	border-color: var(--edoc-hover-line);
}

.edoc .edoc__chip[aria-pressed="true"] {
	border-color: var(--edoc-green);
	background: var(--edoc-green);
	color: #fff;
}

.edoc .edoc__chip:focus-visible {
	outline: 3px solid var(--edoc-green-light);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------- grid --- */

.edoc__grid {
	display: grid;
	grid-template-columns: repeat(var(--edoc-cols), minmax(0, 1fr));
	gap: var(--edoc-gap);
}

.edoc .edoc__card,
.edoc a.edoc__card:hover,
.edoc a.edoc__card:focus {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--edoc-line);
	border-radius: var(--edoc-radius);
	background: var(--edoc-card);
	color: var(--edoc-navy);
	text-decoration: none;
	transition: transform .2s cubic-bezier(.2, .7, .2, 1), box-shadow .2s;
}

.edoc .edoc__card[hidden] {
	display: none;
}

.edoc a.edoc__card:hover,
.edoc a.edoc__card:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 14px 34px #0F39611F;
}

.edoc a.edoc__card:focus-visible {
	outline: 3px solid var(--edoc-green-light);
	outline-offset: 3px;
}

/* --------------------------------------------------------------- cover --- */

.edoc__cover {
	display: grid;
	place-items: end center;
	height: var(--edoc-cover-h);
	padding: 22px 22px 0;
	overflow: hidden;
	background: linear-gradient(180deg, var(--edoc-cover-a), var(--edoc-cover-b));
}

/* The sheet: anchored to the bottom, cut off by the body below it. Themes'
   img { height: auto } is fine; their img:hover { opacity } is not. */
.edoc .edoc__cover img,
.edoc .edoc__cover img:hover {
	display: block;
	width: 72%;
	max-width: none;
	height: auto;
	border-radius: 6px 6px 0 0;
	box-shadow: 0 10px 26px #0F396133;
	opacity: 1;
	transition: transform .25s cubic-bezier(.2, .7, .2, 1);
}

.edoc a.edoc__card:hover .edoc__cover img,
.edoc a.edoc__card:focus-visible .edoc__cover img {
	transform: translateY(-6px) rotate(-1.5deg);
}

/* ---------------------------------------------------------------- body --- */

.edoc__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	padding: 18px 20px 20px;
}

.edoc__type {
	font-family: "Urbanist", system-ui, sans-serif;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--edoc-green);
}

.edoc .edoc__title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--edoc-navy);
}

.edoc__desc {
	font-size: 13px;
	line-height: 1.45;
	color: var(--edoc-muted);
}

.edoc__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid var(--edoc-line);
	font-size: 12px;
	line-height: 1.4;
	color: var(--edoc-muted);
}

.edoc__meta i {
	flex: none;
	padding: 3px 6px;
	border-radius: 5px;
	background: var(--edoc-navy);
	color: #fff;
	font-family: "Urbanist", system-ui, sans-serif;
	font-size: 10px;
	font-style: normal;
	font-weight: 700;
	letter-spacing: .06em;
}

.edoc__size {
	min-width: 0;
}

.edoc__meta em {
	flex: none;
	margin-left: auto;
	font-style: normal;
	font-weight: 600;
	color: var(--edoc-green);
}

.edoc .edoc__card.is-soon .edoc__meta em {
	color: #8A97A1;
	font-weight: 500;
}

.edoc--empty p {
	margin: 0;
	padding: 24px;
	border: 1px dashed var(--edoc-line);
	border-radius: 14px;
	color: var(--edoc-muted);
	text-align: center;
}

/* -------------------------------------------------------------- motion --- */

@keyframes edoc-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
}

/* The script sets each card's delay, capped so a whole shelf is in by 290ms. */
.edoc .edoc__card.is-fresh {
	animation: edoc-in .14s ease-out backwards;
}

/* ---------------------------------------------------------- breakpoints --- */

/* Fallbacks for a page without Elementor's generated CSS; the Columns
   control writes the same property with a more specific selector. */
@media (max-width: 1100px) {
	.edoc {
		--edoc-cols: 2;
	}
}

@media (max-width: 760px) {
	.edoc {
		--edoc-cols: 1;
	}

	/* The one thing allowed to scroll sideways. */
	.edoc__chips {
		flex-wrap: nowrap;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scrollbar-width: none;
		margin-bottom: 14px;
		padding-bottom: 2px;
	}

	.edoc__chips::-webkit-scrollbar {
		display: none;
	}
}

/* ------------------------------------------------------- less motion --- */

@media (prefers-reduced-motion: reduce) {
	.edoc .edoc__card,
	.edoc .edoc__card.is-fresh,
	.edoc .edoc__cover img {
		animation: none;
		transition: box-shadow .2s;
	}

	.edoc a.edoc__card:hover,
	.edoc a.edoc__card:focus-visible,
	.edoc a.edoc__card:hover .edoc__cover img,
	.edoc a.edoc__card:focus-visible .edoc__cover img {
		transform: none;
	}
}
