.hod-dtf {
	margin: 2rem 0 0;
	padding: 1.5rem;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 20px;
	box-shadow: 0 10px 35px rgba(15, 23, 42, 0.06);
	color: #111827;
}

.hod-dtf__header h2 {
	margin: 0.25rem 0 0.5rem;
	font-size: clamp(1.5rem, 2vw, 2rem);
}

.hod-dtf__header p {
	margin: 0;
}

.hod-dtf__eyebrow {
	margin: 0;
	font-size: 0.85rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 700;
	color: #b91c1c;
}

.hod-dtf__layout {
	display: grid;
	grid-template-columns: minmax(430px, 0.95fr) minmax(420px, 1.05fr);
	gap: 1.5rem;
	align-items: start;
	margin-top: 1.5rem;
}

.hod-dtf__stage-card,
.hod-dtf__panel {
	background: #f8fafc;
	border: 1px solid #e5e7eb;
	border-radius: 18px;
	padding: 1rem;
}

.hod-dtf__stage-card {
	width: 100%;
	max-width: 610px;
	justify-self: center;
	align-self: start;
}

.hod-dtf__stage-toolbar,
.hod-dtf__panel-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-bottom: 0.75rem;
}

.hod-dtf__stage-toolbar span,
.hod-dtf__panel-head span,
.hod-dtf__status-warning {
	font-size: 0.85rem;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	background: #e5e7eb;
	color: #374151;
}

.hod-dtf__stage-wrap {
	position: relative;
	padding: 1.75rem 0 0 2rem;
}

.hod-dtf__axis {
	position: absolute;
	display: flex;
	font-size: 0.72rem;
	color: #6b7280;
	pointer-events: none;
}

.hod-dtf__axis--top {
	left: 2rem;
	right: 0;
	top: 0;
	justify-content: space-between;
}

.hod-dtf__axis--left {
	left: 0;
	top: 1.75rem;
	bottom: 0;
	flex-direction: column;
	justify-content: space-between;
	align-items: flex-start;
}

.hod-dtf__stage {
	position: relative;
	width: 100%;
	aspect-ratio: 2 / 5;
	background-color: #d1d5db;
	border: 2px solid #94a3b8;
	border-radius: 12px;
	overflow: hidden;
}

/* Der Hintergrund dient ausschließlich der Vorschau. Die Produktionsdatei bleibt transparent. */
.hod-dtf__stage[data-preview-bg="checker"] {
	background-color: #cbd5e1;
	background-image:
		linear-gradient(45deg, rgba(255,255,255,0.52) 25%, transparent 25%),
		linear-gradient(-45deg, rgba(255,255,255,0.52) 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.52) 75%),
		linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.52) 75%),
		linear-gradient(to right, rgba(71,85,105,0.20) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(71,85,105,0.20) 1px, transparent 1px),
		linear-gradient(to right, rgba(71,85,105,0.10) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(71,85,105,0.10) 1px, transparent 1px);
	background-position: 0 0, 0 10px, 10px -10px, -10px 0, 0 0, 0 0, 0 0, 0 0;
	background-size: 20px 20px, 20px 20px, 20px 20px, 20px 20px, 25% 100%, 100% 25%, 5% 100%, 100% 5%;
}

.hod-dtf__stage[data-preview-bg="dark"] {
	background-color: #64748b;
	background-image:
		linear-gradient(to right, rgba(255,255,255,0.24) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(255,255,255,0.24) 1px, transparent 1px),
		linear-gradient(to right, rgba(255,255,255,0.11) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(255,255,255,0.11) 1px, transparent 1px);
	background-size: 25% 100%, 100% 25%, 5% 100%, 100% 5%;
}

.hod-dtf__stage[data-preview-bg="white"] {
	background-color: #fff;
	background-image:
		linear-gradient(to right, rgba(148,163,184,0.20) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(148,163,184,0.20) 1px, transparent 1px),
		linear-gradient(to right, rgba(148,163,184,0.09) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(148,163,184,0.09) 1px, transparent 1px);
	background-size: 25% 100%, 100% 25%, 5% 100%, 100% 5%;
}

.hod-dtf__drop {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	gap: 0.35rem;
	padding: 1rem;
	color: #64748b;
	background: rgba(255, 255, 255, 0.92);
	transition: opacity 0.2s ease, background-color 0.2s ease;
}

.hod-dtf__stage.has-items .hod-dtf__drop {
	opacity: 0;
	pointer-events: none;
}

.hod-dtf__stage.is-dragover .hod-dtf__drop {
	opacity: 1;
	background: rgba(239, 68, 68, 0.08);
	color: #991b1b;
}

.hod-dtf__item {
	position: absolute;
	border: 2px solid transparent;
	border-radius: 8px;
	box-shadow: none;
	background: transparent;
	cursor: move;
	user-select: none;
}

.hod-dtf__item.is-selected {
	border-color: #dc2626;
	box-shadow: none;
}

.hod-dtf__item img {
	position: absolute;
	left: 50%;
	top: 50%;
	display: block;
	max-width: none !important;
	max-height: none !important;
	object-fit: fill;
	transform-origin: center center;
	pointer-events: none;
	border-radius: 0;
}

.hod-dtf__item-label {
	position: absolute;
	left: 0.35rem;
	top: 0.35rem;
	max-width: calc(100% - 1rem);
	font-size: 0.7rem;
	line-height: 1.1;
	padding: 0.15rem 0.35rem;
	border-radius: 999px;
	background: rgba(17, 24, 39, 0.78);
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
}

.hod-dtf__item-handle {
	position: absolute;
	width: 14px;
	height: 14px;
	right: -7px;
	bottom: -7px;
	border-radius: 50%;
	background: #dc2626;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.15);
	cursor: nwse-resize;
}

.hod-dtf__warnings {
	margin-top: 0.85rem;
	display: grid;
	gap: 0.5rem;
}

.hod-dtf__warning {
	padding: 0.75rem 0.9rem;
	border-radius: 12px;
	font-size: 0.92rem;
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

.hod-dtf__controls {
	display: grid;
	gap: 1rem;
}

.hod-dtf input[type="file"] {
	width: 100%;
}

.hod-dtf__notice {
	margin-top: 0.8rem;
	padding: 0.75rem 0.9rem;
	border-radius: 12px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	color: #1d4ed8;
}

.hod-dtf__small {
	font-size: 0.87rem;
	color: #64748b;
	margin: 0.45rem 0 0;
}


.hod-dtf__live-size {
	margin: -0.15rem 0 0.9rem;
	padding: 0.7rem 0.85rem;
	border-radius: 12px;
	background: #fff;
	border: 1px solid #dbe4ee;
	font-weight: 700;
	font-size: 0.95rem;
	color: #1f2937;
}

.hod-dtf__grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

.hod-dtf__grid-2 label,
.hod-dtf__panel label {
	display: grid;
	gap: 0.35rem;
	font-size: 0.92rem;
}

.hod-dtf__input-unit {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.hod-dtf__input-unit input {
	flex: 1;
	min-width: 0;
}

.hod-dtf__input-unit span {
	font-size: 0.9rem;
	color: #475569;
}

.hod-dtf__actions-row {
	display: flex;
	gap: 0.75rem;
	margin-top: 0.75rem;
}

.hod-dtf__actions-row button,
.hod-dtf__item-row button {
	padding: 0.7rem 0.95rem;
	border-radius: 10px;
	border: 1px solid #cbd5e1;
	background: #fff;
	cursor: pointer;
}

.hod-dtf__actions-row button[disabled],
.hod-dtf__item-row button[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

.hod-dtf__items {
	display: grid;
	gap: 0.5rem;
	max-height: 260px;
	overflow: auto;
}

.hod-dtf__item-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.75rem;
	align-items: center;
	padding: 0.65rem 0.75rem;
	border-radius: 12px;
	background: #fff;
	border: 1px solid #e5e7eb;
}

.hod-dtf__item-row.is-selected {
	border-color: #f87171;
	background: #fff5f5;
}

.hod-dtf__item-row strong,
.hod-dtf__item-row small {
	display: block;
}

.hod-dtf__summary {
	list-style: none;
	padding: 0;
	margin: 0.85rem 0 0;
	display: grid;
	gap: 0.7rem;
}

.hod-dtf__summary li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	font-size: 0.95rem;
}

.hod-dtf__summary span {
	color: #475569;
}

@media (max-width: 1080px) {
	.hod-dtf__layout {
		grid-template-columns: 1fr;
	}

	.hod-dtf__stage-card {
		max-width: 560px;
	}
}

@media (max-width: 640px) {
	.hod-dtf {
		padding: 1rem;
	}

	
.hod-dtf__live-size {
	margin: -0.15rem 0 0.9rem;
	padding: 0.7rem 0.85rem;
	border-radius: 12px;
	background: #fff;
	border: 1px solid #dbe4ee;
	font-weight: 700;
	font-size: 0.95rem;
	color: #1f2937;
}

.hod-dtf__grid-2 {
		grid-template-columns: 1fr;
	}

	.hod-dtf__axis--top {
		font-size: 0.64rem;
	}
}

/* 0.2.15: Raster-Checkbox unabhängig von Theme-Regeln sauber ausrichten. */
.hod-dtf label.hod-dtf__check {
	display: inline-flex !important;
	flex-direction: row !important;
	align-items: center !important;
	justify-content: flex-start !important;
	align-self: flex-start;
	width: auto !important;
	max-width: 100%;
	gap: 0.55rem;
	margin: 0.85rem 0 0 !important;
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.3;
	color: #334155;
	cursor: pointer;
}

.hod-dtf label.hod-dtf__check input[type="checkbox"] {
	display: inline-block !important;
	flex: 0 0 17px !important;
	width: 17px !important;
	height: 17px !important;
	min-width: 17px !important;
	max-width: 17px !important;
	margin: 0 !important;
	padding: 0 !important;
	vertical-align: middle;
}

.hod-dtf label.hod-dtf__check span {
	display: inline-block;
	margin: 0;
}

.hod-dtf__rotation-control {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.75rem;
	align-items: end;
	margin-top: 0.75rem;
}

.hod-dtf__actions-row--compact {
	margin-top: 0;
}

.hod-dtf__actions-row--triple {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: stretch;
}

.hod-dtf__actions-row--triple button {
	width: 100%;
	text-align: center;
}

@media (max-width: 860px) {
	.hod-dtf__actions-row--triple {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hod-dtf__actions-row--triple button:last-child {
		grid-column: 1 / -1;
	}
}

@media (max-width: 560px) {
	.hod-dtf__actions-row--triple {
		grid-template-columns: 1fr;
	}

	.hod-dtf__actions-row--triple button:last-child {
		grid-column: auto;
	}
}

.hod-dtf__item.has-image-error {
	background: repeating-linear-gradient(
		45deg,
		#fee2e2,
		#fee2e2 10px,
		#fff 10px,
		#fff 20px
	);
}

.hod-dtf__item.has-image-error .hod-dtf__item-label {
	white-space: normal;
	max-width: calc(100% - 0.7rem);
	border-radius: 6px;
}

@media (max-width: 640px) {
	.hod-dtf__rotation-control {
		grid-template-columns: 1fr;
	}
}


.hod-dtf__stage-toolbar-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.6rem;
	flex-wrap: wrap;
	flex-shrink: 0;
}

.hod-dtf__undo {
	appearance: none;
	border: 1px solid #cbd5e1;
	background: #fff;
	color: #1f2937;
	border-radius: 999px;
	padding: 0.35rem 0.75rem;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

.hod-dtf__undo:hover:not(:disabled) {
	border-color: #94a3b8;
	background: #f8fafc;
}

.hod-dtf__undo:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

@media (max-width: 640px) {
	.hod-dtf__stage-toolbar {
		align-items: flex-start;
		flex-direction: column;
	}

	.hod-dtf__stage-toolbar-actions {
		width: 100%;
		justify-content: space-between;
	}
}

.hod-dtf__cut-line {
	position: absolute;
	left: 0;
	right: 0;
	z-index: 3;
	border-top: 2px dashed #dc2626;
	pointer-events: none;
}

.hod-dtf__cut-line span {
	position: absolute;
	right: 0.35rem;
	bottom: 0.25rem;
	padding: 0.2rem 0.45rem;
	border-radius: 999px;
	background: #dc2626;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	white-space: nowrap;
}

.hod-dtf__item-size {
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 5;
	transform: translate(-50%, -50%);
	display: none;
	padding: 0.28rem 0.5rem;
	border-radius: 8px;
	background: #111827;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.1;
	white-space: nowrap;
	pointer-events: none;
}

.hod-dtf__item.is-resizing .hod-dtf__item-size {
	display: block;
}

.hod-dtf__quality {
	margin: -0.35rem 0 0.9rem;
	padding: 0.65rem 0.8rem;
	border: 1px solid #dbe4ee;
	border-radius: 12px;
	background: #fff;
	font-size: 0.9rem;
	font-weight: 700;
}

.hod-dtf__quality[data-tone="good"] {
	border-color: #bbf7d0;
	background: #f0fdf4;
	color: #166534;
}

.hod-dtf__quality[data-tone="medium"] {
	border-color: #fde68a;
	background: #fffbeb;
	color: #92400e;
}

.hod-dtf__quality[data-tone="bad"] {
	border-color: #fecaca;
	background: #fef2f2;
	color: #991b1b;
}

.hod-dtf__quality[data-tone="neutral"] {
	color: #475569;
}

.hod-dtf__tiers {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.65rem;
	margin-top: 1rem;
}

.hod-dtf__tier {
	display: grid;
	gap: 0.18rem;
	padding: 0.75rem;
	border: 1px solid #dbe4ee;
	border-radius: 12px;
	background: #fff;
	color: #111827;
	text-align: left;
	cursor: pointer;
}

.hod-dtf__tier:hover,
.hod-dtf__tier.is-active {
	border-color: #dc2626;
	background: #fff7f7;
}

.hod-dtf__tier strong,
.hod-dtf__tier span,
.hod-dtf__tier small {
	display: block;
}

.hod-dtf__tier span {
	font-weight: 700;
}

.hod-dtf__tier small {
	color: #64748b;
}

@media (max-width: 640px) {
	.hod-dtf__tiers {
		grid-template-columns: 1fr;
	}
}


.hod-dtf__preview-bg {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.76rem;
	font-weight: 700;
	color: #475569;
	white-space: nowrap;
}

.hod-dtf__preview-bg select {
	min-width: 118px;
	padding: 0.35rem 1.8rem 0.35rem 0.55rem;
	border: 1px solid #cbd5e1;
	border-radius: 999px;
	background-color: #fff;
	font-size: 0.78rem;
	line-height: 1.2;
}

.hod-dtf__cart-box {
	display: grid;
	grid-template-columns: minmax(180px, 0.72fr) minmax(220px, 1.28fr);
	gap: 0.85rem 1rem;
	align-items: end;
	margin-top: 1rem;
	padding: 1rem;
	border: 1px solid #fecaca;
	border-radius: 14px;
	background: #fff;
}

.hod-dtf__cart-quantity {
	display: grid;
	gap: 0.45rem;
	font-weight: 700;
	color: #334155;
}

.hod-dtf__qty-control {
	display: grid;
	grid-template-columns: 42px minmax(64px, 1fr) 42px;
	min-height: 46px;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.hod-dtf__qty-control button {
	border: 0;
	border-radius: 0;
	background: #f1f5f9;
	font-size: 1.35rem;
	font-weight: 700;
	cursor: pointer;
}

.hod-dtf__qty-control button:hover {
	background: #e2e8f0;
}

.hod-dtf__qty-control input {
	width: 100%;
	min-width: 0;
	border: 0 !important;
	border-left: 1px solid #cbd5e1 !important;
	border-right: 1px solid #cbd5e1 !important;
	border-radius: 0 !important;
	text-align: center;
	font-weight: 700;
	box-shadow: none !important;
}

.hod-dtf__add-to-cart {
	min-height: 48px;
	width: 100%;
	border: 0;
	border-radius: 10px;
	padding: 0.85rem 1.1rem;
	background: #dc2626;
	color: #fff;
	font-size: 1rem;
	font-weight: 800;
	letter-spacing: 0.035em;
	cursor: pointer;
	transition: transform 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

.hod-dtf__add-to-cart:hover:not(:disabled) {
	background: #b91c1c;
	transform: translateY(-1px);
}

.hod-dtf__add-to-cart:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.hod-dtf__cart-message {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 0.84rem;
	color: #64748b;
}

@media (max-width: 760px) {
	.hod-dtf__preview-bg {
		width: 100%;
		justify-content: space-between;
	}

	.hod-dtf__cart-box {
		grid-template-columns: 1fr;
	}
}

/* 0.2.9: Staffelbereich nutzt die volle Konfiguratorbreite. */
.hod-dtf__panel--summary {
	grid-column: 1 / -1;
	width: 100%;
}

.hod-dtf__panel--summary .hod-dtf__summary {
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0.7rem;
}

.hod-dtf__panel--summary .hod-dtf__summary li {
	display: grid;
	align-content: start;
	gap: 0.25rem;
	padding: 0.7rem 0.8rem;
	border: 1px solid #e2e8f0;
	border-radius: 11px;
	background: #fff;
}


.hod-dtf__panel--summary .hod-dtf__summary li strong {
	line-height: 1.25;
}

.hod-dtf__panel--summary .hod-dtf__tiers {
	grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hod-dtf__panel--summary .hod-dtf__tier {
	min-height: 122px;
}

.hod-dtf__cart-action {
	display: grid;
	gap: 0.5rem;
}

.hod-dtf__cart-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding: 0 0.15rem;
	color: #475569;
	font-size: 0.9rem;
}

.hod-dtf__cart-total strong {
	font-size: 1.25rem;
	line-height: 1;
	color: #111827;
}

.hod-dtf__add-to-cart {
	display: grid;
	gap: 0.12rem;
	place-items: center;
}

.hod-dtf__add-to-cart small {
	display: block;
	color: inherit;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0;
	opacity: 0.9;
}

@media (max-width: 1220px) {
	.hod-dtf__panel--summary .hod-dtf__tiers {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.hod-dtf__panel--summary .hod-dtf__summary {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 820px) {
	.hod-dtf__panel--summary .hod-dtf__tiers,
	.hod-dtf__panel--summary .hod-dtf__summary {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

}

@media (max-width: 520px) {
	.hod-dtf__panel--summary .hod-dtf__tiers,
	.hod-dtf__panel--summary .hod-dtf__summary {
		grid-template-columns: 1fr;
	}

}


/* 0.2.10: Kopf des Druckbogens darf bei langen Statusmeldungen nicht abschneiden. */
.hod-dtf__stage-toolbar {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.65rem;
}

.hod-dtf__stage-toolbar > strong {
	display: block;
	width: 100%;
	line-height: 1.35;
}

.hod-dtf__stage-toolbar-actions {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.55rem 0.65rem;
	width: 100%;
	min-width: 0;
}

.hod-dtf__stage-toolbar-actions .hod-dtf__preview-bg {
	grid-column: 1;
	min-width: 0;
	white-space: normal;
}

.hod-dtf__stage-toolbar-actions .hod-dtf__undo {
	grid-column: 2;
	white-space: nowrap;
}

.hod-dtf__stage-toolbar-actions [data-status-chip] {
	grid-column: 1 / -1;
	justify-self: stretch;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	white-space: normal;
	overflow-wrap: anywhere;
	text-align: center;
	line-height: 1.35;
}

@media (max-width: 460px) {
	.hod-dtf__stage-toolbar-actions {
		grid-template-columns: 1fr;
	}

	.hod-dtf__stage-toolbar-actions .hod-dtf__preview-bg,
	.hod-dtf__stage-toolbar-actions .hod-dtf__undo,
	.hod-dtf__stage-toolbar-actions [data-status-chip] {
		grid-column: 1;
	}

	.hod-dtf__stage-toolbar-actions .hod-dtf__undo {
		width: 100%;
	}
}


/* 0.2.11: Gesamtpreis deutlich hervorheben und Flächenwerte lesbar halten. */
.hod-dtf__cart-total {
	padding: 0.45rem 0.25rem 0.15rem;
}

.hod-dtf__cart-total span {
	font-size: 1rem;
	font-weight: 700;
}

.hod-dtf__cart-total strong {
	font-size: clamp(1.7rem, 2.2vw, 2.15rem);
	line-height: 1;
	font-weight: 900;
	color: #b91c1c;
}

.hod-dtf__add-to-cart {
	gap: 0.3rem;
	padding-top: 0.95rem;
	padding-bottom: 0.95rem;
}

.hod-dtf__add-to-cart > span {
	font-size: 1rem;
	line-height: 1.1;
}

.hod-dtf__add-to-cart small {
	font-size: clamp(1.25rem, 1.8vw, 1.6rem);
	line-height: 1.1;
	font-weight: 900;
	opacity: 1;
}

.hod-dtf__panel--summary .hod-dtf__summary li strong {
	word-break: normal;
	overflow-wrap: anywhere;
}

.hod-dtf .hod-dtf__button-danger {
	border-color: #fecaca;
	background: #fff5f5;
	color: #b91c1c;
}

.hod-dtf .hod-dtf__button-danger:hover:not([disabled]) {
	border-color: #ef4444;
	background: #fee2e2;
	color: #991b1b;
}

/* 0.2.13: kompakte, einzeilige Zusammenfassung auf breiten Bildschirmen. */
.hod-dtf__panel--summary .hod-dtf__summary {
	margin-bottom: 0.75rem;
}
.hod-dtf__panel--summary .hod-dtf__summary li {
	min-height: 78px;
	padding: 0.62rem 0.72rem;
}
@media (min-width: 1221px) {
	.hod-dtf__panel--summary .hod-dtf__summary {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}


/* 0.2.15: Staffelpreise einheitlich, Gesamtpreis größer, Rabatt eigene Zeile. */
.hod-dtf__tier {
	grid-template-rows: auto auto 1fr auto;
	align-content: start;
}

.hod-dtf__tier-title {
	font-size: 0.86rem;
	line-height: 1.25;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.hod-dtf__tier-unit {
	font-size: 0.92rem;
	line-height: 1.45;
}

.hod-dtf__tier-total {
	align-self: end;
	margin-top: 0.65rem;
	font-size: 1.05rem;
	font-weight: 800 !important;
	line-height: 1.2;
	color: #c81e1e;
	white-space: nowrap;
}

.hod-dtf__tier:hover .hod-dtf__tier-total,
.hod-dtf__tier.is-active .hod-dtf__tier-total {
	color: #b91c1c;
}

.hod-dtf__tier-discount {
	margin-top: 0.18rem;
	font-size: 0.76rem;
	font-weight: 700;
	line-height: 1.25;
	text-transform: uppercase;
	color: #64748b;
}

@media (max-width: 1380px) and (min-width: 1221px) {
	.hod-dtf__tier-title {
		font-size: 0.78rem;
	}

	.hod-dtf__tier-unit {
		font-size: 0.84rem;
	}
}

@media (max-width: 520px) {
	.hod-dtf__tier-title {
		white-space: normal;
	}
}


/* 0.2.17: Gesamtpreis als wichtigste Zahl in Rot hervorheben. */
.hod-dtf__tier-total {
	color: #c81e1e !important;
}

/* 0.2.19: Rechtebestätigung und Datenschutzhinweis. */
.hod-dtf__privacy-note a {
	font-weight: 700;
}

.hod-dtf__rights-modal[hidden] {
	display: none !important;
}

.hod-dtf__rights-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 1rem;
}

.hod-dtf__rights-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.58);
	backdrop-filter: blur(2px);
}

.hod-dtf__rights-dialog {
	position: relative;
	z-index: 1;
	width: min(680px, 100%);
	max-height: calc(100vh - 2rem);
	overflow: auto;
	padding: 1.35rem;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.hod-dtf__rights-dialog h3 {
	margin: 0 0 0.65rem;
}

.hod-dtf__rights-check {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.75rem;
	align-items: start;
	margin-top: 1rem;
	padding: 1rem;
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	background: #f8fafc;
	line-height: 1.5;
}

.hod-dtf__rights-check input {
	width: 18px;
	height: 18px;
	margin: 0.2rem 0 0;
}

.hod-dtf__rights-actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.75rem;
	margin-top: 1rem;
}

.hod-dtf__rights-actions button {
	padding: 0.75rem 1rem;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	background: #fff;
	font-weight: 700;
	cursor: pointer;
}

.hod-dtf__rights-actions .hod-dtf__rights-confirm {
	border-color: #dc2626;
	background: #dc2626;
	color: #fff;
}

.hod-dtf__rights-actions button:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

body.hod-dtf-rights-open {
	overflow: hidden;
}

@media (max-width: 560px) {
	.hod-dtf__rights-actions {
		flex-direction: column-reverse;
	}

	.hod-dtf__rights-actions button {
		width: 100%;
	}
}

/* 0.2.21: Standard-WooCommerce-Warenkorbsteuerung bei DTF-Produkten ausblenden.
   Die Elemente bleiben im Formular vorhanden, damit der Konfigurator sie zum Absenden nutzen kann. */
body.hod-dtf-configurator-product form.cart > .quantity,
body.hod-dtf-configurator-product form.cart > .single_add_to_cart_button {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

body.hod-dtf-configurator-product form.cart {
	min-height: 0;
}


/* 0.2.23: deutlich sichtbarer Live-Status und KI-Nachbearbeitung. */
.hod-dtf__stage-toolbar-actions [data-status-chip].is-processing {
	border: 1px solid #f87171;
	font-weight: 700;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10);
	animation: hod-dtf-processing-pulse 1.1s ease-in-out infinite;
}

@keyframes hod-dtf-processing-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.62; }
}

.hod-dtf__actions-row--selected {
	display: grid;
	grid-template-columns: minmax(220px, 1.8fr) repeat(2, minmax(100px, 1fr));
}

.hod-dtf .hod-dtf__button-ai {
	border-color: #cbd5e1;
	background: #f8fafc;
	color: #334155;
	font-weight: 650;
}

.hod-dtf .hod-dtf__button-ai[hidden] {
	display: none !important;
}

.hod-dtf .hod-dtf__button-ai:hover:not([disabled]) {
	border-color: #3b82f6;
	background: #dbeafe;
}

@media (max-width: 700px) {
	.hod-dtf__actions-row--selected {
		grid-template-columns: 1fr 1fr;
	}
	.hod-dtf__actions-row--selected .hod-dtf__button-ai {
		grid-column: 1 / -1;
	}
}


/* 0.2.26: Staffel- und Übersichtskarten reagieren auf die tatsächliche
 * Breite des Konfigurators statt nur auf die Fensterbreite. Dadurch gibt es
 * auch in Themes mit Seitenleiste keine überlappenden Texte. */
.hod-dtf__panel--summary {
	container-type: inline-size;
	container-name: hod-dtf-summary;
}

@container hod-dtf-summary (max-width: 1120px) {
	.hod-dtf__panel--summary .hod-dtf__tiers {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.hod-dtf__panel--summary .hod-dtf__summary {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.hod-dtf__tier-title,
	.hod-dtf__tier-total {
		white-space: normal;
	}
}

@container hod-dtf-summary (max-width: 720px) {
	.hod-dtf__panel--summary .hod-dtf__tiers,
	.hod-dtf__panel--summary .hod-dtf__summary {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@container hod-dtf-summary (max-width: 460px) {
	.hod-dtf__panel--summary .hod-dtf__tiers,
	.hod-dtf__panel--summary .hod-dtf__summary {
		grid-template-columns: 1fr;
	}
}


/* 0.2.28: kompakter Farbhinweis als Info-Hover / Tap im Uploadbereich. */
.hod-dtf__upload-heading {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin-bottom: 0.35rem;
}

.hod-dtf__upload-heading > label {
	margin: 0;
}

.hod-dtf__info {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	outline: none;
	flex: 0 0 auto;
}

.hod-dtf__info-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border: 1px solid #94a3b8;
	border-radius: 50%;
	background: #f8fafc;
	color: #334155;
	font-size: 0.78rem;
	font-weight: 800;
	font-style: normal;
	line-height: 1;
	cursor: help;
}

.hod-dtf__info:hover .hod-dtf__info-button,
.hod-dtf__info:focus .hod-dtf__info-button,
.hod-dtf__info:focus-within .hod-dtf__info-button {
	border-color: #64748b;
	background: #eef2f7;
}

.hod-dtf__info-tooltip {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 10px);
	z-index: 50;
	width: min(360px, 78vw);
	padding: 0.75rem 0.85rem;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
	color: #334155;
	font-size: 0.82rem;
	font-weight: 400;
	line-height: 1.45;
	text-align: left;
	transform: translate(-50%, 4px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.hod-dtf__info-tooltip::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 100%;
	border: 7px solid transparent;
	border-top-color: #fff;
	transform: translateX(-50%);
}

.hod-dtf__info:hover .hod-dtf__info-tooltip,
.hod-dtf__info:focus .hod-dtf__info-tooltip,
.hod-dtf__info:focus-within .hod-dtf__info-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}

@media (max-width: 640px) {
	.hod-dtf__info-tooltip {
		left: 0;
		width: min(320px, calc(100vw - 3rem));
		transform: translate(0, 4px);
	}

	.hod-dtf__info-tooltip::after {
		left: 10px;
		transform: none;
	}

	.hod-dtf__info:hover .hod-dtf__info-tooltip,
	.hod-dtf__info:focus .hod-dtf__info-tooltip,
	.hod-dtf__info:focus-within .hod-dtf__info-tooltip {
		transform: translate(0, 0);
	}
}

/* 0.3.0: zentrale Motivquellen – Upload + PrintAI */
.hod-dtf__source-actions {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.65rem;
	margin: 0.2rem 0 0.75rem;
}

.hod-dtf__source-button {
	min-height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.7rem 0.8rem;
	border: 1px solid #cbd5e1;
	border-radius: 11px;
	background: #fff;
	color: #1f2937;
	font-size: 0.9rem;
	font-weight: 750;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}

.hod-dtf__source-button:hover {
	border-color: #94a3b8;
	box-shadow: 0 4px 14px rgba(15,23,42,.08);
	transform: translateY(-1px);
}

.hod-dtf__source-button--ai {
	border-color: #a7b4c5;
	background: linear-gradient(180deg,#fff 0%,#f7f9fc 100%);
}

.hod-dtf__source-button--ai:hover {
	border-color: #dc2626;
	background: #fff8f8;
}

.hod-dtf__ai-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 25px;
	padding: 0 7px;
	border-radius: 7px;
	background: #111827;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: .03em;
}

.hod-dtf__native-file {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0,0,0,0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.hod-dtf__printai-note {
	padding: 0.65rem 0.75rem;
	border-radius: 10px;
	background: #f1f5f9;
	border: 1px solid #dbe4ee;
	color: #475569;
}

@media (max-width: 760px) {
	.hod-dtf__source-actions { grid-template-columns: 1fr; }
	.hod-dtf__source-button { width: 100%; }
}
