/* Brotbestellung – Frontend
   Nutzt CSS-Variablen aus den Design-Einstellungen (mit Fallbacks). */
.ch-brot-wrap{
  --chb-primary:var(--chb-primary,#c8772e);
  --chb-primary-text:var(--chb-primary-text,#fff);
  --chb-accent:var(--chb-accent,#1d2327);
  --chb-bg:var(--chb-bg,#f7f4ef);
  --chb-card-bg:var(--chb-card-bg,#fff);
  --chb-text:var(--chb-text,#1d2327);
  --chb-muted:var(--chb-muted,#6b7280);
  --chb-success:var(--chb-success,#2f855a);
  --chb-radius:var(--chb-radius,18px);
  --chb-btn-radius:var(--chb-btn-radius,12px);
  max-width:1120px;margin:0 auto;color:var(--chb-text);
  font-family:-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
.ch-brot-wrap *{box-sizing:border-box}
.ch-brot-form{margin:0}

/* Hinweise / Banner */
.ch-brot-edit-hint,.ch-brot-existing-hint{background:#fff6e9;border:1px solid #f0d8b0;border-radius:10px;padding:10px 14px;margin:0 0 14px;font-size:14px}
.ch-brot-apt-banner{background:var(--chb-primary);color:var(--chb-primary-text);border-radius:var(--chb-btn-radius);padding:12px 16px;margin-bottom:16px;font-weight:600}

/* Stepnav */
.ch-brot-mobile-step{display:none;font-weight:700;margin-bottom:12px}
.ch-brot-stepnav{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:22px;padding:0;border:none}
.ch-brot-stepnav button{display:flex;align-items:center;gap:10px;background:var(--chb-card-bg);border:1px solid #ece5da;border-radius:var(--chb-btn-radius);padding:12px 14px;cursor:pointer;font-size:13px;line-height:1.15;color:var(--chb-muted);text-align:left}
.ch-brot-stepnav button b{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#efe7da;color:#8a7c68;font-size:14px;flex:0 0 auto;font-style:normal}
.ch-brot-stepnav button.is-active{color:var(--chb-text);border-color:var(--chb-primary);box-shadow:0 4px 16px rgba(0,0,0,.08)}
.ch-brot-stepnav button.is-active b{background:var(--chb-primary);color:var(--chb-primary-text)}

/* Layout */
.ch-brot-layout{display:grid;grid-template-columns:1fr 330px;gap:22px;align-items:start}
.ch-brot-step{display:none}
.ch-brot-step.is-active{display:block;animation:chbfade .25s ease}
@keyframes chbfade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.ch-brot-section-head h3{margin:0 0 4px;font-size:22px}
.ch-brot-section-head p{margin:0 0 16px;color:var(--chb-muted)}

/* Kategorie-Tabs */
.ch-brot-cat-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0 18px}
.ch-brot-cat-tabs button{background:var(--chb-card-bg);border:1px solid #e7ded2;border-radius:999px;padding:7px 16px;cursor:pointer;font-size:14px;color:#5b5346}
.ch-brot-cat-tabs button.is-active{background:var(--chb-primary);color:var(--chb-primary-text);border-color:var(--chb-primary)}

/* Produkte */
.ch-brot-category-block h4{font-size:17px;margin:18px 0 12px}
.ch-brot-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.ch-brot-product{background:var(--chb-card-bg);border:1px solid #efe8de;border-radius:var(--chb-radius);padding:14px;display:flex;gap:14px}
.ch-brot-product-img{width:78px;height:78px;border-radius:14px;background:#f3ece1;display:grid;place-items:center;font-size:34px;flex:0 0 auto;overflow:hidden}
.ch-brot-product-img img{width:100%;height:100%;object-fit:cover}
.ch-brot-product-body{flex:1;min-width:0}
.ch-brot-product-top{display:flex;align-items:baseline;gap:8px;justify-content:space-between}
.ch-brot-product-top strong{font-size:15px}
.ch-brot-product-top small{color:var(--chb-muted);font-size:12px;white-space:nowrap}
.ch-brot-product-body p{margin:4px 0 6px;font-size:12.5px;color:var(--chb-muted);line-height:1.35}
.ch-brot-price{display:inline-block;font-weight:800;color:var(--chb-primary);font-size:16px;margin:2px 0 8px}
.ch-brot-qty{display:inline-flex;align-items:center;border:1px solid #e3dbcf;border-radius:999px;overflow:hidden}
.ch-brot-qty button{border:none;background:#f6f1e9;width:34px;height:34px;font-size:18px;cursor:pointer;color:#6b5d49}
.ch-brot-qty input{width:46px;height:34px;border:none;text-align:center;font-size:15px;font-weight:700;-moz-appearance:textfield}
.ch-brot-qty input::-webkit-outer-spin-button,.ch-brot-qty input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}

/* Bottom-Bar */
.ch-brot-bottom-bar{display:flex;align-items:center;justify-content:space-between;background:var(--chb-card-bg);border:1px solid #efe8de;border-radius:var(--chb-radius);padding:14px 18px;margin-top:18px;gap:14px}
.ch-brot-bottom-bar small{color:var(--chb-muted)}
.ch-brot-sticky-total{color:var(--chb-primary);font-size:18px}

/* Buttons */
.ch-brot-button{background:var(--chb-primary);color:var(--chb-primary-text);border:1px solid var(--chb-primary);border-radius:var(--chb-btn-radius);padding:12px 20px;font-size:14px;font-weight:700;cursor:pointer;text-decoration:none;display:inline-block}
.ch-brot-button.secondary{background:transparent;color:var(--chb-accent);border-color:#d9cfc0}
.ch-brot-button.success{background:var(--chb-success);border-color:var(--chb-success);color:#fff}
.ch-brot-actions{display:flex;justify-content:space-between;gap:12px;margin-top:20px}

/* Datum */
.ch-brot-date-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:12px}
.ch-brot-date-card{background:var(--chb-card-bg);border:1px solid #e9e1d5;border-radius:14px;padding:14px 10px;text-align:center;cursor:pointer;position:relative}
.ch-brot-date-sheet-top{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--chb-muted);display:block}
.ch-brot-date-card strong{display:block;margin:4px 0 2px;font-size:15px}
.ch-brot-date-daynum{font-size:26px;font-weight:800;line-height:1;display:block}
.ch-brot-date-full{display:block;font-size:11px;color:var(--chb-muted);margin-top:4px}
.ch-brot-date-card.is-active{border-color:var(--chb-primary);box-shadow:0 0 0 2px rgba(0,0,0,.06)}
.ch-brot-date-card.is-active .ch-brot-date-daynum{color:var(--chb-primary)}
.ch-brot-cutoff-hint{color:var(--chb-muted);font-size:13px;margin-top:14px}

/* Felder */
.ch-brot-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.ch-brot-fields label{display:flex;flex-direction:column;font-size:13.5px;color:#4a463f;gap:6px}
.ch-brot-fields .ch-brot-wide{grid-column:1 / -1}
.ch-brot-fields input,.ch-brot-fields select,.ch-brot-fields textarea{border:1px solid #e2d9cb;border-radius:10px;padding:11px 12px;font-size:14px;background:#fff;font-family:inherit;width:100%}
.ch-brot-fields input[readonly]{background:#f5f0e8;color:#6b5d49}

/* Review */
.ch-brot-review{background:var(--chb-card-bg);border:1px solid #efe8de;border-radius:var(--chb-radius);padding:6px 18px;margin-bottom:6px}
.ch-brot-review .rev{display:flex;justify-content:space-between;padding:11px 0;border-top:1px solid #f0eadf;font-size:14px;gap:10px}
.ch-brot-review .rev:first-child{border-top:none}
.ch-brot-review .rev.total{font-size:17px}
.ch-brot-review .rev.total b{color:var(--chb-primary)}

/* Zahlart + Consent (Klassen kommen teils aus Inline-CSS des Plugins) */
.ch-brot-pay h4{margin:18px 0 8px;font-size:16px}

/* Aside */
.ch-brot-side-card{background:var(--chb-card-bg);border:1px solid #efe8de;border-radius:var(--chb-radius);padding:18px;position:sticky;top:20px}
.ch-brot-side-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.ch-brot-side-head h3{font-size:17px;margin:0}
.ch-brot-cart-badge{background:var(--chb-primary);color:var(--chb-primary-text);border-radius:999px;min-width:24px;height:24px;display:grid;place-items:center;font-size:13px;padding:0 7px}
.ch-brot-side-items{display:flex;flex-direction:column;gap:10px;margin-bottom:12px}
.ch-brot-side-items .ch-side-item{display:flex;justify-content:space-between;align-items:flex-start;font-size:13.5px;gap:10px}
.ch-brot-side-items .ch-side-item span{flex:1;min-width:0;overflow-wrap:anywhere}
.ch-brot-side-items .ch-side-item small{color:var(--chb-muted);white-space:nowrap;flex:0 0 auto}
.ch-brot-side-empty{color:var(--chb-muted);font-size:13px;text-align:center;padding:8px 0}
.ch-brot-side-total{border-top:1px dashed #e6ddd0;padding-top:12px;display:flex;flex-direction:column}
.ch-brot-side-total small{color:var(--chb-muted)}
.ch-brot-side-total strong{color:var(--chb-primary);font-size:24px;margin:2px 0}
.ch-brot-note{font-size:12px;color:var(--chb-muted);margin:12px 0 0;background:#faf6f0;border-radius:10px;padding:10px}

/* Meldungen */
.ch-brot-message{margin-top:16px}
.ch-brot-success{background:#e8f5ec;border:1px solid #b7e0c4;color:#1e6b3a;border-radius:12px;padding:14px 16px}
.ch-brot-error{background:#fdecec;border:1px solid #f3c0c0;color:#a32020;border-radius:12px;padding:14px 16px}
.ch-brot-info{background:#eef2fb;border:1px solid #c4d2f0;color:#274690;border-radius:12px;padding:14px 16px}
.ch-brot-empty{padding:24px;text-align:center;color:var(--chb-muted)}
.ch-brot-legal a{color:var(--chb-muted)}

/* Mobil */
@media(max-width:760px){
  .ch-brot-mobile-step{display:block}
  .ch-brot-layout{grid-template-columns:1fr}
  .ch-brot-grid{grid-template-columns:1fr}
  .ch-brot-fields{grid-template-columns:1fr}
  .ch-brot-stepnav button{flex-direction:column;text-align:center;gap:6px;padding:10px 6px;font-size:11px}
  .ch-brot-side-card{position:static;margin-top:6px}
  .ch-brot-bottom-bar{flex-direction:column;align-items:stretch}
  .ch-brot-bottom-bar .ch-brot-button{width:100%}
  .ch-brot-actions{flex-wrap:wrap}
  .ch-brot-actions .ch-brot-button{flex:1}
}

/* =========================================================
   THEME-HARDENING – erzwingt das Plugin-Design, auch wenn
   das aktive WordPress-Theme generische Klassen (z. B.
   .is-active, .elementor-button) oder Fokus-Farben setzt.
   ========================================================= */
.ch-brot-wrap{--chb-primary:#c8772e;--chb-primary-text:#fff;--chb-accent:#1d2327;--chb-success:#2f855a}
:root .ch-brot-wrap{--chb-primary:var(--chb-primary)}

/* Buttons prominent & sichtbar */
.ch-brot-wrap .ch-brot-button,
.ch-brot-wrap button.ch-brot-button,
.ch-brot-wrap a.ch-brot-button{
  background:var(--chb-primary,#c8772e)!important;
  color:var(--chb-primary-text,#fff)!important;
  border:2px solid var(--chb-primary,#c8772e)!important;
  border-radius:var(--chb-btn-radius,12px)!important;
  padding:14px 26px!important;font-size:15px!important;font-weight:800!important;
  box-shadow:0 6px 16px rgba(0,0,0,.14)!important;text-decoration:none!important;
  line-height:1.2!important;cursor:pointer;display:inline-flex;align-items:center;gap:6px;
}
.ch-brot-wrap .ch-brot-button:hover{filter:brightness(.94)}
.ch-brot-wrap .ch-brot-button.secondary{
  background:#fff!important;color:var(--chb-accent,#1d2327)!important;
  border-color:#d9cfc0!important;box-shadow:none!important;
}
.ch-brot-wrap .ch-brot-button.success{
  background:var(--chb-success,#2f855a)!important;border-color:var(--chb-success,#2f855a)!important;color:#fff!important;
}
.ch-brot-wrap .ch-brot-button .elementor-button-text,
.ch-brot-wrap .ch-brot-button span{color:inherit!important}

/* Schritt-Navigation aktiv = Marke (gegen Theme-Pink) */
.ch-brot-wrap .ch-brot-stepnav button.is-active{
  background:var(--chb-primary,#c8772e)!important;border-color:var(--chb-primary,#c8772e)!important;
}
.ch-brot-wrap .ch-brot-stepnav button.is-active,
.ch-brot-wrap .ch-brot-stepnav button.is-active span{color:var(--chb-primary-text,#fff)!important}
.ch-brot-wrap .ch-brot-stepnav button.is-active b{background:#fff!important;color:var(--chb-primary,#c8772e)!important}

/* Kategorie-Tabs */
.ch-brot-wrap .ch-brot-cat-tabs button{color:var(--chb-text,#1d2327)!important;background:#fff!important}
.ch-brot-wrap .ch-brot-cat-tabs button.is-active{background:var(--chb-primary,#c8772e)!important;color:var(--chb-primary-text,#fff)!important;border-color:var(--chb-primary,#c8772e)!important}

/* Datums-Kacheln: lesbar + klar erkennbarer ausgewählter Tag mit Haken */
.ch-brot-wrap .ch-brot-date-card{position:relative;background:var(--chb-card-bg,#fff)!important}
.ch-brot-wrap .ch-brot-date-card strong,
.ch-brot-wrap .ch-brot-date-card .ch-brot-date-sheet-top,
.ch-brot-wrap .ch-brot-date-card .ch-brot-date-full{color:var(--chb-text,#1d2327)!important}
.ch-brot-wrap .ch-brot-date-card .ch-brot-date-daynum{color:var(--chb-primary,#c8772e)!important}
.ch-brot-wrap .ch-brot-date-card.is-active{
  background:var(--chb-primary,#c8772e)!important;border-color:var(--chb-primary,#c8772e)!important;
  box-shadow:0 8px 20px rgba(0,0,0,.18)!important;transform:translateY(-1px);
}
.ch-brot-wrap .ch-brot-date-card.is-active strong,
.ch-brot-wrap .ch-brot-date-card.is-active span,
.ch-brot-wrap .ch-brot-date-card.is-active .ch-brot-date-daynum{color:#fff!important}
.ch-brot-wrap .ch-brot-date-card.is-active::after{
  content:"✓";position:absolute;top:6px;right:8px;width:24px;height:24px;border-radius:50%;
  background:#fff;color:var(--chb-primary,#c8772e);display:grid;place-items:center;font-weight:900;font-size:14px;
  box-shadow:0 2px 6px rgba(0,0,0,.2);
}

/* Markenfarbene Texte/Badges */
.ch-brot-wrap .ch-brot-price,
.ch-brot-wrap .ch-brot-sticky-total,
.ch-brot-wrap .ch-brot-side-total strong,
.ch-brot-wrap .ch-brot-review .rev.total b{color:var(--chb-primary,#c8772e)!important}
.ch-brot-wrap .ch-brot-cart-badge{background:var(--chb-primary,#c8772e)!important;color:var(--chb-primary-text,#fff)!important}

/* Fokus: kein Theme-Pink-Overlay, sondern Marken-Outline */
.ch-brot-wrap input:focus,
.ch-brot-wrap select:focus,
.ch-brot-wrap textarea:focus{
  outline:2px solid var(--chb-primary,#c8772e)!important;outline-offset:1px!important;
  border-color:var(--chb-primary,#c8772e)!important;box-shadow:none!important;
}
.ch-brot-wrap ::selection{background:var(--chb-primary,#c8772e);color:#fff}

/* Prüf-Ansicht: Abschnitts-Überschriften & visuelle Trennung */
.ch-brot-wrap .ch-brot-review .rev-head{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--chb-muted,#6b7280);font-weight:800;margin:14px 0 2px}
.ch-brot-wrap .ch-brot-review .rev-head:first-child{margin-top:6px}
.ch-brot-wrap .ch-brot-review .rev-block{background:#faf6f0;border-radius:12px;padding:2px 14px;margin:8px -6px}
.ch-brot-wrap .ch-brot-review .rev-block .rev{border-top-color:#efe6d7}
.ch-brot-wrap .ch-brot-review .rev-block .rev-head{margin-top:10px}

/* Liefer-Info Hinweis */
.ch-brot-wrap .ch-brot-delivery-info{background:#eef6ef;border:1px solid #c9e3cd;color:#1e5b33;border-radius:10px;padding:10px 14px;margin:12px 0 0;font-size:14px}

/* Rechnungsadresse */
.ch-brot-wrap .ch-brot-billing{margin-top:6px;border-top:1px solid #eee;padding-top:12px}
.ch-brot-wrap .ch-brot-billing h4{margin:0 0 10px;font-size:15px}
.ch-brot-wrap .ch-brot-billing h4 small{color:var(--chb-muted,#6b7280);font-weight:400}
.ch-brot-wrap .ch-brot-billing-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.ch-brot-wrap .ch-brot-billing-grid .ch-brot-wide{grid-column:1 / -1}
.ch-brot-wrap .ch-brot-billing-grid label{display:flex;flex-direction:column;gap:6px;font-size:13.5px;color:#4a463f}
.ch-brot-wrap .ch-brot-billing-grid input{border:1px solid #e2d9cb;border-radius:10px;padding:11px 12px;font-size:14px;width:100%}
@media(max-width:760px){.ch-brot-wrap .ch-brot-billing-grid{grid-template-columns:1fr}}
