/* ============================================================
   BioBalkan – My Account Styles
   ============================================================ */

.bb-account-page {
  width: 100% !important;
}

/* Layout – immer 1-spaltig, 80% breit */
.bb-account-layout {
  display: flex !important;
  flex-direction: column !important;
  max-width: 80% !important;
}

@media (max-width: 1024px) {
  .bb-account-layout { max-width: 100% !important; }
}

/* Columns – untereinander mit Abstand */
.bb-account-col {
  display: flex !important;
  flex-direction: column !important;
}

.bb-account-col + .bb-account-col {
  margin-top: 16px !important;
}

/* Box */
.bb-account-box {
  background: #fff !important;
  border-radius: 24px !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.08) !important;
  padding: 0 28px 0 28px !important;
  margin-bottom: 16px !important;
  border: 2px solid transparent !important;
  transition: border-color .2s ease !important;
}
.bb-account-box:hover {
  border-color: var(--color-yellow, #FFF064) !important;
}
/* Geöffnete Box behält den gelben Fokus-Border (Toggle ist aufgeklappt). */
.bb-account-box:has(.bb-account-toggle[aria-expanded="true"]) {
  border-color: var(--color-yellow, #FFF064) !important;
}
.bb-account-box:last-child { margin-bottom: 0 !important; }

/* Toggle */
.bb-account-toggle {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 20px 0 16px 0 !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  border-bottom: 1px solid #eee !important;
  cursor: pointer !important;
  margin-bottom: 0 !important;
  gap: 12px !important;
}
.bb-account-toggle[aria-expanded="false"] {
  border-bottom: none !important;
  padding-bottom: 20px !important;
}

.bb-account-box-title {
  font-size: var(--fs-h4, 1.25rem) !important;
  font-weight: 700 !important;
  color: var(--color-body, #1b1c1c) !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  line-height: 1.3 !important;
}

.bb-account-arrow {
  flex-shrink: 0 !important;
  transition: transform .28s ease !important;
  opacity: .4 !important;
}
.bb-account-toggle[aria-expanded="false"] .bb-account-arrow {
  transform: rotate(-90deg) !important;
}

/* Body */
.bb-account-body {
  overflow: hidden !important;
}

/* Geschlossene Box: kein Padding */
.bb-account-box:has(.bb-account-toggle[aria-expanded="false"]) .bb-account-body {
  padding: 0 !important;
}

/* ── WC Tabellen ── */
.bb-account-box .woocommerce-orders-table,
.bb-account-box .woocommerce-giftcards-table,
.bb-account-box .woocommerce-giftcards-activity-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 0.9rem !important;
  color: var(--color-body, #1b1c1c) !important;
}

.bb-account-box .woocommerce-orders-table thead th,
.bb-account-box .woocommerce-giftcards-table thead th,
.bb-account-box .woocommerce-giftcards-activity-table thead th {
  font-weight: 700 !important;
  font-size: var(--fs-small, .85rem) !important;
  color: #777 !important;
  padding: 0 12px 10px 0 !important;
  text-align: left !important;
  border-bottom: 1px solid #eee !important;
  white-space: nowrap !important;
  background: none !important;
}

.bb-account-box .woocommerce-orders-table tbody td,
.bb-account-box .woocommerce-orders-table tbody th,
.bb-account-box .woocommerce-giftcards-table tbody td,
.bb-account-box .woocommerce-giftcards-activity-table tbody td {
  padding: 12px 12px 12px 0 !important;
  font-size: 0.9rem !important;
  color: var(--color-body, #1b1c1c) !important;
  border-bottom: 1px solid #f5f5f5 !important;
  vertical-align: middle !important;
  background: none !important;
}

.bb-account-box .woocommerce-orders-table tbody tr:last-child td,
.bb-account-box .woocommerce-orders-table tbody tr:last-child th,
.bb-account-box .woocommerce-giftcards-table tbody tr:last-child td,
.bb-account-box .woocommerce-giftcards-activity-table tbody tr:last-child td {
  border-bottom: none !important;
}

/* === BESTELLUNGEN – DESKTOP (klassische Tabelle) ===
   Alle Spalten nebeneinander in einer Zeile. data-title-Label aus dem
   Stack-Layout wird hier ausgeblendet; die thead-Spalten dienen als
   Überschriften. Werte numerisch/aktion rechtsbündig wie im thead. */
#bb-account-orders .woocommerce-orders-table {
  table-layout: auto !important;
}
#bb-account-orders .woocommerce-orders-table thead th {
  text-align: left !important;
  font-size: 0.969rem !important;
}
#bb-account-orders .woocommerce-orders-table thead th.woocommerce-orders-table__header-order-actions {
  text-align: right !important;
}
#bb-account-orders .woocommerce-orders-table tbody tr {
  display: table-row !important;
}
#bb-account-orders .woocommerce-orders-table tbody td {
  display: table-cell !important;
  width: auto !important;
  text-align: left !important;
  vertical-align: middle !important;
  padding: 14px 12px 14px 0 !important;
  border-bottom: 1px solid #f5f5f5 !important;
  border-top: none !important;
  font-size: 1.026rem !important;
  line-height: 1.4 !important;
}
#bb-account-orders .woocommerce-orders-table tbody td::before {
  content: none !important;
}
#bb-account-orders .woocommerce-orders-table tbody tr:last-child td {
  border-bottom: none !important;
}
/* Preisangaben in der Gesamt-Spalte auf Zellenschrift/-farbe zwingen.
   Sonst greift eine globale Theme-Regel (große, grüne .woocommerce-Price-amount),
   die z.B. bei rückerstatteten Bestellungen den durchgestrichenen Originalpreis
   überdimensioniert und grün darstellt. */
#bb-account-orders .woocommerce-orders-table tbody td .woocommerce-Price-amount,
#bb-account-orders .woocommerce-orders-table tbody td .woocommerce-Price-amount .woocommerce-Price-currencySymbol {
  font-size: 1.026rem !important;
  color: var(--color-body, #1b1c1c) !important;
  font-weight: 400 !important;
}
/* Aktion-Spalte rechtsbündig, Button kompakt im schwarzen Stil */
#bb-account-orders .woocommerce-orders-table tbody td.woocommerce-orders-table__cell-order-actions {
  text-align: right !important;
  white-space: nowrap !important;
}
#bb-account-orders .woocommerce-button.view,
#bb-account-orders .woocommerce-orders-table__cell-order-actions a {
  display: inline-block !important;
  width: auto !important;
  box-sizing: border-box !important;
  background: var(--color-body, #1b1c1c) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 60px !important;
  font-size: var(--fs-button, 1rem) !important;
  font-family: inherit !important;
  font-weight: 400 !important;
  padding: clamp(14px, 3vw, 18px) clamp(20px, 3vw, 24px) !important;
  cursor: pointer !important;
  text-align: center !important;
  text-decoration: none !important;
  transition: opacity .2s ease !important;
  line-height: var(--lh-button, 1.2) !important;
}
#bb-account-orders .woocommerce-button.view:hover,
#bb-account-orders .woocommerce-orders-table__cell-order-actions a:hover {
  opacity: .85 !important;
}

/* === GUTHABEN – DESKTOP (klassische Tabellen) ===
   Aktives Guthaben (giftcards-table): Datum / Code / Verfügbares Guthaben / Läuft ab.
   Eingelöstes Guthaben (giftcards-activity-table): Datum / Beschreibung / Menge.
   Beide table-layout: fixed mit deckungsgleichen Spaltenbreiten:
   - Datum         18.4 %  (in beiden gleich)
   - Code          38.9 %  } Beschreibung = Code + Verfügbares Guthaben = 67.4 %
   - Verfügbares   28.5 %  }
   - Läuft ab      14.2 %  = Menge */
#bb-account-guthaben .woocommerce-giftcards-table,
#bb-account-guthaben .woocommerce-giftcards-activity-table {
  display: table !important;
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
}
#bb-account-guthaben .woocommerce-giftcards-table thead,
#bb-account-guthaben .woocommerce-giftcards-activity-table thead {
  display: table-header-group !important;
}
#bb-account-guthaben .woocommerce-giftcards-table thead th,
#bb-account-guthaben .woocommerce-giftcards-activity-table thead th {
  display: table-cell !important;
  font-weight: 700 !important;
  font-size: 0.969rem !important;
  color: #777 !important;
  text-align: left !important;
  padding: 0 12px 10px 0 !important;
  border-bottom: 1px solid #eee !important;
  white-space: nowrap !important;
  background: none !important;
}
#bb-account-guthaben .woocommerce-giftcards-table tbody,
#bb-account-guthaben .woocommerce-giftcards-activity-table tbody {
  display: table-row-group !important;
  width: 100% !important;
}
#bb-account-guthaben .woocommerce-giftcards-table tbody tr,
#bb-account-guthaben .woocommerce-giftcards-activity-table tbody tr {
  display: table-row !important;
  border-bottom: none !important;
  padding: 0 !important;
}
#bb-account-guthaben .woocommerce-giftcards-table tbody td,
#bb-account-guthaben .woocommerce-giftcards-activity-table tbody td {
  display: table-cell !important;
  width: auto !important;
  text-align: left !important;
  vertical-align: top !important;
  box-sizing: border-box !important;
  float: none !important;
  font-size: var(--fs-p, 1rem) !important;
  line-height: 1.4 !important;
  padding: 14px 12px 14px 0 !important;
  border-bottom: 1px solid #f5f5f5 !important;
}
#bb-account-guthaben .woocommerce-giftcards-table tbody tr:last-child td,
#bb-account-guthaben .woocommerce-giftcards-activity-table tbody tr:last-child td {
  border-bottom: none !important;
}
#bb-account-guthaben .woocommerce-giftcards-table tbody td::before,
#bb-account-guthaben .woocommerce-giftcards-activity-table tbody td::before,
#bb-account-guthaben .woocommerce-giftcards-table tbody td[data-title="Läuft ab"]::before {
  content: none !important;
}
#bb-account-guthaben .woocommerce-giftcards-table tbody td[data-title="Code"] {
  font-size: var(--fs-p, 1rem) !important;
  font-weight: 700 !important;
}
#bb-account-guthaben .woocommerce-giftcards-table tbody td[data-title="Verfügbares Guthaben"] {
  font-weight: 700 !important;
}
#bb-account-guthaben .woocommerce-giftcards-activity-table tbody td[data-title="Menge"] {
  font-weight: 700 !important;
}

/* Feste Spaltenbreiten – Aktives Guthaben */
#bb-account-guthaben .woocommerce-giftcards-table thead th:nth-child(1),
#bb-account-guthaben .woocommerce-giftcards-table tbody td:nth-child(1) { width: 18.4% !important; }
#bb-account-guthaben .woocommerce-giftcards-table thead th:nth-child(2),
#bb-account-guthaben .woocommerce-giftcards-table tbody td:nth-child(2) { width: 38.9% !important; }
#bb-account-guthaben .woocommerce-giftcards-table thead th:nth-child(3),
#bb-account-guthaben .woocommerce-giftcards-table tbody td:nth-child(3) { width: 28.5% !important; }
#bb-account-guthaben .woocommerce-giftcards-table thead th:nth-child(4),
#bb-account-guthaben .woocommerce-giftcards-table tbody td:nth-child(4) { width: 14.2% !important; }

/* Feste Spaltenbreiten – Eingelöstes Guthaben (deckungsgleich) */
#bb-account-guthaben .woocommerce-giftcards-activity-table thead th:nth-child(1),
#bb-account-guthaben .woocommerce-giftcards-activity-table tbody td:nth-child(1) { width: 18.4% !important; white-space: normal !important; }
#bb-account-guthaben .woocommerce-giftcards-activity-table thead th:nth-child(2),
#bb-account-guthaben .woocommerce-giftcards-activity-table tbody td:nth-child(2) { width: 67.4% !important; white-space: normal !important; }
#bb-account-guthaben .woocommerce-giftcards-activity-table thead th:nth-child(3),
#bb-account-guthaben .woocommerce-giftcards-activity-table tbody td:nth-child(3) { width: 14.2% !important; white-space: normal !important; }

/* Bestellnummer Link */
.bb-account-box .woocommerce-orders-table__cell-order-number a {
  color: var(--color-body, #1b1c1c) !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}
.bb-account-box .woocommerce-orders-table__cell-order-number a:hover {
  text-decoration: underline !important;
}

/* Status */
.bb-account-box .woocommerce-orders-table__cell-order-status {
  font-size: var(--fs-small, .85rem) !important;
  font-weight: 500 !important;
}

/* Buttons in Tabellen */
.bb-account-box .woocommerce-button.view,
.bb-account-box .woocommerce-button.button {
  display: inline-block !important;
  background: var(--color-body, #1b1c1c) !important;
  color: #fff !important;
  border: 2px solid var(--color-body, #1b1c1c) !important;
  border-radius: 60px !important;
  font-size: var(--fs-small, .85rem) !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  padding: 6px 16px !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: opacity .2s ease !important;
  white-space: nowrap !important;
}
.bb-account-box .woocommerce-button.view:hover,
.bb-account-box .woocommerce-button.button:hover { opacity: .85 !important; }

/* WC Titel ausblenden */
.bb-account-box h2.woocommerce-column__title,
.bb-account-body > h2,
.bb-account-body > h4 {
  font-size: var(--fs-p, 1rem) !important;
  font-weight: 700 !important;
  color: var(--color-body, #1b1c1c) !important;
  margin: 20px 0 12px 0 !important;
}
.bb-account-body > h2:first-child,
.bb-account-body > h4:first-child {
  display: none !important;
}

/* Guthaben Betrag */
.bb-account-body .woocommerce-MyAccount-Giftcards-balance-amount {
  font-size: clamp(1.5rem, 3vw, 2rem) !important;
  font-weight: 700 !important;
  color: var(--color-body, #1b1c1c) !important;
  margin-bottom: 16px !important;
}

/* Guthaben Input */
.bb-account-body .woocommerce-MyAccount-Giftcards-form {
  display: flex !important;
  gap: 8px !important;
  margin-top: 8px !important;
  margin-bottom: 4px !important;
}
.bb-account-body .woocommerce-MyAccount-Giftcards-form input[type="text"] {
  flex: 1 1 auto !important;
  background: var(--color-grey, #f1f1f1) !important;
  border: none !important;
  border-radius: 60px !important;
  font-size: var(--fs-p, 1rem) !important;
  font-family: inherit !important;
  padding: 12px 20px !important;
  min-width: 0 !important;
  height: auto !important;
}

/* "Hinzufügen"-Button: kompakter, schwarzer Button wie die übrigen CTAs.
   align-self/flex verhindern, dass der Flex-Container ihn auf die volle
   Eingabefeld-Höhe streckt; höhere Spezifität als die generische
   .woocommerce-button.button-Regel (font-weight 700, padding 6px 16px). */
#bb-account-guthaben .woocommerce-MyAccount-Giftcards-form {
  align-items: center !important;
}
#bb-account-guthaben .woocommerce-MyAccount-Giftcards-form button.woocommerce-Button,
#bb-account-guthaben .woocommerce-Giftcards button.woocommerce-Button {
  display: inline-block !important;
  align-self: center !important;
  flex: 0 0 auto !important;
  width: auto !important;
  height: auto !important;
  box-sizing: border-box !important;
  background: var(--color-body, #1b1c1c) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 60px !important;
  font-size: var(--fs-button, 1rem) !important;
  font-family: inherit !important;
  font-weight: 400 !important;
  padding: clamp(14px, 3vw, 18px) clamp(20px, 3vw, 24px) !important;
  cursor: pointer !important;
  text-align: center !important;
  text-decoration: none !important;
  transition: opacity .2s ease !important;
  line-height: var(--lh-button, 1.2) !important;
}
#bb-account-guthaben .woocommerce-MyAccount-Giftcards-form button.woocommerce-Button:hover,
#bb-account-guthaben .woocommerce-Giftcards button.woocommerce-Button:hover {
  opacity: .85 !important;
}

/* Guthaben h4 Titel */
.bb-account-body .woocommerce-MyAccount-Giftcards-form ~ h4,
#bb-account-guthaben h4 {
  margin-top: 20px !important;
  margin-bottom: 0 !important;
  font-size: var(--fs-p, 1rem) !important;
  font-weight: 700 !important;
}
.bb-account-body .woocommerce-pagination { display: none !important; }

/* ── Adressen ── */
.bb-account-addresses {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}

.bb-account-address-block {
  padding-bottom: 24px !important;
  border-bottom: 1px solid #eee !important;
  margin-bottom: 24px !important;
}

.bb-account-address-block:last-child {
  border-bottom: none !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.bb-account-address-block h4 {
  font-size: var(--fs-p, 1rem) !important;
  font-weight: 700 !important;
  color: var(--color-body, #1b1c1c) !important;
  margin: 0 0 10px 0 !important;
}

.bb-account-address-block address {
  font-style: normal !important;
  font-size: var(--fs-p, 1rem) !important;
  line-height: var(--lh-p, 1.6) !important;
  color: var(--color-body, #1b1c1c) !important;
  margin-bottom: 16px !important;
}

/* ── Profil ── */
.bb-account-section-label {
  font-size: var(--fs-p, 1rem) !important;
  font-weight: 700 !important;
  color: var(--color-body, #1b1c1c) !important;
  margin: 0 0 12px 0 !important;
}

.bb-account-profile-rows {
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
  margin-top: 20px !important;
  margin-bottom: 20px !important;
}

.bb-account-profile-row {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  font-size: var(--fs-p, 1rem) !important;
}

.bb-account-profile-label {
  color: var(--color-body, #1b1c1c) !important;
  font-weight: 700 !important;
}

.bb-account-profile-value {
  color: var(--color-body, #1b1c1c) !important;
  font-weight: 400 !important;
}

/* ── Buttons ── */
.bb-account-btn {
  display: inline-block !important;
  background: var(--color-body, #1b1c1c) !important;
  color: #fff !important;
  border: 2px solid var(--color-body, #1b1c1c) !important;
  border-radius: 60px !important;
  font-size: var(--fs-button, 1rem) !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  padding: 10px 22px !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: opacity .2s ease !important;
  white-space: nowrap !important;
}
.bb-account-btn:hover { opacity: .85 !important; }

/* Aktions-Buttons in den Account-Boxen (Anpassen/Bearbeiten/Ändern): exakt wie
   der Kassen-Button "Bestellung prüfen" (.bb-order-review__cta-btn), aber mit
   auto-Breite statt voller Breite. Der Abbrechen-Button nutzt eine eigene Klasse
   (--cancel) und bleibt davon unberührt. */
.bb-account-btn--outline {
  display: inline-block !important;
  width: auto !important;
  box-sizing: border-box !important;
  background: var(--color-body, #1b1c1c) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 60px !important;
  font-size: var(--fs-button, 1rem) !important;
  font-family: inherit !important;
  font-weight: 400 !important;
  padding: clamp(14px, 3vw, 18px) clamp(20px, 3vw, 24px) !important;
  cursor: pointer !important;
  text-align: center !important;
  text-decoration: none !important;
  transition: opacity .2s ease !important;
  line-height: var(--lh-button, 1.2) !important;
}
.bb-account-btn--outline:hover {
  background: var(--color-body, #1b1c1c) !important;
  color: #fff !important;
  opacity: .85 !important;
}

/* "Löschung beantragen": gefüllt schwarz wie der Speichern-Button, aber als
   deaktiviert dargestellt (ausgegraut) – die Funktion folgt erst künftig. */
.bb-account-btn--disabled {
  background: var(--color-body, #1b1c1c) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 400 !important;
  opacity: .4 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* ── Adress-Bearbeitung: Button-Reihe (Speichern + Abbrechen) ──
   Beide Buttons linksbündig nebeneinander, normale (auto) Breite, gleiche Höhe.
   Optik/Größe identisch zu den Kassen-Buttons (Speichern = gefüllter CTA,
   Abbrechen = Outline-Button wie "Zurück zur Kasse"). */
.bb-account-form-actions {
  display: flex !important;
  gap: 12px !important;
  margin-top: 32px !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
}

/* Speichern: gefüllter Button wie der Kassen-CTA, aber auto-Breite.
   button.… nötig, um die generische .bb-account-form-wrap button[type="submit"]
   (font-weight 700, padding 14px) zu überstimmen. */
.bb-account-edit-address-form button.bb-account-btn--save,
form.bb-account-edit-address-form button.bb-account-btn--save {
  display: inline-block !important;
  width: auto !important;
  box-sizing: border-box !important;
  background: var(--color-body, #1b1c1c) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 60px !important;
  font-weight: 400 !important;
  padding: clamp(14px, 3vw, 18px) clamp(28px, 4vw, 40px) !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

/* Abbrechen: Outline-Button im Stil von "Zurück zur Kasse" (transparent,
   1px Rand). Padding um 1px reduziert, damit Border+Padding dieselbe Höhe
   wie der gefüllte Speichern-Button ergibt. */
.bb-account-edit-address-form a.bb-account-btn--cancel,
form.bb-account-edit-address-form a.bb-account-btn--cancel {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  box-sizing: border-box !important;
  background: transparent !important;
  color: var(--color-body, #1b1c1c) !important;
  border: 1px solid var(--color-body, #1b1c1c) !important;
  border-radius: 60px !important;
  font-weight: 400 !important;
  padding: calc(clamp(14px, 3vw, 18px) - 1px) clamp(28px, 4vw, 40px) !important;
  margin: 0 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}
.bb-account-edit-address-form a.bb-account-btn--cancel:hover,
form.bb-account-edit-address-form a.bb-account-btn--cancel:hover {
  background: var(--color-body, #1b1c1c) !important;
  color: #fff !important;
  opacity: 1 !important;
}

/* "Rechnung herunterladen" (Bestelldetail): Optik wie der Speichern-Button
   (gefüllt schwarz, font-weight 400, kein Rand, auto-Breite), mit Abstand oben. */
a.bb-account-btn--invoice {
  display: inline-block !important;
  width: auto !important;
  box-sizing: border-box !important;
  background: var(--color-body, #1b1c1c) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 60px !important;
  font-weight: 400 !important;
  padding: clamp(14px, 3vw, 18px) clamp(28px, 4vw, 40px) !important;
  margin-top: 24px !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}
a.bb-account-btn--invoice:hover {
  background: var(--color-body, #1b1c1c) !important;
  color: #fff !important;
  opacity: .85 !important;
}

/* Divider + Hint */
.bb-account-divider {
  border-top: 1px solid #eee !important;
  margin: 20px 0 !important;
}

.bb-account-hint {
  font-size: var(--fs-small, .85rem) !important;
  color: #777 !important;
  margin-top: 8px !important;
}

.bb-account-empty {
  font-size: var(--fs-p, 1rem) !important;
  color: #777 !important;
}

/* ── Edit Account Form – Checkout-Stil ── */
.bb-account-edit-form {
  margin: 0 !important;
}

.bb-edit-row {
  display: flex !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

.bb-edit-row--thirds .bb-edit-field {
  flex: 1 1 calc(33.333% - 8px) !important;
  min-width: 0 !important;
}

.bb-edit-row:not(.bb-edit-row--thirds) .bb-edit-field {
  flex: 1 1 100% !important;
}

.bb-edit-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

/* Headline der Adress-Bearbeitung luftiger vom Inhalt absetzen */
.bb-account-form-wrap h4 {
  margin-top: 8px !important;
  margin-bottom: 28px !important;
}

/* Labels – identisch zu checkout.css .bb-checkout-form label */
.bb-edit-field label,
.bb-account-edit-form label,
.bb-account-form-wrap label {
  font-size: var(--fs-p, 1rem) !important;
  font-weight: 400 !important;
  color: var(--color-body, #1b1c1c) !important;
  margin-bottom: 0 !important;
  display: block !important;
}

/* Pflichtfeld-Sternchen ausblenden */
.bb-account-edit-form .required,
.bb-edit-field .required,
.bb-account-form-wrap .required {
  display: none !important;
}

/* Inputs – identisch zu checkout.css input.input-text */
.bb-edit-field input[type="text"],
.bb-edit-field input[type="email"],
.bb-edit-field input[type="password"],
.bb-account-edit-form input[type="text"],
.bb-account-edit-form input[type="email"],
.bb-account-edit-form input[type="password"],
.bb-account-form-wrap input[type="text"],
.bb-account-form-wrap input[type="email"],
.bb-account-form-wrap input[type="tel"],
.bb-account-form-wrap input[type="password"],
.bb-account-form-wrap select {
  width: 100% !important;
  background: var(--color-grey, #f1f1f1) !important;
  border: none !important;
  border-radius: 60px !important;
  font-size: var(--fs-p, 1rem) !important;
  font-family: inherit !important;
  padding: 12px 20px !important;
  height: auto !important;
  box-sizing: border-box !important;
  color: var(--color-body, #1b1c1c) !important;
  box-shadow: none !important;
  transition: background .25s ease !important;
}

.bb-account-form-wrap select {
  appearance: auto !important;
}

.bb-edit-field input:focus,
.bb-edit-field input:hover,
.bb-account-edit-form input:focus,
.bb-account-edit-form input:hover,
.bb-account-form-wrap input:focus,
.bb-account-form-wrap input:hover,
.bb-account-form-wrap select:focus,
.bb-account-form-wrap select:hover {
  outline: none !important;
  box-shadow: none !important;
  background: color-mix(in srgb, var(--color-grey, #f1f1f1) 95%, #000 5%) !important;
}

/* Passwort-Abschnitt */
.bb-account-edit-form fieldset,
.bb-account-form-wrap fieldset {
  border: none !important;
  padding: 0 !important;
  margin: 24px 0 12px 0 !important;
}

.bb-account-edit-form fieldset legend,
.bb-account-form-wrap fieldset legend {
  font-size: var(--fs-p, 1rem) !important;
  font-weight: 700 !important;
  color: var(--color-body, #1b1c1c) !important;
  margin-bottom: 16px !important;
  padding: 0 !important;
}

/* Submit – identisch zu .bb-order-review__cta-btn */
.bb-edit-row--actions {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  gap: 12px !important;
  margin-top: 12px !important;
}

.bb-account-edit-form button[type="submit"],
.bb-account-edit-form input[type="submit"],
.bb-account-form-wrap .woocommerce-Button,
.bb-account-form-wrap button[type="submit"],
.bb-account-form-wrap input[type="submit"] {
  display: inline-block !important;
  background: var(--color-body, #1b1c1c) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 60px !important;
  font-size: var(--fs-button, 1rem) !important;
  font-family: inherit !important;
  font-weight: 400 !important;
  padding: 14px 24px !important;
  cursor: pointer !important;

  transition: opacity .2s ease !important;
  line-height: var(--lh-button, 1.2) !important;
}
.bb-account-edit-form button[type="submit"]:hover,
.bb-account-form-wrap button[type="submit"]:hover { opacity: .85 !important; }

/* Hint ausblenden */
.bb-edit-hint { display: none !important; }

/* WC Adressformular Layout */
.bb-account-form-wrap .woocommerce-address-fields__field-wrapper {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
}

.bb-account-form-wrap .form-row {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.bb-account-form-wrap .form-row-first,
.bb-account-form-wrap .form-row-last {
  width: calc(50% - 6px) !important;
}

.bb-account-form-wrap .woocommerce-notices-wrapper { margin-bottom: 16px !important; }

/* ── Smartphone ── */
@media (max-width: 768px) {
  .bb-account-layout {
    max-width: 100% !important;
  }
  .bb-edit-row,
  .bb-edit-row--thirds {
    flex-direction: column !important;
  }
  .bb-edit-row--thirds .bb-edit-field,
  .bb-edit-row .bb-edit-field {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  .bb-account-form-wrap .form-row-first,
  .bb-account-form-wrap .form-row-last {
    width: 100% !important;
  }
  .bb-account-form-wrap .woocommerce-address-fields__field-wrapper {
    flex-direction: column !important;
  }

  /* === BESTELLUNGEN – MOBIL (gestapeltes Block-Layout) ===
     Label links, Wert rechts; jede Bestellung als Block; "Aktion:"
     ausgeblendet; Details-Button im Speichern-Button-Stil. */
  #bb-account-orders .woocommerce-orders-table thead {
    display: none !important;
  }
  #bb-account-orders .woocommerce-orders-table tbody td {
    text-align: right !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    padding: 3.5px 0 !important;
    border-top: none !important;
    border-bottom: none !important;
  }
  #bb-account-orders .woocommerce-orders-table tbody td::before {
    content: attr(data-title) ": " !important;
    float: left !important;
    text-align: left !important;
    font-weight: 400 !important;
    color: #777 !important;
    font-size: 0.95rem !important;
  }
  #bb-account-orders .woocommerce-orders-table tbody td.woocommerce-orders-table__cell-order-actions::before {
    content: none !important;
  }
  #bb-account-orders .woocommerce-orders-table tbody td.woocommerce-orders-table__cell-order-actions {
    padding-top: 10px !important;
    padding-bottom: 0 !important;
    text-align: left !important;
  }
  #bb-account-orders .woocommerce-orders-table tbody tr {
    display: block !important;
    border-bottom: 1px solid #eee !important;
    padding-bottom: 28px !important;
    margin-bottom: 28px !important;
  }
  #bb-account-orders .woocommerce-orders-table tbody tr:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
  }
}

/* ── Bestelldetail-Ansicht ── */
.bb-order-detail__back {
  display: inline-block !important;
  font-size: var(--fs-p, 1rem) !important;
  color: #777 !important;
  text-decoration: none !important;
  margin-bottom: 20px !important;
}
.bb-order-detail__back:hover { color: var(--color-body, #1b1c1c) !important; }

.bb-order-detail__header {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  margin-bottom: 24px !important;
  padding-bottom: 20px !important;
  border-bottom: 1px solid #eee !important;
}

.bb-order-detail__row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: baseline !important;
  gap: 16px !important;
  font-size: var(--fs-p, 1rem) !important;
}

.bb-order-detail__label {
  color: var(--color-body, #1b1c1c) !important;
  flex-shrink: 0 !important;
  font-weight: 700 !important;
}

.bb-order-detail__value {
  font-weight: 400 !important;
  color: var(--color-body, #1b1c1c) !important;
  text-align: right !important;
}

.bb-order-detail__value--discount { color: var(--color-green, #2e7d32) !important; }

.bb-order-detail__table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: var(--fs-p, 1rem) !important;
  margin-bottom: 20px !important;
}

.bb-order-detail__table thead th {
  font-weight: 700 !important;
  font-size: var(--fs-p, 1rem) !important;
  color: var(--color-body, #1b1c1c) !important;
  padding: 0 12px 10px 0 !important;
  text-align: left !important;
  border-bottom: 1px solid #eee !important;
}

.bb-order-detail__table thead th:last-child { text-align: right !important; }

.bb-order-detail__table tbody td {
  padding: 10px 12px 10px 0 !important;
  border-bottom: 1px solid #f5f5f5 !important;
  vertical-align: middle !important;
  color: var(--color-body, #1b1c1c) !important;
  font-size: var(--fs-p, 1rem) !important;
}

.bb-order-detail__table tbody td:last-child { text-align: right !important; }

.bb-order-detail__table tbody tr:last-child td { border-bottom: none !important; }

.bb-order-detail__totals {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  padding-top: 16px !important;
  border-top: 1px solid #eee !important;
}

.bb-order-detail__row--total .bb-order-detail__label,
.bb-order-detail__row--total .bb-order-detail__value {
  font-weight: 700 !important;
  font-size: var(--fs-p, 1rem) !important;
  color: var(--color-body, #1b1c1c) !important;
}

.bb-order-detail__tax {
  font-size: var(--fs-small, .85rem) !important;
  color: var(--color-body, #1b1c1c) !important;
  margin-top: 6px !important;
  text-align: right !important;
}

/* Produktbild in Bestelldetail */
.bb-order-detail__td-img {
  width: 56px !important;
  padding-right: 12px !important;
}

.bb-order-detail__td-img img {
  width: 48px !important;
  height: 48px !important;
  object-fit: cover !important;
  border-radius: 8px !important;
  display: block !important;
}

/* Kein Trennstrich vor Benutzerkonto löschen */
#bb-account-profil .bb-account-section-label {
  border-top: none !important;
  padding-top: 0 !important;
}

/* Abstand zwischen Bearbeiten-Button und Benutzerkonto löschen */
#bb-account-profil .bb-account-section-label:last-of-type {
  margin-top: 2em !important;
}

#bb-account-profil .bb-account-btn + .bb-account-section-label,
#bb-account-profil .bb-account-btn--outline + p.bb-account-section-label {
  margin-top: 2em !important;
}

/* Abstand zwischen Bearbeiten-Button und Benutzerkonto löschen */
#bb-account-profil .bb-account-section-label:last-of-type {
  margin-top: 2em !important;
}

/* Abstand: Bearbeiten-Button → Benutzerkonto löschen */
#bb-account-profil .bb-account-btn--outline + .bb-account-section-label {
  margin-top: 2em !important;
}

/* Abstand zwischen Bearbeiten-Button und Benutzerkonto löschen */
#bb-account-profil .bb-account-section-label:not(:first-child) {
  margin-top: 2em !important;
}

/* Abstand zwischen Bearbeiten und Benutzerkonto löschen */
#bb-account-profil .bb-account-section-label:last-of-type,
#bb-account-profil .bb-account-btn--outline + .bb-account-section-label,
#bb-account-profil .bb-account-btn + .bb-account-section-label {
  margin-top: 2em !important;
}

/* Abstand vor Benutzerkonto löschen */
.bb-account-section-label--mt {
  margin-top: 2em !important;
}

/* Abstand zwischen Bearbeiten-Button und Benutzerkonto löschen */
#bb-account-profil .bb-account-section-label:last-of-type {
  margin-top: 2em !important;
}

/* Abstand Bearbeiten-Button → Benutzerkonto löschen */
#bb-account-profil .bb-account-btn--outline + .bb-account-section-label {
  margin-top: 2em !important;
}

/* ── Login Box ── */
.bb-account-login-box {
  background: #fff !important;
  border-radius: 24px !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.08) !important;
  border: 2px solid var(--color-yellow, #FFF064) !important;
  padding: 28px !important;
  max-width: 540px !important;
}

@media (max-width: 1024px) { .bb-account-login-box { max-width: 80% !important; } }
@media (max-width: 768px)  { .bb-account-login-box { max-width: 100% !important; } }

.bb-account-login-box .bb-login-heading {
  font-size: var(--fs-h4, 1.25rem) !important;
  font-weight: 700 !important;
  color: var(--color-body, #1b1c1c) !important;
  margin: 0 0 6px 0 !important;
}

.bb-account-login-box .bb-login-subtitle {
  font-size: var(--fs-p, 1rem) !important;
  color: var(--color-body, #1b1c1c) !important;
  margin: 0 0 20px 0 !important;
}

.bb-account-login-box .form-row {
  margin-bottom: 12px !important;
  padding: 0 !important;
}

.bb-account-login-box .input-text {
  width: 100% !important;
  background: var(--color-grey, #f1f1f1) !important;
  border: none !important;
  border-radius: 60px !important;
  font-size: var(--fs-p, 1rem) !important;
  font-family: inherit !important;
  padding: 12px 20px !important;
  height: auto !important;
  box-sizing: border-box !important;
  transition: background .25s ease !important;
}

.bb-account-login-box .input-text:hover,
.bb-account-login-box .input-text:focus {
  outline: none !important;
  background: color-mix(in srgb, var(--color-grey, #f1f1f1) 95%, #000 5%) !important;
}

.bb-account-login-box .bb-login-lost {
  margin: 4px 0 12px !important;
  font-size: var(--fs-p, 1rem) !important;
}
.bb-account-login-box .bb-login-lost a {
  color: var(--color-green, #2e7d32) !important;
  text-decoration: none !important;
}

.bb-account-login-box .bb-login-remember {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: var(--fs-p, 1rem) !important;
  color: var(--color-body, #1b1c1c) !important;
  cursor: pointer !important;
  margin-bottom: 20px !important;
}

.bb-account-login-box .bb-login-error {
  display: block !important;
  color: var(--color-red, #c00) !important;
  font-size: var(--fs-small, .85rem) !important;
  margin-bottom: 12px !important;
}

.bb-account-login-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  margin-top: 20px !important;
}

.bb-account-login-box .bb-account-login-actions .bb-login-btn,
.bb-account-page .bb-account-login-actions .bb-login-btn {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: var(--color-body, #1b1c1c) !important;
  color: #fff !important;
  border: 2px solid var(--color-body, #1b1c1c) !important;
  border-radius: 60px !important;
  font-size: var(--fs-button, 1rem) !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  padding: 14px 24px !important;
  cursor: pointer !important;
  text-align: center !important;
  transition: opacity .2s ease !important;
}
.bb-account-page .bb-account-login-actions .bb-login-btn:hover { opacity: .85 !important; }

.bb-account-login-box .bb-account-login-actions .bb-guest-continue,
.bb-account-page .bb-account-login-actions .bb-guest-continue {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: transparent !important;
  color: var(--color-body, #1b1c1c) !important;
  border: 2px solid var(--color-body, #1b1c1c) !important;
  border-radius: 60px !important;
  font-size: var(--fs-button, 1rem) !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  padding: 14px 24px !important;
  cursor: pointer !important;
  text-align: center !important;
  text-decoration: none !important;
  transition: opacity .2s ease !important;
}
.bb-account-page .bb-account-login-actions .bb-guest-continue:hover { opacity: .85 !important; }

@media (max-width: 600px) {
  .bb-account-login-actions { grid-template-columns: 1fr !important; }
}

/* Abbrechen-Button (Profil- & Adress-Bearbeitung): echter Outline-Button –
   transparenter Hintergrund, 1px roter Rand, roter Text. Überschreibt die
   gefüllt-schwarze .bb-account-btn--outline-Basis gezielt für die Aktionsreihe.
   Gleiche Höhe wie der Speichern-Button. */
.bb-edit-row--actions .bb-account-btn--outline {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: 1px solid var(--color-red, #c00) !important;
  color: var(--color-red, #c00) !important;
  margin-top: 0 !important;
  line-height: var(--lh-button, 1.2) !important;
}

/* Abbrechen-Button Hover: rot gefüllt, weißer Text */
.bb-edit-row--actions .bb-account-btn--outline:hover {
  background: var(--color-red, #c00) !important;
  border-color: var(--color-red, #c00) !important;
  color: #fff !important;
  opacity: 1 !important;
}

/* Guthaben Mobile */
@media (max-width: 768px) {
  .bb-account-body .woocommerce-MyAccount-Giftcards-form {
    flex-direction: column !important;
  }
  .bb-account-body .woocommerce-MyAccount-Giftcards-form input[type="text"],
  .bb-account-body .woocommerce-MyAccount-Giftcards-form .woocommerce-Button {
    width: 100% !important;
    flex: 1 1 100% !important;
  }
  .bb-account-body .woocommerce-giftcards-table,
  .bb-account-body .woocommerce-giftcards-activity-table {
    display: block !important;
    overflow-x: visible !important;
    table-layout: auto !important;
  }
  /* Mobil: zurück zum gestapelten Block-Layout (eine Karte pro Block) */
  #bb-account-guthaben .woocommerce-giftcards-table thead,
  #bb-account-guthaben .woocommerce-giftcards-activity-table thead {
    display: none !important;
  }
  #bb-account-guthaben .woocommerce-giftcards-table tbody,
  #bb-account-guthaben .woocommerce-giftcards-activity-table tbody {
    display: block !important;
    width: 100% !important;
  }
  #bb-account-guthaben .woocommerce-giftcards-table tbody tr,
  #bb-account-guthaben .woocommerce-giftcards-activity-table tbody tr {
    display: block !important;
    width: 100% !important;
    border-bottom: 1px solid #eee !important;
    padding: 8px 0 !important;
  }
  #bb-account-guthaben .woocommerce-giftcards-table tbody tr:last-child,
  #bb-account-guthaben .woocommerce-giftcards-activity-table tbody tr:last-child {
    border-bottom: none !important;
  }
  #bb-account-guthaben .woocommerce-giftcards-table tbody td,
  #bb-account-guthaben .woocommerce-giftcards-activity-table tbody td {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    padding: 3.5px 0 !important;
    border-bottom: none !important;
    line-height: 1.4 !important;
  }
  /* Feste Desktop-Spaltenbreiten (nth-child) auf Mobil zurücksetzen –
     sonst bleiben die Prozentbreiten aktiv und stauchen das Stack-Layout. */
  #bb-account-guthaben .woocommerce-giftcards-table tbody td:nth-child(1),
  #bb-account-guthaben .woocommerce-giftcards-table tbody td:nth-child(2),
  #bb-account-guthaben .woocommerce-giftcards-table tbody td:nth-child(3),
  #bb-account-guthaben .woocommerce-giftcards-table tbody td:nth-child(4),
  #bb-account-guthaben .woocommerce-giftcards-activity-table tbody td:nth-child(1),
  #bb-account-guthaben .woocommerce-giftcards-activity-table tbody td:nth-child(2),
  #bb-account-guthaben .woocommerce-giftcards-activity-table tbody td:nth-child(3) {
    width: 100% !important;
    white-space: normal !important;
  }
  /* Doppelpunkt aus data-title ausblenden */
  .bb-account-body .woocommerce-giftcards-table td::before,
  .bb-account-body .woocommerce-giftcards-activity-table td::before {
    content: none !important;
  }
  /* Mobil: "Läuft ab"-Label wieder anzeigen (Desktop nutzt den thead).
     Steht NACH der none-Regel, damit es gewinnt. */
  #bb-account-guthaben .woocommerce-giftcards-table tbody td[data-title="Läuft ab"]::before {
    content: "Läuft ab:\00a0" !important;
  }
}

/* Guthaben Mobile – stärkere Selektoren */
@media (max-width: 768px) {
  #bb-account-guthaben .woocommerce-MyAccount-Giftcards-form {
    flex-direction: column !important;
    gap: 8px !important;
  }
  #bb-account-guthaben .woocommerce-MyAccount-Giftcards-form input,
  #bb-account-guthaben .woocommerce-MyAccount-Giftcards-form button,
  #bb-account-guthaben .woocommerce-MyAccount-Giftcards-form a {
    width: 100% !important;
    flex: 1 1 100% !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
}

/* Guthaben Form Mobile – exakte Selektoren aus HTML */
@media (max-width: 768px) {
  #bb-account-guthaben .woocommerce-Giftcards.woocommerce-MyAccount-Giftcards-form {
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }
  #bb-account-guthaben .woocommerce-Giftcards.woocommerce-MyAccount-Giftcards-form input.input-text {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    flex: none !important;
    margin: 0 !important;
  }
  #bb-account-guthaben .woocommerce-Giftcards.woocommerce-MyAccount-Giftcards-form button.woocommerce-Button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    flex: none !important;
    margin: 0 !important;
    padding: 14px 24px !important;
    font-size: var(--fs-p, 1rem) !important;
    font-weight: 400 !important;
  }
}

/* Guthaben Form – overflow fix */
#bb-account-guthaben form {
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

#bb-account-guthaben .woocommerce-Giftcards.woocommerce-MyAccount-Giftcards-form {
  width: 100% !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

@media (max-width: 768px) {
  #bb-account-guthaben form,
  #bb-account-guthaben .woocommerce-Giftcards.woocommerce-MyAccount-Giftcards-form,
  #bb-account-guthaben .woocommerce-Giftcards.woocommerce-MyAccount-Giftcards-form > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    flex-shrink: 1 !important;
  }
}

/* Abstand zwischen Bearbeiten-Button und Passwort-Zeile */
.bb-account-profile-rows--password {
  margin-top: 36px !important;
}

/* Aktions-Buttons in Bestellungen, Adressen und Profil nur auf Desktop ~12 %
   kleiner (weniger prominent). Mobil (<=768px) bleibt unberührt. Basis ist der
   Kassen-Button (.bb-order-review__cta-btn): font-size var(--fs-button),
   padding clamp(14px,3vw,18px) clamp(20px,3vw,24px). Der Guthaben-"Hinzufügen"-
   Button ist bewusst NICHT betroffen. */
@media (min-width: 769px) {
  #bb-account-orders .woocommerce-button.view,
  #bb-account-orders .woocommerce-orders-table__cell-order-actions a,
  .bb-account-btn--outline,
  .bb-account-edit-form .bb-edit-row--actions button[type="submit"],
  .bb-account-edit-form .bb-edit-row--actions input[type="submit"] {
    font-size: calc(var(--fs-button, 1rem) * 0.88) !important;
    padding: clamp(12.3px, 2.64vw, 15.8px) clamp(17.6px, 2.64vw, 21.1px) !important;
  }
}