
.rsa-shop .rsa-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}
.rsa-shop .rsa-item-footer{align-items:flex-end;gap:12px}
.rsa-modal[hidden]{display:none!important}
.rsa-modal{position:fixed;inset:0;z-index:99999}
.rsa-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.45)}
.rsa-dialog{position:relative;background:#fff;max-width:640px;width:min(92vw,640px);margin:24px auto;padding:24px;border-radius:16px;box-shadow:0 10px 30px rgba(0,0,0,.2);max-height:calc(100dvh - 48px);overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;display:flex;flex-direction:column}
.rsa-close{position:absolute;top:10px;right:10px;border:0;background:none;font-size:28px;line-height:1;cursor:pointer;z-index:3}
.rsa-modal-head{padding-right:32px}
.rsa-modal-head h3{margin:0 0 6px}
.rsa-modal-head p{margin:0 0 18px;color:#666}
#rsa-add-to-cart-form{display:flex;flex-direction:column;min-height:0;gap:0}
.rsa-field-group{margin:0 0 18px;padding:14px;border:1px solid #e5e5e5;border-radius:12px}
.rsa-group-title{font-weight:700;margin-bottom:10px}
.rsa-choice{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 0;border-bottom:1px solid #f0f0f0}
.rsa-choice:last-child{border-bottom:0}
.rsa-choice input{margin-right:8px}
.rsa-required{color:#c62828}
.rsa-feedback{min-height:24px;margin:10px 0}
.rsa-feedback.is-error{color:#b3261e}
.rsa-feedback.is-success{color:#1b873f}
.rsa-action-bar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;position:sticky!important;bottom:0!important;background:#fff!important;padding-top:12px!important;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;margin-top:auto!important;border-top:1px solid #eee!important}
.rsa-qty-wrap{display:flex!important;align-items:center!important;gap:12px!important;margin:0!important}
.rsa-qty-wrap label{margin:0!important;white-space:nowrap!important;line-height:1!important;display:flex!important;align-items:center!important}
/* Höchste Spezifizität um Theme-Styles (mfn-dynamic) zu überschreiben */
#rsa-add-to-cart-form .rsa-qty-wrap input[type="number"],
#rsa-add-to-cart-form .rsa-qty-wrap input,
.rsa-qty-wrap input[type="number"],
.rsa-qty-wrap input {
    width:90px!important;
    height:42px!important;
    min-height:42px!important;
    max-height:42px!important;
    padding-top:0!important;
    padding-bottom:0!important;
    margin-top:0!important;
    margin-bottom:0!important;
    box-sizing:border-box!important;
    vertical-align:middle!important;
    line-height:42px!important;
    display:inline-flex!important;
    align-items:center!important;
}
.rsa-submit-wrap{display:flex!important;align-items:center!important;justify-content:flex-end!important;flex:0 0 auto!important;align-self:center!important}
.rsa-submit-wrap .button{height:42px!important;line-height:42px!important;min-height:42px!important;max-height:42px!important;white-space:nowrap!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;padding-top:0!important;padding-bottom:0!important;vertical-align:middle!important}
.rsa-floatcart{position:fixed;right:20px;bottom:20px;z-index:99990;display:none}
.rsa-floatcart.is-visible{display:block}
.rsa-floatcart-toggle{display:flex;align-items:center;gap:10px;border:0;border-radius:999px;background:#111;color:#fff;padding:12px 16px;box-shadow:0 10px 24px rgba(0,0,0,.18);cursor:pointer;font:inherit}
.rsa-floatcart-toggle:hover,.rsa-floatcart-toggle:focus{color:#fff}
.rsa-floatcart-icon{font-size:18px;line-height:1}
.rsa-floatcart-count{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0 6px;border-radius:999px;background:#fff;color:#111;font-weight:700;font-size:13px}
.rsa-floatcart-total{font-weight:700;white-space:nowrap}
.rsa-cartpanel[hidden]{display:none!important}
.rsa-cartpanel{position:fixed;inset:0;z-index:99998}
.rsa-cartpanel-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.35)}
.rsa-cartpanel-dialog{position:absolute;top:0;right:0;height:100dvh;width:min(420px,92vw);background:#fff;box-shadow:-10px 0 30px rgba(0,0,0,.16);display:flex;flex-direction:column;padding:24px 18px 18px}
.rsa-cartpanel-close{position:absolute;top:10px;right:12px;border:0;background:none;font-size:28px;line-height:1;cursor:pointer}
.rsa-cartpanel-head{padding-right:32px;margin-bottom:14px}
.rsa-cartpanel-head h3{margin:0 0 4px}
.rsa-cartpanel-meta{color:#666}
.rsa-cartpanel-body{flex:1 1 auto;overflow:auto;-webkit-overflow-scrolling:touch;padding-right:2px}
.rsa-cartpanel-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding-top:14px;border-top:1px solid #eee;background:#fff}
.rsa-cartitems{display:grid;gap:12px}
.rsa-cartitem{border:1px solid #ececec;border-radius:12px;padding:12px}
.rsa-cartitem-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.rsa-cartitem-title{display:block}
.rsa-cartitem-price{font-weight:700;white-space:nowrap}
.rsa-cartitem-qty{margin-top:4px;color:#666;font-size:14px}
.rsa-cartitem-meta{margin-top:8px;font-size:14px;color:#444;display:grid;gap:4px}
.rsa-cartpanel-empty{margin:0;color:#666}
.rsa-shop .ds-badges{margin:8px 0 0}
.rsa-shop .ds-badge{display:inline-block}
.rsa-shop .ds-vat{margin-top:24px}
@media (max-width: 767px){
  .rsa-dialog{width:100vw;max-width:none;max-height:100dvh;height:100dvh;margin:0;border-radius:0;padding:18px 18px calc(18px + env(safe-area-inset-bottom, 0px))}
  .rsa-shop .rsa-actions{justify-content:space-between;width:100%}
  .rsa-action-bar{gap:12px;align-items:center}
  .rsa-qty-wrap{flex:0 0 auto;align-self:center}
  .rsa-submit-wrap{flex:0 0 auto;align-self:center}
  .rsa-submit-wrap .button{width:auto}
}


/* 1.1.3 mobile modal fixes */
html.rsa-modal-open, body.rsa-modal-open { overscroll-behavior: none; }
.rsa-modal{display:flex;align-items:center;justify-content:center;z-index:999999;}
.rsa-backdrop{z-index:0;}
.rsa-dialog{z-index:1;width:min(92vw,640px);max-width:640px;max-height:min(90dvh,900px);overflow:hidden;display:flex;flex-direction:column;}
.rsa-modal-head{flex:0 0 auto;background:#fff;position:relative;z-index:2;}
#rsa-add-to-cart-form{flex:1 1 auto;min-height:0;overflow:hidden;display:flex;flex-direction:column;}
.rsa-form-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;padding-right:2px;}
#rsa-modal-fields{padding-bottom:6px;}
.rsa-form-footer{flex:0 0 auto;background:#fff;position:relative;z-index:3;padding-bottom:calc(12px + env(safe-area-inset-bottom, 0px));box-shadow:0 -8px 20px rgba(0,0,0,.04);}
.rsa-feedback{min-height:24px;margin:8px 0 10px;padding:0 2px;}
/* action-bar block 2 - superseded by block 1 above */
.rsa-choice{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:10px;}
.rsa-choice input{margin:0;}
.rsa-choice span{min-width:0;overflow-wrap:anywhere;}
.rsa-choice strong{white-space:nowrap;flex:0 0 auto;min-width:86px;text-align:right;padding-left:8px;}
@media (max-width: 767px){
  .rsa-modal{align-items:stretch;}
  .rsa-dialog{width:100vw;max-width:none;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:18px 16px 0;}
  .rsa-modal-head{padding-right:40px;}
  .rsa-form-scroll{padding-bottom:12px;}
  .rsa-form-footer{margin:0 -16px;padding:8px 16px calc(12px + env(safe-area-inset-bottom, 0px));}
  .rsa-action-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;}
  .rsa-qty-wrap{flex:0 0 auto;}
  .rsa-submit-wrap{flex:0 0 auto;}
  .rsa-submit-wrap .button{width:auto;}
  .rsa-qty-wrap{display:grid;grid-template-columns:auto 92px;align-items:center;gap:10px;}
  .rsa-qty-wrap input{width:92px;min-width:92px;}
  .rsa-choice{grid-template-columns:26px minmax(0,1fr) auto;gap:8px;}
  .rsa-choice strong{min-width:74px;font-size:.95em;}
}

@media (max-width: 767px){
  .rsa-floatcart{right:14px;bottom:calc(14px + env(safe-area-inset-bottom, 0px));}
  .rsa-floatcart-toggle{padding:11px 14px;gap:8px}
  .rsa-floatcart-total{font-size:14px}
  .rsa-cartpanel{display:flex;align-items:flex-end}
  .rsa-cartpanel-dialog{position:relative;top:auto;right:auto;left:auto;width:100%;max-width:none;height:auto;max-height:82dvh;border-radius:18px 18px 0 0;padding:20px 16px calc(16px + env(safe-area-inset-bottom, 0px));box-shadow:0 -10px 30px rgba(0,0,0,.16)}
  .rsa-cartpanel-actions{grid-template-columns:1fr}
}


/* 1.1.5 desktop cart panel scroll fix */
.rsa-cartpanel-dialog{max-height:100dvh;overflow:hidden;}
.rsa-cartpanel-body{min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;}
.rsa-cartpanel-actions{flex:0 0 auto;position:relative;z-index:2;}
@media (min-width: 768px){
  .rsa-cartpanel-dialog{padding-bottom:18px;}
}


/* 1.1.6 cart panel desktop + price fix */
.rsa-cartpanel{overflow:hidden;}
.rsa-cartpanel-dialog{box-sizing:border-box;display:grid;grid-template-rows:auto minmax(0,1fr) auto;max-height:100dvh;height:100dvh;overflow:hidden;}
.rsa-cartpanel-head{margin-bottom:0;padding-right:40px;padding-bottom:14px;border-bottom:1px solid #eee;}
.rsa-cartpanel-body{min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;padding:16px 2px 12px 0;}
.rsa-cartpanel-actions{flex:0 0 auto;position:relative;z-index:2;padding-top:14px;padding-bottom:max(2px, env(safe-area-inset-bottom, 0px));background:#fff;border-top:1px solid #eee;}
.rsa-cartitem-price{white-space:nowrap;padding-left:12px;flex:0 0 auto;}
.rsa-cartitem-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.rsa-cartitem-title{min-width:0;overflow-wrap:anywhere;}
@media (min-width: 768px){
  .rsa-cartpanel-dialog{width:min(420px,92vw);padding:24px 18px 18px;}
  .rsa-cartpanel-body{padding-bottom:16px;}
}
@media (max-width: 767px){
  .rsa-cartpanel-dialog{height:auto;max-height:82dvh;grid-template-rows:auto minmax(0,1fr) auto;}
}


/* 1.2.0 block 2A */
.rsa-context-modal[hidden]{display:none!important}
.rsa-context-modal{position:fixed;inset:0;z-index:999997;display:flex;align-items:center;justify-content:center}
.rsa-context-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.45)}
.rsa-context-dialog{position:relative;z-index:1;background:#fff;border-radius:16px;box-shadow:0 10px 30px rgba(0,0,0,.2);padding:24px;width:min(92vw,560px);max-height:90dvh;overflow:auto}
.rsa-context-dialog h3{margin-top:0}
.rsa-context-options{display:flex;gap:12px;flex-wrap:wrap;margin:16px 0}
.rsa-context-delivery label{display:block;font-weight:600;margin:0 0 6px}
.rsa-context-delivery input{width:100%;max-width:180px;min-height:42px}
.rsa-context-rules{margin-top:12px;display:grid;gap:8px;font-size:14px;color:#444}
.rsa-context-feedback{margin-top:12px;color:#b3261e}
.rsa-context-actions{margin-top:16px;display:flex;justify-content:flex-end}
@media (max-width:767px){
  .rsa-context-dialog{width:100vw;max-width:none;min-height:50dvh;border-radius:18px 18px 0 0;align-self:flex-end;padding:20px 16px calc(20px + env(safe-area-inset-bottom, 0px))}
  .rsa-context-options{display:grid;grid-template-columns:1fr 1fr}
}


/* 1.3.0 – MwSt.-Aufschlüsselung im Cart-Panel */
.rsa-vat-breakdown{margin-top:16px;padding-top:14px;border-top:2px solid #f0f0f0;font-size:13px}
.rsa-vat-title{font-weight:700;color:#1d2327;margin-bottom:8px;font-size:12px;text-transform:uppercase;letter-spacing:.4px}
.rsa-vat-row{display:flex;justify-content:space-between;align-items:baseline;gap:8px;padding:5px 0;border-bottom:1px solid #f5f5f5;flex-wrap:wrap}
.rsa-vat-rate{font-weight:600;color:#1d2327;white-space:nowrap}
.rsa-vat-cols{display:flex;gap:6px;align-items:center;color:#555;flex-wrap:wrap;justify-content:flex-end}
.rsa-vat-sep{color:#ccc}
.rsa-vat-total{display:flex;justify-content:space-between;align-items:center;margin-top:10px;padding-top:10px;border-top:2px solid #1d2327;font-weight:700;font-size:14px}
.rsa-vat-total-price{font-size:16px}

/* 1.3.2 – Modal z-index & scroll fix (Theme-Menü-Kollision) */

/* Maximaler z-index, überschreibt jeden Theme-Header/Menü */
.rsa-modal {
  z-index: 2147483647 !important;
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  isolation: isolate;
}
.rsa-modal[hidden] { display: none !important; }

/* Backdrop immer hinter Dialog aber über allem anderen */
.rsa-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  background: rgba(0,0,0,.55) !important;
}

/* Dialog: flex-column, volle innere Scroll-Kontrolle */
.rsa-dialog {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.28);
  /* Breite */
  width: min(92vw, 640px);
  max-width: 640px;
  /* Höhe: 90svh verhindert Überlappung mit Browser-Chrome + Theme-Header */
  max-height: 90svh;
  overflow: hidden !important;
  /* Margins oben/unten damit es nicht an Theme-Elementen klebt */
  margin: 5svh auto;
}

/* Header des Dialogs: fixiert, scrollt nicht mit */
.rsa-modal-head {
  flex: 0 0 auto !important;
  background: #fff;
  position: relative !important;
  z-index: 2 !important;
  padding-right: 40px !important;
}

/* Formular: flex-column, innerer Scroll */
#rsa-add-to-cart-form {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Scrollbarer Bereich mit den Optionen */
.rsa-form-scroll {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 2px;
}

/* Footer mit Menge + Button: fixiert am unteren Rand des Dialogs */
.rsa-form-footer {
  flex: 0 0 auto !important;
  background: #fff;
  position: relative !important;
  z-index: 3 !important;
  box-shadow: 0 -6px 16px rgba(0,0,0,.06);
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* action-bar block 3 - superseded by block 1 above */

/* Mobile: Dialog füllt ganzen Viewport aus */
@media (max-width: 767px) {
  .rsa-modal {
    align-items: flex-end !important;
  }
  .rsa-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: 96svh !important;
    margin: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    padding: 18px 16px 0 !important;
  }
  .rsa-form-footer {
    margin: 0 -16px;
    padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  }
}

/* Cart-Panel Slide-In: ebenfalls höchster z-index */
.rsa-cartpanel {
  z-index: 2147483646 !important;
}

/* Warenkorb-Panel Button-Zeile: zwei Buttons nebeneinander */
.rsa-cartpanel-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
}
@media (max-width: 767px) {
  .rsa-cartpanel-actions {
    grid-template-columns: 1fr !important;
  }
}

/* Slide-In Button-Farben per CSS-Variablen (werden per PHP gesetzt) */
.rsa-cartpanel-actions a.button:first-child {
  /* "Warenkorb öffnen" – sekundärer Button */
  background: var(--rsa-cart-btn-bg, #f0f0f0) !important;
  color: var(--rsa-cart-btn-text, #1d2327) !important;
  border-color: var(--rsa-cart-btn-bg, #dcdcde) !important;
  text-align: center;
}
.rsa-cartpanel-actions a.button-primary,
.rsa-cartpanel-actions a:last-child {
  /* "Zur Kasse" – primärer Button */
  background: var(--rsa-checkout-btn-bg, #111) !important;
  color: var(--rsa-checkout-btn-text, #fff) !important;
  border-color: var(--rsa-checkout-btn-bg, #111) !important;
  text-align: center;
}

/* 1.3.8 – Modal body-append fix: nach body-append brauchen wir stärkere Regeln */
/* html.rsa-modal-open verhindert Hintergrund-Scroll */
html.rsa-modal-open { overflow: hidden !important; overscroll-behavior: none !important; }
html.rsa-modal-open body { overflow: hidden !important; }

/* Modal nimmt genau den Viewport ein – kein Einfluss von Theme-Elementen möglich
   da es jetzt direkt als Kind von <body> liegt */
body > .rsa-modal,
body > .rsa-context-modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 2147483647 !important;
}

/* Dialog: maximale nutzbare Höhe = Viewport minus sicherer Bereich oben/unten */
body > .rsa-modal .rsa-dialog {
    max-height: calc(100vh - 40px) !important;
    max-height: calc(100dvh - 40px) !important;
    margin: 20px auto !important;
}
@media (max-width: 767px) {
    body > .rsa-modal .rsa-dialog {
        max-height: 100vh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
    }
    body > .rsa-modal {
        align-items: flex-start !important;
    }
}

/* Floating Cart: z-index unter Modals aber über allem anderen */
.rsa-floatcart { z-index: 99990 !important; }

/* 1.3.9 – Cart-Panel nach body-append: z-index über allem */
body > .rsa-cartpanel {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483646 !important;
}

/* 1.4.0 – Mengen-Controls, Löschen, Liefergebühr */
.rsa-cartitem-controls{display:flex;align-items:center;gap:8px;margin-top:8px}
.rsa-qty-btn{width:30px;height:30px;border:1px solid #ddd;border-radius:6px;background:#f7f7f7;font-size:16px;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0}
.rsa-qty-btn:hover{background:#e8e8e8}
.rsa-qty-display{min-width:24px;text-align:center;font-weight:600;font-size:14px}
.rsa-item-remove{margin-left:auto;border:none;background:none;cursor:pointer;font-size:16px;opacity:.6;padding:4px;border-radius:4px}
.rsa-item-remove:hover{opacity:1;background:#fde8e8}

.rsa-delivery-summary{margin:12px 0;padding:12px;background:#f7f9ff;border-radius:10px;border:1px solid #e0eaff;font-size:13px}
.rsa-delivery-hint{padding:6px 10px;border-radius:6px;background:#fff3cd;color:#856404;font-weight:500;margin-bottom:8px;font-size:12px}
.rsa-delivery-hint.rsa-delivery-free{background:#d4edda;color:#155724}
.rsa-delivery-row{display:flex;justify-content:space-between;padding:4px 0;color:#444}
.rsa-delivery-row:not(:last-child){border-bottom:1px solid #eaefff}
.rsa-free-badge{display:inline-block;background:#d4edda;color:#155724;border-radius:4px;padding:1px 6px;font-size:11px;font-weight:700}

/* 1.4.2 – Liefergebühr MwSt. separater Titel */
.rsa-vat-title-fee{margin-top:10px;padding-top:8px;border-top:1px dashed #ddd}

/* 1.5.2 – Datum/Uhrzeit-Auswahl im Context-Modal */
.rsa-context-schedule{margin-top:16px}
.rsa-schedule-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.rsa-schedule-col label{display:block;font-weight:600;margin-bottom:6px;font-size:13px}
.rsa-schedule-col select{width:100%;min-height:40px;padding:6px 10px;border:1px solid #d1d5db;border-radius:8px;font-size:14px;background:#fff}
.rsa-schedule-hint{margin-top:8px;font-size:12px;color:#b45309;background:#fef3c7;border-radius:6px;padding:6px 10px;display:none}
@media(max-width:480px){.rsa-schedule-row{grid-template-columns:1fr}}

/* ============================================================
   Checkout – [restaurant-checkout]
   ============================================================ */
.rsa-checkout{display:grid;grid-template-columns:1fr 380px;gap:32px;align-items:start;max-width:1100px;margin:0 auto}
@media(max-width:860px){.rsa-checkout{grid-template-columns:1fr}}
.rsa-checkout-section{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:24px;margin-bottom:20px}
.rsa-checkout-section-title{font-size:16px;font-weight:700;margin:0 0 16px;color:#1d2327}
.rsa-checkout-field{margin-bottom:16px}
.rsa-checkout-field label{display:block;font-weight:600;font-size:13px;margin-bottom:6px;color:#374151}
.rsa-checkout-field input,.rsa-checkout-field textarea{width:100%;padding:10px 14px;border:1px solid #d1d5db;border-radius:8px;font-size:14px;font-family:inherit;transition:border-color .15s}
.rsa-checkout-field input:focus,.rsa-checkout-field textarea:focus{border-color:#2271b1;outline:none;box-shadow:0 0 0 3px rgba(34,113,177,.12)}
.rsa-checkout-field-row{display:grid;grid-template-columns:120px 1fr;gap:12px}
.rsa-checkout-info-row{display:flex;justify-content:space-between;align-items:baseline;padding:6px 0;border-bottom:1px solid #f3f4f6;font-size:14px}
.rsa-checkout-info-label{color:#6b7280}
.rsa-checkout-info-value{font-weight:600;color:#1d2327;text-align:right}
.rsa-checkout-change-link{display:inline-block;margin-top:12px;font-size:13px;color:#2271b1;text-decoration:none}
.rsa-checkout-change-link:hover{text-decoration:underline}

/* Zahlungsarten */
.rsa-payment-methods{display:flex;flex-direction:column;gap:10px}
.rsa-payment-option{display:flex;align-items:center;gap:14px;padding:14px 16px;border:2px solid #e5e7eb;border-radius:10px;cursor:pointer;transition:border-color .15s,background .15s}
.rsa-payment-option input[type="radio"]{display:none}
.rsa-payment-option.is-selected{border-color:#2271b1;background:#f0f6ff}
.rsa-payment-option:hover{border-color:#2271b1}
.rsa-payment-icon{font-size:22px;flex-shrink:0}
.rsa-payment-info{display:flex;flex-direction:column}
.rsa-payment-info strong{font-size:14px;color:#1d2327}
.rsa-payment-info small{font-size:12px;color:#6b7280;margin-top:2px}

/* Bestellübersicht */
.rsa-co-items{margin-bottom:16px}
.rsa-co-item{padding:8px 0;border-bottom:1px solid #f3f4f6}
.rsa-co-item:last-child{border-bottom:none}
.rsa-co-item-main{display:flex;align-items:baseline;gap:6px;font-size:14px}
.rsa-co-item-qty{font-weight:700;color:#6b7280;flex-shrink:0}
.rsa-co-item-title{flex:1;color:#1d2327}
.rsa-co-item-price{font-weight:600;white-space:nowrap}
.rsa-co-item-meta{font-size:12px;color:#6b7280;margin-top:2px;padding-left:22px}
.rsa-co-totals{border-top:2px solid #e5e7eb;padding-top:12px}
.rsa-co-total-row{display:flex;justify-content:space-between;padding:4px 0;font-size:14px;color:#374151}
.rsa-co-grand-total{margin-top:8px;padding-top:8px;border-top:1px solid #e5e7eb;font-size:16px;color:#1d2327}
.rsa-co-vat{margin-top:12px;padding-top:12px;border-top:1px solid #f3f4f6;font-size:12px;color:#6b7280}
.rsa-co-vat-title,.rsa-co-vat-subtitle{font-weight:600;margin-bottom:4px;color:#374151}
.rsa-co-vat-subtitle{margin-top:8px}
.rsa-co-vat-row{display:flex;justify-content:space-between;padding:2px 0}

/* Submit */
.rsa-checkout-feedback{padding:10px 14px;border-radius:8px;font-size:14px;margin-bottom:12px;display:none}
.rsa-checkout-feedback.is-error{display:block;background:#fde8e8;color:#b91c1c}
.rsa-checkout-feedback.is-success{display:block;background:#d4edda;color:#155724}
.rsa-checkout-submit{width:100%;padding:14px !important;font-size:16px !important;border-radius:10px !important}
.rsa-checkout-empty{text-align:center;padding:40px 20px}

/* Bestätigung */
.rsa-confirmation{max-width:560px;margin:40px auto;text-align:center}
.rsa-confirm-icon{font-size:56px;margin-bottom:16px}
.rsa-confirmation h2{font-size:26px;font-weight:700;color:#1d2327;margin:0 0 8px}
.rsa-confirm-number{font-size:18px;color:#2271b1;font-weight:600;margin-bottom:28px}
.rsa-confirm-card{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:20px;text-align:left;margin-bottom:24px}
.rsa-confirm-row{display:flex;justify-content:space-between;align-items:baseline;padding:8px 0;border-bottom:1px solid #f3f4f6;font-size:14px}
.rsa-confirm-row:last-child{border-bottom:none}
.rsa-confirm-row span{color:#6b7280}
.rsa-confirm-row strong{color:#1d2327;text-align:right}
.rsa-confirm-total{margin-top:8px;font-size:16px}
.rsa-confirm-note{font-size:13px;color:#6b7280;margin-bottom:24px;line-height:1.6}
.rsa-btn-back{display:inline-block;padding:12px 24px;font-size:14px}

/* Einzelner Zur-Kasse-Button im Cart-Panel */
.rsa-cartpanel-actions { grid-template-columns: 1fr !important; }
.rsa-cartpanel-checkout-btn { text-align: center; justify-content: center; }

/* ============================================================
   Checkout Page Template – Theme-Reset
   Setzt störende Theme-Styles gezielt zurück
   ============================================================ */

/* Grid bleibt zweispaltig auch mit Admin-Bar */
#rsa-page-canvas .rsa-checkout {
    display: grid !important;
    grid-template-columns: 1fr 380px !important;
    gap: 32px !important;
}
@media (max-width: 900px) {
    #rsa-page-canvas .rsa-checkout {
        grid-template-columns: 1fr !important;
    }
}

/* Abstände zwischen Feldern auf das definierte Maß zurücksetzen */
#rsa-page-canvas .rsa-checkout-field {
    margin-bottom: 16px !important;
}

/* Labels: Theme-Margin/Padding entfernen */
#rsa-page-canvas .rsa-checkout-field label {
    display: block !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

/* Input-Felder: Theme-Reset */
#rsa-page-canvas .rsa-checkout-field input,
#rsa-page-canvas .rsa-checkout-field textarea,
#rsa-page-canvas .rsa-checkout-field select {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 10px 14px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    background: #fff !important;
    color: #1d2327 !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
}
#rsa-page-canvas .rsa-checkout-field input:focus,
#rsa-page-canvas .rsa-checkout-field textarea:focus {
    border-color: #2271b1 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(34,113,177,.12) !important;
}

/* Sektionen: Theme-Margin entfernen */
#rsa-page-canvas .rsa-checkout-section {
    margin-bottom: 20px !important;
    padding: 24px !important;
}

/* Überschriften in Sektionen */
#rsa-page-canvas .rsa-checkout-section-title {
    margin: 0 0 16px !important;
    padding: 0 !important;
    font-size: 16px !important;
    line-height: 1.3 !important;
    border: none !important;
}

/* Zahlungsart */
#rsa-page-canvas .rsa-payment-option {
    margin: 0 !important;
    padding: 14px 16px !important;
}

/* Submit-Button */
#rsa-page-canvas .rsa-checkout-submit {
    width: 100% !important;
    margin: 0 !important;
    padding: 14px !important;
    font-size: 16px !important;
    display: block !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* Feedback */
#rsa-page-canvas .rsa-checkout-feedback {
    margin-bottom: 12px !important;
    padding: 10px 14px !important;
}

/* Bestellübersicht rechts */
#rsa-page-canvas .rsa-co-item {
    padding: 8px 0 !important;
}
#rsa-page-canvas .rsa-co-total-row {
    padding: 4px 0 !important;
    margin: 0 !important;
}

/* ============================================================
   Checkout-Modal
   ============================================================ */
.rsa-checkout-modal[hidden]{display:none!important}
.rsa-checkout-modal{position:fixed;inset:0;z-index:2147483645;display:flex;align-items:center;justify-content:center;padding:16px}
body > .rsa-checkout-modal{position:fixed!important;inset:0!important;z-index:2147483645!important}
.rsa-checkout-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55)}
.rsa-checkout-modal-dialog{position:relative;background:#f7f8fa;border-radius:16px;width:100%;max-width:860px;height:90vh;max-height:90vh;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 24px 60px rgba(0,0,0,.22)}
.rsa-checkout-modal-close{position:absolute;top:12px;right:14px;border:0;background:none;font-size:28px;line-height:1;cursor:pointer;z-index:5;color:#666;padding:4px 8px}
.rsa-checkout-modal-close:hover{color:#000}

/* Head */
.rsa-co-modal-head{padding:20px 24px 0;flex-shrink:0}
.rsa-co-modal-head h2{margin:0;font-size:20px;font-weight:700;color:#1d2327}

/* Screen-Form als Flex-Column damit Body scrollen kann */
#rsa-co-screen-form{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow:hidden}

/* Body scrollbar */
.rsa-co-modal-body{flex:1 1 auto;overflow-y:auto;padding:20px 24px;-webkit-overflow-scrolling:touch;min-height:0}

/* Grid: 2 Spalten auf Desktop */
.rsa-co-modal-grid{display:grid;grid-template-columns:1fr 300px;gap:20px}
@media(max-width:680px){.rsa-co-modal-grid{grid-template-columns:1fr}}

/* Sektionen */
.rsa-co-section{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:16px;margin-bottom:14px}
.rsa-co-section:last-child{margin-bottom:0}
.rsa-co-section-title{font-weight:700;font-size:14px;color:#1d2327;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid #f3f4f6}

/* Info-Reihen */
.rsa-co-info-row{display:flex;justify-content:space-between;align-items:baseline;font-size:13px;padding:4px 0;gap:8px}
.rsa-co-info-row span{color:#6b7280}
.rsa-co-info-row strong{color:#1d2327;text-align:right}

/* Felder */
.rsa-co-field{margin-bottom:12px}
.rsa-co-field:last-child{margin-bottom:0}
.rsa-co-field label{display:block;font-size:12px;font-weight:600;color:#374151;margin-bottom:5px}
.rsa-co-field input,.rsa-co-field textarea,.rsa-co-field select{display:block;width:100%;padding:9px 12px;border:1.5px solid #d1d5db;border-radius:8px;font-size:14px;font-family:inherit;background:#fff;color:#1d2327;box-sizing:border-box;transition:border-color .15s;margin:0;box-shadow:none}
.rsa-co-field input:focus,.rsa-co-field textarea:focus{border-color:#2271b1;outline:none;box-shadow:0 0 0 3px rgba(34,113,177,.1)}
.rsa-co-field-row{display:grid;grid-template-columns:110px 1fr;gap:8px}

/* Zahlungsart */
.rsa-co-payment-opt{display:flex;align-items:center;gap:12px;padding:12px 14px;border:2px solid #e5e7eb;border-radius:10px;cursor:pointer;font-size:14px;transition:border-color .15s}
.rsa-co-payment-opt input{display:none}
.rsa-co-payment-opt.is-selected{border-color:#2271b1;background:#f0f6ff}
.rsa-co-pay-icon{font-size:20px;flex-shrink:0}
.rsa-co-pay-info{display:flex;flex-direction:column}
.rsa-co-pay-info strong{font-size:13px;color:#1d2327}
.rsa-co-pay-info small{font-size:11px;color:#6b7280}

/* Bestellübersicht rechts */
.rsa-co-items-list .rsa-cartitems{padding:0;margin:0}
.rsa-co-items-list .rsa-cartitem{padding:6px 0;border-bottom:1px solid #f3f4f6}
.rsa-co-items-list .rsa-cartitem-controls{display:none}
.rsa-co-totals .rsa-delivery-summary,.rsa-co-totals .rsa-vat-breakdown{margin-top:8px;font-size:12px}

/* Footer */
.rsa-co-modal-footer{flex-shrink:0;padding:14px 24px;border-top:1px solid #e5e7eb;background:#fff;display:flex;flex-direction:column;gap:10px}
.rsa-co-submit-btn{width:100%!important;padding:14px!important;font-size:15px!important;text-align:center!important;border-radius:10px!important}
.rsa-co-feedback{font-size:13px;padding:10px 14px;border-radius:8px;display:none}
.rsa-co-feedback.is-error{display:block;background:#fde8e8;color:#b91c1c}
.rsa-co-feedback.is-success{display:block;background:#d4edda;color:#155724}

/* Bestätigungs-Screen */
.rsa-co-confirm-body{text-align:center;padding:40px 24px}
.rsa-co-confirm-icon{font-size:64px;color:#22c55e;margin-bottom:16px}
.rsa-co-confirm-nr{font-size:20px;font-weight:700;color:#2271b1;margin:8px 0 20px}
.rsa-co-confirm-details{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:16px;text-align:left;margin-bottom:20px;max-width:400px;margin-left:auto;margin-right:auto}
.rsa-co-confirm-row{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f3f4f6;font-size:13px}
.rsa-co-confirm-row:last-child{border-bottom:none}
.rsa-co-confirm-row span{color:#6b7280}
.rsa-co-confirm-row strong{color:#1d2327}

@media(max-width:480px){
    .rsa-checkout-modal{padding:0}
    .rsa-checkout-modal-dialog{border-radius:0;max-height:100vh;max-height:100dvh}
}

/* Mindestbestellwert-Hinweis im Warenkorb-Panel */
.rsa-min-order-notice {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}
.rsa-cartpanel-checkout-btn.is-disabled,
.rsa-cartpanel-checkout-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Legal Consent Checkbox */
.rsa-co-legal-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0 8px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    color: #50575e;
}
.rsa-co-legal-wrap input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    margin-top: 2px !important;
    cursor: pointer;
    accent-color: var(--rsa-checkout-btn-bg, #111);
}
.rsa-co-legal-text {
    flex: 1;
}
.rsa-co-legal-text a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}
.rsa-co-legal-text a:hover {
    opacity: 0.75;
}
.rsa-co-legal-wrap.rsa-legal-error {
    color: #dc2626;
    animation: rsa-shake 0.3s ease;
}
.rsa-co-legal-wrap.rsa-legal-error input[type="checkbox"] {
    outline: 2px solid #dc2626;
    border-radius: 2px;
}
@keyframes rsa-shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-4px); }
    75%       { transform: translateX(4px); }
}
