/* ==========================================================================
   BlockBande – Kasse im neuen Design (Leinwand „KasseNeu“, abgenommen 23.10.2026).
   Schlanker Kopf, dunkler Kopf mit Schritten (warenkorb.css), Karten im Graphit-Stil, hell/dunkel über die
   Variablen --k-… aus kopf-fuss.css. Aufbau wie bisher: am PC links „Deine Daten“ und „Deine Bestellung“,
   rechts „Zahlungsart“ mit Haken, Gesamtsumme und Knopf; am Handy untereinander.
   Vorlagen: templates/kasse.php, templates/form-checkout.php, Logik in inc/checkout.php.
   ========================================================================== */

/* Alte Variablennamen für bb-konto (assets/kasse.css: „Geht an …“, Konto-Hinweis) auf die neuen Farben */
body.bb-kasse {
	--bb-bg: var(--k-bg);
	--bb-surface: var(--k-field);
	--bb-surface-active: var(--k-card2);
	--bb-line: var(--k-line);
	--bb-field-line: var(--k-line);
	--bb-text: var(--k-strong);
	--bb-text-soft: var(--k-text);
	--bb-text-muted: var(--k-muted);
	--bb-accent: var(--k-gem);
	--bb-link: var(--k-link);
	--bb-danger: var(--k-danger-text);
}

/* --- Grundlage ---------------------------------------------------------------------- */

html {
	-webkit-text-size-adjust: 100%;
}

body.bb-kasse {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--k-bg);
	color: var(--k-text);
	font-family: var(--k-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.bb-kasse *,
.bb-kasse *::before,
.bb-kasse *::after {
	box-sizing: border-box;
}

.bb-kasse a {
	color: var(--k-link);
}

.bb-kasse a:hover {
	color: var(--k-strong);
}

.bb-kasse .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.bb-kasse .clear {
	clear: both;
}

.bb-kasse .bbsh-ln {
	width: 16px;
	height: 16px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.75;
	stroke-linecap: square;
	stroke-linejoin: miter;
}

.bb-kasse-wrap {
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 24px;
}

/* --- Kopf und Fuß ------------------------------------------------------------------- */

.bb-kasse-header {
	height: 56px;
	background: var(--k-top);
	border-bottom: 1px solid var(--k-line);
}

.bb-kasse-header__in {
	height: 100%;
	display: flex;
	align-items: center;
	gap: 18px;
}

.bb-kasse-header__brand {
	display: flex;
}

.bb-kasse-header__brand img {
	display: block;
	width: auto;
	height: 30px;
}

.bb-kasse-header__safe {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	color: var(--k-gem-text);
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.bb-kasse-header__safe .bbsh-ln {
	width: 15px;
	height: 15px;
}

.bb-kasse .bb-kasse-header__back {
	color: var(--k-muted);
	font-size: 12.5px;
	font-weight: 800;
	text-decoration: none;
}

.bb-kasse .bb-kasse-header__back:hover {
	color: var(--k-strong);
}

.bb-kasse-main {
	flex-grow: 1;
	padding-top: 26px;
	padding-bottom: 72px;
}

.bb-kasse-footer {
	border-top: 1px solid var(--k-line);
	background: var(--k-top);
}

.bb-kasse-footer__in {
	min-height: 52px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 18px;
	padding-top: 10px;
	padding-bottom: 10px;
	font-size: 12.5px;
	font-weight: 800;
	color: var(--k-muted);
}

.bb-kasse-footer nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
}

.bb-kasse .bb-kasse-footer a {
	color: var(--k-muted);
	text-decoration: none;
}

.bb-kasse .bb-kasse-footer a:hover {
	color: var(--k-strong);
}

.bb-kasse-footer__in > span {
	margin-left: auto;
}

/* --- Hinweise von WooCommerce -------------------------------------------------------- */

.bb-kasse .woocommerce-error,
.bb-kasse .woocommerce-info,
.bb-kasse .woocommerce-message {
	list-style: none;
	margin: 0 0 16px;
	padding: 12px 16px;
	border: 1px solid var(--k-info-line);
	border-left-width: 3px;
	border-radius: 0;
	background: var(--k-info-bg);
	color: var(--k-info-text);
	font-size: 13.5px;
	font-weight: 700;
}

.bb-kasse .woocommerce-message {
	border-color: var(--k-ok-line);
	background: var(--k-ok-bg);
	color: var(--k-ok-text);
}

.bb-kasse .woocommerce-error {
	border-color: var(--k-err-line);
	background: var(--k-err-bg);
	color: var(--k-err-text);
}

.bb-kasse .woocommerce-error::before,
.bb-kasse .woocommerce-info::before,
.bb-kasse .woocommerce-message::before {
	content: none;
}

.bb-kasse .woocommerce-error li {
	margin: 0;
	padding-left: 14px;
	position: relative;
}

.bb-kasse .woocommerce-error li::before {
	content: "";
	position: absolute;
	top: 0.62em;
	left: 2px;
	width: 5px;
	height: 5px;
	background: currentColor;
}

.bb-kasse .woocommerce-error li + li {
	margin-top: 4px;
}

.bb-kasse .woocommerce-error a {
	color: inherit;
	font-weight: inherit;
	text-decoration: none;
}

/* Fehler nach dem Bestellversuch: Titel (theme.js) und Liste stehen zusammen in einem roten Kasten */
.bb-kasse .woocommerce-NoticeGroup:has(.woocommerce-error) {
	margin: 0 0 16px;
	padding: 12px 16px;
	border: 1px solid var(--k-err-line);
	border-left-width: 3px;
	background: var(--k-err-bg);
	color: var(--k-err-text);
	font-size: 13.5px;
	font-weight: 700;
}

.bb-kasse .woocommerce-NoticeGroup .woocommerce-error {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

.bb-kasse .bb-error-title {
	margin: 0 0 6px;
	padding: 0 !important;
	color: inherit;
	font-weight: 900;
}

.bb-kasse .bb-error-title::before {
	content: none !important;
}

/* Gutscheine gehen im Warenkorb */
.bb-kasse .woocommerce-form-coupon-toggle,
.bb-kasse form.checkout_coupon {
	display: none !important;
}

/* Konto-Hinweis für Gäste (bb-konto) */
.bb-kasse .bbk-kasse-guest {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 6px;
	margin: 0 0 14px;
	padding: 10px 14px;
	border: 1px solid var(--k-line);
	border-left: 3px solid var(--k-accent);
	border-radius: 0;
	background: var(--k-card);
	color: var(--k-text);
	font-size: 13px;
	font-weight: 700;
}

.bb-kasse .bbk-kasse-guest a {
	color: var(--k-link);
	font-weight: 900;
}

/* --- Aufteilung ------------------------------------------------------------------- */

.bb-kasse-form {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	grid-template-rows: auto auto auto auto 1fr;
	column-gap: 22px;
	row-gap: 0;
	align-items: start;
	margin: 0;
}

.bb-kasse-form > .woocommerce-NoticeGroup {
	grid-column: 1 / -1;
	grid-row: 1;
}

.bb-kasse-details {
	grid-column: 1;
	grid-row: 2;
	display: flex;
	flex-direction: column;
}

/* Die Überschrift „2 Zahlungsart“ steht am PC oben in der Zahlungs-Karte (siehe #payment::before). */
.bb-kasse-details .bb-kasse-step__title--pay {
	display: none;
}

.bb-kasse-summary-title {
	grid-column: 1;
	grid-row: 3;
}

.bb-kasse-form #order_review {
	display: contents;
}

.bb-kasse-form .woocommerce-checkout-review-order-table {
	grid-column: 1;
	grid-row: 4;
}

.bb-kasse-form #payment {
	position: relative;
	grid-column: 2;
	grid-row: 2 / 6;
	padding: 60px 20px 20px;
	background: var(--k-card);
	border: 1px solid var(--k-line);
	border-radius: 0;
}

/* Kopf der Zahlungs-Karte: Nummer und Titel wie bei „1 Deine Daten“ */
.bb-kasse-form #payment::before,
.bb-kasse-form #payment::after {
	position: absolute;
	top: 20px;
}

.bb-kasse-form #payment::before {
	content: "2";
	left: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	background: var(--k-chip-on);
	color: var(--k-accent);
	font: 900 12px/1 var(--k-body);
}

.bb-kasse-form #payment::after {
	content: "Zahlungsart";
	left: 54px;
	color: var(--k-strong);
	font: 400 21px/24px var(--k-head);
}

/* --- Karten: Deine Daten, Deine Bestellung ------------------------------------------- */

.bb-kasse-step {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px 20px 20px;
	background: var(--k-card);
	border: 1px solid var(--k-line);
}

.bb-kasse-step__title,
.bb-kasse-summary-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: var(--k-strong);
	font: 400 21px/1.1 var(--k-head);
}

.bb-kasse-step__title {
	margin-bottom: 8px;
}

.bb-kasse-step__num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	background: var(--k-chip-on);
	color: var(--k-accent);
	font: 900 12px/1 var(--k-body);
}

.bb-kasse-hint {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	color: var(--k-muted);
}

/* „Deine Bestellung“: Titel und Tabelle bilden zusammen eine Karte */
.bb-kasse-summary-title {
	margin-top: 14px;
	padding: 18px 20px 6px;
	background: var(--k-card);
	border: 1px solid var(--k-line);
	border-bottom: 0;
}

/* --- Felder ---------------------------------------------------------------------- */

.bb-kasse-form #minecraft_details h3,
.bb-kasse-form .woocommerce-billing-fields > h3 {
	display: none;
}

.bb-kasse-form .form-row {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 0;
}

.bb-kasse-form .woocommerce-billing-fields__field-wrapper {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-top: 8px;
}

.bb-kasse-form .form-row > label {
	margin: 0;
	color: var(--k-strong);
	font-size: 12.5px;
	font-weight: 900;
	line-height: 1.4;
}

.bb-kasse .required {
	color: var(--k-danger-text);
	text-decoration: none;
}

.bb-kasse .woocommerce-input-wrapper {
	display: block;
	width: 100%;
}

.bb-kasse input.input-text,
.bb-kasse select {
	width: 100%;
	height: 40px;
	margin: 0;
	padding: 0 12px;
	background: var(--k-field);
	border: 1px solid var(--k-line);
	border-radius: 0;
	box-shadow: none;
	color: var(--k-strong);
	font: 700 14px var(--k-body);
}

.bb-kasse input.input-text::placeholder {
	color: var(--k-muted);
	font-weight: 600;
	opacity: 1;
}

.bb-kasse input.input-text:focus,
.bb-kasse select:focus {
	border-color: var(--k-accent);
	outline: none;
}

.bb-kasse .select2-container--focus .select2-selection--single,
.bb-kasse .select2-container--open .select2-selection--single {
	border-color: var(--k-accent) !important;
	outline: none;
}

/* Rote Rahmen erst nach einem Bestellversuch (Klasse setzt theme.js), wie bisher */
.bb-kasse-form.bb-tried-submit .woocommerce-invalid input.input-text,
.bb-kasse-form.bb-tried-submit .woocommerce-invalid .select2-selection--single {
	border-color: var(--k-danger) !important;
	box-shadow: inset 3px 0 0 var(--k-danger);
}

/* WooCommerce färbt gültige Pflichtfelder sonst grün – nicht nötig. */
.bb-kasse-form .form-row.woocommerce-validated input.input-text,
.bb-kasse-form .form-row.woocommerce-validated .select2-container .select2-selection {
	border-color: var(--k-line) !important;
}

.bb-kasse .checkout-inline-error-message {
	margin: 2px 0 0;
	color: var(--k-danger-text);
	font-size: 12.5px;
	font-weight: 800;
	line-height: 1.4;
}

/* Länderauswahl (select2) */
.bb-kasse .select2-container {
	width: 100% !important;
}

.bb-kasse .select2-container .select2-selection--single {
	height: 40px;
	margin: 0;
	background: var(--k-field);
	border: 1px solid var(--k-line);
	border-radius: 0;
}

.bb-kasse .select2-container .select2-selection--single .select2-selection__rendered {
	padding: 0 36px 0 12px;
	color: var(--k-strong);
	font: 700 14px/38px var(--k-body);
}

.bb-kasse .select2-container .select2-selection--single .select2-selection__arrow {
	top: 0;
	right: 8px;
	height: 38px;
}

.bb-kasse .select2-container--default .select2-selection--single .select2-selection__arrow b {
	border-color: var(--k-muted) transparent transparent;
}

.bb-kasse .select2-dropdown {
	background: var(--k-card);
	border: 1px solid var(--k-line);
	border-radius: 0;
	color: var(--k-strong);
	overflow: hidden;
}

.bb-kasse .select2-search--dropdown .select2-search__field {
	height: 38px;
	padding: 0 10px;
	background: var(--k-field);
	border: 1px solid var(--k-line);
	border-radius: 0;
	color: var(--k-strong);
	font: 700 15px var(--k-body);
}

.bb-kasse .select2-results__option {
	padding: 8px 12px;
	font-size: 14px;
	font-weight: 700;
}

/* Gewähltes Land. Nur data-selected: selectWoo setzt aria-selected="true" auf den Eintrag unter
   Maus/Tastatur, das ist die Hervorhebung darunter. */
.bb-kasse .select2-container--default .select2-results__option[data-selected="true"] {
	background: var(--k-card2);
	color: var(--k-strong);
}

.bb-kasse .select2-container--default .select2-results__option.select2-results__option--highlighted {
	background: var(--k-accent);
	color: #fff;
}

/* Angemeldet: „Geht an deinen Minecraft-Account“ (bb-konto) */
.bb-kasse .bbk-kasse-to {
	gap: 12px;
	padding: 10px 12px;
	background: var(--k-field);
	border: 1px solid var(--k-line);
	border-radius: 0;
}

.bb-kasse .bbk-kasse-to img {
	width: 40px;
	height: 40px;
	border-radius: 0;
}

.bb-kasse .bbk-kasse-to__who span {
	font-size: 12px;
	font-weight: 700;
	color: var(--k-muted);
}

.bb-kasse .bbk-kasse-to__who strong {
	color: var(--k-strong);
	font: 400 20px/1.1 var(--k-head);
}

.bb-kasse .bbk-kasse-to__change {
	color: var(--k-link);
	font: 800 12.5px var(--k-body);
}

/* --- Bestellübersicht ------------------------------------------------------------------ */

.bb-kasse-form .woocommerce-checkout-review-order-table {
	display: block;
	width: 100%;
	margin: 0;
	padding: 4px 20px 18px;
	background: var(--k-card);
	border: 1px solid var(--k-line);
	border-top: 0;
	border-collapse: collapse;
	border-radius: 0;
}

.bb-kasse-form .woocommerce-checkout-review-order-table thead {
	display: none;
}

.bb-kasse-form .woocommerce-checkout-review-order-table tbody,
.bb-kasse-form .woocommerce-checkout-review-order-table tfoot {
	display: block;
}

.bb-kasse-form .woocommerce-checkout-review-order-table tr {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding: 8px 0;
}

.bb-kasse-form .woocommerce-checkout-review-order-table th,
.bb-kasse-form .woocommerce-checkout-review-order-table td {
	display: block;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	text-align: left;
	font-weight: 700;
}

/* Produktzeile: Anzahl, Name, Kennzeichen; Preis rechts oben; Beschreibung darunter über die volle Breite */
.bb-kasse-form .woocommerce-checkout-review-order-table tbody tr {
	position: relative;
	display: block;
	padding: 12px 0 14px;
	border-bottom: 1px solid var(--k-line2);
}

.bb-kasse-form .woocommerce-checkout-review-order-table .product-name {
	padding-right: 100px;
	color: var(--k-strong);
}

.bb-kasse .bb-qty-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 22px;
	margin-right: 8px;
	padding: 0 6px;
	background: var(--k-card2);
	border: 1px solid var(--k-line);
	color: var(--k-text);
	font: 900 12px/1 system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	vertical-align: 3px;
}

.bb-kasse .bb-item-name {
	font: 400 19px/1.1 var(--k-head);
	color: var(--k-strong);
}

.bb-kasse .bb-digital {
	display: inline-block;
	margin-left: 8px;
	padding: 1px 6px;
	background: var(--k-chip-on);
	color: var(--k-accent);
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	vertical-align: 3px;
}

.bb-kasse-form .woocommerce-checkout-review-order-table tbody .product-total {
	position: absolute;
	top: 12px;
	right: 0;
	color: var(--k-strong);
	font: 400 19px/1.1 var(--k-head);
	white-space: nowrap;
}

.bb-kasse-form .woocommerce-checkout-review-order-table tbody .wgm-tax,
.bb-kasse-form .woocommerce-checkout-review-order-table tbody .wgm-break {
	display: none;
}

.bb-kasse-form .woocommerce-checkout-review-order-table .product-desc,
.bb-kasse-form .woocommerce-checkout-review-order-table .wgm-product-prerequisites {
	display: block;
	margin: 10px -100px 0 0;
	padding: 10px 12px;
	background: var(--k-card2);
	color: var(--k-muted);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
}

.bb-kasse-form .woocommerce-checkout-review-order-table tfoot tr {
	padding: 6px 0;
}

.bb-kasse-form .woocommerce-checkout-review-order-table tfoot th {
	color: var(--k-text);
	font-size: 14px;
}

.bb-kasse-form .woocommerce-checkout-review-order-table tfoot td {
	flex-shrink: 0;
	text-align: right;
	color: var(--k-strong);
}

.bb-kasse-form .woocommerce-checkout-review-order-table .cart-subtotal {
	margin-top: 6px;
}

/* Zwischensumme nur, wenn ein Gutschein oder eine Gebühr etwas ändert (sonst gleich der Gesamtsumme) */
.bb-kasse-form .woocommerce-checkout-review-order-table tfoot:not(:has(.cart-discount, .fee)) .cart-subtotal {
	display: none;
}

.bb-kasse-form .woocommerce-checkout-review-order-table .order-total {
	margin-top: 4px;
	padding-top: 12px;
	border-top: 1px solid var(--k-line);
}

.bb-kasse-form .woocommerce-checkout-review-order-table .order-total th {
	color: var(--k-strong);
	font-size: 14px;
	font-weight: 800;
}

.bb-kasse-form .woocommerce-checkout-review-order-table .order-total td {
	flex-shrink: 1;
	min-width: 0;
}

.bb-kasse-form .woocommerce-checkout-review-order-table .order-total td strong {
	font: 400 30px/1 var(--k-head);
}

.bb-kasse-form .woocommerce-checkout-review-order-table .wgm-tax,
.bb-kasse-form .woocommerce-checkout-review-order-table .product-tax,
.bb-kasse-form .woocommerce-checkout-review-order-table .includes_tax {
	display: block;
	margin-top: 4px;
	color: var(--k-muted);
	font-size: 12px;
	font-weight: 700;
}

.bb-kasse-form .woocommerce-remove-coupon {
	margin-left: 6px;
	font-size: 12.5px;
}

/* --- Zahlungsarten ------------------------------------------------------------------- */

.bb-kasse-form #payment .wc_payment_methods {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

.bb-kasse-form #payment .wc_payment_method {
	display: grid !important;
	grid-template-columns: 18px minmax(0, 1fr);
	align-items: center;
	column-gap: 12px;
	margin: 0;
	padding: 6px 14px;
	background: var(--k-field);
	border: 1px solid var(--k-line);
	border-radius: 0;
}

.bb-kasse-form #payment .wc_payment_method > * {
	grid-column: 1 / -1;
}

.bb-kasse-form #payment .wc_payment_method > input[type="radio"] {
	grid-column: 1;
	grid-row: 1;
}

.bb-kasse-form #payment .wc_payment_method > label {
	grid-column: 2;
	grid-row: 1;
}

.bb-kasse-form #payment .wc_payment_method:has(> input:checked) {
	background: linear-gradient(90deg, var(--k-gem-bg), transparent 60%), var(--k-field);
	border-color: var(--k-gem);
	box-shadow: inset 3px 0 0 var(--k-gem);
}

/* Auswahlfeld eckig wie im Entwurf: Rahmen, gewählt mit grünem Quadrat */
.bb-kasse-form #payment .wc_payment_method > input[type="radio"] {
	display: grid;
	place-content: center;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1.5px solid var(--k-muted);
	border-radius: 0;
	background: transparent;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.bb-kasse-form #payment .wc_payment_method > input[type="radio"]::before {
	content: "";
	width: 8px;
	height: 8px;
	background: var(--k-gem);
	transform: scale(0);
}

.bb-kasse-form #payment .wc_payment_method > input[type="radio"]:checked {
	border-color: var(--k-gem);
}

.bb-kasse-form #payment .wc_payment_method > input[type="radio"]:checked::before {
	transform: scale(1);
}

.bb-kasse-form #payment .wc_payment_method > input[type="radio"]:focus-visible {
	outline: 2px solid var(--k-accent);
	outline-offset: 2px;
}

.bb-kasse-form #payment .wc_payment_method > label {
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 38px;
	margin: 0;
	color: var(--k-strong);
	font-size: 14px;
	font-weight: 900;
	cursor: pointer;
}

.bb-kasse-form #payment .wc_payment_method > label img {
	display: block;
	float: none !important;
	width: auto !important;
	height: 24px !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0;
	border-radius: 0;
}

.bb-kasse-form #payment .wc_payment_method > label img:first-of-type {
	margin-left: auto;
}

.bb-kasse-form #payment .payment_method_ppcp > label img {
	padding: 4px 8px;
	background: #ffffff;
}

.bb-kasse-form #payment .payment_box {
	grid-row: 2;
	margin: 4px 0 8px 30px;
	padding: 0;
	background: none;
	color: var(--k-muted);
	font-size: 12.5px;
	font-weight: 700;
}

.bb-kasse-form #payment .payment_box::before {
	content: none;
}

.bb-kasse-form #payment .payment_box:empty {
	display: none;
}

.bb-kasse-form #payment .payment_box p {
	margin: 0 0 8px;
}

.bb-kasse-form #payment .payment_box p:last-child {
	margin-bottom: 0;
}

.bb-kasse-form #payment .payment_box fieldset {
	margin: 0;
	padding: 0;
	border: 0;
}

/* --- Abschluss: Haken, Gesamtsumme, Knopf ------------------------------------------- */

.bb-kasse-form #payment .place-order {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	margin: 18px 0 0;
	padding: 0;
	background: none;
	border: 0;
}

.bb-kasse-form #payment .place-order p {
	margin: 0;
}

/* Leerer Hinweis von German Market (bei reinen Digitalprodukten ohne Text) nimmt keinen Platz ein */
.bb-kasse-form #payment .place-order .wgm-digital-checkout-notice:empty {
	display: none;
}

/* Checkboxen: große Tippfläche, kleiner Text; ein Tipp auf den Text setzt ebenfalls den Haken */
.bb-kasse-form #payment .place-order label.checkbox,
.bb-kasse-form #payment .place-order label.woocommerce-form__label-for-checkbox {
	display: block;
	position: relative;
	min-height: 22px;
	margin: 0;
	padding-left: 32px;
	color: var(--k-text);
	font-family: inherit !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 1.5 !important;
	cursor: pointer;
}

.bb-kasse-form #payment .place-order label a {
	color: var(--k-link);
	font-weight: 800;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.bb-kasse-form #payment .place-order input[type="checkbox"] {
	position: absolute;
	top: 0;
	left: 0;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 1.5px solid var(--k-muted);
	border-radius: 0;
	background: var(--k-field) center / 13px 13px no-repeat;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.bb-kasse-form #payment .place-order input[type="checkbox"]:checked {
	border-color: var(--k-gem);
	background-color: var(--k-gem);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304210d' stroke-width='3' stroke-linecap='square'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
}

.bb-kasse-form #payment .place-order input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--k-accent);
	outline-offset: 2px;
}

/* WooCommerce markiert leere Pflicht-Checkboxen sofort als ungültig; der Text bleibt deshalb neutral. */
.bb-kasse-form.bb-tried-submit #payment .place-order .woocommerce-invalid label,
.bb-kasse-form.bb-tried-submit #payment .place-order .woocommerce-invalid label span {
	color: var(--k-text) !important;
}

.bb-kasse-form:not(.bb-tried-submit) #payment .woocommerce-invalid input[type="checkbox"] {
	outline: none !important;
}

.bb-kasse-form.bb-tried-submit #payment .woocommerce-invalid input[type="checkbox"] {
	outline: none !important;
	border-color: var(--k-danger);
	box-shadow: 0 0 0 2px rgba(201, 57, 63, 0.3);
}

/* Bei den Pflicht-Haken steht der Hinweis eingerückt unter dem Text. */
.bb-kasse-form #payment .place-order .checkout-inline-error-message {
	padding-left: 32px;
}

/* Gesamtsumme direkt über „Zahlungspflichtig bestellen“ (nur PC; am Handy steht die Bestellung darüber) */
.bb-pay-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-top: 4px;
	padding-top: 12px;
	border-top: 1px solid var(--k-line);
}

.bb-pay-total__label {
	color: var(--k-strong);
	font-size: 14px;
	font-weight: 800;
}

.bb-pay-total__value {
	text-align: right;
}

.bb-pay-total__value strong,
.bb-pay-total__value strong .amount {
	color: var(--k-strong);
	font: 400 26px/1 var(--k-head);
}

.bb-pay-total__value small,
.bb-pay-total__value .includes_tax,
.bb-pay-total__value .includes_tax .amount {
	display: block;
	margin-top: 4px;
	color: var(--k-muted);
	font-size: 12px;
	font-weight: 700;
}

.bb-pay-total__value .includes_tax .amount {
	display: inline;
}

.bb-pay-total .wgm-break {
	display: none;
}

/* „Zahlungspflichtig bestellen“ als grüner Tastenkante-Knopf; Text mittig auf Fläche + Kante */
.bb-kasse-form #place_order {
	width: 100%;
	height: 50px;
	margin: 4px 0 3px;
	padding: 3px 16px 0;
	border: 0;
	border-radius: 0;
	background: var(--k-gem);
	color: var(--k-gem-on);
	font: 900 13.5px/1 var(--k-body);
	letter-spacing: 0.09em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 3px 0 var(--k-gem-edge), 0 3px 0 1px var(--k-outline);
	transition: transform 0.05s, box-shadow 0.05s, filter 0.05s;
}

.bb-kasse-form #place_order:hover {
	filter: brightness(1.08);
}

.bb-kasse-form #place_order:active {
	transform: translateY(3px);
	box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 1px var(--k-outline);
	filter: none;
}

.bb-kasse-form #place_order:focus-visible {
	outline: 2px solid var(--k-accent);
	outline-offset: 3px;
}

/* Während der Bestellung: drei Block-Punkte im Knopf (theme.js), Knopf über dem Abdunkeln von WooCommerce */
.bb-kasse-form #place_order {
	position: relative;
}

.bb-kasse-form #place_order.is-busy {
	z-index: 1001;
	color: transparent;
	pointer-events: none;
}

.bb-kasse-form #place_order .bb-dots {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding-top: 3px;
}

.bb-kasse-form #place_order.is-busy .bb-dots {
	display: flex;
}

.bb-kasse-form #place_order .bb-dots i {
	width: 10px;
	height: 10px;
	background: var(--k-gem-on);
	animation: bb-dot 0.9s ease-in-out infinite;
}

.bb-kasse-form #place_order .bb-dots i:nth-child(2) {
	animation-delay: 0.15s;
}

.bb-kasse-form #place_order .bb-dots i:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes bb-dot {
	0%,
	70%,
	100% {
		transform: scale(0.6);
		opacity: 0.45;
	}

	35% {
		transform: scale(1.15);
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bb-kasse-form #place_order .bb-dots i {
		animation-duration: 2.4s;
	}
}

.bb-kasse-form .bb-busy-note {
	position: relative;
	z-index: 1001;
	margin: 8px 0 0;
	color: var(--k-soft);
	font-size: 12.5px;
	font-weight: 800;
	text-align: center;
}

/* WooCommerce dunkelt das Formular während der Bestellung ab – passend zum dunklen bzw. hellen Grund statt weiß */
.bb-kasse-form .blockUI.blockOverlay {
	background: var(--k-bg) !important;
	opacity: 0.55 !important;
}

/* Vertrauenspunkte unter dem Knopf */
.bb-kasse-trust {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin: 2px 0 0;
	padding: 0;
	list-style: none;
}

.bb-kasse-trust li {
	display: flex;
	align-items: flex-start;
	line-height: 1.4;
	gap: 7px;
	margin: 0;
	color: var(--k-text);
	font-size: 12.5px;
	font-weight: 800;
}

.bb-kasse-trust .bbsh-ln {
	width: 15px;
	height: 15px;
	margin-top: 1px;
	color: var(--k-gem-text);
}

/* --- Handy und schmale Fenster: Daten, Zahlungsart, Bestellung, Haken, Knopf ------------------- */

@media (max-width: 900px) {
	.bb-kasse-form {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: none;
	}

	.bb-kasse-form > .woocommerce-NoticeGroup,
	.bb-kasse-details,
	.bb-kasse-summary-title,
	.bb-kasse-form .woocommerce-checkout-review-order-table,
	.bb-kasse-form #payment .wc_payment_methods,
	.bb-kasse-form #payment .place-order {
		grid-column: 1;
	}

	.bb-kasse-form > .woocommerce-NoticeGroup {
		grid-row: 1;
	}

	/* #payment löst sich auf, damit Zahlarten und Abschluss an verschiedenen Stellen stehen können */
	.bb-kasse-form #payment {
		display: contents;
	}

	.bb-kasse-form #payment::before,
	.bb-kasse-form #payment::after {
		content: none;
	}

	.bb-kasse-details {
		grid-row: 2;
	}

	/* „2 Zahlungsart“ als Kopf einer Karte, die Zahlarten darunter als ihr Inhalt */
	.bb-kasse-details .bb-kasse-step__title--pay {
		display: flex;
		margin: 12px 0 0;
		padding: 16px 14px 12px;
		background: var(--k-card);
		border: 1px solid var(--k-line);
		border-bottom: 0;
	}

	.bb-kasse-form #payment .wc_payment_methods {
		grid-row: 3;
		padding: 0 14px 14px;
		background: var(--k-card);
		border: 1px solid var(--k-line);
		border-top: 0;
	}

	.bb-kasse-summary-title {
		grid-row: 4;
		margin-top: 12px;
		padding: 16px 14px 4px;
	}

	.bb-kasse-form .woocommerce-checkout-review-order-table {
		grid-row: 5;
		padding: 4px 14px 6px;
		border-bottom: 0;
	}

	.bb-kasse-form #payment .place-order {
		grid-row: 6;
		margin: 0;
		padding: 6px 14px 16px;
		background: var(--k-card);
		border: 1px solid var(--k-line);
		border-top: 0;
	}

	.bb-kasse-step {
		padding: 16px 14px;
	}

	.bb-kasse-step__title,
	.bb-kasse-summary-title {
		font-size: 19px;
	}

	.bb-kasse-form .woocommerce-billing-fields__field-wrapper {
		grid-template-columns: minmax(0, 1fr);
	}

	.bb-pay-total {
		display: none;
	}
}

@media (max-width: 767px) {
	.bb-kasse-wrap {
		padding: 0 16px;
	}

	.bb-kasse-header {
		height: 52px;
	}

	.bb-kasse-header__brand img {
		height: 26px;
	}

	.bb-kasse-header__back {
		display: none;
	}

	.bb-kasse-main {
		padding-top: 14px;
		padding-bottom: 28px;
	}

	/* Eingabefelder 16 px, sonst zoomt iOS hinein */
	.bb-kasse input.input-text,
	.bb-kasse select {
		height: 44px;
		font-size: 16px;
	}

	.bb-kasse .select2-container .select2-selection--single {
		height: 44px;
	}

	.bb-kasse .select2-container .select2-selection--single .select2-selection__rendered {
		font-size: 16px;
		line-height: 42px;
	}

	.bb-kasse .select2-container .select2-selection--single .select2-selection__arrow {
		height: 42px;
	}

	.bb-kasse-form .woocommerce-checkout-review-order-table .product-name {
		padding-right: 80px;
	}

	.bb-kasse-form .woocommerce-checkout-review-order-table .product-desc,
	.bb-kasse-form .woocommerce-checkout-review-order-table .wgm-product-prerequisites {
		margin-right: -80px;
	}

	.bb-kasse-footer__in > span {
		margin-left: 0;
	}
}

@media (max-width: 480px) {
	.bb-kasse-form #payment .wc_payment_method > label {
		flex-wrap: wrap;
		row-gap: 6px;
	}

	.bb-kasse-form #payment .wc_payment_method > label img {
		height: 22px !important;
	}

	.bb-kasse-form #payment .payment_method_ppcp > label img {
		padding: 3px 6px;
	}
}
