/* MaxSocial Checkout — Multi-Step Wow-Design
 * Dreamscape-Tokens + Mesh-Gradient-Atmosphere + Motion
 */

/* ───────── Reset + Body ───────── */

.ms-body--checkout {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--ms-bg, #FAECE0);
    color: var(--ms-ink, #352974);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.ms-body--checkout *,
.ms-body--checkout *::before,
.ms-body--checkout *::after {
    box-sizing: border-box;
}

/* ───────── Mesh Background ───────── */

.ms-co-mesh {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ms-co-mesh__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    animation: ms-co-float 22s ease-in-out infinite;
    will-change: transform;
}

.ms-co-mesh__orb--1 {
    top: -10%;
    left: -8%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(238,113,30,0.55) 0%, rgba(238,113,30,0) 70%);
    animation-delay: 0s;
}

.ms-co-mesh__orb--2 {
    top: 30%;
    right: -12%;
    width: 620px;
    height: 620px;
    background: radial-gradient(circle, rgba(231,31,129,0.45) 0%, rgba(231,31,129,0) 70%);
    animation-delay: -7s;
}

.ms-co-mesh__orb--3 {
    bottom: -15%;
    left: 20%;
    width: 680px;
    height: 680px;
    background: radial-gradient(circle, rgba(32,80,157,0.35) 0%, rgba(32,80,157,0) 70%);
    animation-delay: -14s;
}

@keyframes ms-co-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -30px) scale(1.06); }
    50% { transform: translate(-20px, 40px) scale(0.96); }
    75% { transform: translate(30px, 20px) scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
    .ms-co-mesh__orb { animation: none; }
    .ms-co-btn--primary::before { animation: none; }
    .ms-co-timeline__fill { animation: none; transition: none; }
    .ms-co-timeline__step.is-active .ms-co-timeline__dot { animation: none; }
    .ms-co-hero__line,
    .ms-co-hero__kicker,
    .ms-co-hero__subline,
    .ms-co-timeline,
    .ms-co-trust,
    .ms-co-hero-actions,
    .ms-co-thanks-check,
    .ms-co-thanks-order,
    .ms-co-thanks-next { animation: none !important; opacity: 1 !important; transform: none !important; }
    .ms-co-step { transition: none; }
}

/* Mobile-Perf: Mesh-Blur reduzieren (80px blur × 3 orbs kostet GPU-Memory) */
@media (max-width: 640px) {
    .ms-co-mesh__orb {
        filter: blur(48px);
        opacity: 0.45;
    }
    .ms-co-mesh__orb--1 { width: 360px; height: 360px; }
    .ms-co-mesh__orb--2 { width: 420px; height: 420px; }
    .ms-co-mesh__orb--3 { width: 460px; height: 460px; }
}

/* ───────── Shell-Layout ───────── */

.ms-co-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "top      top"
        "main     summary"
        "actions  actions";
    gap: 24px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px 32px 64px;
    min-height: 100vh;
}

/* ───────── Topbar (Brand + Progress) ───────── */

.ms-co-topbar {
    grid-area: top;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--ms-edge, rgba(53,41,116,0.06));
    border-radius: var(--ms-radius-full, 9999px);
    box-shadow: var(--ms-shadow-sm, 0 4px 16px rgba(53,41,116,0.05));
}

.ms-co-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ms-ink, #352974);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.ms-co-brand__signet {
    width: 28px;
    height: 28px;
}

.ms-co-brand__wordmark {
    font-size: 15px;
    background: var(--ms-gradient-brand, linear-gradient(135deg, #EE711E, #E71F81 50%, #20509D));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.ms-co-progress__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    counter-reset: ms-co-step;
}

.ms-co-progress__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 6px;
    color: var(--ms-ghost, #8B8DB8);
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.ms-co-progress__item::after {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--ms-edge-strong, rgba(53,41,116,0.12));
    margin-left: 4px;
}

.ms-co-progress__item:last-child::after {
    display: none;
}

.ms-co-progress__dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--ms-edge, rgba(53,41,116,0.06));
    color: var(--ms-ghost, #8B8DB8);
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ms-co-progress__item.is-current .ms-co-progress__dot {
    background: var(--ms-gradient-brand, linear-gradient(135deg, #EE711E, #E71F81 50%, #20509D));
    color: #fff;
    box-shadow: 0 4px 12px rgba(231,31,129,0.35);
    transform: scale(1.05);
}

.ms-co-progress__item.is-done .ms-co-progress__dot {
    background: var(--ms-signal, #E73159);
    color: #fff;
}

.ms-co-progress__item.is-current,
.ms-co-progress__item.is-done {
    color: var(--ms-ink, #352974);
    font-weight: 600;
}

/* ───────── Main + Steps ───────── */

.ms-co-main {
    grid-area: main;
    position: relative;
    display: flex;
    flex-direction: column;
}

.ms-co-step {
    display: none;
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ms-co-step.is-active {
    display: flex;
    flex-direction: column;
    flex: 1;
    opacity: 1;
    transform: translateX(0);
}

.ms-co-step.is-entering {
    display: flex;
    flex-direction: column;
    flex: 1;
    opacity: 0;
    transform: translateX(24px);
}

.ms-co-step.is-leaving {
    display: flex;
    flex-direction: column;
    flex: 1;
    opacity: 0;
    transform: translateX(-24px);
    pointer-events: none;
}

/* ───────── Welcome-Hero ───────── */

.ms-co-hero {
    text-align: left;
    max-width: 720px;
    margin: 36px 0 40px;
}

.ms-co-hero__kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ms-signal, #E73159);
    margin-bottom: 18px;
    padding: 6px 14px;
    background: var(--ms-signal-light, rgba(231,49,89,0.06));
    border: 1px solid var(--ms-signal-muted, rgba(231,49,89,0.12));
    border-radius: var(--ms-radius-full, 9999px);
    animation: ms-co-fade-up 0.6s ease-out 0.1s both;
}

.ms-co-hero__headline {
    margin: 0;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ms-ink, #352974);
}

.ms-co-hero__line {
    display: block;
    animation: ms-co-fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ms-co-hero__line:nth-child(1) { animation-delay: 0.2s; }
.ms-co-hero__line:nth-child(2) { animation-delay: 0.35s; }

.ms-co-hero__line--accent {
    background: var(--ms-gradient-brand, linear-gradient(135deg, #EE711E, #E71F81 50%, #20509D));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.ms-co-hero__subline {
    margin: 24px 0 0;
    font-size: 18px;
    line-height: 1.55;
    color: var(--ms-lead, #5E60A9);
    max-width: 600px;
    animation: ms-co-fade-up 0.7s ease-out 0.5s both;
}

.ms-co-hero__subline strong {
    color: var(--ms-ink, #352974);
    font-weight: 600;
}

@keyframes ms-co-fade-up {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ───────── Timeline ───────── */

.ms-co-timeline {
    position: relative;
    margin: 32px 0 0;
    padding: 28px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--ms-edge, rgba(53,41,116,0.06));
    border-radius: var(--ms-radius-md, 16px);
    box-shadow: var(--ms-shadow-sm);
    animation: ms-co-fade-up 0.8s ease-out 0.7s both;
}

.ms-co-timeline__track {
    position: absolute;
    top: 50px;
    left: 56px;
    right: 56px;
    height: 3px;
    background: var(--ms-edge-strong, rgba(53,41,116,0.12));
    border-radius: 2px;
    overflow: hidden;
}

.ms-co-timeline__fill {
    display: block;
    width: var(--ms-timeline-progress, 15%);
    height: 100%;
    background: var(--ms-gradient-brand, linear-gradient(90deg, #EE711E, #E71F81 50%, #20509D));
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ms-co-timeline__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    position: relative;
}

.ms-co-timeline__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.ms-co-timeline__dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--ms-edge-strong, rgba(53,41,116,0.12));
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.ms-co-timeline__step.is-active .ms-co-timeline__dot {
    border-color: var(--ms-signal, #E73159);
    box-shadow: 0 0 0 6px rgba(231,49,89,0.12), 0 4px 12px rgba(231,49,89,0.25);
    animation: ms-co-pulse 2s ease-in-out infinite;
}

@keyframes ms-co-pulse {
    0%, 100% { box-shadow: 0 0 0 6px rgba(231,49,89,0.12), 0 4px 12px rgba(231,49,89,0.25); }
    50% { box-shadow: 0 0 0 10px rgba(231,49,89,0.06), 0 4px 12px rgba(231,49,89,0.3); }
}

.ms-co-timeline__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ms-ink, #352974);
    letter-spacing: -0.01em;
}

.ms-co-timeline__meta {
    font-size: 12px;
    color: var(--ms-lead, #5E60A9);
    line-height: 1.3;
}

/* ───────── Trust-Row (Feature-Cards) ───────── */

.ms-co-trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 20px 0 0;
    flex: 1;
    animation: ms-co-fade-up 0.7s ease-out 0.9s both;
}

.ms-co-trust__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 26px 22px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--ms-edge, rgba(53,41,116,0.06));
    border-radius: var(--ms-radius-md, 16px);
    box-shadow: var(--ms-shadow-sm);
    font-size: 13px;
    line-height: 1.5;
    color: var(--ms-lead, #5E60A9);
    min-height: 160px;
}

.ms-co-trust__item svg {
    color: var(--ms-signal, #E73159);
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 6px;
    background: rgba(231,49,89,0.08);
    border-radius: 8px;
    box-sizing: content-box;
}

.ms-co-trust__item strong {
    color: var(--ms-ink, #352974);
    font-weight: 700;
    font-size: 15px;
    display: block;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.ms-co-trust__item > span {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ───────── Hero Actions ───────── */

.ms-co-hero-actions {
    display: flex;
    gap: 12px;
    animation: ms-co-fade-up 0.7s ease-out 1.1s both;
}

/* ───────── Buttons ───────── */

.ms-co-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: 0;
    border-radius: var(--ms-radius-full, 9999px);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.15s ease;
    position: relative;
    overflow: hidden;
}

.ms-co-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ms-co-btn--primary {
    background: var(--ms-gradient-brand, linear-gradient(135deg, #EE711E, #E71F81 50%, #20509D));
    color: #fff;
    box-shadow: 0 6px 24px rgba(231,31,129,0.35), 0 2px 6px rgba(231,31,129,0.2);
}

.ms-co-btn--primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(231,31,129,0.45), 0 4px 12px rgba(231,31,129,0.3);
}

.ms-co-btn--primary:active:not(:disabled) {
    transform: translateY(0);
}

/* Shimmer-Sweep auf Primary-Idle */
.ms-co-btn--primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: ms-co-shimmer 4s ease-in-out infinite;
}

@keyframes ms-co-shimmer {
    0% { left: -100%; }
    25%, 100% { left: 100%; }
}

.ms-co-btn--ghost {
    background: rgba(255, 255, 255, 0.7);
    color: var(--ms-ink, #352974);
    border: 1px solid var(--ms-edge-strong, rgba(53,41,116,0.12));
}

.ms-co-btn--ghost:hover:not(:disabled) {
    background: #fff;
    border-color: var(--ms-ink, #352974);
}

/* Full-width Button-Modifier (fuer Summary-Actions). */
.ms-co-btn--block {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Kleinerer Button-Modifier (Zurueck-Button sekundaer unter Primary). */
.ms-co-btn--sm {
    padding: 10px 18px;
    font-size: 13px;
}

/* ───────── Step-Head (Kontakt / Payment) ───────── */

.ms-co-step-head {
    margin: 8px 0 28px;
}

.ms-co-step-head__kicker {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ms-signal, #E73159);
    margin-bottom: 10px;
}

.ms-co-step-head__title {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ms-ink, #352974);
}

.ms-co-step-head__sub {
    margin: 0;
    font-size: 15px;
    color: var(--ms-lead, #5E60A9);
    line-height: 1.55;
}

.ms-co-step-head__sub strong {
    color: var(--ms-ink, #352974);
    font-weight: 600;
}

/* ───────── Form ───────── */

.ms-co-form {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--ms-edge, rgba(53,41,116,0.06));
    border-radius: var(--ms-radius-md, 16px);
    padding: 28px;
    box-shadow: var(--ms-shadow-sm);
}

.ms-co-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.ms-co-form-row > .ms-co-field--short { flex: 0 0 120px; }
.ms-co-form-row > .ms-co-field--grow { flex: 1; }

.ms-co-form-row:has(.ms-co-field--short) {
    grid-template-columns: 120px 1fr 160px;
}

/* Firefox-/Safari-Fallback ohne :has() — explizite Klasse vom Template. */
.ms-co-form-row--addr {
    grid-template-columns: 120px 1fr 160px;
}

.ms-co-field {
    margin-bottom: 14px;
    position: relative;
}

.ms-co-field__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ms-lead, #5E60A9);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ms-co-field__optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--ms-ghost, #8B8DB8);
}

.ms-co-field__inputwrap {
    position: relative;
}

.ms-co-field__input {
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 15px;
    color: var(--ms-ink, #352974);
    background: #fff;
    border: 1.5px solid var(--ms-edge-strong, rgba(53,41,116,0.12));
    border-radius: var(--ms-radius-xs, 8px);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

.ms-co-field__input:focus {
    border-color: var(--ms-signal, #E73159);
    box-shadow: 0 0 0 4px rgba(231,49,89,0.12);
}

.ms-co-field__input:user-invalid {
    border-color: var(--ms-critical, #EF4444);
}

.ms-co-field__badge {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--ms-radius-full, 9999px);
    opacity: 0;
    transition: opacity 0.2s;
}

.ms-co-field__badge.is-valid {
    background: var(--ms-healthy-light, rgba(16,185,129,0.08));
    color: #065F46;
    opacity: 1;
}

.ms-co-field__badge.is-invalid {
    background: rgba(239,68,68,0.1);
    color: #991B1B;
    opacity: 1;
}

.ms-co-field__badge.is-checking {
    background: var(--ms-edge, rgba(53,41,116,0.06));
    color: var(--ms-lead);
    opacity: 1;
}

.ms-co-field__hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--ms-lead, #5E60A9);
    line-height: 1.4;
}

.ms-co-field__hint.is-success { color: #065F46; }
.ms-co-field__hint.is-warning { color: #92400E; }

/* ───────── Step-Actions ───────── */

.ms-co-step-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--ms-edge, rgba(53,41,116,0.06));
}

/* ───────── Payment ───────── */

.ms-co-payment {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--ms-edge, rgba(53,41,116,0.06));
    border-radius: var(--ms-radius-md, 16px);
    padding: 24px 28px;
    box-shadow: var(--ms-shadow-sm);
}

.ms-co-payment-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    color: var(--ms-lead, #5E60A9);
    font-size: 14px;
    justify-content: center;
}

.ms-co-payment-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--ms-edge-strong, rgba(53,41,116,0.12));
    border-top-color: var(--ms-signal, #E73159);
    border-radius: 50%;
    animation: ms-co-spin 0.8s linear infinite;
}

@keyframes ms-co-spin {
    to { transform: rotate(360deg); }
}

#ms-co-payment-element {
    min-height: 180px;
}

.ms-co-payment-error {
    margin: 12px 0 0;
    padding: 10px 14px;
    font-size: 13px;
    color: #991B1B;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: var(--ms-radius-xs, 8px);
    display: none;
}

.ms-co-payment-trust {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0 0;
    padding: 10px 14px;
    font-size: 12px;
    color: var(--ms-lead, #5E60A9);
    background: var(--ms-inset, #FEF7F0);
    border-radius: var(--ms-radius-xs, 8px);
}

.ms-co-payment-trust svg {
    color: var(--ms-signal, #E73159);
    flex-shrink: 0;
}

.ms-co-payment-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--ms-ink, #352974);
    line-height: 1.5;
    cursor: pointer;
}

.ms-co-payment-consent input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--ms-signal, #E73159);
}

.ms-co-payment-consent a {
    color: var(--ms-signal, #E73159);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Submit-Loading-State */
.ms-co-submit-loading {
    display: none;
    align-items: center;
    gap: 8px;
}

.ms-co-btn.is-loading .ms-co-submit-label {
    display: none;
}

.ms-co-btn.is-loading .ms-co-submit-loading {
    display: inline-flex;
}

/* ───────── Summary (Desktop Sticky) ───────── */

.ms-co-summary {
    grid-area: summary;
    position: sticky;
    top: 28px;
    align-self: start;
    /* JS setzt margin-top pro Step, damit die Summary-Top an der Content-Card-Top alignt. */
    margin-top: var(--ms-co-summary-offset, 0px);
    transition: margin-top 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ───────── Welcome-Step Action-Bar (Full-Width, centered button) ───────── */

.ms-co-actions-bar {
    grid-area: actions;
    margin-top: 8px;
    padding: 20px 4px 0;
    border-top: 1px solid var(--ms-edge-strong, rgba(53,41,116,0.12));
    display: flex;
    justify-content: center;
}

/* Billing + Payment: keine Action-Bar, Buttons sind unter der Summary. */
.ms-co-shell[data-step="billing"] .ms-co-actions-bar,
.ms-co-shell[data-step="payment"] .ms-co-actions-bar {
    display: none;
}

.ms-co-actions-bar__slot {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.ms-co-actions-bar__slot[hidden] {
    display: none;
}

/* ───────── Summary-Actions (Billing + Payment, unter Summary-Card) ───────── */

.ms-co-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.ms-co-summary-actions[hidden] {
    display: none;
}

.ms-co-summary__inner {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--ms-edge, rgba(53,41,116,0.06));
    border-radius: var(--ms-radius-md, 16px);
    padding: 24px;
    box-shadow: var(--ms-shadow-md);
}

.ms-co-summary__title {
    margin: 0 0 18px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ms-lead, #5E60A9);
}

.ms-co-summary__line {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--ms-edge, rgba(53,41,116,0.06));
}

.ms-co-summary__line-label {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: var(--ms-ink, #352974);
    letter-spacing: -0.01em;
    margin-bottom: 2px;
}

.ms-co-summary__line-meta {
    display: block;
    font-size: 13px;
    color: var(--ms-lead, #5E60A9);
}

.ms-co-summary__rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.ms-co-summary__row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--ms-lead, #5E60A9);
}

.ms-co-summary__row span:last-child {
    color: var(--ms-ink, #352974);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.ms-co-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--ms-edge-strong, rgba(53,41,116,0.12));
    flex-wrap: nowrap;
}

.ms-co-summary__total-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ms-lead, #5E60A9);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.3;
}

.ms-co-summary__total-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--ms-ink, #352974);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}

.ms-co-summary__today {
    margin-top: 12px;
    padding: 12px 14px;
    background: var(--ms-healthy-light, rgba(16,185,129,0.08));
    border: 1px solid var(--ms-healthy-border, rgba(16,185,129,0.2));
    border-radius: var(--ms-radius-sm, 10px);
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #065F46;
    font-weight: 600;
}

.ms-co-summary__today strong {
    font-size: 17px;
    font-weight: 800;
}

.ms-co-summary__mobile-toggle {
    display: none;
}

/* ───────── Mobile: Summary als Bottom-Bar ───────── */

@media (max-width: 960px) {
    .ms-co-shell {
        grid-template-columns: 1fr;
        grid-template-areas:
            "top"
            "main"
            "actions";
        padding: 20px 16px 120px;
    }

    .ms-co-actions-bar {
        margin-top: 0;
        padding-top: 16px;
    }

    /* Summary-Offset auf Mobile resetten (auf Mobile ist Summary fixed-bottom). */
    .ms-co-summary {
        margin-top: 0;
    }

    .ms-co-topbar {
        gap: 12px;
        padding: 10px 14px;
        border-radius: var(--ms-radius-md);
    }

    .ms-co-progress__label {
        display: none;
    }

    .ms-co-progress__item {
        padding: 4px;
    }

    .ms-co-progress__item::after {
        width: 12px;
    }

    .ms-co-summary {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        z-index: 50;
    }

    .ms-co-summary__inner {
        display: none;
        position: fixed;
        bottom: 72px;
        left: 12px;
        right: 12px;
        max-height: 70vh;
        overflow-y: auto;
        border-radius: var(--ms-radius-md);
        box-shadow: var(--ms-shadow-xl, 0 20px 60px rgba(53,41,116,0.2));
    }

    .ms-co-summary.is-open .ms-co-summary__inner {
        display: block;
    }

    .ms-co-summary__mobile-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 14px 20px;
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border: 0;
        border-top: 1px solid var(--ms-edge, rgba(53,41,116,0.06));
        box-shadow: 0 -4px 20px rgba(53,41,116,0.08);
        font-family: inherit;
        font-size: 15px;
        color: var(--ms-ink, #352974);
        font-weight: 700;
        cursor: pointer;
        position: relative;
    }

    .ms-co-summary__mobile-toggle::before {
        content: '';
        position: absolute;
        top: -1px;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--ms-gradient-brand, linear-gradient(90deg, #EE711E, #E71F81, #20509D));
        opacity: 0.4;
    }

    .ms-co-summary__mobile-hint {
        font-size: 13px;
        font-weight: 600;
        color: var(--ms-signal, #E73159);
    }

    .ms-co-hero {
        margin: 20px 0 28px;
    }

    .ms-co-trust {
        grid-template-columns: 1fr;
    }

    .ms-co-timeline__steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ms-co-timeline__track {
        display: none;
    }

    .ms-co-timeline__step {
        flex-direction: row;
        align-items: center;
        text-align: left;
        justify-content: flex-start;
        gap: 14px;
    }

    .ms-co-timeline__dot {
        margin: 0;
    }

    .ms-co-timeline__label,
    .ms-co-timeline__meta {
        display: block;
    }

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

    .ms-co-form-row:has(.ms-co-field--short),
    .ms-co-form-row--addr {
        grid-template-columns: 1fr 1fr;
    }

    .ms-co-step-actions {
        flex-direction: column-reverse;
    }

    .ms-co-step-actions .ms-co-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .ms-co-shell {
        padding: 14px 12px 120px;
    }

    .ms-co-brand__wordmark {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   THANK-YOU PAGE
   ═══════════════════════════════════════════════════════════════ */

.ms-body--thankyou { overflow-x: hidden; }

.ms-co-confetti {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 40;
}

.ms-co-mesh--celebrate .ms-co-mesh__orb {
    opacity: 0.7;
    animation-duration: 14s;
}

.ms-co-thankyou {
    position: relative;
    z-index: 1;
    max-width: 880px;
    margin: 0 auto;
    padding: 28px 32px 80px;
    min-height: 100vh;
}

.ms-co-topbar--thankyou {
    justify-content: center;
    margin-bottom: 48px;
}

.ms-co-thanks-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ms-co-thanks-check {
    margin: 16px 0 32px;
    animation: ms-co-check-pop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes ms-co-check-pop {
    0% { transform: scale(0.4); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.ms-co-thanks-check__ring {
    fill: none;
    stroke: url(#ms-co-grad);
    stroke-width: 4;
    stroke-dasharray: 226;
    stroke-dashoffset: 0;
    animation: ms-co-ring-draw 1s ease-out 0.3s both;
}

.ms-co-thanks-check__ring,
.ms-co-thanks-check svg {
    stroke: var(--ms-signal, #E73159);
}

.ms-co-thanks-check svg circle {
    fill: none;
    stroke: var(--ms-signal, #E73159);
    stroke-width: 3;
}

.ms-co-thanks-check svg path {
    stroke: var(--ms-signal, #E73159);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: ms-co-check-draw 0.6s ease-out 0.9s forwards;
}

@keyframes ms-co-check-draw {
    to { stroke-dashoffset: 0; }
}

.ms-co-thanks-hero {
    max-width: 720px;
    margin-bottom: 36px;
}

.ms-co-thanks-hero .ms-co-hero__subline {
    margin-left: auto;
    margin-right: auto;
}

.ms-co-thanks-order {
    width: 100%;
    max-width: 680px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--ms-edge, rgba(53,41,116,0.06));
    border-radius: var(--ms-radius-md, 16px);
    padding: 24px 28px;
    box-shadow: var(--ms-shadow-md);
    margin-bottom: 40px;
    animation: ms-co-fade-up 0.7s ease-out 0.7s both;
}

.ms-co-thanks-order__grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr 1fr;
    gap: 24px;
    text-align: left;
}

.ms-co-thanks-order__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ms-ghost, #8B8DB8);
    margin-bottom: 4px;
}

.ms-co-thanks-order__value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--ms-ink, #352974);
}

.ms-co-thanks-order__value--big {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ms-co-thanks-next {
    width: 100%;
    max-width: 680px;
    text-align: left;
    animation: ms-co-fade-up 0.8s ease-out 0.9s both;
}

.ms-co-thanks-next__title {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 700;
    color: var(--ms-ink, #352974);
    letter-spacing: -0.01em;
    text-align: center;
}

.ms-co-thanks-next__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ms-co-thanks-next__item {
    display: flex;
    gap: 18px;
    padding: 22px 24px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--ms-edge, rgba(53,41,116,0.06));
    border-radius: var(--ms-radius-md, 16px);
    box-shadow: var(--ms-shadow-sm);
}

.ms-co-thanks-next__num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ms-gradient-brand, linear-gradient(135deg, #EE711E, #E71F81 50%, #20509D));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(231,31,129,0.3);
}

.ms-co-thanks-next__item-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ms-ink, #352974);
}

.ms-co-thanks-next__item-desc {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ms-lead, #5E60A9);
}

.ms-co-thanks-next__item-desc:last-child {
    margin-bottom: 0;
}

.ms-co-thanks-next__item .ms-co-btn {
    margin-top: 4px;
}

.ms-co-thanks-footer {
    margin-top: 48px;
    font-size: 13px;
    color: var(--ms-lead, #5E60A9);
    text-align: center;
}

.ms-co-thanks-footer a {
    color: var(--ms-signal, #E73159);
    text-decoration: none;
    font-weight: 600;
}

.ms-co-thanks-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 720px) {
    .ms-co-thanks-order__grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ms-co-thanks-next__item {
        padding: 18px 18px;
        gap: 14px;
    }
}

/* Block 14 D-08: Mobile Sticky-Bottom-Summary fuer Checkout.
   Order-Summary-Card wird auf Mobile zur sticky-Bar am unteren Bildschirmrand
   damit User auf jedem Step das Total sieht ohne zu scrollen. */
@media (max-width: 720px) {
    .ms-co-summary {
        position: sticky;
        bottom: 0;
        z-index: 50;
        background: var(--ms-surface);
        border-top: 1px solid var(--ms-edge);
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        box-shadow: 0 -8px 16px -4px rgba(53, 41, 116, 0.12);
        margin-top: var(--ms-space-4) !important;
    }
    .ms-co-summary__inner {
        padding: 14px 16px !important;
    }
    .ms-co-summary__title {
        font-size: var(--ms-fs-sm) !important;
        margin-bottom: 6px !important;
    }
    .ms-co-summary__line {
        padding: 4px 0 !important;
        font-size: var(--ms-fs-xs) !important;
    }
    .ms-co-summary__line--total {
        padding-top: 8px !important;
        font-size: var(--ms-fs-base) !important;
        font-weight: 700;
    }
}
