/* Community-Seite (community-page.php): Checkout-Dialog, Zahlungsarten, Stepper, Rail.
   Ausgelagert aus dem Seitenkopf (28.11.2026). Hero, Vorteile, Plan-Auswahl und
   Bewertungen liegen als .cp-* in assets/styles.css. */

.method-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.method-card {
    background: var(--iso-tint-04);
    border: 1.5px solid var(--iso-tint-08);
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 12px;
}
.method-card:hover {
    border-color: rgba(59,130,246,0.35);
    background: rgba(59,130,246,0.05);
}
.method-card.selected {
    border-color: var(--iso-primary, #3b82f6);
    background: rgba(59,130,246,0.10);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.10);
}
.method-card .mc-icon {
    width: 32px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.method-card .mc-icon img { max-height: 22px; max-width: 32px; object-fit: contain; }
.method-card .mc-icon .emoji { font-size: 20px; line-height: 1; }
.method-card .mc-label {
    color: var(--iso-text);
    font-size: 13px;
    font-weight: 600;
    flex: 1;
    min-width: 0;
}
.method-card .mc-fee {
    color: var(--iso-text-muted, #8b93a1);
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
}
.method-card .mc-total {
    color: var(--iso-primary-light, #60a5fa);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}
.method-card .mc-check {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--iso-primary, #3b82f6);
    color: var(--iso-text);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}
.method-card.selected .mc-check { display: flex; }

/* ---- Checkout in Schritten ---------------------------------- */
#checkoutModal .modal-body { padding: 22px 26px 26px; }
#checkoutModal .co-step-count {
    color: var(--iso-text-muted, #8b93a1); font-size: 13px; font-weight: 400;
    margin-left: 10px; font-variant-numeric: tabular-nums;
}
#checkoutModal .co-layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 28px; align-items: start;
}
#checkoutModal .co-main { order: 1; min-width: 0; }
#checkoutModal .co-rail { order: 2; position: sticky; top: 0; }
#checkoutModal .co-rail-toggle { display: none; }
#checkoutModal #planInfo {
    background: var(--iso-tint-04); border: 1px solid var(--iso-tint-08) !important;
    border-radius: 14px; padding: 18px 20px; margin-bottom: 12px;
    color: var(--iso-text); font-size: 16px; font-variant-numeric: tabular-nums;
}
#checkoutModal #planInfo > strong:first-child {
    display: block; color: var(--iso-text-muted, #8b93a1); font-size: 13px; font-weight: 500; margin-bottom: 2px;
}
#checkoutModal #planInfo .text-muted { color: var(--iso-text-muted) !important; }
/* Betraege nie umbrechen; lange Bezeichnungen links duerfen auf zwei Zeilen gehen. */
#checkoutModal #planInfo .d-flex > :last-child { white-space: nowrap; flex-shrink: 0; margin-left: 12px; }
#checkoutModal .co-rail .alert-dark {
    background: var(--iso-tint-04); border: 1px solid var(--iso-tint-08) !important; border-radius: 12px;
}

#checkoutModal .co-stepper { list-style: none; display: flex; align-items: center; padding: 0; margin: 2px 0 26px; }
#checkoutModal .co-stepper[hidden] { display: none; }
#checkoutModal .co-stepper li {
    display: flex; align-items: center; gap: 10px; min-width: 0;
    color: var(--iso-text-muted, #8b93a1); font-size: 13px;
}
#checkoutModal .co-stepper li:not(:last-child) { flex: 1; }
#checkoutModal .co-stepper li:not(:last-child)::after {
    content: ""; flex: 1; height: 1px; margin: 0 14px; background: var(--iso-tint-12);
}
#checkoutModal .co-stepper li.is-done::after { background: var(--iso-primary, #3b82f6); }
#checkoutModal .co-stepper li button {
    all: unset; display: flex; align-items: center; gap: 10px; cursor: pointer; border-radius: 999px;
}
#checkoutModal .co-stepper li button:focus-visible .co-step-num { outline: 2px solid var(--iso-primary, #3b82f6); outline-offset: 2px; }
#checkoutModal .co-step-num {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
    border: 1.5px solid var(--iso-tint-18); color: var(--iso-text-secondary);
    transition: background-color .2s, border-color .2s, color .2s;
}
#checkoutModal .co-stepper li.is-current .co-step-num {
    background: var(--iso-primary); border-color: var(--iso-primary); color: var(--iso-primary-ink);
}
#checkoutModal .co-stepper li.is-done .co-step-num {
    background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.55); color: #4ade80; font-size: 15px;
}
#checkoutModal .co-step-label { white-space: nowrap; }
#checkoutModal .co-stepper li.is-current .co-step-label { color: var(--iso-text); font-weight: 600; }
#checkoutModal .co-stepper li.is-done button:hover .co-step-label { color: var(--iso-text); }

#checkoutModal .co-step[hidden] { display: none; }
#checkoutModal .co-step-title { font-size: 20px; font-weight: 600; color: var(--iso-text); margin: 0 0 6px; letter-spacing: -.01em; }
#checkoutModal .co-step-lead { color: var(--iso-text-muted, #8b93a1); font-size: 14px; margin: 0 0 18px; max-width: 60ch; }
#checkoutModal .co-step-title + :not(.co-step-lead) { margin-top: 16px; }
/* Die alten Grossbuchstaben-Labels: im Rechnungsschritt ersetzt der Titel das Label,
   die uebrigen werden zu normalen Feldbeschriftungen. */
#coStepBilling #billingBlock > label.form-label { display: none; }
#coStepBilling #checkoutEmailBlock label.form-label,
#coStepPayment #methodPickerBlock label.form-label {
    text-transform: none !important; letter-spacing: 0 !important; font-size: 14px !important;
    color: var(--iso-text-secondary) !important; margin-bottom: 8px;
}
#checkoutModal .co-enter { animation: co-in .28s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes co-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #checkoutModal .co-enter { animation: none; } }

#checkoutModal .co-nav {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--iso-tint-08);
}
#checkoutModal .co-nav[hidden] { display: none; }
#checkoutModal .co-back { color: var(--iso-text-muted, #8b93a1); text-decoration: none; padding-left: 0; }
#checkoutModal .co-back:hover, #checkoutModal .co-back:focus-visible { color: var(--iso-text); }
#checkoutModal .co-back[hidden], #checkoutModal .co-next[hidden] { display: none; }
#checkoutModal .co-next { min-width: 170px; margin-left: auto; }
#checkoutModal .form-control:focus, #checkoutModal .form-select:focus {
    border-color: var(--iso-primary, #3b82f6);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--iso-primary, #3b82f6) 25%, transparent);
}

@media (max-width: 991.98px) {
    #checkoutModal .modal-body { padding: 16px 16px 20px; }
    #checkoutModal .co-layout { grid-template-columns: 1fr; gap: 18px; }
    #checkoutModal .co-rail { order: 0; position: static; }
    #checkoutModal .co-main { order: 1; }
    #checkoutModal .co-rail-toggle {
        display: flex; width: 100%; align-items: center; gap: 12px; text-align: left;
        background: var(--iso-tint-04); border: 1px solid var(--iso-tint-08); border-radius: 12px;
        padding: 12px 16px; color: var(--iso-text); font-size: 15px; font-weight: 600;
    }
    #checkoutModal .co-rail-toggle .bi { transition: transform .2s; color: var(--iso-text-muted, #8b93a1); }
    #checkoutModal .co-rail.is-open .co-rail-toggle .bi { transform: rotate(180deg); }
    #checkoutModal .co-rail-mini { display: flex; justify-content: space-between; gap: 12px; flex: 1; min-width: 0; }
    #checkoutModal .co-mini-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #checkoutModal .co-mini-price { flex-shrink: 0; font-variant-numeric: tabular-nums; }
    #checkoutModal .co-rail-body { display: none; margin-top: 10px; }
    #checkoutModal .co-rail.is-open .co-rail-body { display: block; }
    #checkoutModal .co-step-title { font-size: 18px; }
}
@media (max-width: 575.98px) {
    #checkoutModal .co-stepper li:not(.is-current) .co-step-label { display: none; }
    #checkoutModal .co-stepper li:not(:last-child)::after { margin: 0 10px; }
    #checkoutModal .co-next { min-width: 0; flex: 1; }
}

/* Hero: .cp-hero in assets/styles.css (28.11.2026) */
/* Vorteile/FAQ-Kacheln: .cp-benefits in assets/styles.css (28.11.2026) */
