/* SD24 Artikelerfassung – zuerst fürs Handy gebaut, im Adminbereich von WordPress. */

.sd24 {
	--sd24-text: #1d2327;
	--sd24-leise: #50575e;
	--sd24-rand: #c3c4c7;
	--sd24-flaeche: #fff;
	--sd24-haupt: #2271b1;
	--sd24-haupt-dunkel: #135e96;
	--sd24-gut: #1a7f37;
	--sd24-gut-flaeche: #edfaef;
	--sd24-warn: #8a5a00;
	--sd24-warn-flaeche: #fcf5e3;
	--sd24-fehlt: #b32d2e;
	--sd24-fehlt-flaeche: #fcf0f1;
	--sd24-info-flaeche: #f0f6fc;
	max-width: 760px;
	color: var(--sd24-text);
	font-size: 16px;
	line-height: 1.5;
}

.sd24 h1 {
	font-size: 1.5rem;
	margin: 0;
	padding: 0;
}

.sd24 h2 {
	font-size: 1.05rem;
	margin: 0 0 .4rem;
}

.sd24-kopf {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .75rem;
	margin: .5rem 0 1rem;
}

.sd24-leise {
	color: var(--sd24-leise);
	font-size: .9rem;
	margin: .25rem 0 0;
}

.sd24-leer {
	padding: 2rem 1rem;
	text-align: center;
	color: var(--sd24-leise);
	background: var(--sd24-flaeche);
	border: 1px dashed var(--sd24-rand);
	border-radius: 8px;
}

.sd24-link {
	color: var(--sd24-haupt);
}

.sd24-versteckt {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Knöpfe: mindestens 44 Pixel hoch, damit sie mit dem Daumen sicher zu treffen sind. */
.sd24-knopf {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: .5rem 1rem;
	border: 1px solid var(--sd24-haupt);
	border-radius: 6px;
	background: var(--sd24-flaeche);
	color: var(--sd24-haupt);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	box-sizing: border-box;
}

.sd24-knopf:hover {
	background: var(--sd24-info-flaeche);
	color: var(--sd24-haupt-dunkel);
}

.sd24-knopf:focus-visible,
.sd24-knopf:focus-within,
.sd24-karte:focus-visible {
	outline: 3px solid #f0b849;
	outline-offset: 2px;
}

.sd24-knopf-haupt {
	background: var(--sd24-haupt);
	color: #fff;
}

.sd24-knopf-haupt:hover {
	background: var(--sd24-haupt-dunkel);
	color: #fff;
}

.sd24-knopf-gross {
	min-height: 54px;
	font-size: 1.1rem;
	flex: 1 1 100%;
}

.sd24-knopf-leise {
	border-color: transparent;
	background: transparent;
	font-weight: 400;
	text-decoration: underline;
}

.sd24-knopf-gefahr {
	color: var(--sd24-fehlt);
}

.sd24-knopf[disabled] {
	opacity: .5;
	cursor: not-allowed;
}

.sd24-leiste {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .6rem;
	margin: 1rem 0;
}

.sd24-leiste-fest {
	position: sticky;
	bottom: 0;
	z-index: 5;
	margin: 1rem -.5rem 0;
	padding: .6rem .5rem;
	background: #f0f0f1;
	border-top: 1px solid var(--sd24-rand);
}

.sd24-leiste-fest .sd24-knopf {
	flex: 1 1 12rem;
}

.sd24-leiste-neben {
	margin-top: .25rem;
}

/* Meldungen und Kästen */
.sd24-meldung,
.sd24-kasten {
	margin: 0 0 1rem;
	padding: .75rem 1rem;
	border: 1px solid var(--sd24-rand);
	border-left-width: 5px;
	border-radius: 6px;
	background: var(--sd24-flaeche);
}

.sd24-meldung-gut,
.sd24-kasten-gut {
	border-color: var(--sd24-gut);
	background: var(--sd24-gut-flaeche);
}

.sd24-meldung-warn,
.sd24-kasten-warn {
	border-color: var(--sd24-warn);
	background: var(--sd24-warn-flaeche);
}

.sd24-meldung-fehler,
.sd24-kasten-fehlt {
	border-color: var(--sd24-fehlt);
	background: var(--sd24-fehlt-flaeche);
}

.sd24-meldung-info {
	border-color: var(--sd24-haupt);
	background: var(--sd24-info-flaeche);
}

.sd24-punkte {
	margin: .25rem 0 0 1.2rem;
	padding: 0;
	list-style: disc;
}

.sd24-punkte li {
	margin: .2rem 0;
}

/* Statusleiste: Stand der Verarbeitung */
.sd24-lauf-huelle:empty {
	display: none;
}

.sd24-lauf {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .6rem .85rem;
	margin: 0 0 1rem;
	padding: .75rem 1rem;
	border: 1px solid var(--sd24-rand);
	border-radius: 8px;
	background: var(--sd24-flaeche);
}

.sd24-lauf-text {
	display: flex;
	flex: 1 1 12rem;
	flex-direction: column;
	min-width: 0;
	overflow-wrap: anywhere;
}

.sd24-lauf-text span {
	color: var(--sd24-leise);
	font-size: .9rem;
}

.sd24-lauf-punkt {
	flex: 0 0 auto;
	width: .8rem;
	height: .8rem;
	border-radius: 50%;
	background: #a7aaad;
}

.sd24-lauf-aktiv {
	border-color: var(--sd24-gut);
	background: var(--sd24-gut-flaeche);
}

.sd24-lauf-aktiv .sd24-lauf-punkt {
	background: var(--sd24-gut);
	animation: sd24-puls 1.6s ease-in-out infinite;
}

.sd24-lauf-warn {
	border-color: var(--sd24-warn);
	background: var(--sd24-warn-flaeche);
}

.sd24-lauf-warn .sd24-lauf-punkt {
	background: var(--sd24-warn);
}

@keyframes sd24-puls {
	0%,
	100% {
		box-shadow: 0 0 0 0 rgba(26, 127, 55, .45);
	}

	50% {
		box-shadow: 0 0 0 .45rem rgba(26, 127, 55, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.sd24-lauf-aktiv .sd24-lauf-punkt {
		animation: none;
	}
}

/* Liste der Aufträge */
.sd24-gruppe {
	margin: 1.5rem 0 .5rem;
	padding-bottom: .3rem;
	border-bottom: 1px solid var(--sd24-rand);
}

.sd24-karte {
	display: flex;
	gap: .75rem;
	width: 100%;
	margin: 0 0 .6rem;
	padding: .6rem;
	border: 1px solid var(--sd24-rand);
	border-radius: 8px;
	background: var(--sd24-flaeche);
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.sd24-karte:hover {
	border-color: var(--sd24-haupt);
}

.sd24-karte-bild {
	flex: 0 0 64px;
	width: 64px;
	height: 84px;
	border-radius: 4px;
	background: #dcdcde;
	object-fit: cover;
}

.sd24-karte-text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: .15rem;
	min-width: 0;
}

.sd24-karte-text strong,
.sd24-karte-zeile {
	overflow-wrap: anywhere;
}

.sd24-marke,
.sd24-quelle {
	display: inline-block;
	padding: .05rem .5rem;
	border-radius: 999px;
	font-size: .8rem;
	font-weight: 600;
	white-space: nowrap;
}

.sd24-marke-fertig,
.sd24-quelle-gut {
	background: var(--sd24-gut-flaeche);
	color: var(--sd24-gut);
}

.sd24-marke-wartet,
.sd24-marke-in_arbeit,
.sd24-quelle-info {
	background: var(--sd24-info-flaeche);
	color: var(--sd24-haupt-dunkel);
}

.sd24-marke-rueckfrage {
	background: var(--sd24-warn-flaeche);
	color: var(--sd24-warn);
}

.sd24-marke-fehler,
.sd24-quelle-fehlt {
	background: var(--sd24-fehlt-flaeche);
	color: var(--sd24-fehlt);
}

.sd24-quelle-warn {
	background: var(--sd24-warn-flaeche);
	color: var(--sd24-warn);
}

.sd24-marke-uebernommen,
.sd24-quelle-hand {
	background: #f0f0f1;
	color: var(--sd24-leise);
}

/* Fotos */
.sd24-foto {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	margin: 0 0 1rem;
	padding: 1rem;
	border: 1px solid var(--sd24-rand);
	border-radius: 8px;
	background: var(--sd24-flaeche);
}

.sd24-foto-vorschau {
	max-width: 100%;
	max-height: 260px;
	border-radius: 6px;
	object-fit: contain;
	background: #f0f0f1;
}

.sd24-foto-vorschau[hidden] {
	display: none;
}

.sd24-foto-status {
	color: var(--sd24-leise);
}

.sd24-foto-da {
	color: var(--sd24-gut);
	font-weight: 600;
}

.sd24-fotos {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: .75rem;
	margin: 0 0 1rem;
}

.sd24-fotos a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .25rem;
	min-width: 0;
	max-width: 240px;
	color: var(--sd24-haupt);
	font-size: .9rem;
	text-align: center;
}

/* Sammel-Upload: Raster der gewählten Fotos mit Nummer */
.sd24-raster {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: .5rem;
	margin: 0 0 .75rem;
}

.sd24-raster:empty {
	display: none;
}

.sd24-kachel {
	position: relative;
	display: block;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border: 1px solid var(--sd24-rand);
	border-radius: 6px;
	background: #f0f0f1;
}

.sd24-kachel img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sd24-kachel-leer {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: .25rem;
	color: var(--sd24-leise);
	font-size: .75rem;
	text-align: center;
	overflow-wrap: anywhere;
}

.sd24-kachel-nr {
	position: absolute;
	top: 4px;
	left: 4px;
	min-width: 1.6rem;
	padding: 0 .35rem;
	border-radius: 999px;
	background: rgba(29, 35, 39, .85);
	color: #fff;
	font-size: .85rem;
	font-weight: 600;
	line-height: 1.6rem;
	text-align: center;
	box-sizing: border-box;
}

.sd24-kachel-weg {
	position: absolute;
	top: 0;
	right: 0;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 0 6px 0 6px;
	background: rgba(29, 35, 39, .85);
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.sd24-kachel-weg:hover,
.sd24-kachel-weg:focus-visible {
	background: var(--sd24-fehlt);
	outline: 3px solid #f0b849;
	outline-offset: -3px;
}

/* Sammel-Upload: Fotos den Artikeln zuordnen */
.sd24-zuordnung-zeile {
	display: flex;
	gap: .75rem;
	align-items: flex-start;
	margin: 0 0 .75rem;
	padding: .6rem;
	border: 1px solid var(--sd24-rand);
	border-radius: 8px;
	background: var(--sd24-flaeche);
}

.sd24-zuordnung-zeile a {
	flex: 0 0 96px;
}

.sd24-zuordnung-zeile img {
	display: block;
	width: 96px;
	height: 128px;
	border-radius: 4px;
	background: #f0f0f1;
	object-fit: cover;
}

.sd24-zuordnung-wahl {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: .35rem;
	min-width: 0;
}

.sd24-geschwister {
	margin: .25rem 0 0;
	padding: 0;
	list-style: none;
}

.sd24-geschwister li {
	display: flex;
	align-items: center;
	gap: .6rem;
	margin: .35rem 0;
	overflow-wrap: anywhere;
}

.sd24-geschwister img {
	flex: 0 0 36px;
	width: 36px;
	height: 48px;
	border-radius: 3px;
	object-fit: cover;
}

.sd24-fotos img {
	width: 100%;
	max-height: 300px;
	border: 1px solid var(--sd24-rand);
	border-radius: 6px;
	background: var(--sd24-flaeche);
	object-fit: contain;
}

/* Formular */
.sd24-zeile {
	margin: 0 0 1rem;
}

.sd24-zeile-kopf {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem .6rem;
	margin-bottom: .25rem;
}

.sd24 label,
.sd24-beschriftung {
	font-weight: 600;
}

.sd24-quelle-huelle {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem;
	font-size: .85rem;
	overflow-wrap: anywhere;
}

.sd24 input[type="text"],
.sd24 select,
.sd24 textarea {
	display: block;
	width: 100%;
	max-width: none;
	min-height: 44px;
	margin: 0;
	padding: .45rem .6rem;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	background: var(--sd24-flaeche);
	color: var(--sd24-text);
	font-size: 16px; /* Unter 16 Pixel zoomt das iPhone beim Antippen in die Seite. */
	line-height: 1.4;
	box-sizing: border-box;
}

.sd24 textarea {
	resize: vertical;
}

.sd24 [aria-invalid="true"] {
	border-color: var(--sd24-fehlt);
	box-shadow: 0 0 0 1px var(--sd24-fehlt);
}

.sd24-grundpreis {
	margin: -.5rem 0 1rem;
	font-weight: 600;
}

.sd24-kategorien {
	max-height: 280px;
	padding: .5rem .75rem;
	overflow-y: auto;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	background: var(--sd24-flaeche);
}

.sd24-haken {
	display: flex;
	align-items: center;
	gap: .6rem;
	min-height: 40px;
	font-weight: 400 !important;
}

.sd24-haken-ein {
	padding-left: 1.75rem;
}

.sd24-haken input {
	flex: 0 0 auto;
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
}

@media (min-width: 600px) {
	.sd24-knopf-gross {
		flex: 0 1 auto;
	}

	.sd24-raster {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.sd24-karte-bild {
		flex-basis: 72px;
		width: 72px;
		height: 96px;
	}
}
