/* =============================================================================================
   Warenkorb und Kasse (WooCommerce-Bloecke), Max 23.11.2026 ueber Haupt
   Vorlage templates/page-checkout.html: normaler Brandmeier-Kopf und -Fuss statt WooCommerce-Kassenkopf,
   Link "Zurueck zum Warenkorb" und Titel "Kasse" wie "Warenkorb" auf der Warenkorbseite.
   ============================================================================================= */

/* Link "Zurueck zum Warenkorb" ueber der Kasse */
.bm-kasse .bm-kasse-zurueck { margin-top: 26px; margin-bottom: 0; }
.bm-kasse .bm-kasse-zurueck p { margin: 0; }
.bm-kasse .bm-kasse-zurueck a { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--bm-blau); text-decoration: none; }
.bm-kasse .bm-kasse-zurueck a::before { content: "\2190"; font-size: 20px; line-height: 1; }
.bm-kasse .bm-kasse-zurueck a:hover { color: var(--bm-blau-dunkel); text-decoration: underline; }
.bm-kasse .bm-kasse-zurueck + .wp-block-post-title { margin-top: 8px; }

/* Titel "Warenkorb" (WooCommerce-Vorlage page-cart) und "Kasse" wie Kundenkonto und einfache Seiten
   (36 px, am Handy 28 px, wenig Abstand zum Kopf; Haupt 23.11.2026) */
main[data-page="cart"] > h1.wp-block-post-title,
.bm-kasse > h1.wp-block-post-title { margin-top: 30px; margin-bottom: 22px; font-size: 36px; font-weight: 600; line-height: 1.15; letter-spacing: .2px; }
.bm-kasse > .bm-kasse-zurueck + h1.wp-block-post-title { margin-top: 8px; }
@media (max-width: 781px) {
  main[data-page="cart"] > h1.wp-block-post-title,
  .bm-kasse > h1.wp-block-post-title { margin-top: 22px; margin-bottom: 16px; font-size: 28px; }
  .bm-kasse > .bm-kasse-zurueck + h1.wp-block-post-title { margin-top: 6px; }
  .bm-kasse .bm-kasse-zurueck { margin-top: 20px; }
}

/* Art.-Nr. je Position (inc/shop.php, brandmeier_artnr_im_warenkorb): eigene Zeile, ohne Trenner " / " */
.wc-block-components-product-details .wc-block-components-product-details__art-nr { display: block; }
.wc-block-components-product-details .wc-block-components-product-details__art-nr > [aria-hidden="true"] { display: none; }

/* Bestellknopf am Ende der Kasse (nach Bestellnotiz und Haken AGB/Widerruf). Germanized setzt ihn am Rechner rechts
   unter die Bestelluebersicht (eigener Knopf in .wc-gzd-checkout-submit) und blendet den Knopf im Formular aus.
   Am Rechner (is-large) hier umgekehrt; die Gesamtsumme bleibt rechts. Handy/Tablet unveraendert: dort steht der Knopf
   schon am Ende, direkt unter Haken und Bestelluebersicht. */
.wc-gzd-checkout.wc-gzd-checkout-has-custom-submit .wc-block-checkout.is-large .wp-block-woocommerce-checkout-fields-block .wc-block-checkout__actions { display: block; margin: 8px 0 40px; }
.wc-gzd-checkout .wc-block-checkout.is-large .wc-gzd-checkout-submit .wc-block-checkout__actions { display: none; }

/* Aussehen wie der Shop: Ueberschriften, Felder, Auswahlkaesten, Uebersicht */
.wc-block-checkout .wc-block-components-checkout-step__title { font-size: 20px; font-weight: 600; line-height: 1.3; color: var(--bm-tinte); }
.wc-block-checkout .wc-block-components-checkout-step__description { color: var(--bm-grau); }
.wc-block-checkout .wc-block-components-text-input input:is([type=text], [type=email], [type=tel], [type=number], [type=password]),
.wc-block-checkout .wc-block-components-textarea,
.wc-block-checkout .wc-blocks-components-select .wc-blocks-components-select__select {
  border: 1px solid #b9c1bb;
  border-radius: 6px;
  color: var(--bm-tinte);
}
.wc-block-checkout .wc-block-components-text-input input:focus,
.wc-block-checkout .wc-block-components-textarea:focus,
.wc-block-checkout .wc-blocks-components-select .wc-blocks-components-select__select:focus {
  border-color: var(--bm-blau);
  box-shadow: 0 0 0 1px var(--bm-blau);
  outline: none;
}
.wc-block-checkout .wc-block-components-radio-control--highlight-checked,
.wc-block-checkout .wc-block-components-radio-control-accordion-option { border-radius: 6px; }
.wc-block-checkout .wc-block-components-radio-control--highlight-checked::after { border-radius: 6px; }
.wc-block-checkout .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox] { border-radius: 3px; }
.wc-block-checkout .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked { border-color: var(--bm-blau); }
.wc-block-checkout .wc-block-components-checkbox .wc-block-components-checkbox__mark { fill: var(--bm-blau); }
.wc-block-checkout a { color: var(--bm-blau); }
.wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block,
.wc-block-checkout__sidebar .wc-gzd-checkout-submit .wc-gzd-show-total-wrapper { border-radius: 8px; overflow: hidden; }
.bm-kasse .bm-bestellablauf { border-radius: 0 8px 8px 0; }

/* =============================================================================================
   Seite "Vertrag widerrufen" (Germanized-Formular, Haupt 23.11.2026 aus Max' Klick-Test): Felder, Auswahl und Knopf
   wie in der Kasse; Bestellnummer und Datum nach der Auswahl der Bestellung (mark) fett statt gelb hinterlegt.
   Ein Infotext ueber dem Formular kommt ggf. vom Inhalte-Chat in den Seiteninhalt, hier nichts vorgesehen.
   ============================================================================================= */
.order-withdrawal-request.woocommerce-form { margin-top: 20px; }
.order-withdrawal-request.woocommerce-form mark,
[class*="eu-owb"] mark { padding: 0; background: none; color: var(--bm-tinte); font-weight: 600; }
.order-withdrawal-request.woocommerce-form .form-row { margin: 0 0 16px; padding: 0; }
.order-withdrawal-request.woocommerce-form .form-row label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 600; line-height: 1.4; color: #33403a; }
.order-withdrawal-request.woocommerce-form .form-row .required { color: var(--bm-rot); text-decoration: none; }
.order-withdrawal-request.woocommerce-form .form-row .optional { font-weight: 400; color: var(--bm-grau); }
.order-withdrawal-request.woocommerce-form :is(input.input-text, select, textarea),
.order-withdrawal-request.woocommerce-form .select2-container .select2-selection--single {
  box-sizing: border-box; width: 100%; min-height: 46px; margin: 0; padding: 10px 12px;
  border: 1px solid #b9c1bb; border-radius: 6px; background-color: #fff;
  font-family: inherit; font-size: 16px; line-height: 1.4; color: var(--bm-tinte);
}
.order-withdrawal-request.woocommerce-form :is(input.input-text, select, textarea):focus,
.order-withdrawal-request.woocommerce-form .select2-container--focus .select2-selection--single { outline: none; border-color: var(--bm-blau); box-shadow: 0 0 0 1px var(--bm-blau); }
.order-withdrawal-request.woocommerce-form .select2-container .select2-selection--single { display: flex; align-items: center; height: 46px; padding: 0; }
.order-withdrawal-request.woocommerce-form .select2-container .select2-selection--single .select2-selection__rendered { padding: 0 34px 0 12px; line-height: 44px; }
.order-withdrawal-request.woocommerce-form .select2-container .select2-selection--single .select2-selection__arrow { top: 0; right: 6px; height: 44px; }
.order-withdrawal-request.woocommerce-form .form-row-submit { margin-top: 6px; }
@media (max-width: 600px) {
  .order-withdrawal-request.woocommerce-form :is(.form-row-first, .form-row-last) { float: none; width: 100%; }
}

/* =============================================================================================
   Danke-Seite (Bestellbestaetigung, WooCommerce-Vorlage order-confirmation; Max 23.11.2026 ueber Haupt: schoener,
   Ueberschriften etwas kleiner): wie die Bestellansicht im Kundenkonto. Einleitungstext und Vorkasse-Box
   (Kunden-Mails-Chat, inc/mails.php) bleiben, die Art.-Nr. je Position kommt ebenfalls von dort.
   ============================================================================================= */
.wc-block-order-confirmation-status { margin-top: 30px; font-size: 18px !important; line-height: 1.55; color: var(--bm-tinte); }
.wc-block-order-confirmation-status :is(h1, h2) { margin: 0 0 12px; font-size: 36px !important; font-weight: 600; line-height: 1.15; }
.wc-block-order-confirmation-status p { margin: 0 0 10px; }
.wc-block-order-confirmation-status-description { font-size: 16px; color: var(--bm-grau); }

/* Ueberschriften der Abschnitte (Bestelldetails, Downloads, Liefer- und Rechnungsadresse, Zusaetzliche Information) */
:is(.wp-block-woocommerce-order-confirmation-totals-wrapper, .wp-block-woocommerce-order-confirmation-downloads-wrapper,
    .wp-block-woocommerce-order-confirmation-shipping-wrapper, .wp-block-woocommerce-order-confirmation-billing-wrapper,
    .wp-block-woocommerce-order-confirmation-additional-fields-wrapper) > .wp-block-heading {
  margin: 30px 0 12px !important; font-size: 21px !important; font-weight: 700 !important; line-height: 1.3; letter-spacing: normal; text-transform: none; color: var(--bm-tinte);
}

/* Bestelldaten als ruhige Karte, Bestellnummer hervorgehoben */
.wc-block-order-confirmation-summary { margin: 22px 0 0; padding: 0; }
.wc-block-order-confirmation-summary .wc-block-order-confirmation-summary-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px 24px; margin: 0; padding: 18px 22px;
  border: 1px solid var(--bm-linie); border-radius: 8px; background: #f6f8f5; list-style: none;
}
.wc-block-order-confirmation-summary .wc-block-order-confirmation-summary-list-item {
  display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; border: 0; font-size: 15px; line-height: 1.45;
}
.wc-block-order-confirmation-summary .wc-block-order-confirmation-summary-list-item::after { content: none; display: none; }
.wc-block-order-confirmation-summary .wc-block-order-confirmation-summary-list-item__key { font-size: 13px; font-weight: 400; color: var(--bm-grau); }
.wc-block-order-confirmation-summary .wc-block-order-confirmation-summary-list-item__value { font-weight: 600; color: var(--bm-tinte); overflow-wrap: anywhere; }
.wc-block-order-confirmation-summary .wc-block-order-confirmation-summary-list-item:first-child .wc-block-order-confirmation-summary-list-item__value { font-size: 18px; color: var(--bm-blau); }

/* Positionen kompakt, Summenzeile hervorgehoben */
.wc-block-order-confirmation-totals { margin: 0; }
.wc-block-order-confirmation-totals table.wc-block-order-confirmation-totals__table {
  width: 100%; margin: 0; border: 1px solid var(--bm-linie); border-radius: 8px; border-collapse: separate; border-spacing: 0; overflow: hidden; font-size: 15px;
}
.wc-block-order-confirmation-totals table :is(th, td) { padding: 12px 16px; border: 0; border-bottom: 1px solid var(--bm-linie); background: #fff; vertical-align: top; text-align: left; font-weight: 400; }
.wc-block-order-confirmation-totals table thead th { background: #f6f8f5; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--bm-grau); }
.wc-block-order-confirmation-totals table .wc-block-order-confirmation-totals__total { text-align: right; white-space: nowrap; }
.wc-block-order-confirmation-totals table tbody .wc-block-order-confirmation-totals__product a { font-weight: 600; color: var(--bm-tinte); text-decoration: none; }
.wc-block-order-confirmation-totals table .product-quantity { font-weight: 400; color: var(--bm-grau); }
.wc-block-order-confirmation-totals .wc-item-meta { margin: 6px 0 0; padding: 0; list-style: none; font-size: 13.5px; line-height: 1.5; color: var(--bm-grau); }
.wc-block-order-confirmation-totals .wc-item-meta li { margin: 0; padding: 0; }
.wc-block-order-confirmation-totals .wc-item-meta li .wc-item-meta-label { float: none; margin: 0 3px 0 0; font-weight: 500; color: var(--bm-tinte); }
.wc-block-order-confirmation-totals .wc-item-meta li p { display: inline; margin: 0; }
.wc-block-order-confirmation-totals table tbody th > :is(p, div) { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--bm-grau); }
.wc-block-order-confirmation-totals table tfoot tr:last-child :is(th, td) { border-bottom: 0; background: #f6f8f5; font-size: 16px; font-weight: 700; }
.wc-block-order-confirmation-totals table tfoot tr:last-child small { font-size: 13px; font-weight: 400; color: var(--bm-grau); }
.wc-block-order-confirmation-totals table small.shipped_via { color: var(--bm-grau); }

/* Adressen als zwei gleich hohe Karten (Spalten-Block), leere Spalte (z. B. Abholung ohne Lieferadresse) ausblenden */
.wc-block-order-confirmation-address-wrapper { gap: 16px !important; margin-top: 26px !important; }
.wc-block-order-confirmation-address-wrapper > .wp-block-column { box-sizing: border-box; padding: 18px 20px; border: 1px solid var(--bm-linie); border-radius: 8px; background: #fff; }
.wc-block-order-confirmation-address-wrapper > .wp-block-column:not(:has(*)) { display: none; }
.wc-block-order-confirmation-address-wrapper :is(.wp-block-woocommerce-order-confirmation-shipping-wrapper, .wp-block-woocommerce-order-confirmation-billing-wrapper) > .wp-block-heading { margin-top: 0 !important; font-size: 16px !important; }
:is(.wc-block-order-confirmation-shipping-address, .wc-block-order-confirmation-billing-address) { margin: 0; padding: 0; border: 0; border-radius: 0; }
:is(.wc-block-order-confirmation-shipping-address, .wc-block-order-confirmation-billing-address) address { margin: 0; font-style: normal; line-height: 1.6; color: var(--bm-tinte); }
:is(.wc-block-order-confirmation-shipping-address, .wc-block-order-confirmation-billing-address) :is(p, .wc-block-components-additional-fields-list) { margin: 6px 0 0; color: var(--bm-grau); }

/* Zusaetzliche Angaben, falls vorhanden: als Karte */
.wp-block-woocommerce-order-confirmation-additional-fields { padding: 16px 20px; border: 1px solid var(--bm-linie); border-radius: 8px; }
.wc-block-components-additional-fields-list { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; }
.wc-block-components-additional-fields-list dt { margin: 0; font-weight: 400; color: var(--bm-grau); }
.wc-block-components-additional-fields-list dd { margin: 0; font-weight: 600; color: var(--bm-tinte); }
.wp-block-woocommerce-order-confirmation-additional-information:not(:empty) { margin-top: 26px; }

@media (max-width: 781px) {
  .wc-block-order-confirmation-status { margin-top: 22px; font-size: 17px !important; }
  .wc-block-order-confirmation-status :is(h1, h2) { font-size: 28px !important; }
  :is(.wp-block-woocommerce-order-confirmation-totals-wrapper, .wp-block-woocommerce-order-confirmation-downloads-wrapper,
      .wp-block-woocommerce-order-confirmation-additional-fields-wrapper) > .wp-block-heading { margin-top: 24px !important; font-size: 19px !important; }
  .wc-block-order-confirmation-summary .wc-block-order-confirmation-summary-list { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px 18px; }
  .wc-block-order-confirmation-totals table thead { display: none; }
  .wc-block-order-confirmation-totals table :is(th, td) { padding: 11px 12px; }
  .wc-block-order-confirmation-totals table tfoot .wc-block-order-confirmation-totals__total { white-space: normal; }
  .wc-block-order-confirmation-totals table small.shipped_via { display: block; }
  /* Feste Spaltenbreiten: lange Zahlungsart in der Summenspalte macht die Produktspalte sonst schmal */
  .wc-block-order-confirmation-totals table.wc-block-order-confirmation-totals__table { table-layout: fixed; }
  .wc-block-order-confirmation-totals table .wc-block-order-confirmation-totals__total { width: 34%; }
  .wc-block-order-confirmation-address-wrapper { gap: 12px !important; }
}
