/* Farbtabelle im Bestellformular: Farbfeld in Höhe der Eingabefelder, Farbname nur für Vorleseprogramme. */
.kmde-mx .gfa_matrix_table td.kmde-mx-name {
	width: 0;
	max-width: 0;
	padding: 0;
	border: 0;
	overflow: hidden;
	font-size: 0;
	line-height: 0;
	white-space: nowrap;
}

.kmde-mx .gfa_matrix_table td.kmde-mx-cell {
	width: var(--kmde-mx-size, 44px);
	padding-left: 0;
	vertical-align: middle;
}

.kmde-mx table.gfa_matrix_table th.kmde-mx-corner {
	width: var(--kmde-mx-size, 44px);
	padding: 0;
	overflow: hidden;
	color: transparent;
	font-size: 0;
	line-height: 0;
}

.kmde-mx table.gfa_matrix_table th.kmde-mx-size {
	padding: 8px 2px;
	color: #17171a;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-align: center;
	white-space: nowrap;
}

.kmde-mx .kmde-mx-swatch {
	display: block;
	width: var(--kmde-mx-size, 44px);
	height: var(--kmde-mx-size, 44px);
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 6px;
	background: #f1f1f1;
	box-shadow: none;
	overflow: hidden;
	cursor: default;
}

.kmde-mx .kmde-mx-swatch.has-photo {
	cursor: zoom-in;
}

.kmde-mx .kmde-mx-swatch img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
}

.kmde-mx .kmde-mx-swatch.has-photo:hover,
.kmde-mx .kmde-mx-swatch.has-photo:focus-visible {
	border-color: #17171a;
	outline: 2px solid var(--kmde-accent, #fbe64d);
	outline-offset: 1px;
}

.kmde-mx-box {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(15, 15, 18, 0.82);
}

.kmde-mx-box[hidden] {
	display: none;
}

.kmde-mx-figure {
	position: relative;
	max-width: min(680px, 100%);
	margin: 0;
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
}

.kmde-mx-figure img {
	display: block;
	width: 100%;
	height: auto;
	max-height: calc(100vh - 120px);
	object-fit: contain;
	background: #fff;
}

.kmde-mx-figure figcaption {
	padding: 12px 56px;
	color: #17171a;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
}

.kmde-mx-box button {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--kmde-accent, #fbe64d);
	color: var(--kmde-accent-ink, #17171a);
	font-size: 24px;
	line-height: 1;
	letter-spacing: 0;
	cursor: pointer;
}

.kmde-mx-box button:hover,
.kmde-mx-box button:focus-visible {
	background: #17171a;
	color: var(--kmde-hover-ink, #fbe64d);
}

.kmde-mx-close {
	top: 8px;
	right: 8px;
}

.kmde-mx-prev,
.kmde-mx-next {
	bottom: 4px;
}

.kmde-mx-prev {
	left: 8px;
}

.kmde-mx-next {
	right: 8px;
}

/* Lineal: öffnet die Größentabelle des gewählten Artikels. */
.kmde-mx-has-ruler .gfa_matrix_table th .kmde-mx-ruler {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-height: 0;
	margin: 0 0 0 8px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: var(--kmde-accent, #fbe64d);
	color: var(--kmde-accent-ink, #17171a);
	box-shadow: none;
	line-height: 1;
	vertical-align: middle;
	cursor: pointer;
}

.kmde-mx.kmde-mx-has-ruler .gfa_matrix_table th .kmde-mx-ruler {
	display: flex;
	width: var(--kmde-mx-size, 44px);
	height: 36px;
	margin: 0;
}

.kmde-mx-has-ruler .gfa_matrix_table th .kmde-mx-ruler:hover,
.kmde-mx-has-ruler .gfa_matrix_table th .kmde-mx-ruler:focus-visible {
	background: #17171a;
	color: var(--kmde-hover-ink, #fbe64d);
}

.kmde-mx-sheet {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(760px, 100%);
	max-height: calc(100vh - 32px);
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
}

.kmde-mx-title {
	margin: 0;
	padding: 18px 64px 12px 20px;
	color: #17171a;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
}

.kmde-mx-sizes {
	padding: 0 20px 20px;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

.kmde-mx-sizes table {
	width: 100%;
	margin: 0;
}

/* ---------- Handy: Kacheln der Bildauswahl quadratisch, damit das Textil ganz zu sehen ist ---------- */

@media (max-width: 639px) {
	.image-choices-field.ic-theme--simple .image-choices-choice-image-wrap {
		height: auto;
		aspect-ratio: 1 / 1;
	}

	.image-choices-field.ic-theme--simple .image-choices-choice-image-wrap::after {
		height: 100%;
	}
}

/* ---------- Handy: Farbtabelle kompakter, Zahlen haben in den schmalen Feldern Platz ---------- */

@media (max-width: 639px) {
	.kmde-mx .gfa_matrix_table input.gfa_matrix_input {
		height: 40px;
		min-height: 0;
		padding: 0;
		text-align: center;
		-moz-appearance: textfield;
		appearance: textfield;
	}

	.kmde-mx .gfa_matrix_table input.gfa_matrix_input::-webkit-outer-spin-button,
	.kmde-mx .gfa_matrix_table input.gfa_matrix_input::-webkit-inner-spin-button {
		-webkit-appearance: none;
		margin: 0;
	}

	.kmde-mx .gfa_matrix_table td {
		padding-right: 2px;
		padding-left: 2px;
	}

	.kmde-mx table.gfa_matrix_table th.kmde-mx-size {
		font-size: 14px;
	}
}

/* ---------- Gleich breite Spalten für alle Größen ---------- */

.kmde-mx table.gfa_matrix_table.kmde-mx-fixed {
	width: 100%;
	table-layout: fixed;
}

.kmde-mx col.kmde-mx-col-swatch {
	width: calc(var(--kmde-mx-size, 44px) + 6px);
}

.kmde-mx col.kmde-mx-col-name {
	width: 0;
}

.kmde-mx .kmde-mx-fixed input.gfa_matrix_input {
	width: 100%;
	max-width: none;
	box-sizing: border-box;
}

@media (max-width: 639px) {
	.kmde-mx table.gfa_matrix_table th.kmde-mx-size {
		padding-right: 0;
		padding-left: 0;
		font-size: 13px;
		letter-spacing: 0;
	}
}
