/**
 * SachsMarketing ImmobilienWertanalyse Pro - Wizard Styles
 * Premium Dark Design mit Gold-Akzenten
 * v1.0.0
 */

/* ── Design Tokens ──────────────────────────────────────────────────────────── */
:root {
    --sw-primary: #c9a84c;
    --sw-primary-dark: #b3913a;
    --sw-primary-light: #d4b55a;
    --sw-primary-glow: rgba(201, 168, 76, 0.3);
    --sw-bg-dark: #0f172a;
    --sw-surface: #1e2a3a;
    --sw-surface-hover: #253347;
    --sw-surface-light: rgba(15, 23, 42, 0.4);
    --sw-text-main: #f8fafc;
    --sw-text-muted: #94a3b8;
    --sw-border: rgba(201, 168, 76, 0.2);
    --sw-border-subtle: rgba(255, 255, 255, 0.06);
    --sw-green: #22c55e;
    --sw-green-bg: rgba(34, 197, 94, 0.15);
    --sw-yellow: #f0c040;
    --sw-orange: #f97316;
    --sw-red: #ef4444;
    --sw-radius: 12px;
    --sw-radius-lg: 20px;
    --sw-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sw-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --sw-font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --sw-font-heading: 'Lora', Georgia, serif;
}

/* ── Wizard Container ────────────────────────────────────────────────────────── */
.sw-wizard-wrap {
    position: relative;
    width: 100%;
    max-width: 650px;
    margin: 40px auto;
    padding: 40px;
    background: var(--sw-surface);
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius-lg);
    box-shadow: var(--sw-shadow);
    font-family: var(--sw-font-main);
    color: var(--sw-text-main);
}

/* ── Progress Bar ────────────────────────────────────────────────────────────── */
.sw-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 40px;
    overflow: hidden;
}
.sw-progress-fill {
    height: 100%;
    width: 10%;
    background: linear-gradient(90deg, var(--sw-primary), #eab308);
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Steps ───────────────────────────────────────────────────────────────────── */
.sw-step {
    display: none;
    animation: swFadeIn 0.4s ease;
}
.sw-step.active {
    display: block;
}
@keyframes swFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.sw-step-title {
    font-family: var(--sw-font-heading);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--sw-primary);
}
.sw-step-subtitle {
    font-size: 16px;
    color: var(--sw-text-muted);
    margin-bottom: 35px;
    line-height: 1.5;
}

/* ── Labels ──────────────────────────────────────────────────────────────────── */
.sw-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--sw-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.sw-optional {
    opacity: 0.5;
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0;
}

/* ── Inputs & Selects ────────────────────────────────────────────────────────── */
.sw-input {
    width: 100%;
    padding: 16px 20px;
    background: var(--sw-surface-light);
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius);
    color: #fff;
    font-size: 18px;
    font-family: var(--sw-font-main);
    margin-bottom: 25px;
    transition: var(--sw-transition);
    -webkit-appearance: none;
    appearance: none;
}
.sw-input:focus {
    outline: none;
    border-color: var(--sw-primary);
    box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.15);
}
select.sw-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}
select.sw-input option {
    background: var(--sw-surface);
    color: #fff;
}
.sw-textarea {
    resize: vertical;
    min-height: 80px;
    font-size: 16px;
}

/* ── Radio Cards ─────────────────────────────────────────────────────────────── */
.sw-radio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 25px;
}
.sw-radio-grid-2 { grid-template-columns: 1fr 1fr; }
.sw-radio-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.sw-radio-grid-4 { grid-template-columns: repeat(4, 1fr); }

.sw-radio-card {
    border: 1px solid var(--sw-border);
    padding: 16px 12px;
    border-radius: var(--sw-radius);
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    transition: var(--sw-transition);
    background: rgba(15, 23, 42, 0.2);
    color: var(--sw-text-muted);
    user-select: none;
}
.sw-radio-card:hover {
    border-color: var(--sw-primary);
    background: rgba(201, 168, 76, 0.05);
    transform: translateY(-2px);
}
.sw-radio-card.selected {
    border-color: var(--sw-primary);
    background: var(--sw-primary);
    color: #1e2a3a;
    box-shadow: 0 10px 15px -3px var(--sw-primary-glow);
}
.sw-radio-card input {
    display: none;
}

/* ── Conditional Blocks ──────────────────────────────────────────────────────── */
.sw-conditional-block {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: var(--sw-radius);
    margin-bottom: 20px;
    border: 1px solid var(--sw-border-subtle);
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.sw-btn-flex {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    gap: 12px;
}
.sw-btn {
    padding: 16px 32px;
    border-radius: var(--sw-radius);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--sw-transition);
    font-family: var(--sw-font-main);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}
.sw-btn-primary {
    background: var(--sw-primary);
    color: #1e2a3a;
    box-shadow: 0 10px 15px -3px var(--sw-primary-glow);
}
.sw-btn-primary:hover {
    background: var(--sw-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(201, 168, 76, 0.4);
}
.sw-btn-outline {
    background: transparent;
    color: var(--sw-text-muted);
    border: 1px solid var(--sw-border);
}
.sw-btn-outline:hover {
    color: #fff;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}
.sw-btn-checkout {
    width: 100%;
    margin-top: 20px;
    font-size: 18px;
    padding: 18px;
}
.sw-btn-test {
    width: 100%;
    margin-top: 10px;
    font-size: 16px;
    padding: 14px;
    background: transparent;
    border: 1px solid var(--sw-primary);
    color: var(--sw-primary);
    box-shadow: none;
}
.sw-btn-test:hover {
    background: rgba(201, 168, 76, 0.1);
}
.sw-btn-bailout {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--sw-text-muted);
    border: 1px solid var(--sw-border-subtle);
}
.sw-btn-bailout:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.sw-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ── Divider ─────────────────────────────────────────────────────────────────── */
.sw-divider {
    border: 0;
    border-top: 1px solid var(--sw-border);
    margin: 30px 0;
}

/* ── DSGVO Checkbox ──────────────────────────────────────────────────────────── */
.sw-dsgvo {
    font-size: 12px;
    color: var(--sw-text-muted);
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.sw-dsgvo input[type="checkbox"] {
    width: auto;
    margin-top: 2px;
    accent-color: var(--sw-primary);
}
.sw-dsgvo a {
    color: var(--sw-primary);
}

/* ── Payment Note ────────────────────────────────────────────────────────────── */
.sw-payment-note {
    text-align: center;
    font-size: 11px;
    margin-top: 10px;
    color: var(--sw-text-muted);
}

/* ── Result Panel ────────────────────────────────────────────────────────────── */
.sw-result-panel {
    text-align: center;
    padding: 20px 0;
}
.sw-result-badge {
    display: inline-block;
    background: var(--sw-green-bg);
    color: var(--sw-green);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}
.sw-result-heading {
    font-family: var(--sw-font-heading);
    font-size: 28px;
    margin-bottom: 10px;
    color: #fff;
}
.sw-result-meta {
    color: var(--sw-text-muted);
    margin-bottom: 20px;
    font-size: 14px;
}
.sw-result-price {
    font-size: 42px;
    font-weight: 800;
    color: var(--sw-primary);
    margin: 20px 0;
    letter-spacing: -1px;
}
.sw-score-pill {
    display: inline-block;
    background: var(--sw-green-bg);
    color: var(--sw-green);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 25px;
}
.sw-result-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--sw-text-main);
    margin-bottom: 10px;
}

/* ── Premium Box ─────────────────────────────────────────────────────────────── */
.sw-premium-box {
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: var(--sw-radius);
    padding: 28px;
    margin-top: 30px;
    text-align: left;
}
.sw-premium-box h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 20px;
}
.sw-premium-features {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sw-premium-features li {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--sw-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.sw-premium-features li::before {
    content: '✓';
    color: var(--sw-primary);
    font-weight: bold;
    flex-shrink: 0;
}

/* ── Bailout ─────────────────────────────────────────────────────────────────── */
.sw-bailout {
    margin-top: 20px;
}
.sw-bailout-divider {
    text-align: center;
    color: var(--sw-text-muted);
    font-size: 13px;
    margin-bottom: 12px;
}

/* ── Loading Overlay ─────────────────────────────────────────────────────────── */
.sw-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--sw-radius-lg);
    z-index: 50;
    backdrop-filter: blur(4px);
}
.sw-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--sw-border);
    border-top-color: var(--sw-primary);
    border-radius: 50%;
    animation: swSpin 0.8s linear infinite;
    margin-bottom: 20px;
}
@keyframes swSpin {
    to { transform: rotate(360deg); }
}
.sw-loading-text {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--sw-primary);
}
.sw-loading-subtext {
    font-size: 14px;
    color: var(--sw-text-muted);
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sw-wizard-wrap {
        margin: 20px auto;
        padding: 24px 20px;
        border-radius: 16px;
    }
    .sw-step-title {
        font-size: 22px;
    }
    .sw-radio-grid {
        grid-template-columns: 1fr 1fr;
    }
    .sw-radio-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
    .sw-radio-grid-4 {
        grid-template-columns: 1fr 1fr;
    }
    .sw-radio-card {
        padding: 12px 8px;
        font-size: 13px;
    }
    .sw-result-price {
        font-size: 32px;
    }
    .sw-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
    .sw-btn-flex {
        flex-direction: column-reverse;
        gap: 10px;
    }
    .sw-btn-flex .sw-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .sw-wizard-wrap {
        padding: 20px 16px;
    }
    .sw-step-title {
        font-size: 20px;
    }
    .sw-input {
        font-size: 16px;
        padding: 14px 16px;
    }
    .sw-radio-grid-4 {
        grid-template-columns: 1fr 1fr;
    }
    .sw-result-price {
        font-size: 28px;
    }
}
