/*
 * Werkverzeichnis – frontend styles.
 * Fonts and text colour are inherited from the surrounding theme.
 * Adjust the variables below to fit a theme instance.
 */
.wvz {
	/* Width of the content, without the side padding. */
	--wvz-max-width: 1200px;
	--wvz-padding: 20px;
	/* Longest line of the detail text. */
	--wvz-text-width: 900px;
	--wvz-gap: 28px;
	--wvz-column-min: 220px;
	--wvz-accent: #111;
	--wvz-muted: #6b6b6b;
	--wvz-border: #d0d0d0;
	--wvz-tile-background: #f3f3f1;
	/* Space kept free above a scroll target, e.g. for a fixed navigation bar. */
	--wvz-scroll-offset: 110px;

	box-sizing: border-box;
	max-width: calc(var(--wvz-max-width) + 2 * var(--wvz-padding));
	margin: 0 auto;
	padding: 32px var(--wvz-padding) 64px;
}
.wvz *,
.wvz *::before,
.wvz *::after { box-sizing: inherit; }

.wvz__title { margin: 0 0 24px; }

/* Detail area of the selected work */
.wvz-detail-wrap { scroll-margin-top: var(--wvz-scroll-offset); transition: opacity 0.15s; }
.wvz--loading .wvz-detail-wrap { opacity: 0.4; }
.wvz-detail {
	display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px;
	margin: 0 0 48px; padding: 0 0 48px; border-bottom: 1px solid var(--wvz-border);
}
.wvz-detail__media { min-width: 0; }
.wvz-detail__info { min-width: 0; }
.wvz-detail__title { margin: 0 0 16px; font-size: 1.5em; line-height: 1.25; }
.wvz-detail__data { margin: 0; }
.wvz-detail__row { display: flex; gap: 16px; padding: 7px 0; border-top: 1px solid var(--wvz-border); }
.wvz-detail__row:last-child { border-bottom: 1px solid var(--wvz-border); }
.wvz-detail__row dt { flex: 0 0 9.5em; margin: 0; color: var(--wvz-muted); font-weight: normal; }
.wvz-detail__row dd { flex: 1 1 auto; min-width: 0; margin: 0; }
.wvz-detail__text { grid-column: 1 / -1; max-width: var(--wvz-text-width); line-height: 1.6; }
.wvz-detail__text > :first-child { margin-top: 0; }
.wvz-detail__text > :last-child,
.wvz-detail__text > :last-child .wvz-more__toggle { margin-bottom: 0; }
.wvz-more[open] .wvz-more__toggle { margin-bottom: 1em; }
.wvz-detail__text img { max-width: 100%; height: auto; }
/* Restore text formatting that themes commonly reset. */
.wvz-detail__text p,
.wvz-detail__text ul,
.wvz-detail__text ol,
.wvz-detail__text blockquote { margin: 0 0 1em; }
.wvz-detail__text h2,
.wvz-detail__text h3,
.wvz-detail__text h4 { margin: 1.6em 0 0.5em; line-height: 1.3; }
.wvz-detail__text ul,
.wvz-detail__text ol { padding-left: 1.4em; }
.wvz-detail__text ul { list-style: disc; }
.wvz-detail__text ol { list-style: decimal; }
.wvz-detail__text li { margin: 0 0 0.3em; }
.wvz-detail__text blockquote { padding-left: 1em; border-left: 3px solid var(--wvz-border); }
.wvz-detail__text blockquote p:last-child { margin-bottom: 0; }
.wvz-detail__text a { text-decoration: underline; }

/* Text after the "more" tag */
.wvz-more { margin: 0; }
.wvz-more__toggle { display: inline-block; margin: 0 0 1em; text-decoration: underline; cursor: pointer; list-style: none; }
.wvz-more__toggle::-webkit-details-marker { display: none; }
.wvz-more__toggle:focus-visible { outline: 2px solid var(--wvz-accent); outline-offset: 2px; }
.wvz-more__close,
.wvz-more[open] .wvz-more__open { display: none; }
.wvz-more[open] .wvz-more__close { display: inline; }
.wvz-more__content > :first-child { margin-top: 0; }
.wvz-more__content > :last-child { margin-bottom: 0; }

/* Slider */
.wvz-slider { position: relative; background: var(--wvz-tile-background); }
.wvz-slider__stage { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; }
.wvz-slider__stage img,
.wvz-slider__stage video { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.wvz-slider__stage video { width: 100%; height: 100%; background: #000; }
.wvz-slider__zoom {
	display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; margin: 0; padding: 0;
	border: 0; border-radius: 0; background: transparent; cursor: zoom-in;
}
.wvz-slider__zoom:focus-visible { outline: 2px solid var(--wvz-accent); outline-offset: 2px; }
.wvz-slider__empty { color: var(--wvz-muted); }
.wvz-slider__pdf {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
	width: 100%; height: 100%; color: inherit; text-align: center; text-decoration: none;
}
.wvz-slider__pdf img { flex: 0 1 auto; min-height: 0; border: 1px solid var(--wvz-border); }
.wvz-slider__pdf-label { flex: 0 0 auto; text-decoration: underline; }
/* PDF shown inside the slider */
.wvz-slider__doc { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; padding: 8px; }
.wvz-slider__doc-bar { display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 8px; padding: 0 0 8px; }
.wvz-slider__doc-button {
	display: inline-block; margin: 0; padding: 4px 12px;
	border: 1px solid var(--wvz-border); border-radius: 0; background: #fff; color: inherit;
	font: inherit; font-size: 0.8em; line-height: 1.5; text-decoration: none; cursor: pointer;
}
.wvz-slider__doc-button:hover,
.wvz-slider__doc-button:focus-visible { border-color: var(--wvz-accent); }

.wvz-pdf { flex: 1 1 auto; width: 100%; min-height: 0; overflow-x: hidden; overflow-y: auto; background: #8a8a8a; padding: 8px; }
.wvz-pdf:focus-visible { outline: 2px solid var(--wvz-accent); }
.wvz-pdf__page { width: 100%; margin: 0 0 8px; background: #fff; }
.wvz-pdf__page:last-child { margin-bottom: 0; }
.wvz-slider__stage .wvz-pdf__page canvas,
.wvz-pdf__page canvas { display: block; width: 100%; height: auto; max-height: none; }
.wvz-pdf__status { margin: 24px 0 8px; color: #fff; text-align: center; }
.wvz-pdf__fallback { display: block; color: #fff; text-align: center; text-decoration: underline; }

.wvz-slider__nav {
	position: absolute; top: 50%; width: 44px; height: 44px; margin: 0; padding: 0; transform: translateY(-50%);
	border: 0; border-radius: 0; background: rgba(255, 255, 255, 0.85); color: var(--wvz-accent);
	font: inherit; font-size: 30px; line-height: 44px; text-align: center; cursor: pointer;
}
.wvz-slider__nav--prev { left: 0; }
.wvz-slider__nav--next { right: 0; }
.wvz-slider__nav:hover,
.wvz-slider__nav:focus-visible { background: var(--wvz-accent); color: #fff; }

.wvz-thumbs { display: flex; gap: 8px; margin: 8px 0 0; padding: 0 0 6px; overflow-x: auto; list-style: none; position: relative; }
.wvz-thumbs li { flex: 0 0 auto; margin: 0; padding: 0; }
.wvz-thumbs li::before { content: none; }
.wvz-thumbs__item {
	position: relative; display: block; width: 76px; height: 76px; margin: 0; padding: 0;
	border: 2px solid transparent; border-radius: 0; background: var(--wvz-tile-background); cursor: pointer; opacity: 0.6;
}
.wvz-thumbs__item:hover,
.wvz-thumbs__item:focus-visible,
.wvz-thumbs__item.is-active { opacity: 1; }
.wvz-thumbs__item.is-active { border-color: var(--wvz-accent); }
.wvz-thumbs__item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wvz-thumbs__item--icon img { object-fit: contain; padding: 14px 14px 22px; }
.wvz-thumbs__type {
	position: absolute; right: 0; bottom: 0; left: 0; padding: 1px 0;
	background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 11px; line-height: 1.5; text-align: center;
}

/* Filter */
.wvz-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin: 0 0 24px; scroll-margin-top: var(--wvz-scroll-offset); }
.wvz-filter__field { display: flex; flex: 1 1 170px; flex-direction: column; gap: 4px; min-width: 0; margin: 0; }
.wvz-filter__field--search { flex-grow: 2; }
.wvz-filter__label { font-size: 0.8em; color: var(--wvz-muted); }
.wvz-filter select,
.wvz-filter input[type="search"],
.wvz-filter input[type="text"] {
	width: 100%; height: 42px; margin: 0; padding: 0 10px;
	border: 1px solid var(--wvz-border); border-radius: 0;
	background-color: #fff; color: inherit; font: inherit; line-height: 1.2;
	transition: border-color 0.15s;
}
.wvz-filter select:hover,
.wvz-filter input:hover { border-color: var(--wvz-muted); }
.wvz-filter select:focus,
.wvz-filter input:focus { outline: none; border-color: var(--wvz-accent); box-shadow: 0 0 0 1px var(--wvz-accent); }
/* Same chevron on every select instead of the browser's own control. */
.wvz-filter select {
	-webkit-appearance: none; appearance: none;
	padding-right: 36px; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center;
}
.wvz-filter select::-ms-expand { display: none; }
.wvz-filter input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }

/* Searchable select (progressive enhancement of a native select) */
.wvz-combobox { position: relative; }
/* The button looks like the selects next to it. */
.wvz-filter .wvz-combobox__trigger {
	display: block; width: 100%; height: 42px; margin: 0; padding: 0 30px 0 10px;
	border: 1px solid var(--wvz-border); border-radius: 0;
	background-color: #fff; color: inherit; font: inherit; line-height: 1.2; text-align: left; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 10px center;
	transition: border-color 0.15s;
}
.wvz-filter .wvz-combobox__trigger:hover { border-color: var(--wvz-muted); }
.wvz-filter .wvz-combobox__trigger:focus-visible,
.wvz-combobox.is-open .wvz-combobox__trigger { outline: none; border-color: var(--wvz-accent); box-shadow: 0 0 0 1px var(--wvz-accent); }
.wvz-combobox.is-open .wvz-combobox__trigger {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 7l5-5 5 5' fill='none' stroke='%23111' stroke-width='1.5'/%3E%3C/svg%3E");
}
.wvz-combobox__value { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wvz-combobox__panel {
	position: absolute; z-index: 20; top: 100%; left: 0;
	/* At least as wide as the field, wider for long names, never wider than the screen. */
	min-width: 100%; width: max-content; max-width: min(360px, calc(100vw - 2 * var(--wvz-padding)));
	margin: 2px 0 0; border: 1px solid var(--wvz-border); background: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.wvz-combobox__panel[hidden] { display: none; }
.wvz-filter .wvz-combobox__panel .wvz-combobox__search,
.wvz-filter .wvz-combobox__panel .wvz-combobox__search:focus {
	height: 38px; border: 0; border-bottom: 1px solid var(--wvz-border); box-shadow: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='6' cy='6' r='4.5' fill='none' stroke='%236b6b6b' stroke-width='1.5'/%3E%3Cpath d='M9.5 9.5L13 13' stroke='%236b6b6b' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat 10px center #fff;
	padding-left: 32px;
}
.wvz-combobox__list {
	max-height: 240px; margin: 0; padding: 4px 0; overflow-y: auto; list-style: none;
}
.wvz-combobox__option { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; cursor: pointer; }
.wvz-combobox__option.is-active { background: var(--wvz-tile-background); }
.wvz-combobox__option[aria-selected="true"] { font-weight: 600; }
.wvz-combobox__count { color: var(--wvz-muted); font-size: 0.85em; }
.wvz-combobox__empty { padding: 8px 10px; color: var(--wvz-muted); }
.wvz-button {
	height: 42px; margin: 0; padding: 0 20px;
	border: 1px solid var(--wvz-accent); border-radius: 0;
	background: var(--wvz-accent); color: #fff; font: inherit; cursor: pointer;
}
.wvz-button:hover,
.wvz-button:focus-visible { background: #fff; color: var(--wvz-accent); }

/* Results */
.wvz-results { transition: opacity 0.15s; }
.wvz--loading .wvz-results { opacity: 0.4; pointer-events: none; }
.wvz-results__count { margin: 0 0 20px; color: var(--wvz-muted); }
.wvz-results__reset { margin-left: 12px; color: inherit; text-decoration: underline; }

.wvz-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(var(--wvz-column-min), 1fr));
	gap: var(--wvz-gap);
	margin: 0; padding: 0; list-style: none;
}
.wvz-item { min-width: 0; margin: 0; padding: 0; }
.wvz-item::before { content: none; }
.wvz-item__link { display: block; color: inherit; text-decoration: none; }
.wvz-item__link:focus-visible { outline: 2px solid var(--wvz-accent); outline-offset: 4px; }

.wvz-item__image {
	position: relative; display: flex; align-items: center; justify-content: center;
	width: 100%; aspect-ratio: 1 / 1;
	background: var(--wvz-tile-background); color: var(--wvz-muted);
	outline: 0 solid var(--wvz-accent); outline-offset: 3px;
}
.wvz-item__image--empty { font-size: 0.85em; }
.wvz-item__image img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.wvz-item__link:hover .wvz-item__image { outline-width: 1px; }
.wvz-item.is-selected .wvz-item__image { outline-width: 2px; }
.wvz-item__count {
	position: absolute; right: 8px; bottom: 8px; padding: 2px 8px;
	background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 0.75em; line-height: 1.5;
}

.wvz-item__text { display: block; padding-top: 10px; }
.wvz-item__title { display: block; margin: 0 0 4px; font-weight: 600; line-height: 1.3; }
.wvz-item__line { display: block; font-size: 0.85em; line-height: 1.45; }
.wvz-item__number { color: var(--wvz-muted); }

/* Pagination */
.wvz-pages { margin-top: 40px; }
.wvz-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.wvz-per-page { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; margin: 16px 0 0; color: var(--wvz-muted); font-size: 0.9em; }
.wvz-per-page__choice { color: inherit; text-decoration: underline; }
.wvz-per-page__choice:hover,
.wvz-per-page__choice:focus-visible { color: var(--wvz-accent); }
.wvz-per-page__choice.is-current { color: var(--wvz-accent); font-weight: 600; text-decoration: none; }
.wvz-pagination .page-numbers {
	min-width: 40px; padding: 8px 12px;
	border: 1px solid var(--wvz-border); color: inherit; line-height: 1.4; text-align: center; text-decoration: none;
}
.wvz-pagination a.page-numbers:hover,
.wvz-pagination a.page-numbers:focus-visible { border-color: var(--wvz-accent); }
.wvz-pagination .page-numbers.current { border-color: var(--wvz-accent); background: var(--wvz-accent); color: #fff; }
.wvz-pagination .page-numbers.dots { border-color: transparent; }

/* Lightbox */
html.wvz-lightbox-open { overflow: hidden; }
.wvz-lightbox {
	position: fixed; inset: 0;
	width: 100%; max-width: 100%; height: 100%; max-height: 100%;
	margin: 0; padding: 0; border: 0;
	background: rgba(15, 15, 15, 0.96); color: #fff;
}
.wvz-lightbox[open] { display: flex; flex-direction: column; }
.wvz-lightbox::backdrop { background: rgba(15, 15, 15, 0.96); }
.wvz-lightbox__stage { position: relative; display: flex; flex: 1 1 auto; align-items: center; justify-content: center; min-height: 0; padding: 48px 56px 8px; }
.wvz-lightbox__image { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.wvz-lightbox__image[hidden],
.wvz-lightbox__pdf[hidden] { display: none; }
.wvz-lightbox__pdf { display: flex; width: 100%; max-width: 1100px; height: 100%; min-height: 0; }
.wvz-lightbox__pdf .wvz-pdf { background: transparent; padding: 0; }
.wvz-lightbox__caption { flex: 0 0 auto; padding: 12px 56px 20px; text-align: center; }
.wvz-lightbox__title { margin: 0; color: #fff; font-weight: 600; }
.wvz-lightbox__counter { margin: 4px 0 0; color: #b5b5b5; font-size: 0.8em; }

.wvz-lightbox__close,
.wvz-lightbox__nav {
	position: absolute; z-index: 1; width: 44px; height: 44px; margin: 0; padding: 0;
	border: 0; border-radius: 0; background: transparent; color: #fff;
	font: inherit; font-size: 34px; line-height: 44px; text-align: center; cursor: pointer;
}
.wvz-lightbox__close { top: 4px; right: 8px; }
.wvz-lightbox__nav { top: 50%; transform: translateY(-50%); }
.wvz-lightbox__nav--prev { left: 6px; }
.wvz-lightbox__nav--next { right: 6px; }
.wvz-lightbox__nav[hidden] { display: none; }
.wvz-lightbox__close:hover,
.wvz-lightbox__nav:hover { opacity: 0.7; }
.wvz-lightbox__close:focus-visible,
.wvz-lightbox__nav:focus-visible { outline: 2px solid #fff; }

@media (max-width: 899px) {
	.wvz-detail { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-bottom: 32px; padding-bottom: 32px; }
}

@media (max-width: 767px) {
	.wvz { --wvz-gap: 16px; --wvz-column-min: 140px; --wvz-scroll-offset: 16px; padding-top: 20px; }
	.wvz-filter__field { flex-basis: 100%; }
	.wvz-filter__actions,
	.wvz-button { width: 100%; }
	.wvz-thumbs__item { width: 60px; height: 60px; }
	.wvz-detail__row dt { flex-basis: 7.5em; }
	.wvz-lightbox__stage { padding: 48px 8px 8px; }
	.wvz-lightbox__caption { padding: 10px 16px 16px; }
	.wvz-lightbox__nav { top: auto; bottom: 8px; transform: none; background: rgba(15, 15, 15, 0.5); }
}
