/* ==========================================================================
   MyHomeScout V2 – Angleichung der Bootstrap-/V1-Inhalte an das V2-Design
   Gilt nur innerhalb von <div class="bs"> (Seiten mit V1-Inhalt:
   Checkout, Bestelluebersicht, Bezahlseiten, 2FA, Aktivierung usw.).
   Reihenfolge: style.css (V2) -> bs-scoped.css -> v2-theme.css
   ========================================================================== */

.bs {
  --primary: #0366DD;
  --accent: #D9F36A;
  --dark: #0E1A2B;
  --light: #F7F7F2;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: transparent;
  padding-bottom: 40px;
}
.bs h1, .bs h2, .bs h3, .bs .h1, .bs .h2, .bs .h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; color: inherit; }
.bs h4, .bs h5, .bs h6, .bs .h4, .bs .h5, .bs .h6 { font-weight: 600; color: inherit; }
.bs a { color: var(--blue); }
.bs a:hover { color: var(--blue-d); }
.bs .text-muted { color: var(--muted) !important; }
.bs .text-primary { color: var(--blue) !important; }
.bs .bg-primary { background-color: var(--blue) !important; }
.bs .bg-light { background-color: var(--bg-2) !important; }
.bs .bg-dark { background-color: var(--ink) !important; }
.bs .border-primary { border-color: var(--blue) !important; }
.bs .container { max-width: 1240px; padding-left: 24px; padding-right: 24px; }

/* Seitenkopf (V1-Hero) -> V2-Seitenkopf ohne Bild */
.bs [class^="hero"], .bs .small-hero {
  background: none !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 64px 0 8px !important;
  margin: 0 !important;
  color: var(--ink) !important;
}
.bs [class^="hero"]::after, .bs .small-hero::after, .bs [class^="hero"]::before { display: none !important; }
.bs [class^="hero"] .container { text-align: left !important; color: var(--ink) !important; }
.bs [class^="hero"] .text-white { color: var(--ink) !important; }
.bs [class^="hero"] h1, .bs .small-hero h1 {
  font-family: var(--display); font-weight: 800; font-size: clamp(32px, 4vw, 48px) !important;
  line-height: 1.05; letter-spacing: -0.035em; color: var(--ink) !important; text-shadow: none !important;
}
.bs [class^="hero"] p.lead, .bs [class^="hero"] .lead {
  font-size: clamp(17px, 1.6vw, 20px) !important; color: var(--ink-2) !important; text-shadow: none !important; max-width: 720px;
}

/* Buttons */
.bs .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border-width: 1.5px;
  font-weight: 600; font-size: 16px; line-height: 1.2; box-shadow: none !important;
}
.bs .btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.bs .btn-lg { min-height: 56px; padding: 0 30px; font-size: 17px; }
.bs .btn-block { display: flex; width: 100%; }
.bs .btn-link { min-height: 0; padding: 0; border-radius: 0; }
.bs .btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.bs .btn-primary:hover, .bs .btn-primary:focus, .bs .btn-primary:active { background: var(--blue-d) !important; border-color: var(--blue-d) !important; color: #fff; }
.bs .btn-outline-primary { color: var(--blue); border-color: var(--blue); background: transparent; }
.bs .btn-outline-primary:hover { background: var(--blue); color: #fff; }
.bs .btn-dark, .bs .btn-secondary { background: var(--ink); border-color: var(--ink); color: #fff; }
.bs .btn-dark:hover, .bs .btn-secondary:hover { background: #1D2D44; border-color: #1D2D44; color: #fff; }
.bs .btn-outline-secondary, .bs .btn-outline-dark { color: var(--ink); border-color: var(--ink); background: transparent; }
.bs .btn-outline-secondary:hover, .bs .btn-outline-dark:hover { background: var(--ink); color: #fff; }
.bs .btn-success { background: var(--lime); border-color: var(--lime-line); color: var(--ink); }
.bs .btn-success:hover { background: #CBE65A; border-color: #CBE65A; color: var(--ink); }
.bs .btn-light { background: #fff; border-color: var(--line-2); color: var(--ink); }

/* Karten */
.bs .card { border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.bs .card.shadow, .bs .card.shadow-sm { box-shadow: var(--shadow) !important; }
.bs .card-header, .bs .card-footer { background: transparent; border-color: var(--line); }
.bs .card-header:first-child { border-radius: var(--r) var(--r) 0 0; }
.bs .card-footer:last-child { border-radius: 0 0 var(--r) var(--r); }
.bs .list-group-item { border-color: var(--line); }

/* Formulare */
.bs .form-control, .bs .custom-select {
  min-height: 52px; height: auto; border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  background-color: var(--field); color: var(--ink); font-size: 16px; padding: 10px 16px;
}
.bs textarea.form-control { min-height: 140px; }
.bs .form-control:focus, .bs .custom-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(3,102,221,.25); background-color: #fff; }
.bs .form-control.is-invalid { border-color: var(--error); background-color: var(--error-bg); }
.bs label { font-weight: 600; font-size: 15px; }
.bs .form-check-label, .bs .custom-control-label { font-weight: 400; }
.bs .input-group-text { border: 1.5px solid var(--line-2); background: var(--bg-2); border-radius: var(--r-sm); }
.bs .custom-control-input:checked ~ .custom-control-label::before { background-color: var(--blue); border-color: var(--blue); }

/* Hinweise */
.bs .alert { border-radius: 16px; border: 0; padding: 16px 18px; font-size: 15px; }
.bs .alert-success { background: var(--ok-bg); color: #1F3A12; }
.bs .alert-danger { background: var(--error-bg); color: var(--error); }
.bs .alert-info, .bs .alert-primary { background: var(--blue-soft); color: #1A2B55; }
.bs .alert-warning { background: #FFF7E0; color: #6B4E00; }

/* Badges, Tabellen */
.bs .badge { border-radius: 999px; font-weight: 600; padding: .4em .75em; }
.bs .badge-primary { background: var(--blue); }
.bs .badge-success { background: var(--lime); color: var(--ink); }
.bs .table { color: var(--ink); }
.bs .table td, .bs .table th { border-color: var(--line); }

/* Modale (AGB, Datenschutz, Widerruf) */
.bs .modal-content { border: 0; border-radius: var(--r); }
.bs .modal-header, .bs .modal-footer { border-color: var(--line); }
.modal-backdrop.show { opacity: .55; }

/* Checkout / Bestelluebersicht: Kopf im V2-Stil statt Farbverlauf */
.bs .checkout-hero { background: none !important; color: var(--ink) !important; padding: 56px 0 12px !important; }
.bs .checkout-hero-title { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 3.6vw, 44px) !important; letter-spacing: -0.03em; color: var(--ink) !important; }
.bs .checkout-hero-title i { color: var(--blue); }
.bs .auth-fullsize { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 36px) !important; box-shadow: var(--shadow); }
.bs .btn-login { background: var(--blue); border-color: var(--blue); color: #fff; }
.bs .btn-login:hover { background: var(--blue-d); color: #fff; }
.bs .btn-warning { background: var(--lime); border-color: var(--lime-line); color: var(--ink); }

/* ── Bestellstrecke: Kopf zentriert, einheitliche Breite ───────────── */
.bs .checkout-hero { padding: 40px 0 16px !important; }
.bs .checkout-hero .container { text-align: center !important; }
.bs .checkout-hero-title { display: inline-flex; align-items: center; gap: .4em; }
.bs .checkout-hero-title i { font-size: .8em; }
.bs .checkout-slim, .bs .review-slim { margin-left: auto !important; margin-right: auto !important; }
.bs .checkout-slim > [class*="col-"], .bs .review-slim > [class*="col-"] { padding-left: 0 !important; padding-right: 0 !important; }
.bs .checkout-slim .card, .bs .review-slim .card { padding: 0 !important; overflow: hidden; }
.bs .checkout-cta-card.border-0 { border: 0 !important; background: transparent !important; box-shadow: none !important; overflow: visible; }
.bs .checkout-card > .card-header, .bs .checkout-card > .card-body, .bs .checkout-summary-card > .card-header, .bs .checkout-summary-card > .card-body, .bs .review-slim .checkout-cta-card > .card-header, .bs .review-slim .checkout-cta-card > .card-body { padding-left: 14px !important; padding-right: 14px !important; }
.bs .checkout-summary-card > .card-header { border-radius: 0 !important; margin: 0 !important; }
.bs .row { gap: 0; align-items: normal; }

/* ── Banküberweisung (pay_bank) ────────────────────────────────────── */
.bs .pb-wrap { max-width: 720px; margin: 16px auto 0; }
.bs .pb-amount { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(135deg, #0a66d9 0%, #0d47a1 100%); color: #fff;
  border-radius: 18px; padding: 22px 26px; box-shadow: 0 10px 28px rgba(13,71,161,.22); margin-bottom: 14px; }
.bs .pb-amount-label { font-size: .9rem; opacity: .85; font-weight: 500; }
.bs .pb-amount-value { font-size: 2.1rem; font-weight: 800; letter-spacing: -.5px; line-height: 1.15; }
.bs .pb-amount-icon { font-size: 2.4rem; opacity: .35; }
.bs .pb-info { display: flex; gap: 10px; align-items: flex-start; background: #ecfdf3; color: #166534;
  border: 1px solid #bbf7d0; border-radius: 12px; padding: 12px 16px; font-size: .95rem; margin-bottom: 14px; }
.bs .pb-info i { margin-top: 3px; }
.bs .pb-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 6px 20px 0; overflow: hidden;
  box-shadow: 0 4px 18px rgba(15,23,42,.05); }
.bs .pb-row { display: grid; grid-template-columns: 170px 1fr 40px; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid #eef2f7; }
.bs .pb-row:last-child { border-bottom: 0; }
.bs .pb-label { color: #64748b; font-size: .9rem; font-weight: 500; }
.bs .pb-value { color: #0f172a; font-weight: 600; word-break: break-word; }
.bs .pb-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .5px; }
.bs .pb-muted { color: #94a3b8; font-weight: 400; }
.bs .pb-row-ref { background: #f8fafc; margin: 0 -20px; padding: 14px 20px; border-radius: 0 0 18px 18px; }
.bs .pb-copy { width: 36px; height: 36px; border-radius: 10px; border: 1px solid #e2e8f0; background: #fff;
  color: #0a66d9; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; }
.bs .pb-copy:hover { background: #eff6ff; border-color: #bfdbfe; }
.bs .pb-copy.is-copied { background: #16a34a; border-color: #16a34a; color: #fff; }
.bs .pb-notice { margin: 14px 4px 0; color: #64748b; font-size: .9rem; }
@media (max-width: 575.98px) {
  .bs .pb-row { grid-template-columns: 1fr 40px; row-gap: 2px; }
  .bs .pb-label { grid-column: 1 / -1; }
  .bs .pb-amount-value { font-size: 1.7rem; }
}

/* ── Zahlungsbestätigung (payment_success) ─────────────────────────── */
.bs .ps-banner { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff; border-radius: 18px; padding: 20px 24px; margin-bottom: 14px; box-shadow: 0 10px 28px rgba(21,128,61,.22);
  font-size: 1rem; line-height: 1.5; }
.bs .ps-banner-icon { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.2);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.bs .ps-banner-warn { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); box-shadow: 0 10px 28px rgba(217,119,6,.22); }
.bs .ps-card { padding-bottom: 0; }
.bs .ps-message { margin: 14px 0 4px; color: #475569; }
.bs .ps-card .pb-row:last-of-type { border-bottom: 1px solid #eef2f7; }
.bs .ps-items { padding: 14px 0; border-bottom: 1px solid #eef2f7; }
.bs .ps-items ul { margin: 6px 0 0; padding-left: 1.2em; color: #0f172a; }
.bs .ps-totals { background: #f8fafc; margin: 0 -20px; padding: 14px 20px 16px; }
.bs .ps-total-line { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; color: #475569; }
.bs .ps-total-sum { margin-top: 6px; padding-top: 10px; border-top: 1px solid #e2e8f0; color: #0f172a; font-weight: 800; font-size: 1.15rem; }
.bs .ps-total-sum span:last-child { color: #0a66d9; }
.bs .ps-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.bs .ps-actions .btn { flex: 1 1 240px; }

/* ── Starter-Paket (pay_starter) ───────────────────────────────────── */
.bs .pst-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; background: #eff6ff; color: #1e3a8a;
  border: 1px solid #bfdbfe; border-radius: 12px; padding: 12px 16px; font-size: .95rem; }
.bs .pst-note i { margin-top: 3px; color: #0a66d9; }
.bs #runtimeOptionsDivView:first-child, .bs #summaryWeeklyDivView[style*="none"] ~ #summaryCreditsDivView[style*="none"] ~ #runtimeOptionsDivView { margin-top: 0 !important; padding-top: 0 !important; border-top: 0 !important; }
.bs #runtimeOptions .alert { display: block !important; } .bs #runtimeOptions .alert i { margin-right: .4em; }
.bs #summaryWeeklyDivView[style*="none"] + #runtimeOptionsDivView { margin-top: 0 !important; padding-top: 0 !important; border-top: 0 !important; }
.bs #runtimeOptionsDivView .alert { display: block !important; }
.bs #runtimeOptionsDivView .alert i { margin-right: .4em; }
/* Bootstrap-5-Abstaende, die V1 im Markup nutzt (Bootstrap 4 kennt sie nicht) */
.bs .me-1 { margin-right: .25rem !important; } .bs .me-2 { margin-right: .5rem !important; }
.bs .ms-1 { margin-left: .25rem !important; }  .bs .ms-2 { margin-left: .5rem !important; }
html[dir="rtl"] .bs .me-1, html[dir="rtl"] .bs .me-2 { margin-right: 0 !important; margin-left: .4rem !important; }