/* VC Documents: front end. Restyle with the custom properties --vc-accent, --vc-ink, --vc-muted, --vc-radius and --vc-placeholder (fallbacks are built in). */

/* Buttons and focus */

.vc-btn {
	display: inline-block;
	min-height: 44px;
	padding: 0.6rem 1.1rem;
	border: 2px solid var(--vc-accent, #1d4ed8);
	border-radius: var(--vc-radius, 6px);
	background: var(--vc-accent, #1d4ed8);
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.vc-btn:hover {
	filter: brightness(1.08);
}

.vc-btn--ghost {
	background: transparent;
	color: var(--vc-accent, #1d4ed8);
}

.vc-btn:focus-visible,
.vc-docs a:focus-visible,
.vc-pdf a:focus-visible,
.vc-pdf button:focus-visible,
.vc-docs select:focus-visible,
.vc-docs input:focus-visible {
	outline: 3px solid #f59e0b;
	outline-offset: 2px;
}

.vc-pdf__fullscreen[hidden] {
	display: none;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	border: 0;
	word-wrap: normal !important;
}

@media (prefers-reduced-motion: reduce) {
	.vc-docs *,
	.vc-pubs *,
	.vc-pdf * {
		transition: none !important;
		animation: none !important;
	}
}

/* Library: filters */

.vc-docs__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	align-items: flex-end;
	margin: 0 0 1.25rem;
}

.vc-docs__field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.vc-docs__field select,
.vc-docs__field input {
	min-height: 44px;
	padding: 0.4rem 0.6rem;
	font: inherit;
	border: 1px solid #8a93a0;
	border-radius: var(--vc-radius, 6px);
	background: #fff;
}

.vc-docs__field--search {
	flex: 1 1 220px;
}

.vc-docs__field--search input {
	width: 100%;
}

.vc-docs__clear {
	display: inline-block;
	min-height: 44px;
	line-height: 44px;
}

.vc-docs__count {
	color: var(--vc-muted, #5b6573);
	margin: 0 0 1rem;
}

.vc-docs__empty {
	color: var(--vc-muted, #5b6573);
}

/* Library: list and cards */

.vc-docs__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.vc-docs--cards .vc-docs__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 1.5rem;
}

.vc-docs--list .vc-docs__list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.vc-doc {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	margin: 0;
	padding: 0;
}

.vc-docs--cards .vc-doc {
	flex-direction: column;
}

.vc-doc__cover {
	flex: 0 0 auto;
	width: 100%;
	max-width: 210px;
}

.vc-docs--list .vc-doc__cover {
	width: 72px;
	max-width: 72px;
}

.vc-doc__cover img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1.414;
	object-fit: cover;
	object-position: top;
	border-radius: var(--vc-radius, 6px);
	background: var(--vc-placeholder, #eef1f5);
	border: 1px solid #d5dae1;
}

.vc-doc__placeholder {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 0.25rem;
	aspect-ratio: 1 / 1.414;
	padding: 1rem;
	border-radius: var(--vc-radius, 6px);
	background: var(--vc-placeholder, #eef1f5);
	border: 1px solid #d5dae1;
	text-align: center;
	font-weight: 600;
}

.vc-doc__body {
	min-width: 0;
	flex: 1 1 auto;
}

.vc-doc__label {
	margin: 0 0 0.15rem;
	color: var(--vc-muted, #5b6573);
	font-size: 0.9rem;
	font-weight: 600;
}

.vc-doc__title {
	margin: 0 0 0.25rem;
	font-size: 1.15rem;
	line-height: 1.3;
}

.vc-doc__title a {
	color: inherit;
}

.vc-doc__meta {
	margin: 0 0 0.6rem;
	color: var(--vc-muted, #5b6573);
	font-size: 0.9rem;
}

.vc-doc__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
}

.vc-docs__pages {
	margin-top: 1.5rem;
}

.vc-docs__pages ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.vc-docs__pages a,
.vc-docs__pages .current {
	display: inline-block;
	min-width: 44px;
	min-height: 44px;
	line-height: 44px;
	padding: 0 0.75rem;
	text-align: center;
	border: 1px solid #8a93a0;
	border-radius: var(--vc-radius, 6px);
	color: var(--vc-ink, #1d2730);
	text-decoration: none;
}

.vc-docs__pages .current {
	background: var(--vc-accent, #1d4ed8);
	border-color: var(--vc-accent, #1d4ed8);
	color: #fff;
}

/* PDF viewer */

.vc-pdf {
	margin: 1.5rem 0;
}

.vc-pdf__frame {
	position: relative;
	height: var(--vc-pdf-height, 80vh);
	min-height: 320px;
}

.vc-pdf__frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 1px solid #b8c0cc;
	border-radius: var(--vc-radius, 6px);
	background: #f6f7f9;
}

.vc-pdf__fallback {
	display: none;
	text-align: center;
}

.vc-pdf__fallback .vc-pdf__cover {
	max-width: 240px;
	margin: 0 auto 1rem;
}

.vc-pdf__fallback .vc-pdf__cover img,
.vc-pdf__fallback .vc-doc__placeholder {
	width: 100%;
}

/* Phones: cover and "Open PDF" instead of an inline PDF (pointer: coarse, not a user-agent check). */
@media (pointer: coarse) {
	.vc-pdf--cover .vc-pdf__frame {
		display: none;
	}

	.vc-pdf--cover .vc-pdf__fallback {
		display: block;
	}
}

.vc-pdf__tools {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.vc-pdf__notice {
	color: var(--vc-muted, #5b6573);
}

.vc-pdf--file {
	text-align: center;
}

.vc-pdf--file .vc-pdf__cover {
	max-width: 240px;
	margin: 0 auto 1rem;
}

.vc-pdf:fullscreen {
	padding: 1rem;
	background: #fff;
}

.vc-pdf:fullscreen .vc-pdf__frame {
	height: calc(100vh - 4.5rem);
	min-height: 0;
}

/* Publications */

.vc-pubs {
	display: grid;
	grid-template-columns: repeat(var(--vc-pubs-cols, 3), minmax(0, 1fr));
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.vc-pub {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin: 0;
}

.vc-pub__cover img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: var(--vc-radius, 6px);
	background: var(--vc-placeholder, #eef1f5);
}

.vc-pub__title {
	margin: 0.4rem 0 0;
	font-size: 1.1rem;
	line-height: 1.3;
}

.vc-pub__title a {
	color: inherit;
}

.vc-pub__meta,
.vc-pub__note {
	margin: 0;
	color: var(--vc-muted, #5b6573);
	font-size: 0.9rem;
}

.vc-pub__price {
	margin: 0;
	font-weight: 700;
}

.vc-pub p {
	margin: 0;
}

.vc-badge {
	display: inline-block;
	padding: 0.15rem 0.6rem;
	border-radius: 999px;
	background: #e5e7eb;
	color: #111827;
	font-size: 0.85rem;
	font-weight: 600;
}

.vc-badge--in-stock {
	background: #dcfce7;
	color: #14532d;
}

.vc-badge--out-of-print {
	background: #fee2e2;
	color: #7f1d1d;
}

.vc-badge--reprinted {
	background: #dbeafe;
	color: #1e3a8a;
}

/* Single document and publication */

.vc-doc-single,
.vc-pub-single {
	max-width: 960px;
	margin: 0 auto;
}

.vc-doc-single__type {
	margin: 0;
	color: var(--vc-muted, #5b6573);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.85rem;
}

.vc-doc-single__label {
	margin: 0.25rem 0 0;
	color: var(--vc-muted, #5b6573);
}

.vc-doc-single__facts,
.vc-pub-single__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: 1rem 0;
}

.vc-doc-single__facts div,
.vc-pub-single__facts div {
	display: flex;
	gap: 0.4rem;
}

.vc-doc-single__facts dt,
.vc-pub-single__facts dt {
	font-weight: 600;
}

.vc-doc-single__facts dd,
.vc-pub-single__facts dd {
	margin: 0;
}

.vc-pub-single__layout {
	display: grid;
	grid-template-columns: minmax(200px, 300px) 1fr;
	gap: 2rem;
	align-items: start;
}

.vc-pub-single__cover img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--vc-radius, 6px);
}

/* eBay listings: the note shown while the feed waits for media consent. */

.vc-ebay-consent {
	margin: 0 0 1.5rem;
}

.vc-ebay-consent p {
	margin: 0 0 0.75rem;
}

.vc-ebay-consent .vc-btn:focus-visible {
	outline: 3px solid #f59e0b;
	outline-offset: 2px;
}

/* Phones */

@media (max-width: 700px) {
	.vc-pubs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.vc-pub-single__layout {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 420px) {
	.vc-pubs {
		grid-template-columns: 1fr;
	}

	.vc-docs--cards .vc-docs__list {
		grid-template-columns: 1fr;
	}
}
