/* ============================================
   Bewertungen24 - Checkout (1:1 Sternedoktor Look)
   Self-contained: defines all needed variables so it
   does NOT depend on a global style.css.
   ============================================ */

/* ---- Variables (from Sternedoktor design system) ---- */
.co-scope {
    --color-bg-primary: #f5f5f7;
    --color-bg-secondary: #eeeef0;
    --color-bg-card: #141416;
    --color-bg-white: #ffffff;
    --color-gold: #F59E0B;
    --color-gold-light: #FBBF24;
    --color-gold-dark: #0A4F49;
    --color-petrol: #0F766E;
    --color-petrol-dark: #0B5C55;
    --color-success: #22c55e;
    --color-text-primary: #111113;
    --color-text-secondary: #555560;
    --color-text-muted: #8c8c96;
    --color-border: rgba(0, 0, 0, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --font-body: 'Jakarta', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* The whole checkout area uses the light Sternedoktor theme */
.co-scope {
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
}

.co-scope .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.co-scope h1,
.co-scope h2,
.co-scope h3,
.co-scope h4 {
    font-family: var(--font-body);
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-text-primary);
}

.co-scope p {
    color: var(--color-text-secondary);
}

.co-scope a {
    color: var(--color-gold-dark);
    text-decoration: none;
    transition: 0.2s ease;
}

.co-scope a:hover {
    color: var(--color-gold);
}

/* ---- Form fields ---- */
.co-scope .form-group {
    margin-bottom: var(--space-lg);
}

.co-scope .form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.co-scope .form-group input,
.co-scope .form-group textarea,
.co-scope .form-group select {
    width: 100%;
    padding: 14px 18px;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: 0.2s ease;
}

.co-scope .form-group input:focus,
.co-scope .form-group textarea:focus,
.co-scope .form-group select:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(232, 160, 32, 0.08);
}

.co-scope .form-group textarea {
    min-height: 90px;
    resize: vertical;
}

.co-scope .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.co-scope .req {
    color: #ef4444;
}

/* ---- Small button (coupon) ---- */
.co-scope .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 14px 28px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s ease;
    border: none;
    text-decoration: none;
    font-family: var(--font-body);
}

.co-scope .btn-sm {
    padding: 10px 22px;
    font-size: 0.9rem;
}

.co-scope .btn-primary {
    background: var(--color-petrol);
    color: #fff;
    box-shadow: 0 4px 20px rgba(15, 118, 110, 0.28);
}

.co-scope .btn-primary:hover {
    transform: translateY(-2px);
    background: var(--color-petrol-dark);
    box-shadow: 0 8px 30px rgba(10, 79, 73, 0.4);
    color: #fff;
}

/* ============================================
   CHECKOUT LAYOUT (from Sternedoktor inline <style>)
   ============================================ */
.checkout-hero-v2 {
    padding: 32px 0 24px;
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.08), rgba(34, 197, 94, 0.05));
    border-bottom: 1px solid var(--color-border);
}

.checkout-hero-v2 .container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.checkout-hero-v2 .step-indicators {
    display: flex;
    gap: 0;
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
}

.checkout-hero-v2 .step-ind {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 12px 8px 0;
}

.checkout-hero-v2 .step-ind::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-border);
    border-radius: 4px;
}

.checkout-hero-v2 .step-ind.active::before {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.checkout-hero-v2 .step-ind.completed::before {
    background: #22c55e;
}

.checkout-hero-v2 .step-ind span {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.checkout-hero-v2 .step-ind.active span {
    color: #22c55e;
    font-weight: 700;
}

.checkout-hero-v2 .step-ind.completed span {
    color: var(--color-text-secondary);
}

.checkout-trust-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.03), rgba(34, 197, 94, 0.03));
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
}

.checkout-trust-bar .tb-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 6px 14px;
    font-weight: 500;
}

.checkout-trust-bar .tb-item .tb-icon {
    font-size: 0.95rem;
}

.checkout-main {
    padding: 40px 0 60px;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
    align-items: start;
}

.form-section {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.form-section h3 {
    font-size: 1.15rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #111113;
}

.form-section h3 .section-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-gold), #d4940a);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.checkout-summary {
    position: sticky;
    top: 100px;
}

.summary-card {
    background: #ffffff;
    border: 2px solid rgba(232, 160, 32, 0.25);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.summary-card h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: #111113;
}

.summary-product {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.summary-product .sp-name {
    font-size: 0.95rem;
    color: #333;
}

.summary-product .sp-price {
    font-weight: 700;
    color: #111113;
}

.summary-totals {
    margin-top: 12px;
    padding-top: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.95rem;
    color: #555;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    padding-top: 12px;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    color: #111113;
}

.summary-row.discount {
    color: #22c55e;
}

.checkout-btn-v2 {
    width: 100%;
    padding: 18px;
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(135deg, #0F766E, #0B5C55);
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
}

.checkout-btn-v2:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.4);
}

.summary-trust-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.sti {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--color-text-secondary);
}

.sti .sti-icon {
    font-size: 0.9rem;
}

.coupon-toggle {
    font-size: 0.85rem;
    color: var(--color-gold-dark);
    cursor: pointer;
    margin-top: 12px;
    text-align: center;
}

.coupon-toggle:hover {
    text-decoration: underline;
}

.coupon-row {
    display: none;
    gap: 8px;
    margin-top: 8px;
}

.coupon-row input {
    flex: 1;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #f5f5f7;
    color: #111113;
    font-size: 0.9rem;
    font-family: var(--font-body);
}

.coupon-row button {
    padding: 10px 16px;
    font-size: 0.85rem;
}

.legal-checks {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legal-check {
    display: flex;
    gap: 10px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #555560;
}

.legal-check input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--color-gold);
    cursor: pointer;
}

/* ---- Rhythm Cards ---- */
.rhythm-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.rhythm-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    background: #ffffff;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.rhythm-card:hover {
    border-color: rgba(232, 160, 32, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 160, 32, 0.12);
}

.rhythm-card.active {
    border: 2px solid var(--color-gold);
    background: rgba(232, 160, 32, 0.06);
    box-shadow: 0 0 0 3px rgba(232, 160, 32, 0.18), 0 4px 24px rgba(232, 160, 32, 0.18);
}

.rhythm-card.active .rhythm-icon {
    transform: scale(1.15);
}

.rhythm-card.active .rhythm-title {
    color: var(--color-gold-dark);
    font-weight: 700;
}

.rhythm-card.active::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--color-gold);
    color: #000;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(232, 160, 32, 0.5);
}

.rhythm-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
    transition: transform 0.25s ease;
}

.rhythm-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #111113;
    margin-bottom: 2px;
}

.rhythm-desc {
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

/* ---- Success box ---- */
.checkout-success-section {
    padding: 60px 0;
    background: var(--color-bg-primary);
}

.co-success-box {
    background: #ffffff;
    border: 2px solid #22c55e;
    border-radius: var(--radius-xl);
    padding: 48px 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.co-success-box h2 {
    color: #111113;
}

.co-success-box p {
    color: var(--color-text-secondary);
}

.co-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 24px;
    padding: 14px 32px;
    border-radius: 9999px;
    font-weight: 700;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.25);
}

.co-back-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.4);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .checkout-trust-bar {
        display: flex;
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 10px 12px;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .checkout-trust-bar::-webkit-scrollbar {
        display: none;
    }

    .checkout-trust-bar .tb-item {
        font-size: 0.7rem;
        gap: 4px;
        padding: 5px 10px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .checkout-trust-bar .tb-item .tb-icon {
        font-size: 0.8rem;
    }

    .form-section {
        padding: 24px 20px;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .rhythm-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rhythm-card {
        padding: 12px 6px;
    }

    .rhythm-icon {
        font-size: 1.2rem;
    }

    .rhythm-title {
        font-size: 0.78rem;
    }
}

/* ============ Checkout-Fallback: kein Paket gewählt ============ */
.co-fallback {
  padding: 4.5rem 0 5rem;
  background: linear-gradient(135deg, #0b0f1a 0%, #141a2b 100%);
  min-height: 60vh;
}
.co-fb-card {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}
.co-fb-badge {
  display: inline-block;
  background: rgba(0, 182, 122, 0.14);
  color: #00875C;
  border: 1px solid rgba(0, 182, 122, 0.35);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}
.co-fb-card h1 {
  color: #fff;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 1rem;
}
.co-fb-lead {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.02rem;
  line-height: 1.65;
  max-width: 46rem;
  margin: 0 auto 2.2rem;
}
.co-fb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  text-align: left;
}
.co-fb-tile {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.2rem 1.3rem;
  text-decoration: none;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.co-fb-tile:hover {
  border-color: rgba(0, 182, 122, 0.55);
  background: rgba(0, 182, 122, 0.07);
  transform: translateY(-2px);
}
.co-fb-t {
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
}
.co-fb-d {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.88rem;
  line-height: 1.45;
}
.co-fb-arw {
  color: #00875C;
  font-weight: 600;
  font-size: 0.86rem;
  margin-top: 0.5rem;
}
.co-fb-tile--del:hover {
  border-color: rgba(225, 29, 72, 0.5);
  background: rgba(225, 29, 72, 0.06);
}
.co-fb-tile--del .co-fb-arw {
  color: #f2698a;
}
.co-fb-help {
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.92rem;
}
.co-fb-help a {
  color: #00875C;
  text-decoration: none;
  font-weight: 600;
}
.co-fb-help a:hover {
  text-decoration: underline;
}
@media (max-width: 640px) {
  .co-fallback { padding: 3rem 0 3.5rem; }
  .co-fb-grid { grid-template-columns: 1fr; }
}
