/**
 * Stapler-Konfigurator – Basis-Styling.
 *
 * Bewusst zurückhaltend: Das Plugin läuft im Theme des Kunden, also werden
 * Farben und Radien über Custom Properties gesetzt. Anpassung im Child-Theme:
 *
 *   .stapler-konfigurator { --stapler-akzent: #0a6b2f; }
 */

.stapler-konfigurator {
	--stapler-akzent: #48992a;
	--stapler-akzent-text: #ffffff;
	--stapler-dunkel: #13181C;
	--stapler-rand: #d8dcde;
	--stapler-flaeche: #ffffff;
	--stapler-radius: 2px;
	--stapler-abstand: 1rem;

	container-type: inline-size;
}

/* --- Schrittnavigation --- */

.stapler-schritte ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	justify-content: stretch;
	list-style: none;
	margin: 0 0 var(--stapler-abstand);
	padding: 0;
}

.stapler-schritte ol li {
	padding: 0;
	margin-left: -2px;
	flex: 1;
}

.stapler-schritt-tab {
	background: transparent;
	border: 2px solid var(--stapler-akzent);
	color: inherit;
	cursor: pointer;
	font: inherit;
	padding: 0.5rem 1.5rem;
	width: 100%;
	height: 100%;
}

.stapler-schritt-tab:hover {
	background: var(--stapler-dunkel);
	color: var(--stapler-akzent-text);
}

.stapler-schritt-tab.ist-aktiv {
	background: var(--stapler-akzent);
	color: var(--stapler-dunkel) !important;
	-webkit-text-fill-color: var(--stapler-dunkel);
}

.stapler-schritt-tab:focus-visible {
	outline: 2px solid var(--stapler-dunkel);
	outline-offset: 2px;
}

.stapler-schritt {
	margin: 0 auto 48px;
	max-width: 1480px;
}

.stapler-schritt:first-of-type {
	max-width: unset;
}

@media(max-width:900px) {
	.stapler-schritte ol {
		flex-flow: column;
	}

	.stapler-schritte ol li:not(:last-of-type) {
		margin-bottom: -2px;
	}
}

/* --- Allgemein --- */

.stapler-ueberschrift {
	margin-bottom: 32px;
	text-align: center;
}

/* --- Modellkarten --- */

.stapler-karten {
	display: grid;
	gap: var(--stapler-abstand);
	grid-auto-columns: minmax(15rem, 1fr);
	grid-auto-flow: column;
	overflow-x: auto;
	padding-bottom: 0.5rem;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
}

@container (max-width: 40rem) {
	.stapler-karten {
		grid-auto-columns: minmax(12rem, 80%);
	}
}

.stapler-karte {
	cursor: pointer;
	display: block;
	scroll-snap-align: start;
}

/* Radio bleibt für Tastatur und Screenreader erreichbar, ist aber visuell ersetzt. */
.stapler-karte input {
	height: 1px;
	opacity: 0;
	position: absolute;
	width: 1px;
}

.stapler-karte-inhalt {
	border: 2px solid transparent;
	display: block;
	height: 100%;
	overflow: hidden;
}

.stapler-karte input:checked+.stapler-karte-inhalt,
.stapler-karte input:focus-visible+.stapler-karte-inhalt {
	outline: solid 6px var(--stapler-akzent);
	outline-offset: -6px;
}

/*
.stapler-karte input:focus-visible + .stapler-karte-inhalt {
	outline: 2px solid var(--stapler-dunkel);
	outline-offset: -2px;
}*/

.stapler-karte-bild img {
	aspect-ratio: 2 / 2.1;
	max-height: 392px;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.stapler-karte-kopf {
	align-items: baseline;
	background: var(--stapler-dunkel);
	color: #fff;
	display: flex;
	gap: 0.5rem;
	justify-content: space-between;
	padding: 16px 24px;
	font-family: "Montserrat-Bold", sans-serif;
	font-weight: 700;
}

/*
.stapler-karte-name {
	font-family: "Montserrat-Bold", sans-serif;
	font-weight: 700;
}*/

.stapler-karte-daten {
	background: var(--stapler-dunkel);
	color: #fff;
	display: flex;
	gap: 1px;
	padding: 0 24px 16px;
}

.stapler-datenpunkt {
	border-left: 1px solid var(--stapler-akzent);
	display: block;
	flex: 1;
	text-align: center;
}

.stapler-datenpunkt:first-child {
	border-left: 0;
	padding-left: 0;
}

.stapler-datenpunkt-name {
	display: block;
	font-size: 0.65rem;
	font-family: "Montserrat-Regular", sans-serif;
}

.stapler-datenpunkt-wert {
	display: block;
	font-size: 0.875rem;
}

/* --- Modellkarten als Swiper --- */

/*
 * Swiper-Variante (Container zusätzlich mit .formswiper .swiper, Swiper-CSS/JS
 * über eigenes Plugin). Die nativen Carousel-Regeln von .stapler-karten – Grid,
 * overflow-x, scroll-snap – müssen hier zurückgenommen werden, sonst kollidieren
 * sie mit dem Flex-Layout und den Transforms von Swiper.
 */

.stapler-karten.formswiper {
	display: block;
	grid-auto-flow: row;
	overflow: hidden;
	padding-bottom: 0;
	position: relative;
	scroll-snap-type: none;
}

.swiper-steuer-wrapper {
	position: relative;
	padding: 0 42.5px;
}

.stapler-karten.formswiper .swiper-wrapper {
	align-items: stretch; /* alle Karten gleich hoch */
}

.stapler-karten.formswiper .swiper-slide {
	height: auto; /* Breite setzt Swiper per slidesPerView, Höhe kommt von der Karte */
	scroll-snap-align: none;
}

.stapler-karten.formswiper .stapler-karte {
	height: 100%;
}


.formswiper-button-prev,
.formswiper-button-next {
	background: #13181C;
	color: var(--stapler-akzent-text);
	cursor: pointer;
	height: 2.75rem;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 2.75rem;
	z-index: 2;
	display: grid;
	transition: transform 0.3s ease;
}


.formswiper-button-prev:hover svg,
.formswiper-button-next:hover svg {
	transform: scale(1.3);
	transition: transform 0.3s ease;
	transform-origin: center;
}


.formswiper-button-prev svg,
.formswiper-button-next svg {
	place-self: center;
  	width: 24px;
  	margin-right: 5px;
}

.formswiper-button-next svg {
  	margin-right: 0;
	margin-left: 5px ;
}

.formswiper-button-prev {
	left: 2px;
}

.formswiper-button-next {
	right: 2px;
}


.formswiper-button-prev.swiper-button-disabled,
.formswiper-button-next.swiper-button-disabled {
	cursor: default;
	opacity: 0.35;
}


.formswiper-button-prev.swiper-button-disabled:hover svg,
.formswiper-button-next.swiper-button-disabled:hover svg {
	transform: scale(1);
}

/* --- Extras --- */

.stapler-extras {
	display: grid;
	gap: 12px;
}

.stapler-extra {
	background: var(--stapler-flaeche);
	border: 1px solid var(--stapler-rand);
}

.stapler-extra-auswahl {
	align-items: center;
	cursor: pointer;
	display: flex;
	gap: 0.75rem;
	padding: 12px 16px;
}

.stapler-extra-auswahl input[type="checkbox"] {
	appearance: none;
	background-color: transparent;
	border: 2px solid var(--stapler-akzent);
	box-sizing: border-box;
	flex-shrink: 0;
	height: 20px;
	margin: 0;
	padding: 0;
	transition: outline 0.1s;
	width: 20px;
}

.stapler-extra-auswahl input[type="checkbox"]:checked {
	background-color: var(--stapler-akzent);
}

.stapler-extra-auswahl:has(input:checked) {
	outline: var(--stapler-akzent) solid 2px;
	outline-offset: -2px;
}

.stapler-extra-preis {
	margin-left: auto;
	white-space: nowrap;
}

.stapler-extra.ist-gesperrt {
	cursor: not-allowed;
	opacity: 0.45;
}

.stapler-extra.ist-gesperrt .stapler-extra-auswahl {
	cursor: not-allowed;
}

.stapler-extra-hinweis:not([hidden]) {
	display: block;
	font-size: 0.8125rem;
	font-style: italic;
	padding: 0 16px 12px;
}

/*
.stapler-extra-name {
	font-family: "Montserrat-Bold", sans-serif;
	font-weight: 700;
}*/

/* --- Extras: Beschreibungs-Accordion --- */

.stapler-extra-umschalter {
	background: transparent;
	border: 0;
	cursor: pointer;
	flex-shrink: 0;
	padding: 0;
}

.stapler-extra-umschalter:hover {
	background-color: transparent;
}

.stapler-extra-umschalter::after {
	background-color: var(--stapler-akzent);
	border-radius: 999px;
	color: white;
	content: "i";
	display: inline-block;
	font-style: italic;
	font-weight: 700;
	line-height: 1;
	padding: 4px 10px;
}

.stapler-extra-beschreibung {
	border-top: 1px solid var(--stapler-rand);
	padding: 12px 16px;
}

.stapler-extra-beschreibung p {
	font-size: 0.8em;
	margin: 0 0 0.5em;
}

.stapler-extra-beschreibung>*:first-child {
	margin-top: 0;
}

.stapler-extra-beschreibung>*:last-child {
	margin-bottom: 0;
}

.stapler-nur-bildschirmleser {
	border: 0;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

/* --- Kontaktfelder --- */

.stapler-felder {
	display: grid;
	gap: var(--stapler-abstand);
	grid-template-columns: repeat(2, 1fr);
}

.stapler-feld:has(>#stapler-firma) {
	grid-column: 1 /3;
}

@media(max-width:600px) {
	.stapler-feld {
	grid-column: 1 /3;
	}
}

.stapler-feld label {
	display: block;
	margin-bottom: 0.25rem;
	font-family: "Montserrat-Bold", sans-serif;
  	font-size: 0.75em;
}

.stapler-feld input,
.stapler-feld textarea {
	border: 2px solid var(--stapler-rand);
	padding: 0.5rem;
	width: 100%;
}

.stapler-feld--nachricht {
	margin-top: var(--stapler-abstand);
}

.stapler-einwilligung {
	display: flex;
	gap: 0.5rem;
	margin-top: var(--stapler-abstand);
}

.stapler-einwilligung span,
.stapler-einwilligung a {
	font-size: 0.75rem!important;
}

.stapler-einwilligung a {
	color:var(--stapler-akzent);
}

.stapler-einwilligung input[type="checkbox"] {
	appearance: none;
	background-color: transparent;
	border: 2px solid var(--stapler-akzent);
	box-sizing: border-box;
	flex-shrink: 0;
	height: 14px;
	margin: auto 0;
	padding: 0;
	transition: outline 0.1s;
	width: 14px;
}
	
.stapler-einwilligung input[type="checkbox"]:checked {
	background-color: var(--stapler-akzent);
}
	

.stapler-formular input[type="text"]:focus,
.stapler-formular input[type="email"]:focus,
.stapler-formular input[type="url"]:focus,
.stapler-formular input[type="password"]:focus,
.stapler-formular input[type="search"]:focus,
.stapler-formular input[type="tel"]:focus,
.stapler-formular input[type="number"]:focus,
.stapler-formular input[type="date"]:focus,
.stapler-formular input[type="time"]:focus,
.stapler-formular textarea:focus,
.stapler-formular select:focus {
	border-color: var(--stapler-akzent);
	border-radius: 0;
}


/* --- Übersicht --- */

.stapler-formular table {
	margin-bottom: 0;
}

.stapler-formular table,
.stapler-formular  td,
.stapler-formular  th {
	border:none;
}

.stapler-uebersicht {
	display: grid;
	gap: calc(var(--stapler-abstand) * 2);
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.stapler-uebersicht h3 {
	margin-bottom: 16px;
}

.stapler-uebersicht h4,
.stapler-uebersicht h5 {
	margin-bottom: 8px;
}

.stapler-uebersicht ul {
	margin: 0 0 0 24px;
}

.stapler-uebersicht-auswahl ul li::marker {
  	content: "+";
  	font-family: "Montserrat-Bold", sans-serif;
  	color: var(--stapler-akzent);
}

.stapler-uebersicht-auswahl ul li {
  	padding-left: 8px;
}

.stapler-uebersicht .table-wrapper {
	padding:24px 48px;
	background-color: #d8dcde66;
}

.stapler-summe {
	border-collapse: collapse;
	width: 100%;
}

.stapler-summe td {
	padding: 0.375rem 0;
}

.stapler-summe td:last-child {
	text-align: right;
	white-space: nowrap;
}

.stapler-summe-gesamt td {
	border-top: 2px solid var(--stapler-dunkel);
	font-weight: 600;
	padding-top: 0.75rem;
}

.stapler-summe-hinweis {
	font-size: 0.8125rem;
	margin-top: 0.75rem;
	opacity: 0.75;
}

.stapler-uebersicht dl {
	display: grid;
	gap: 0.25rem 1.5rem;
	grid-template-columns: 0.5fr 1fr;
	margin: var(--stapler-abstand) 0 0;
	font-size: 0.75em;
}

.stapler-uebersicht dt {
	opacity: 0.7;
	line-height: 1.3em;
}

.stapler-uebersicht dd {
	margin: 0;
}

/* --- Navigation und Meldungen --- */

.stapler-navigation {
	display: flex;
	gap: 0.5rem;
	justify-content: space-between;
	margin-top: calc(var(--stapler-abstand) * 1.5);
}

.stapler-knopf {
	background: var(--stapler-akzent);
	border: 0;
	color: var(--stapler-dunkel) !important;
	-webkit-text-fill-color: var(--stapler-dunkel);
	cursor: pointer;
	font: inherit;
	padding: 0.625rem 1.5rem;
}

.stapler-knopf--zurueck {
	background: var(--stapler-dunkel);
	color: var(--stapler-akzent-text) !important;
	-webkit-text-fill-color: var(--stapler-akzent-text);
	margin-right: auto;
}

.stapler-knopf--weiter,
.stapler-knopf--senden {
	margin-left: auto;
}

.stapler-knopf[disabled] {
	cursor: wait;
	opacity: 0.6;
}

.stapler-meldung {
	border-left: 4px solid;
	margin-bottom: var(--stapler-abstand);
	padding: 0.75rem 1rem;
	scroll-margin-top: 2rem; /* Abstand zum Sprungziel, ggf. an fixen Header anpassen */
}

.stapler-meldung:focus {
	outline: none;
}

.stapler-meldung--erfolg {
	background: #eef7ee;
	border-color: var(--stapler-akzent);
}

.stapler-meldung--fehler {
	background: #fdeeee;
	border-color: #c0392b;
}

/* Honeypot: für Menschen unsichtbar, aber nicht display:none,
   damit einfache Bots ihn trotzdem befüllen. */
.stapler-honigtopf {
	height: 0;
	left: -9999px;
	overflow: hidden;
	position: absolute;
	width: 0;
}