/**
 * HEELBOPPS Kasse: Minimal-Styles (nur Struktur). Farben/Typografie kommen aus theme.json des Themes;
 * hier werden bewusst nur CSS-Variablen mit Rückfall-Werten benutzt, damit das Theme alles überschreiben kann.
 * Variablen (optional im Theme setzen):
 *   --hb-accent, --hb-ink, --hb-muted, --hb-line, --hb-ok
 */

/* Gratis-Versand-Hinweis (Mini-Cart, Warenkorb, Kasse) */
.hb-freeship {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--hb-line, #d9d6d1);
	background: var(--hb-bg, #faf9f7);
	color: var(--hb-ink, #111);
	font-size: 0.9375rem;
	line-height: 1.4;
}
.hb-freeship__text { margin: 0 0 0.5rem; }
.hb-freeship__bar {
	display: block;
	height: 4px;
	background: var(--hb-line, #d9d6d1);
}
.hb-freeship__bar > span {
	display: block;
	height: 100%;
	background: var(--hb-accent, #7a1f2b);
	transition: width 0.2s ease;
}
.hb-freeship--done .hb-freeship__bar > span { background: var(--hb-ok, #1d6b3a); }
@media (prefers-reduced-motion: reduce) {
	.hb-freeship__bar > span { transition: none; }
}

/* Vertrauenshinweis unter dem Bestell-Button */
.hb-checkout-trust {
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	font-size: 0.875rem;
	color: var(--hb-muted, #4a4a4a);
}
.hb-checkout-trust li::before {
	content: "\2713\00a0";
	color: var(--hb-ok, #1d6b3a);
	font-weight: 700;
}

/* Bestätigungsseite / Überweisungs-Hinweis */
.hb-confirm {
	margin: 1.5rem 0;
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--hb-line, #d9d6d1);
	background: var(--hb-bg, #faf9f7);
}
.hb-confirm h2 { margin-top: 0; font-size: 1.25rem; }
.hb-confirm__number { font-weight: 700; }
.hb-confirm ol { margin: 0.5rem 0 1rem 1.25rem; padding: 0; }
.hb-confirm li + li { margin-top: 0.35rem; }
.hb-bacs-hint {
	margin: 1rem 0;
	padding: 0.75rem 1rem;
	border-left: 4px solid var(--hb-accent, #7a1f2b);
	background: var(--hb-bg, #faf9f7);
}

/* Zahlungsarten: kleines Bank-Symbol vor "Überweisung" (Stripe/PayPal bringen eigene Symbole mit) */
#radio-control-wc-payment-method-options-bacs__label::before,
.wc-block-components-radio-control__option[for="radio-control-wc-payment-method-options-bacs"] .wc-block-components-radio-control__label::before {
	content: "";
	display: inline-block;
	width: 1.5em;
	height: 1.5em;
	margin-right: 0.5em;
	vertical-align: -0.35em;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10 12 4l9 6'/%3E%3Cpath d='M5 10v8M9.5 10v8M14.5 10v8M19 10v8'/%3E%3Cpath d='M3 20h18'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Fehler: nicht nur Farbe, Text bleibt sichtbar (Block-Kasse setzt Rand + Meldung selbst). */
.wc-block-components-validation-error { font-size: 0.875rem; }

/* ==== Mobil / Instagram-In-App-Browser ==== */

/* Eingaben: mindestens 16 px (sonst zoomt iOS), große Tippflächen */
.wc-block-checkout input[type="text"],
.wc-block-checkout input[type="email"],
.wc-block-checkout input[type="tel"],
.wc-block-checkout input[type="password"],
.wc-block-checkout select,
.wc-block-checkout textarea,
.wc-block-components-text-input input,
.wc-blocks-components-select__select,
.wc-block-components-combobox input {
	font-size: 16px !important;
}
.wc-block-components-text-input input,
.wc-blocks-components-select__select { min-height: 3rem; }

/* Zahlungsarten als große, ruhige Karten */
.wc-block-components-radio-control-accordion-option,
.wc-block-components-radio-control__option {
	min-height: 3.5rem;
}
.wc-block-components-radio-control__option { padding-top: 1rem; padding-bottom: 1rem; }

/* Hinweis im In-App-Browser */
.hb-inapp-hint {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--hb-line, #d9d6d1);
	background: var(--hb-bg, #faf9f7);
	font-size: 0.875rem;
	color: var(--hb-muted, #4a4a4a);
}
.hb-inapp-hint p { margin: 0 0 0.5rem; }
.hb-inapp-hint__btn {
	min-height: 44px;
	padding: 0 1rem;
	border: 1px solid var(--hb-ink, #111);
	background: transparent;
	color: var(--hb-ink, #111);
	font: inherit;
	cursor: pointer;
}
.hb-inapp-hint__ok { margin-left: 0.75rem; color: var(--hb-ok, #1d6b3a); }

/* Im In-App-Browser keine Express-Buttons (Apple/Google Pay, PayPal-Popup): PayPal, Karte, SEPA stehen gleichwertig in der Liste */
.hb-inapp [class*="express-payment"],
.hb-inapp .wc-block-components-express-payment { display: none !important; }

/*
 * Mobil: Bestell-Button mit Summe am Formularende, im Seitenfluss (Abnahme v4, design-experte M11: der klebende Knopf verdeckte von Anfang an
 * ca. 90 px Formular und beim Tippen Felder). Er klebt nicht mehr; das gilt auch gegen die Sticky-Regeln der Theme-Stylesheets
 * (heelbopps-elementor/assets/checkout.css, heelbopps-shop/assets/src/checkout.css), daher die höhere Spezifität.
 */
@media (max-width: 782px) {
	.wc-block-checkout .wc-block-checkout__actions,
	.wc-block-checkout .wc-block-checkout__actions .wc-block-checkout__actions_row,
	.wc-block-checkout .wc-block-checkout__actions .wc-block-components-checkout-place-order-button {
		position: static;
		box-shadow: none;
	}
	.wc-block-checkout .wc-block-checkout__actions {
		margin: 0;
		padding: 0.75rem 0 calc(0.75rem + env(safe-area-inset-bottom, 0px));
		border-top: 0;
		background: transparent;
	}
	.wc-block-checkout .wc-block-checkout__actions .wc-block-checkout__actions_row {
		margin-inline: 0;
		padding-inline: 0;
		border-top: 0;
		background: transparent;
	}
	.wc-block-checkout__actions .wc-block-components-checkout-place-order-button {
		min-height: 3.25rem;
		width: 100%;
		font-size: 1rem;
	}
	.wc-block-checkout__actions .wc-block-components-checkout-return-to-cart-button { display: none; }
	.hb-freeship { margin-inline: 0; }
}

/* Zollhinweis und Währungswähler */
.hb-customs {
	margin: 0.75rem 0;
	padding: 0.5rem 0.75rem;
	border-left: 3px solid var(--hb-accent, #7a1f2b);
	font-size: 0.875rem;
	color: var(--hb-muted, #4a4a4a);
}
.hb-currency__list { display: inline-flex; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.hb-currency__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 0.6rem;
	font-size: 0.875rem;
	color: inherit;
	text-decoration: none;
}
.hb-currency__link[aria-current="true"] { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.hb-currency__hint { margin: 0; font-size: 0.8125rem; }

.hb-nodelivery, .hb-order-hint { margin: 0.75rem 0 0; font-size: 0.875rem; color: var(--hb-muted, #4a4a4a); }

/* UI Easy Checkout P1-1: Der Gratis-Versand-Hinweis steht schon oben in der Seitenleiste; die zweite Kopie im Sticky-Fuß (59 px) entfällt. */
.wc-block-checkout__actions .hb-freeship { display: none; }

/* Mobil: Die Bestellübersicht steht einmal oben (aufklappbar mit Summe); die zweite Kopie im Bereich des Bestell-Buttons entfällt. */
@media (max-width: 782px) {
	.wc-block-checkout__actions .checkout-order-summary-block-fill-wrapper { display: none; }
}

/* Keine Zahlungsart verfügbar: Meldung und gesperrter Bestell-Button */
.hb-nopay {
	margin: 1rem 0;
	padding: 0.75rem 1rem;
	border: 2px solid var(--hb-accent, #7a1f2b);
	background: var(--hb-bg, #faf9f7);
	color: var(--hb-ink, #111);
	font-size: 0.9375rem;
}
.hb-nopay p { margin: 0 0 0.5rem; }
.hb-nopay__link { font-weight: 700; }
.hb-no-payment .wc-block-components-checkout-place-order-button { opacity: 0.45; cursor: not-allowed; }

/* F-B8: Fehlertext des AGB-Häkchens (und anderer Häkchen) unter dem Label in voller Breite, nicht als schmale Spalte daneben */
.wc-block-components-validated-checkbox-control label { flex-wrap: wrap; }
/*
 * Abnahme v4 (tester-braut H4): Mit flex-wrap rutschte bei langem Text (mobil) der Text unter das Kästchen; der Haken (absolut positioniert,
 * statische Lage = Mitte des Labels) erschien dann über dem Text, das Kästchen sah leer aus. Kästchen und Text bleiben in einer Zeile
 * (Text schrumpft statt umzubrechen), oben ausgerichtet; der Haken sitzt fest im Kästchen. Spezifität über der Theme-Regel (align-items: center).
 */
.wc-block-checkout .wc-block-components-checkbox.wc-block-components-validated-checkbox-control label,
.wc-block-cart .wc-block-components-checkbox.wc-block-components-validated-checkbox-control label { align-items: flex-start; }
.wc-block-components-checkbox.wc-block-components-validated-checkbox-control label > .wc-block-components-checkbox__input { flex: 0 0 auto; }
.wc-block-components-checkbox.wc-block-components-validated-checkbox-control label > .wc-block-components-checkbox__label { flex: 1 1 0; min-width: 0; padding-top: 2px; }
.wc-block-components-checkbox.wc-block-components-validated-checkbox-control label > .wc-block-components-checkbox__mark { top: 4px; }
.wc-block-components-validated-checkbox-control .wc-block-components-validation-error {
	flex: 0 0 100%;
	width: 100%;
	grid-column: 1 / -1;
	margin: 0.25rem 0 0;
}

/* E-Mail-Fehler am Feld (Text, Symbol, rote Linie; nie nur rote Beschriftung) */
.hb-field-error { margin-top: 0.25rem; }
.hb-field-error p { display: flex; align-items: flex-start; gap: 0.25rem; margin: 0; }
.hb-field-error svg { flex: 0 0 24px; fill: currentColor; }

/* Steuerzusatz im Mini-Warenkorb (Lieferland außerhalb der EU) */
.wc-block-mini-cart__footer-subtotal .hb-tax-note{display:block;width:100%;font-size:.8125rem;font-weight:400;opacity:.85;text-align:right}

/* 1.6.0: Schalter Geschenkverpackung (vor dem Bestell- bzw. „Zur Kasse“-Knopf, im Seitenfluss) */
.hb-gift { margin: 0 0 1rem; }
.hb-gift__label {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 48px;
	padding: 0.5rem 0.75rem;
	box-sizing: border-box;
	border: 1px solid var(--hb-line, #d9d6d1);
	color: var(--hb-ink, #111);
	font-size: 1rem;
	line-height: 1.4;
	cursor: pointer;
}
.hb-gift__input {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin: 0;
	accent-color: var(--hb-ink, #111);
	cursor: pointer;
}
.hb-gift__input:focus-visible { outline: 3px solid var(--hb-ink, #111); outline-offset: 2px; }
.hb-gift[aria-busy="true"] .hb-gift__label { opacity: 0.7; cursor: progress; }
.hb-gift__text { min-width: 0; }
