.y3-ui.y3da-single {
	padding-top: calc(var(--header-height, 0px) + clamp(2rem, 5vw, 5rem));
	padding-bottom: clamp(2rem, 5vw, 5rem);
}

.y3-ui.y3da-archive {
	padding-block: clamp(2rem, 5vw, 5rem);
}

.y3da-archive__container {
	box-sizing: border-box;
	width: calc(100% - clamp(2rem, 6vw, 4rem));
	max-width: var(--y3-container-width, 1200px);
	margin-inline: auto;
}

.y3da-single__header,
.y3da-single__content,
.y3da-archive__header {
	margin-bottom: 2rem;
}

.y3da-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	height: 100%;
	/* Grundlage der Container Query weiter unten: die Zweiteilung richtet sich
	   nach der Breite der Karte, nicht nach der des Viewports. Im dreispaltigen
	   Grid bleibt sie damit gestapelt, auf der Detailseite wird sie geteilt. */
	container-type: inline-size;
}

/* Merkmale als zugeklapptes Akkordeon am Fuß der Card, im selben Muster wie
   die Bestellhistorie: natives details/summary, kein eigenes JavaScript. */
.y3da-card__attributes {
	/* Derselbe Abstand wie zwischen den übrigen Blöcken des Inhaltsbereichs,
	   der dort aus dessen gap entsteht. */
	margin-top: 1rem;
	border-top: 1px solid var(--y3-color-border, #d7d7d7);
}

.y3da-card__attributes-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	padding: .75rem 1rem;
	cursor: pointer;
	list-style: none;
	font-weight: 600;
}

.y3da-card__attributes-summary::-webkit-details-marker {
	display: none;
}

.y3da-card__attributes-summary::after {
	content: "";
	flex: 0 0 auto;
	width: .5rem;
	height: .5rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translate(-.15em, -.15em);
	transition: transform .15s ease;
}

.y3da-card__attributes[open] > .y3da-card__attributes-summary::after {
	transform: rotate(-135deg) translate(-.15em, -.15em);
}

.y3da-card__attributes-summary:hover,
.y3da-card__attributes-summary:focus-visible {
	background: var(--y3-color-surface-alt, #f5f5f5);
}

.y3da-card__attributes-body {
	padding: 0 1rem 1rem;
}

.y3da-card__attributes-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .875em;
}

.y3da-card__attributes-table th,
.y3da-card__attributes-table td {
	padding: .35rem 0;
	text-align: start;
	vertical-align: top;
	border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.y3da-card__attributes-table tr:last-child th,
.y3da-card__attributes-table tr:last-child td {
	border-bottom: 0;
}

.y3da-card__attributes-table th {
	width: 40%;
	padding-inline-end: .75rem;
	font-weight: 500;
	color: var(--y3-color-muted, #667085);
}

.y3da-card__media {
	position: relative;
	display: grid;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: color-mix(in srgb, currentColor 7%, transparent);
	place-items: center;
}

.y3da-card__media img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: scale-down;
	object-position: center;
}

.y3da-card__media + .y3da-card__content {
	margin-top: 1rem;
}

.y3da-card__preview-toggle {
	position: absolute;
	right: .6rem;
	bottom: .6rem;
	z-index: 1;
	display: inline-grid;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: none;
	border-radius: .4rem;
	background: color-mix(in srgb, #000 55%, transparent);
	color: #fff;
	cursor: pointer;
	place-items: center;
}

.y3da-card__preview-toggle:hover,
.y3da-card__preview-toggle:focus-visible {
	background: color-mix(in srgb, #000 70%, transparent);
}

.y3da-card__preview-toggle.is-active {
	background: var(--y3-color-primary, #2563eb);
}

.y3da-card__content {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 1rem;
}

.y3da-card__title {
	margin: 0;
	font-size: 1.2rem;
}

.y3da-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .75rem;
	margin: 0;
	font-size: .875em;
}

.y3da-card__note,
.y3da-card__excerpt p,
.y3da-card__login-note {
	margin: 0;
}

.y3da-download-grid__toolbar {
	justify-content: space-between;
	margin-bottom: 1rem;
}

.y3da-download-grid__category-filter {
	width: min(100%, 16rem);
}

.y3da-download-grid__file-types {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.y3da-download-grid__file-type-options {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
}

.y3da-download-grid__search {
	margin-inline-start: auto;
	position: relative;
	width: min(100%, 22rem);
}

.y3da-download-grid__search .y3-input {
	padding-inline: .75rem 2.75rem;
}

.y3da-download-grid__search > i {
	position: absolute;
	top: 50%;
	inset-inline-end: 1rem;
	pointer-events: none;
	transform: translateY(-50%);
}

.y3da-download-grid__result-status {
	margin: 0 0 .75rem;
	color: var(--y3-color-muted);
	font-size: .875rem;
}

.y3da-download-grid__item {
	min-width: 0;
	height: 100%;
}

.y3da-download-grid__item[hidden],
.y3da-download-grid__empty[hidden] {
	display: none;
}

.y3da-download-grid__empty {
	margin-top: 1rem;
}

.y3da-card__action {
	/* margin-top: auto schiebt den Aktionsblock in Grid-Karten unterschiedlicher
	   Höhe nach unten. Der Abstand innerhalb des Blocks kommt aus dem gap, nicht
	   aus Margins der Kinder – sonst addieren sich beide. */
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: .5rem;
}

/* Die Aktionen sind Icon-Buttons und stehen immer in einer Reihe. Kein
   flex-wrap: bei drei quadratischen Buttons ist kein Umbruch nötig, und ohne
   ihn bleibt die Reihe auch in schmalen Grid-Spalten geschlossen. */
.y3da-card__buttons {
	display: flex;
	align-items: center;
	gap: .5rem;
}

.y3da-card__download,
.y3da-card__view,
.y3da-card__reorder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

/* Hervorgehobene Aktion der Card, volle Breite unter der Icon-Reihe. */
.y3da-card__details {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.y3da-card__login-note {
	font-size: .875em;
}

.y3da-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .75rem;
	margin-bottom: 2rem;
}

.y3da-filters label { margin: 0; }
.y3da-filters__search { position: relative; }
.y3da-filters__search .y3-input { padding-right: 2.75rem; }
.y3da-filters__search > i { position: absolute; top: 50%; right: 1rem; transform: translateY(-50%); pointer-events: none; }

.y3da-pdf-viewer {
	position: fixed;
	inset: 0;
	width: min(96vw, 90rem);
	max-width: none;
	height: min(94dvh, 70rem);
	max-height: none;
	margin: auto;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: var(--y3-radius, .75rem);
	background: var(--y3-color-surface, #fff);
	color: var(--y3-color-text, #1f2937);
	box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 30%);
}

.y3da-pdf-viewer:not([open]) {
	display: none;
}

.y3da-pdf-viewer::backdrop {
	background: rgb(0 0 0 / 65%);
	backdrop-filter: blur(2px);
}

.y3da-pdf-viewer__layout {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
}

.y3da-pdf-viewer__header,
.y3da-pdf-viewer__toolbar {
	display: flex;
	flex: none;
	align-items: center;
	gap: .75rem;
	padding: .75rem 1rem;
	border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent);
	background: var(--y3-color-surface, #fff);
}

.y3da-pdf-viewer__header {
	justify-content: space-between;
}

.y3da-pdf-viewer__title {
	overflow: hidden;
	margin: 0;
	font-size: clamp(1rem, 2vw, 1.25rem);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.y3da-pdf-viewer__toolbar {
	justify-content: space-between;
	background: color-mix(in srgb, var(--y3-color-surface, #fff) 94%, currentColor);
}

.y3da-pdf-viewer__toolbar-group,
.y3da-pdf-viewer__page-label {
	display: flex;
	align-items: center;
	gap: .5rem;
}

.y3da-pdf-viewer__icon-button {
	display: inline-grid;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
	border-radius: .4rem;
	background: transparent;
	color: inherit;
	cursor: pointer;
	place-items: center;
}

.y3da-pdf-viewer__icon-button:hover:not(:disabled),
.y3da-pdf-viewer__icon-button:focus-visible {
	background: color-mix(in srgb, currentColor 9%, transparent);
}

.y3da-pdf-viewer__icon-button:disabled {
	opacity: .35;
	cursor: not-allowed;
}

.y3da-pdf-viewer__comment-toggle,
.y3da-pdf-viewer__fit-page,
.y3da-pdf-viewer__box-toggle {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	height: 2.5rem;
	padding: 0 .75rem;
	border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
	border-radius: .4rem;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.y3da-pdf-viewer__comment-toggle:hover,
.y3da-pdf-viewer__comment-toggle:focus-visible,
.y3da-pdf-viewer__comment-toggle.is-active,
.y3da-pdf-viewer__fit-page:hover:not(:disabled),
.y3da-pdf-viewer__fit-page:focus-visible,
.y3da-pdf-viewer__fit-page.is-active,
.y3da-pdf-viewer__box-toggle:hover:not(:disabled),
.y3da-pdf-viewer__box-toggle:focus-visible,
.y3da-pdf-viewer__box-toggle.is-active {
	background: color-mix(in srgb, currentColor 9%, transparent);
}

.y3da-pdf-viewer__box-toggle:disabled,
.y3da-pdf-viewer__fit-page:disabled {
	opacity: .45;
	cursor: not-allowed;
}

.y3da-pdf-viewer__comment-count {
	display: inline-grid;
	min-width: 1.35rem;
	height: 1.35rem;
	padding-inline: .3rem;
	border-radius: 999px;
	background: var(--y3-color-primary, #2563eb);
	color: #fff;
	font-size: .75rem;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	place-items: center;
}

.y3da-pdf-viewer__page-label {
	font-size: .875rem;
}

.y3da-pdf-viewer__page-label > span {
	display: inline-block;
	white-space: nowrap;
}

.y3da-pdf-viewer__page-label [data-y3da-pdf-total] {
	display: inline;
}

.y3da-pdf-viewer__page-label input {
	box-sizing: border-box;
	flex: 0 0 4.25rem;
	width: 4.25rem !important;
	height: 2.5rem;
	margin: 0;
	padding: .25rem .5rem;
	border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
	border-radius: .4rem;
	background: var(--y3-color-surface, #fff);
	color: inherit;
	font: inherit;
	text-align: center;
}

.y3da-pdf-viewer__zoom {
	min-width: 3.5rem;
	font-size: .875rem;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.y3da-pdf-viewer__workspace {
	position: relative;
	display: flex;
	flex: 1;
	min-height: 0;
}

.y3da-pdf-viewer__surface {
	position: relative;
	display: block;
	flex: 1;
	min-width: 0;
	min-height: 0;
	padding: 1rem;
	overflow: auto;
	overscroll-behavior: contain;
	background: color-mix(in srgb, currentColor 9%, var(--y3-color-surface, #fff));
}

.y3da-pdf-viewer__page-stage {
	position: relative;
	margin: 0 auto;
}

.y3da-pdf-viewer__page-stage.is-placing-annotation {
	cursor: crosshair;
}

.y3da-pdf-viewer__page-stage.is-drawing-annotation {
	touch-action: none;
}

.y3da-pdf-viewer__page-stage.is-editing-annotation {
	cursor: default;
}

.y3da-pdf-viewer__surface canvas {
	display: block;
	margin: 0;
	background: #fff;
	box-shadow: 0 .4rem 1.5rem rgb(0 0 0 / 20%);
}

.y3da-pdf-viewer__markers {
	position: absolute;
	z-index: 2;
	inset: 0;
	pointer-events: none;
}

.y3da-pdf-viewer__marker {
	position: absolute;
	display: grid;
	width: 1.8rem;
	height: 1.8rem;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50% 50% 50% 0;
	background: var(--y3-color-primary, #2563eb);
	color: #fff;
	box-shadow: 0 .15rem .5rem rgb(0 0 0 / 35%);
	font: 700 .75rem/1 sans-serif;
	cursor: pointer;
	pointer-events: auto;
	transform: translate(-50%, -100%) rotate(-45deg);
	place-items: center;
}

.y3da-pdf-viewer__marker > span {
	transform: rotate(45deg);
}

.y3da-pdf-viewer__marker--draft {
	opacity: .8;
	border-style: dashed;
	cursor: grab;
	pointer-events: auto;
	touch-action: none;
}

.y3da-pdf-viewer__marker--draft:active {
	cursor: grabbing;
}

.y3da-pdf-viewer__marker:hover,
.y3da-pdf-viewer__marker:focus-visible,
.y3da-pdf-viewer__marker.is-focused-annotation {
	z-index: 3;
	background: color-mix(in srgb, var(--y3-color-primary, #2563eb) 75%, #000);
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.y3da-pdf-viewer__shape-layer {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

.y3da-pdf-viewer__shape {
	cursor: pointer;
	pointer-events: auto;
}

.y3da-pdf-viewer__shape-stroke {
	fill: none;
	stroke: var(--y3-color-primary, #2563eb);
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 3;
}

.y3da-pdf-viewer__shape-hit {
	fill: transparent;
	stroke: transparent;
	stroke-width: 16;
	pointer-events: stroke;
}

.y3da-pdf-viewer__annotation-edit-hit {
	cursor: move;
	pointer-events: stroke;
	touch-action: none;
}

rect.y3da-pdf-viewer__annotation-edit-hit {
	pointer-events: all;
}

.y3da-pdf-viewer__annotation-handle {
	fill: #fff;
	stroke: var(--y3-color-primary, #2563eb);
	stroke-width: 3;
	cursor: grab;
	pointer-events: all;
	touch-action: none;
}

.y3da-pdf-viewer__annotation-handle:hover,
.y3da-pdf-viewer__annotation-handle:focus {
	fill: color-mix(in srgb, var(--y3-color-primary, #2563eb) 18%, #fff);
	outline: none;
}

.y3da-pdf-viewer__shape--rectangle .y3da-pdf-viewer__shape-hit {
	pointer-events: all;
}

.y3da-pdf-viewer__arrow-head,
.y3da-pdf-viewer__shape-number {
	fill: var(--y3-color-primary, #2563eb);
}

.y3da-pdf-viewer__shape-number {
	stroke: #fff;
	stroke-width: 2;
}

.y3da-pdf-viewer__shape-number-text {
	fill: #fff;
	font: 700 11px/1 sans-serif;
	pointer-events: none;
}

.y3da-pdf-viewer__shape:hover .y3da-pdf-viewer__shape-stroke,
.y3da-pdf-viewer__shape:focus-visible .y3da-pdf-viewer__shape-stroke,
.y3da-pdf-viewer__shape.is-focused-annotation .y3da-pdf-viewer__shape-stroke {
	stroke: color-mix(in srgb, var(--y3-color-primary, #2563eb) 75%, #000);
	stroke-width: 5;
}

.y3da-pdf-viewer__shape:focus {
	outline: none;
}

.y3da-pdf-viewer__shape-layer--draft {
	opacity: .75;
}

.y3da-pdf-viewer__shape-layer--draft .y3da-pdf-viewer__shape-stroke {
	stroke-dasharray: 7 5;
}

.y3da-pdf-viewer__surface canvas[hidden],
.y3da-pdf-viewer__status[hidden] {
	display: none;
}

.y3da-pdf-viewer__status {
	position: sticky;
	z-index: 1;
	top: 1rem;
	width: fit-content;
	max-width: calc(100% - 2rem);
	margin: 1rem auto;
	padding: .65rem .9rem;
	border-radius: .4rem;
	background: var(--y3-color-surface, #fff);
	box-shadow: 0 .2rem 1rem rgb(0 0 0 / 15%);
	text-align: center;
}

.y3da-pdf-viewer__status.is-error {
	color: #a00;
}

.y3da-pdf-viewer__annotations {
	box-sizing: border-box;
	flex: 0 0 min(24rem, 36vw);
	width: min(24rem, 36vw);
	padding: 1rem;
	overflow: auto;
	border-inline-start: 1px solid color-mix(in srgb, currentColor 14%, transparent);
	background: var(--y3-color-surface, #fff);
}

.y3da-pdf-viewer__annotations[hidden],
.y3da-pdf-viewer__annotation-form[hidden],
.y3da-pdf-viewer__annotation-form [data-y3da-annotation-text-field][hidden],
.y3da-pdf-viewer__annotation-hint[hidden],
.y3da-pdf-viewer__annotation-status[hidden],
.y3da-pdf-viewer__annotation-empty[hidden],
.y3da-pdf-viewer__reference-section[hidden],
.y3da-pdf-viewer__reference-picker[hidden],
.y3da-pdf-viewer__selected-references[hidden] {
	display: none;
}

.y3da-pdf-viewer__annotations-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	margin-bottom: 1rem;
}

.y3da-pdf-viewer__annotations-header h3 {
	margin: 0;
	font-size: 1.05rem;
}

.y3da-pdf-viewer__annotation-tools {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(5.2rem, 1fr));
	gap: .4rem;
}

.y3da-pdf-viewer__marker--lightbox {
	background: #7c3aed;
}

.y3da-pdf-viewer__marker--vector {
	background: #047857;
}

.y3da-pdf-viewer__annotation-tool {
	display: grid;
	min-width: 0;
	min-height: 4rem;
	padding: .5rem .25rem;
	border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
	border-radius: .45rem;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: .75rem;
	cursor: pointer;
	gap: .3rem;
	place-items: center;
}

.y3da-pdf-viewer__annotation-tool i {
	font-size: 1.05rem;
}

.y3da-pdf-viewer__annotation-tool:hover:not(:disabled),
.y3da-pdf-viewer__annotation-tool:focus-visible,
.y3da-pdf-viewer__annotation-tool.is-active {
	border-color: var(--y3-color-primary, #2563eb);
	background: color-mix(in srgb, var(--y3-color-primary, #2563eb) 10%, transparent);
}

.y3da-pdf-viewer__annotation-tool:disabled {
	opacity: .45;
	cursor: not-allowed;
}

.y3da-pdf-viewer__annotation-hint,
.y3da-pdf-viewer__annotation-status,
.y3da-pdf-viewer__annotation-empty {
	margin: .75rem 0;
	font-size: .875rem;
}

.y3da-pdf-viewer__annotation-hint {
	padding: .7rem;
	border-radius: .4rem;
	background: color-mix(in srgb, var(--y3-color-primary, #2563eb) 12%, transparent);
}

.y3da-pdf-viewer__annotation-status.is-error {
	color: #a00;
}

.y3da-pdf-viewer__annotation-form {
	margin: 1rem 0;
	padding: .85rem;
	border: 1px solid color-mix(in srgb, currentColor 15%, transparent);
	border-radius: .5rem;
	background: color-mix(in srgb, currentColor 4%, var(--y3-color-surface, #fff));
}

.y3da-pdf-viewer__annotation-form p {
	margin: 0 0 .75rem;
	font-size: .875rem;
}

.y3da-pdf-viewer__annotation-form label,
.y3da-pdf-viewer__annotation-form label > span {
	display: block;
}

.y3da-pdf-viewer__annotation-form label > span {
	margin-bottom: .35rem;
	font-size: .875rem;
	font-weight: 600;
}

.y3da-pdf-viewer__annotation-form textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 7rem;
	margin: 0;
	padding: .65rem;
	resize: vertical;
	border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
	border-radius: .4rem;
	background: var(--y3-color-surface, #fff);
	color: inherit;
	font: inherit;
}

.y3da-pdf-viewer__annotation-form-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-top: .75rem;
}

.y3da-pdf-viewer__reference-section {
	margin-top: .9rem;
	padding-top: .9rem;
	border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}

.y3da-pdf-viewer__reference-heading {
	display: block;
	font-size: .875rem;
	font-weight: 700;
}

.y3da-pdf-viewer__reference-help {
	margin: .3rem 0 .65rem !important;
	opacity: .75;
	font-size: .78rem !important;
}

.y3da-pdf-viewer__reference-buttons {
	display: grid;
	gap: .45rem;
}

.y3da-pdf-viewer__reference-buttons .y3-button {
	justify-content: flex-start;
	width: 100%;
	font-size: .8rem;
}

.y3da-pdf-viewer__selected-references {
	display: grid;
	gap: .45rem;
	margin-top: .65rem;
}

.y3da-pdf-viewer__selected-references article {
	position: relative;
	padding: .6rem 4.5rem .6rem .65rem;
	border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
	border-radius: .4rem;
	background: var(--y3-color-surface, #fff);
}

.y3da-pdf-viewer__selected-references article > p {
	margin: .2rem 0 0;
	white-space: pre-wrap;
}

.y3da-pdf-viewer__selected-references article > span {
	position: absolute;
	top: .35rem;
	right: .35rem;
	display: flex;
}

.y3da-pdf-viewer__reference-link {
	display: block;
	color: var(--y3-color-primary, #2563eb);
	font-size: .8rem;
	font-weight: 650;
	overflow-wrap: anywhere;
}

.y3da-pdf-viewer__reference-picker {
	margin-top: .75rem;
	padding: .7rem;
	border: 1px solid color-mix(in srgb, var(--y3-color-primary, #2563eb) 55%, transparent);
	border-radius: .5rem;
	background: var(--y3-color-surface, #fff);
	box-shadow: 0 .35rem 1.2rem rgb(0 0 0 / 10%);
}

.y3da-pdf-viewer__reference-picker > header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
	margin-bottom: .65rem;
}

.y3da-pdf-viewer__reference-picker select,
.y3da-pdf-viewer__reference-picker input {
	box-sizing: border-box;
	width: 100%;
	min-height: 2.45rem;
	margin: 0 0 .55rem;
	padding: .5rem .6rem;
	border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
	border-radius: .4rem;
	background: var(--y3-color-surface, #fff);
	color: inherit;
	font: inherit;
}

.y3da-pdf-viewer__reference-picker textarea {
	min-height: 4.5rem;
}

.y3da-pdf-viewer__reference-status {
	min-height: 1.2em;
	margin: 0 0 .4rem !important;
}

.y3da-pdf-viewer__reference-status.is-error {
	color: #a00;
}

.y3da-pdf-viewer__reference-results {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: .4rem;
	max-height: 15rem;
	margin-bottom: .65rem;
	overflow: auto;
}

.y3da-pdf-viewer__reference-result {
	display: grid;
	min-width: 0;
	padding: .3rem;
	border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
	border-radius: .4rem;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: .72rem;
	text-align: start;
	cursor: pointer;
	gap: .25rem;
}

.y3da-pdf-viewer__reference-result:hover,
.y3da-pdf-viewer__reference-result:focus-visible,
.y3da-pdf-viewer__reference-result.is-selected {
	border-color: var(--y3-color-primary, #2563eb);
	background: color-mix(in srgb, var(--y3-color-primary, #2563eb) 10%, transparent);
}

.y3da-pdf-viewer__reference-result-media {
	display: grid;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: .25rem;
	background: color-mix(in srgb, currentColor 8%, transparent);
	place-items: center;
}

.y3da-pdf-viewer__reference-result-media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.y3da-pdf-viewer__reference-result-media i {
	font-size: 1.5rem;
	opacity: .45;
}

.y3da-pdf-viewer__annotation-list {
	display: grid;
	gap: .75rem;
	margin: .75rem 0 0;
	padding: 0;
	list-style: none;
}

.y3da-pdf-viewer__annotation-list li {
	padding: .75rem;
	border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
	border-radius: .5rem;
}

.y3da-pdf-viewer__annotation-list li.is-focused-annotation {
	border-color: var(--y3-color-primary, #2563eb);
	background: color-mix(in srgb, var(--y3-color-primary, #2563eb) 8%, transparent);
}

.y3da-pdf-viewer__annotation-list li > div {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
}

.y3da-pdf-viewer__annotation-list li > div > span {
	display: inline-flex;
	gap: .25rem;
}

.y3da-pdf-viewer__annotation-list li > div > span:first-child {
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
}

.y3da-pdf-viewer__annotation-list small {
	opacity: .7;
}

.y3da-pdf-viewer__annotation-focus {
	display: block;
	width: 100%;
	margin: .5rem 0 0;
	padding: .5rem;
	border: 0;
	border-radius: .35rem;
	background: color-mix(in srgb, currentColor 4%, transparent);
	color: inherit;
	font: inherit;
	text-align: start;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	cursor: pointer;
}

.y3da-pdf-viewer__annotation-focus:hover,
.y3da-pdf-viewer__annotation-focus:focus-visible {
	background: color-mix(in srgb, var(--y3-color-primary, #2563eb) 12%, transparent);
}

.y3da-pdf-viewer__comment-references {
	display: grid;
	gap: .4rem;
	margin: .55rem 0 0;
	padding: .55rem;
	border-radius: .35rem;
	background: color-mix(in srgb, currentColor 4%, transparent);
	list-style: none;
}

.y3da-pdf-viewer__comment-references li {
	padding: 0;
	border: 0;
	border-radius: 0;
}

.y3da-pdf-viewer__comment-references li > span {
	display: block;
	margin-top: .15rem;
	font-size: .78rem;
	white-space: pre-wrap;
}

.y3da-pdf-viewer__annotation-action {
	display: inline-grid;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 0;
	border-radius: .35rem;
	background: transparent;
	color: inherit;
	cursor: pointer;
	place-items: center;
}

.y3da-pdf-viewer__annotation-action:hover,
.y3da-pdf-viewer__annotation-action:focus-visible {
	background: color-mix(in srgb, currentColor 9%, transparent);
}

.y3da-pdf-viewer__annotation-author {
	opacity: .7;
	font-style: italic;
}

.y3da-pdf-viewer__replies {
	display: grid;
	gap: .5rem;
	margin: .6rem 0 0;
	padding: .5rem 0 0 .75rem;
	border-left: 2px solid color-mix(in srgb, currentColor 14%, transparent);
	list-style: none;
}

.y3da-pdf-viewer__reply > div {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
}

.y3da-pdf-viewer__reply p {
	margin: .2rem 0 0;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.y3da-pdf-viewer__reply-form {
	display: grid;
	gap: .4rem;
	margin-top: .6rem;
}

.y3da-pdf-viewer__reply-form textarea {
	width: 100%;
	resize: vertical;
}

.y3da-pdf-viewer__reply-form-actions {
	display: flex;
	gap: .5rem;
}

.y3da-pdf-viewer__invite {
	display: grid;
	gap: .6rem;
	margin: .75rem 0;
	padding: .75rem;
	border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
	border-radius: .5rem;
}

.y3da-pdf-viewer__invite label {
	display: grid;
	gap: .25rem;
}

.y3da-pdf-viewer__invite-hint {
	margin: 0;
	opacity: .8;
	font-size: .85rem;
}

.y3da-pdf-viewer__invite-results {
	display: grid;
	gap: .4rem;
}

.y3da-pdf-viewer__invite-result {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
	padding: .4rem .5rem;
	border-radius: .35rem;
	background: color-mix(in srgb, currentColor 4%, transparent);
}

.y3da-pdf-viewer__invite-status {
	margin: 0;
}

.y3da-pdf-viewer__invite-status.is-error {
	color: var(--y3-color-danger, #b42318);
}

.y3da-pdf-viewer__annotation-export {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}

.y3da-pdf-viewer__annotation-export .y3-button {
	justify-content: center;
	width: 100%;
}

@media (max-width: 850px) {
	.y3da-pdf-viewer__annotations {
		position: absolute;
		z-index: 4;
		inset-block: 0;
		inset-inline-end: 0;
		width: min(90%, 24rem);
		box-shadow: -.75rem 0 2rem rgb(0 0 0 / 20%);
	}
}

@media (max-width: 600px) {
	.y3da-download-grid__toolbar,
	.y3da-download-grid__category-filter,
	.y3da-download-grid__file-types,
	.y3da-download-grid__search { width: 100%; }

	.y3da-filters > * { width: 100%; }
	.y3da-filters select,
	.y3da-filters input,
	.y3da-filters .y3-button { width: 100%; }

	/* Die Icon-Buttons bleiben auch mobil quadratisch und in einer Reihe,
	   statt wie früher die volle Breite zu füllen. */
	.y3da-card__buttons .y3-button { flex: 0 0 auto; justify-content: center; }

	.y3da-pdf-viewer {
		width: 100vw;
		height: 100dvh;
		border-radius: 0;
	}

	.y3da-pdf-viewer__toolbar {
		flex-wrap: wrap;
		justify-content: center;
	}

	.y3da-pdf-viewer__surface {
		padding: .75rem;
	}
}

.y3da-reorder-dialog {
	width: min(92vw, 34rem);
	max-width: none;
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: var(--y3-radius, .75rem);
	background: var(--y3-color-surface, #fff);
	color: var(--y3-color-text, #1f2937);
	box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 30%);
}

.y3da-reorder-dialog:not([open]) {
	display: none;
}

.y3da-reorder-dialog::backdrop {
	background: rgb(0 0 0 / 65%);
	backdrop-filter: blur(2px);
}

.y3da-reorder-dialog__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	padding: .75rem 1rem;
	border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}

.y3da-reorder-dialog__header h2 {
	margin: 0;
	font-size: 1.1rem;
}

.y3da-reorder-dialog__body {
	padding: 1rem;
	max-height: 80vh;
	overflow-y: auto;
}

.y3da-reorder-dialog__attributes {
	width: 100%;
	margin-bottom: 1rem;
	border-collapse: collapse;
}

.y3da-reorder-dialog__attributes th,
.y3da-reorder-dialog__attributes td {
	padding: .35rem .5rem;
	border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent);
	text-align: left;
	font-size: .9rem;
}

.y3da-reorder-dialog__attributes th {
	font-weight: 600;
	color: var(--y3-color-muted, #667085);
	white-space: nowrap;
}

.y3da-reorder-dialog__providers {
	margin: 0 0 1rem;
	padding: 0;
	border: 0;
}

.y3da-reorder-dialog__providers legend {
	margin-bottom: .35rem;
	font-weight: 600;
}

.y3da-reorder-dialog__providers label {
	display: block;
	margin-bottom: .35rem;
}

.y3da-reorder-dialog__tiers {
	margin: 0 0 1rem;
	padding: 0;
	border: 0;
}

.y3da-reorder-dialog__tiers legend {
	margin-bottom: .35rem;
	font-weight: 600;
}

.y3da-reorder-dialog__tiers label {
	display: block;
	margin-bottom: .35rem;
}

.y3da-reorder-dialog__field {
	display: block;
	margin-bottom: 1rem;
}

.y3da-reorder-dialog__field span {
	display: block;
	margin-bottom: .35rem;
	font-weight: 600;
}

.y3da-reorder-dialog__field input,
.y3da-reorder-dialog__field select {
	width: 100%;
}

.y3da-reorder-dialog__checkbox {
	display: flex;
	align-items: center;
	gap: .5rem;
	margin-bottom: 1rem;
}

.y3da-reorder-dialog__status {
	margin: 0 0 .75rem;
	min-height: 1.2em;
}

.y3da-reorder-dialog__status.is-error {
	color: var(--y3-color-danger, #b42318);
}

.y3da-reorder-dialog__status.is-success {
	color: var(--y3-color-success, #067647);
}

/* Bestellhistorie auf der Asset-Detailseite ------------------------------- */

.y3da-order-history {
	margin-top: 1.5rem;
}

.y3da-order-history__title {
	margin: 0;
}

.y3da-order-history__count {
	margin: 0.25rem 0 1rem;
	color: var(--y3-color-muted, #667085);
	font-size: 0.875rem;
}

.y3da-order-history__list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.y3da-order-history__panel {
	border: 1px solid var(--y3-color-border, #d7d7d7);
	border-radius: var(--y3-radius-md, 0.5rem);
	background: var(--y3-color-surface, #fff);
	overflow: hidden;
}

/* Die Titelleiste bleibt immer sichtbar und trägt Bestelldatum und Status. */
.y3da-order-history__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	cursor: pointer;
	list-style: none;
	font-weight: 600;
}

.y3da-order-history__summary::-webkit-details-marker {
	display: none;
}

.y3da-order-history__summary::after {
	content: "";
	flex: 0 0 auto;
	width: 0.5rem;
	height: 0.5rem;
	margin-left: auto;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translate(-0.15em, -0.15em);
	transition: transform 0.15s ease;
}

.y3da-order-history__panel[open] > .y3da-order-history__summary::after {
	transform: rotate(-135deg) translate(-0.15em, -0.15em);
}

.y3da-order-history__summary:hover,
.y3da-order-history__summary:focus-visible {
	background: var(--y3-color-surface-alt, #f5f5f5);
}

/* Die Bestellnummer ist der Bezugspunkt und steht deshalb zuerst; sie darf
   nicht umbrechen, das Datum gibt bei Platzmangel nach. */
.y3da-order-history__number {
	flex: 0 0 auto;
	font-family: var(--y3-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
	font-size: .875em;
}

.y3da-order-history__date {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 400;
	color: var(--y3-color-muted, #667085);
}

/* Der Status darf nicht schrumpfen, sonst bricht er bei langen Labels um. */
.y3da-order-history__status {
	flex: 0 0 auto;
	font-weight: 500;
}

.y3da-order-history__body {
	padding: 0 1rem 1rem;
	border-top: 1px solid var(--y3-color-border, #d7d7d7);
}

.y3da-order-history__facts {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.25rem 1rem;
	margin: 1rem 0 0;
}

.y3da-order-history__facts dt {
	color: var(--y3-color-muted, #667085);
}

.y3da-order-history__facts dd {
	margin: 0;
}

.y3da-order-history__timeline-title {
	margin: 1.25rem 0 0.5rem;
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--y3-color-muted, #667085);
}

.y3da-order-history__timeline {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.y3da-order-history__timeline li {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.75rem;
	justify-content: space-between;
}

.y3da-order-history__timeline-date {
	color: var(--y3-color-muted, #667085);
}

@media (max-width: 480px) {
	.y3da-order-history__summary {
		flex-wrap: wrap;
	}
}
