/* EasyExam PDF Viewer – link list (front end: Elementor, shortcode, block) */

.cpv-list {
	--cpv-accent: #2563eb;
	--cpv-bg: #ffffff;
	--cpv-text: #111827;
	--cpv-muted: #6b7280;
	--cpv-border: #e5e7eb;
	--cpv-thumb-bg: #f3f4f6;
	--cpv-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
	--cpv-shadow-hover: 0 14px 30px rgba(16, 24, 40, .16);
	--cpv-radius: 12px;
	width: 100%;
	color: var(--cpv-text);
	box-sizing: border-box;
}
.cpv-list *, .cpv-list *::before, .cpv-list *::after { box-sizing: inherit; }

.cpv-theme-dark {
	--cpv-bg: #1f2430; --cpv-text: #f3f4f6; --cpv-muted: #9ca3af; --cpv-border: #313746; --cpv-thumb-bg: #2a303d;
	--cpv-shadow: 0 1px 2px rgba(0, 0, 0, .4); --cpv-shadow-hover: 0 14px 30px rgba(0, 0, 0, .5);
}
@media (prefers-color-scheme: dark) {
	.cpv-theme-auto {
		--cpv-bg: #1f2430; --cpv-text: #f3f4f6; --cpv-muted: #9ca3af; --cpv-border: #313746; --cpv-thumb-bg: #2a303d;
		--cpv-shadow: 0 1px 2px rgba(0, 0, 0, .4); --cpv-shadow-hover: 0 14px 30px rgba(0, 0, 0, .5);
	}
}

.cpv-heading { margin: 0 0 .7em; color: var(--cpv-text); }

.cpv-items { list-style: none; margin: 0; padding: 0; }
.cpv-item { margin: 0; padding: 0; list-style: none; min-width: 0; }

/* card base */
.cpv-card {
	position: relative;
	display: flex;
	color: var(--cpv-text);
	background: var(--cpv-bg);
	border: 1px solid var(--cpv-border);
	border-radius: var(--cpv-radius);
	box-shadow: var(--cpv-shadow);
	text-decoration: none;
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}
.cpv-card:hover, .cpv-card:focus-visible {
	transform: translateY(-4px);
	box-shadow: var(--cpv-shadow-hover);
	border-color: var(--cpv-accent);
	color: var(--cpv-text);
	outline: none;
}
.cpv-card:focus-visible { outline: 2px solid var(--cpv-accent); outline-offset: 2px; }

.cpv-icon { display: inline-flex; color: var(--cpv-accent); }
.cpv-icon svg, .cpv-icon i { width: 1em; height: 1em; font-size: 1em; }
.cpv-icon svg:not([stroke]) { fill: currentColor; }

.cpv-title { display: block; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.cpv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin-top: 4px; font-size: .85em; color: var(--cpv-muted); }
.cpv-meta > span:empty { display: none; }
.cpv-meta > span + span::before { content: "•"; margin: 0 .45em; opacity: .7; }
.cpv-meta > span:empty + span::before { content: none; }
.cpv-meta > span:first-child::before { content: none; }

.cpv-badge {
	display: inline-block; padding: 2px 9px; border-radius: 999px;
	font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
	color: #fff; background: #16a34a; line-height: 1.5;
}
.cpv-lock { display: inline-flex; font-size: 15px; color: var(--cpv-muted); }
.cpv-card.cpv-is-locked { opacity: .92; }

/* ------------------------------------------------------------ cards */
.cpv-style-cards .cpv-items {
	display: grid;
	grid-template-columns: repeat(var(--cpv-cols, 3), minmax(0, 1fr));
	gap: 20px;
}
.cpv-style-cards .cpv-card { flex-direction: column; height: 100%; }
.cpv-style-cards .cpv-thumb {
	position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden;
	background: var(--cpv-thumb-bg); border-bottom: 1px solid var(--cpv-border);
}
.cpv-style-cards .cpv-thumb .cpv-icon { position: absolute; inset: 0; align-items: center; justify-content: center; font-size: 56px; opacity: .85; }
.cpv-style-cards .cpv-thumb canvas { position: absolute; left: 0; top: 0; width: 100%; height: auto; display: block; }
.cpv-has-thumb .cpv-thumb .cpv-icon { display: none; }
.cpv-style-cards .cpv-body { display: block; padding: 14px 16px 16px; }
.cpv-style-cards .cpv-title { font-size: 1.02em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cpv-style-cards .cpv-badge { position: absolute; top: 10px; left: 10px; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.cpv-style-cards .cpv-lock { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; background: var(--cpv-bg); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }

/* ------------------------------------------------------------ compact list */
.cpv-style-list .cpv-items { display: flex; flex-direction: column; gap: 8px; }
.cpv-style-list .cpv-card { align-items: center; gap: 12px; padding: 11px 16px; border-radius: 10px; }
.cpv-style-list .cpv-card:hover, .cpv-style-list .cpv-card:focus-visible { transform: translateX(4px); }
.cpv-style-list .cpv-thumb { flex: 0 0 auto; display: inline-flex; width: auto; }
.cpv-style-list .cpv-thumb .cpv-icon { font-size: 26px; }
.cpv-style-list .cpv-thumb canvas { display: none; }
.cpv-style-list .cpv-body { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.cpv-style-list .cpv-title { flex: 1 1 200px; }
.cpv-style-list .cpv-meta { margin: 0; flex: 0 0 auto; }
.cpv-style-list .cpv-badge, .cpv-style-list .cpv-lock { position: static; flex: 0 0 auto; }

/* ------------------------------------------------------------ inline links
   Small, text-only: behaves like an ordinary hyperlink with a tiny file icon and muted details. */
.cpv-style-links { --cpv-link: var(--cpv-accent); }
.cpv-style-links .cpv-items {
	display: grid;
	grid-template-columns: repeat(var(--cpv-cols, 1), minmax(0, 1fr));
	gap: 2px 28px;
}
.cpv-style-links .cpv-card {
	display: inline-flex; align-items: baseline; gap: .4em; max-width: 100%;
	padding: 3px 0; line-height: 1.5;
	color: var(--cpv-link); background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible;
}
.cpv-style-links .cpv-card:hover, .cpv-style-links .cpv-card:focus-visible {
	transform: none; box-shadow: none; background: none; border-color: transparent; color: var(--cpv-link);
}
.cpv-style-links .cpv-card:focus-visible { outline: 2px solid var(--cpv-accent); outline-offset: 2px; border-radius: 3px; }
.cpv-style-links .cpv-thumb { flex: 0 0 auto; display: inline-flex; width: auto; }
.cpv-style-links .cpv-thumb canvas { display: none; }
.cpv-style-links .cpv-thumb .cpv-icon { position: relative; top: .14em; font-size: 1.05em; opacity: .9; }
.cpv-style-links .cpv-body { display: block; min-width: 0; }
.cpv-style-links .cpv-title {
	display: inline; font-weight: 500; line-height: inherit; color: inherit;
	text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em;
	text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
	transition: text-decoration-color .15s ease;
}
.cpv-style-links .cpv-card:hover .cpv-title, .cpv-style-links .cpv-card:focus-visible .cpv-title { text-decoration-color: currentColor; }
.cpv-style-links .cpv-meta { display: inline-flex; flex-wrap: nowrap; margin: 0 0 0 .45em; font-size: .8em; white-space: nowrap; vertical-align: baseline; }
.cpv-style-links .cpv-meta:not(:has(> span:not(:empty))) { display: none; }
.cpv-style-links .cpv-badge { position: static; align-self: center; flex: 0 0 auto; padding: 0 6px; font-size: 10px; line-height: 1.6; }
.cpv-style-links .cpv-lock { position: static; align-self: center; flex: 0 0 auto; font-size: 12px; }
.cpv-style-links .cpv-group-title { font-size: 1em; margin: 0 0 6px; padding-bottom: 5px; border-bottom-width: 1px; }
.cpv-style-links .cpv-group + .cpv-group { margin-top: 12px; }
.cpv-style-links details.cpv-group > summary.cpv-group-title { padding: 8px 14px; }
.cpv-style-links details.cpv-group > .cpv-items { padding: 8px 14px 10px; }
/* lighter link colour on dark backgrounds so the accent stays readable */
.cpv-theme-dark.cpv-style-links { --cpv-link: color-mix(in srgb, var(--cpv-accent) 58%, #fff); }
@media (prefers-color-scheme: dark) {
	.cpv-theme-auto.cpv-style-links { --cpv-link: color-mix(in srgb, var(--cpv-accent) 58%, #fff); }
}

/* ------------------------------------------------------------ bold tiles */
.cpv-style-tiles .cpv-items {
	display: grid;
	grid-template-columns: repeat(var(--cpv-cols, 3), minmax(0, 1fr));
	gap: 18px;
}
.cpv-style-tiles .cpv-card {
	min-height: 190px; height: 100%; flex-direction: column; justify-content: flex-end;
	border: 0; color: #fff;
	background-color: var(--cpv-accent);
	background-image: linear-gradient(145deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .3) 100%);
	box-shadow: 0 8px 20px rgba(0, 0, 0, .14);
}
.cpv-style-tiles .cpv-card:hover, .cpv-style-tiles .cpv-card:focus-visible { color: #fff; transform: translateY(-5px) scale(1.01); box-shadow: 0 18px 36px rgba(0, 0, 0, .26); }
.cpv-style-tiles .cpv-thumb {
	position: absolute; top: 16px; right: 16px; width: 76px; aspect-ratio: 3 / 4; overflow: hidden;
	border-radius: 6px; background: rgba(255, 255, 255, .92); transform: rotate(5deg);
	box-shadow: 0 6px 16px rgba(0, 0, 0, .3); transition: transform .25s ease;
}
.cpv-style-tiles .cpv-card:hover .cpv-thumb { transform: rotate(0deg) scale(1.06); }
.cpv-style-tiles .cpv-thumb .cpv-icon { position: absolute; inset: 0; align-items: center; justify-content: center; font-size: 34px; color: var(--cpv-accent); }
.cpv-style-tiles .cpv-thumb canvas { position: absolute; left: 0; top: 0; width: 100%; height: auto; display: block; }
.cpv-style-tiles .cpv-body { position: relative; display: block; padding: 18px 20px 20px; }
.cpv-style-tiles .cpv-title { font-size: 1.2em; font-weight: 700; color: #fff; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cpv-style-tiles .cpv-meta { color: rgba(255, 255, 255, .85); }
.cpv-style-tiles .cpv-badge { position: absolute; top: 16px; left: 16px; background: #fff; color: var(--cpv-accent); box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.cpv-style-tiles .cpv-lock { position: absolute; top: 100px; right: 22px; color: #fff; }

/* ------------------------------------------------------------ groups */
.cpv-group { margin: 0 0 8px; }
.cpv-group + .cpv-group { margin-top: 18px; }
.cpv-group-title {
	display: flex; align-items: center; gap: 10px;
	margin: 0 0 14px; padding: 0 0 8px;
	font-size: 1.15em; font-weight: 700; line-height: 1.3;
	color: var(--cpv-text); border-bottom: 2px solid var(--cpv-border);
}
.cpv-group-name { flex: 0 1 auto; }
.cpv-count {
	display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 8px;
	border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--cpv-accent);
	background: color-mix(in srgb, var(--cpv-accent) 14%, transparent);
}
details.cpv-group { border: 1px solid var(--cpv-border); border-radius: var(--cpv-radius); background: var(--cpv-bg); padding: 0; overflow: hidden; }
details.cpv-group > summary.cpv-group-title {
	margin: 0; padding: 14px 18px; border-bottom: 0; cursor: pointer; list-style: none; user-select: none;
}
details.cpv-group > summary.cpv-group-title::-webkit-details-marker { display: none; }
details.cpv-group > summary.cpv-group-title::after {
	content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--cpv-muted); border-bottom: 2px solid var(--cpv-muted);
	transform: rotate(45deg); transition: transform .2s;
}
details.cpv-group[open] > summary.cpv-group-title::after { transform: rotate(-135deg); }
details.cpv-group[open] > summary.cpv-group-title { border-bottom: 1px solid var(--cpv-border); }
details.cpv-group > .cpv-items { padding: 18px; }

.cpv-notice { padding: 10px 14px; background: #fff8e5; border-left: 4px solid #f0b429; color: #333; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1024px) {
	.cpv-style-cards .cpv-items, .cpv-style-tiles .cpv-items, .cpv-style-links .cpv-items { grid-template-columns: repeat(var(--cpv-cols-t, 2), minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.cpv-style-cards .cpv-items, .cpv-style-tiles .cpv-items, .cpv-style-links .cpv-items { grid-template-columns: repeat(var(--cpv-cols-m, 1), minmax(0, 1fr)); }
	details.cpv-group > .cpv-items { padding: 12px; }
	.cpv-style-links details.cpv-group > .cpv-items { padding: 8px 12px 10px; }
}
@media (prefers-reduced-motion: reduce) {
	.cpv-card, .cpv-card:hover, .cpv-card:focus-visible { transition: none; transform: none; }
}
