/* ═══════════════════════════════════════════════════════════════════════════
   Pure Exterior — Publieke Configurator
   Theme: light minimalist — Stripe/Linear/Vercel aesthetic
   Font: Inter (body + display)
   Mobile-first, full-width. Class names match existing HTML + configurator.js.
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ─── Reset / base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

/* ─── Design tokens ──────────────────────────────────────────────────────── */
:root {
    --bg:                #ffffff;
    --bg-subtle:         #fafafa;
    --bg-muted:          #f4f4f5;
    --surface:           #ffffff;
    --border:            #e8e8ec;
    --border-strong:     #d4d4d8;

    --text:              #0a0a0a;
    --text-muted:        #52525b;
    --text-faint:        #a1a1aa;

    --accent:            #0a0a0a;
    --accent-blue:       #4a7fd6;
    --accent-blue-bg:    #eef3fc;

    /* Brand dark blue — used for hand-drawn house lines */
    --brand-blue:        #1e3a8a;
    --brand-blue-strong: #172e6e;
    --brand-blue-wash:   rgba(30, 58, 138, 0.08);
    --brand-blue-wash-2: rgba(30, 58, 138, 0.18);

    --error:             #dc2626;
    --error-bg:          #fef2f2;
    --error-border:      #fecaca;
    --success:           #16a34a;
    --success-bg:        #f0fdf4;
    --success-border:    #bbf7d0;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.10);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --max-w:     1400px;
    --content-w: 880px;
    --gutter:    clamp(1.25rem, 4vw, 2.5rem);
    --ease:      cubic-bezier(0.16, 1, 0.3, 1);

    /* ── Spacing scale (8px-grid, base = --space-1 = 0.5rem) ──
       Canonieke schaal voor alle padding, margin en gap. Cross-surface
       identiek met admin (--space-*) en portaal (--pe-space-*).
       Conventie:
         --space-1 (0.5rem)  micro: pill-padding, icon-gap
         --space-2 (1rem)    base: card-padding, gap binnen rij
         --space-3 (1.5rem)  step-vertical, card-rij-gap
         --space-4 (2rem)    step-tot-step, page-gutter mobile
         --space-5 (3rem)    page-gutter desktop, hero-spacing
         --space-6 (4rem)    page-margin-bottom, grote vertical rhythm
       --space-half (0.25rem) alleen voor extreme finetuning, niet aanbevolen. */
    --space-half: 0.25rem;
    --space-1:    0.5rem;
    --space-2:    1rem;
    --space-3:    1.5rem;
    --space-4:    2rem;
    --space-5:    3rem;
    --space-6:    4rem;
}

/* ─── Global ─────────────────────────────────────────────────────────────── */
body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { max-width: 100%; display: block; }

::selection { background: var(--text); color: var(--bg); }

.d-none { display: none !important; }

/* ─── Steam atmosphere (decorative background) ──────────────────────────────
   Geïnspireerd op het admin-dashboard. 48 drijvende wolkjes, subtiele
   witte/blauwe radial-gradients die traag opstijgen. Lichte intensiteit voor
   leesbaarheid op wit. Uitgezet bij prefers-reduced-motion. */

#bg-atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Zorgt dat content altijd boven de stoom ligt */
.page-wrapper { position: relative; z-index: 1; }

.steam-puff {
    position: absolute;
    bottom: var(--steam-start, -200px);
    width: var(--steam-size, 420px);
    height: var(--steam-size, 420px);
    margin-left: calc(var(--steam-size, 420px) / -2);
    border-radius: 50%;
    /* Neutraler grijs met zeer lichte blauwe ondertoon, past bij sketch-stijl */
    background: radial-gradient(
        circle at 50% 50%,
        rgba(216, 218, 224, 0.82) 0%,
        rgba(204, 208, 215, 0.50) 32%,
        rgba(188, 193, 203, 0.22) 60%,
        transparent 82%
    );
    /* Dunne ballpoint-blauwe outline — sketch-identiteit */
    border: 1px solid rgba(30, 58, 138, 0.18);
    filter: blur(4px);
    opacity: 0;
    will-change: transform, opacity;
    animation: steamDrift var(--steam-dur, 26s) linear var(--steam-delay, 0s) infinite;
}

@keyframes steamDrift {
    0%   { transform: translate(0, 0) scale(0.7);                                  opacity: 0; }
    14%  {                                                                          opacity: 0.72; }
    85%  {                                                                          opacity: 0.55; }
    100% { transform: translate(var(--steam-spread, 0px), -120vh) scale(1.6);      opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .steam-puff { animation: none !important; opacity: 0 !important; }
}

/* ─── Page wrapper ───────────────────────────────────────────────────────── */
.page-wrapper {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.pe-page { padding: clamp(2rem, 5vw, 4rem) 0 5rem; }

/* ─── Site header (full-width glass bar) ─────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    /* z-index 200 = boven de popup overlay (100) zodat nav toegankelijk blijft */
    z-index: 200;
    width: 100%;
    background: rgba(255, 255, 255, 0.68);
    backdrop-filter: saturate(180%) blur(22px);
    -webkit-backdrop-filter: saturate(180%) blur(22px);
    border-bottom: 1px solid rgba(232, 232, 236, 0.7);
    box-shadow:
        inset 0 -1px 0 rgba(255, 255, 255, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.35),
        0 4px 18px rgba(10, 10, 10, 0.04);
    transition: box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0.7rem var(--gutter);
}

/* Wanneer de popup open is — sterkere blur + schaduw zodat de header duidelijk
   boven de overlay drijft en het "glas"-effect krachtig aanvoelt. */
body.cfg-sheet-active .site-header {
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: saturate(190%) blur(28px);
    -webkit-backdrop-filter: saturate(190%) blur(28px);
    box-shadow: 0 8px 24px rgba(10, 10, 10, 0.1);
    border-bottom-color: rgba(232, 232, 236, 0.55);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    transition: opacity 0.15s var(--ease);
}

.header-brand:hover { opacity: 0.78; }

.header-logo-wrap {
    position: relative;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.header-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Hide the spray-drop decoration — not aligned with minimalist theme */
.spray-drop { display: none; }

/* Hide the farmhouse sketch in the header */
.header-sketch { display: none; }

.header-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.header-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

.header-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    transition: all 0.15s var(--ease);
}

.header-contact-link:hover {
    color: var(--text);
    border-color: var(--text);
    background: var(--bg-subtle);
}

/* ─── Primaire navigatie (admin-style pill, ingebed in header) ──────────────
   Zit midden in de glas-balk. Subtielere achtergrond omdat het al op glas ligt. */
.primary-nav {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.25rem;
    background: rgba(10, 10, 10, 0.04);
    border: 1px solid rgba(10, 10, 10, 0.05);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 0 1 auto;
    min-width: 0;
}

.primary-nav::-webkit-scrollbar { display: none; }

.primary-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    background: transparent;
    border: none;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition:
        color 0.18s var(--ease),
        background 0.18s var(--ease),
        box-shadow 0.18s var(--ease);
}

.primary-nav-item svg {
    opacity: 0.7;
    flex-shrink: 0;
    transition: opacity 0.18s var(--ease), color 0.18s var(--ease);
}

.primary-nav-item:hover:not(.active) {
    color: var(--text);
    background: rgba(10, 10, 10, 0.04);
}

.primary-nav-item:hover:not(.active) svg { opacity: 1; }

.primary-nav-item.active {
    color: var(--text);
    background: #ffffff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 2px 8px rgba(10, 10, 10, 0.08),
        0 0 0 1px rgba(10, 10, 10, 0.04);
    font-weight: 600;
}

.primary-nav-item.active svg {
    opacity: 1;
    color: var(--accent-blue);
}

.primary-nav-item:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.primary-nav-sep {
    display: inline-block;
    width: 1px;
    height: 18px;
    background: var(--border);
    margin: 0 0.25rem;
    flex-shrink: 0;
}

/* Contact-link op kleine schermen: verberg tekst, alleen icoon */
@media (max-width: 520px) {
    .header-contact-link span { display: none; }
    .header-contact-link { padding: 0.5rem; width: 40px; height: 40px; justify-content: center; }
}

/* Smaller nav pill on mobile */
@media (max-width: 640px) {
    .primary-nav {
        margin: 0.9rem auto 1.25rem;
        padding: 0.25rem;
    }
    .primary-nav-item {
        padding: 0.5rem 0.85rem;
        font-size: 0.82rem;
        gap: 0.35rem;
    }
    .primary-nav-sep { display: none; }
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.pe-hero {
    text-align: center;
    padding: clamp(2.5rem, 6vw, 5rem) 1rem clamp(2rem, 5vw, 4rem);
    max-width: 780px;
    margin: 0 auto;
}

.pe-hero h1 {
    font-weight: 600;
    font-size: clamp(2.25rem, 5.5vw, 3.75rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 1.25rem;
}

.pe-hero p {
    font-size: clamp(1.02rem, 1.35vw, 1.2rem);
    color: var(--text-muted);
    line-height: 1.55;
    max-width: 54ch;
    margin: 0 auto 2rem;
}

.pe-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 1.6rem;
    background: var(--text);
    color: var(--bg);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    transition: background 0.15s var(--ease);
}

.pe-hero-cta:hover { background: #262626; }

/* ─── Trust strip — vlak boven configurator ──────────────────────────────── */
.pe-trust-strip {
    list-style: none;
    margin: 0 auto 1rem;
    padding: 0.65rem 1rem;
    max-width: 1200px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-xs);
}

.pe-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: var(--text-muted, #52525b);
    line-height: 1.2;
}

.pe-trust-item svg {
    color: var(--brand-blue, #4a7fd6);
    flex-shrink: 0;
}

.pe-trust-item strong {
    color: var(--text);
    font-weight: 600;
}

@media (max-width: 640px) {
    .pe-trust-strip {
        border-radius: var(--radius-md);
        padding: 0.55rem 0.75rem;
        gap: 0.4rem 1rem;
    }
    .pe-trust-item {
        font-size: 0.78rem;
        gap: 0.35rem;
    }
}

/* ─── Configurator shell ─────────────────────────────────────────────────── */
#pe-configurator {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 3rem) clamp(1.25rem, 3vw, 2.5rem);
    box-shadow: var(--shadow-xs);
}

/* ─── Photo step — analyse-tips card ─────────────────────────────────────── */
.pe-photo-tips {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem 0.85rem 1rem;
    background: var(--accent-blue-bg, #f1f5fb);
    border: 1px solid var(--accent-blue, #d3dff1);
    border-left: 3px solid var(--brand-blue, #4a7fd6);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pe-photo-tips-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brand-blue-strong, #1e3a8a);
}

.pe-photo-tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pe-photo-tips-list li {
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.pe-photo-tips-list li > span:first-child {
    font-size: 1rem;
    flex-shrink: 0;
    line-height: 1.3;
}

.pe-photo-tips-list strong {
    font-weight: 600;
}

/* ─── Submit reassurance — micro-trust net boven submit-knop ─────────────── */
.pe-submit-reassurance {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.25rem;
    margin: 1rem 0 0.5rem;
    padding: 0;
    font-size: 0.82rem;
    color: var(--text-muted, #52525b);
}

.pe-submit-reassurance span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1.3;
}

.pe-submit-reassurance svg {
    color: var(--brand-blue, #4a7fd6);
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .pe-submit-reassurance {
        font-size: 0.76rem;
        gap: 0.3rem 0.85rem;
    }
}

/* ─── Progress indicator ─────────────────────────────────────────────────── */
.pe-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.pe-progress-steps {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pe-step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-muted);
    color: var(--text-faint);
    display: grid;
    place-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    position: relative;
    transition: all 0.2s var(--ease);
}

.pe-step-indicator::after {
    content: "";
    position: absolute;
    top: 50%;
    left: calc(100% + 2px);
    width: 0.75rem;
    height: 1px;
    background: var(--border);
    transform: translateY(-50%);
}

.pe-step-indicator:last-child::after { display: none; }

.pe-step-indicator.active {
    background: var(--text);
    color: var(--bg);
}

.pe-step-indicator.done {
    background: var(--success);
    color: #fff;
}

.pe-progress-labels {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pe-progress-labels span {
    text-align: center;
    min-width: 80px;
}

/* ─── Loading / success states ───────────────────────────────────────────── */
.pe-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.pe-spinner {
    width: 36px;
    height: 36px;
    border: 2.5px solid var(--border);
    border-top-color: var(--text);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 0.8s linear infinite;
}

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

.pe-success {
    text-align: center;
    padding: 2.5rem 1rem;
    max-width: 520px;
    margin: 0 auto;
}

.pe-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    color: var(--success);
    background: var(--success-bg);
    border-radius: 50%;
    padding: 10px;
}

.pe-success-icon svg { width: 100%; height: 100%; }
.pe-success-icon svg path,
.pe-success-icon svg circle { stroke: var(--success); }

.pe-success h2 {
    font-weight: 600;
    font-size: 1.65rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.pe-success-ref {
    display: inline-block;
    font-size: 0.82rem;
    color: var(--text-faint);
    margin-bottom: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, monospace;
}

.pe-success p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ─── Step panels ────────────────────────────────────────────────────────── */
.pe-step { animation: fadeIn 0.3s var(--ease); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pe-step-header {
    margin-bottom: 2rem;
    text-align: center;
}

.pe-step-title {
    font-weight: 600;
    font-size: clamp(1.45rem, 2.4vw, 1.8rem);
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.pe-step-sub {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 54ch;
    margin: 0 auto;
    line-height: 1.5;
}

.pe-step-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid var(--error-border);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 1.25rem;
}

.pe-step-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* ─── Config hero (house + sidebar) ──────────────────────────────────────── */
.cfg-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: clamp(1.25rem, 2.5vw, 2rem);
    align-items: start;
    margin-bottom: 0.5rem;
}

@media (max-width: 960px) {
    .cfg-hero { grid-template-columns: minmax(0, 1fr); }
    .cfg-side-col { position: static; top: auto; }
}

/* House area — Insta-Highlights style: icon row on top, SVG below */
.cfg-house-wrap {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(0.5rem, 1.5vw, 1rem);
    position: relative;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.cfg-house-svg-container {
    flex: 1 1 0%;
    min-width: 0;
    /* Match container aspect to SVG viewBox (1200x700 ≈ 12/7) */
    aspect-ratio: 12 / 7;
    position: relative;
    display: block;
}

.cfg-house-svg-container svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: 640px;
    stroke: var(--brand-blue);
    display: block;
}

/* ─── SVG stroke overrides — make hand-drawn lines dark blue ─────────────── */
.cfg-house-svg-container svg .pe-ink {
    stroke: var(--brand-blue) !important;
}

.cfg-house-svg-container svg [class="pe-ink"],
.cfg-house-svg-container svg .pe-ink[stroke] {
    stroke: var(--brand-blue) !important;
}

.cfg-house-svg-container svg line[stroke="#e8eef8"],
.cfg-house-svg-container svg path[stroke="#e8eef8"],
.cfg-house-svg-container svg polygon[stroke="#e8eef8"],
.cfg-house-svg-container svg polyline[stroke="#e8eef8"],
.cfg-house-svg-container svg circle[stroke="#e8eef8"],
.cfg-house-svg-container svg rect[stroke="#e8eef8"] {
    stroke: var(--brand-blue) !important;
}

.cfg-house-svg-container svg .pe-label-line { stroke: var(--brand-blue) !important; opacity: 0.35 !important; }
.cfg-house-svg-container svg .pe-label-text { fill: var(--brand-blue) !important; opacity: 0.7 !important; }
.cfg-house-svg-container svg .pe-smoke-puff { fill: var(--brand-blue) !important; }
.cfg-house-svg-container svg .pe-check-path { stroke: var(--brand-blue-strong) !important; }

/* Hover + selected fills — light blue wash (was invisible white on white) */
.cfg-house-svg-container svg .pe-fill {
    fill: var(--brand-blue-wash) !important;
}

.cfg-house-svg-container svg .pe-surface.pe-selected .pe-fill,
.cfg-house-svg-container svg .pe-surface.selected .pe-fill {
    fill: var(--brand-blue-wash-2) !important;
}

.cfg-house-svg-container svg .pe-focus {
    stroke: var(--brand-blue) !important;
}

.cfg-surface-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

/* ── Icon-pill column — sits left of the house on desktop, row above on mobile ─
   Each pill = horizontal button with icon left, label right. Always visible
   (no hover-required reveal — works on touch).
   Selected state: brand-blue fill with white icon/label.                      */
.cfg-surface-icons {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 1.2vw, 0.9rem);
    width: fit-content;
    max-width: 100%;
    margin: 0.9rem auto 0;
    padding: 0.65rem 0.9rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(250, 250, 252, 0.7) 100%);
    border: 0.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 8px 24px -8px rgba(15, 23, 42, 0.08);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
}

.cfg-icon-ball {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    flex: 0 0 auto;
    width: 64px;
    background: transparent;
    border: none;
    padding: 0.15rem 0.1rem;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
    line-height: 1.1;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s var(--ease);
}

.cfg-icon-ball:hover {
    transform: translateY(-1px);
}

.cfg-icon-ball:focus-visible {
    outline: none;
}

.cfg-icon-ball:focus-visible .cfg-icon-ball-thumb {
    box-shadow: 0 0 0 3px var(--accent-blue);
}

.cfg-icon-ball.icon-selected {
    background: transparent;
    border: none;
}

.cfg-icon-ball-thumb {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    width: clamp(40px, 5.5vw, 52px);
    height: clamp(40px, 5.5vw, 52px);
    line-height: 1;
    border-radius: 14px;
    /* Insta-style thin gradient ring */
    background: linear-gradient(135deg, #4a7fd6 0%, #1e3a8a 100%);
    padding: 2px;
    box-sizing: border-box;
    transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.cfg-icon-ball:hover .cfg-icon-ball-thumb {
    box-shadow: 0 4px 14px rgba(30, 58, 138, 0.18);
}

.cfg-icon-ball.icon-selected .cfg-icon-ball-thumb {
    background: linear-gradient(135deg, #16a34a 0%, #14532d 100%);
}

.cfg-icon-ball-inner {
    font-size: clamp(1.05rem, 2.2vw, 1.4rem);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
}

.cfg-icon-ball-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--brand-blue-strong, #1e3a8a);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--surface), 0 1px 3px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    transition: background 0.15s var(--ease), transform 0.15s var(--ease);
}

.cfg-icon-ball.icon-selected .cfg-icon-ball-badge {
    background: #16a34a;
    box-shadow: 0 0 0 2px var(--brand-blue), 0 1px 3px rgba(0, 0, 0, 0.18);
}

.cfg-icon-ball.icon-selected .cfg-icon-ball-inner {
    background: var(--surface);
}

/* Image-based icon variant — photo crop fills the circle */
.cfg-icon-ball-inner--img {
    padding: 0;
    background: var(--bg-muted);
    overflow: hidden;
}

.cfg-icon-ball-inner--img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.cfg-icon-ball-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted, #52525b);
    letter-spacing: 0;
    line-height: 1.15;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 100%;
}

.cfg-icon-ball.icon-selected .cfg-icon-ball-label {
    color: var(--text);
    font-weight: 600;
}

/* ── Modern pill markers — rendered directly on the house illustration ──────
   These replace the old hover-only floating labels. Each pill sits at the
   (lx, ly) position matching the SVG surface, pointer-events enabled so
   clicking the pill opens the surface sheet directly.                       */
.cfg-surface-pill {
    position: absolute;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    height: 28px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(30, 58, 138, 0.18);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--brand-blue);
    white-space: nowrap;
    cursor: pointer;
    pointer-events: auto;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10), 0 0 0 1px rgba(255,255,255,0.7) inset;
    transition: background 0.15s var(--ease), color 0.15s var(--ease),
                border-color 0.15s var(--ease), box-shadow 0.15s var(--ease),
                transform 0.15s var(--ease);
    user-select: none;
    letter-spacing: 0.01em;
}

.cfg-surface-pill:hover {
    background: var(--brand-blue);
    color: #fff;
    border-color: var(--brand-blue);
    box-shadow: 0 3px 12px rgba(30,58,138,0.25);
    transform: translate(-50%, -50%) scale(1.05);
}

.cfg-surface-pill:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Selected state: dark blue background */
.cfg-surface-pill.pill-selected {
    background: var(--brand-blue);
    color: #fff;
    border-color: var(--brand-blue-strong);
    box-shadow: 0 3px 12px rgba(30,58,138,0.30);
}

.cfg-surface-pill.pill-selected:hover {
    background: var(--brand-blue-strong);
}

/* Pill icon (emoji) */
.cfg-surface-pill .pill-icon {
    font-size: 0.8rem;
    line-height: 1;
    flex-shrink: 0;
}

/* Pill label text */
.cfg-surface-pill .pill-label {
    line-height: 1.2;
}

/* Legacy label (hover tooltip) — kept for graceful fallback but now hidden */
.cfg-surface-label {
    display: none;
}

/* Surface hover/selected states on SVG groups */
.pe-surface {
    cursor: pointer;
    transition: opacity 0.15s var(--ease);
}

.pe-surface:hover,
.pe-surface.pe-hovered { opacity: 0.7; }

.pe-surface.selected .pe-ink,
.pe-surface.pe-selected .pe-ink {
    stroke: var(--brand-blue-strong) !important;
    stroke-width: 2.5 !important;
}

.pe-surface.selected,
.pe-surface.pe-selected {
    filter: drop-shadow(0 0 4px rgba(30, 58, 138, 0.35));
}

@keyframes pulse-once {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.pe-surface.pe-pulsing {
    transform-origin: center;
    transform-box: fill-box;
    animation: pulse-once 0.35s var(--ease);
}

/* ─── Right column wrapper (options sheet + selected list stacked) ───────── */
.cfg-side-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 6rem;
    align-self: start;
    min-width: 0;
}

/* ─── Sidebar (selected list) ────────────────────────────────────────────── */
.cfg-sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    min-height: 180px;
}

.cfg-sidebar-heading {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

.cfg-selected-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cfg-selected-empty {
    color: var(--text-faint);
    font-size: 0.9rem;
    text-align: center;
    padding: 1.75rem 0.5rem;
    line-height: 1.5;
}

.cfg-selected-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.85rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s var(--ease), transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.cfg-selected-row:hover { background: var(--bg-muted); }

.cfg-selected-row.removing {
    opacity: 0;
    transform: translateX(8px);
}

.cfg-selected-row .cfg-row-main {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex: 1;
    min-width: 0;
}

.cfg-selected-row .cfg-row-icon {
    font-size: 1.05rem;
    flex-shrink: 0;
}

.cfg-selected-row .cfg-row-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cfg-selected-row .cfg-row-name {
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.005em;
}

.cfg-selected-row .cfg-row-detail {
    font-size: 0.78rem;
    color: var(--text-faint);
    line-height: 1.3;
    margin-top: 0.1rem;
}

.cfg-selected-row .cfg-row-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.cfg-selected-row .cfg-row-edit,
.cfg-selected-row .cfg-row-remove {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: var(--text-faint);
    transition: all 0.15s var(--ease);
    font-size: 0.8rem;
}

.cfg-selected-row .cfg-row-edit:hover {
    background: var(--bg-muted);
    color: var(--text);
}

.cfg-selected-row .cfg-row-remove:hover {
    background: var(--error-bg);
    color: var(--error);
}

/* ─── Chosen options + hydrofuge nudge inside the selected row ───────────── */
.cfg-row-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding-left: 0.1rem;
}

.cfg-row-option {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.005em;
    white-space: nowrap;
}

.cfg-row-option--selected {
    background: var(--brand-blue-wash);
    color: var(--brand-blue-strong);
    border: 1px solid var(--brand-blue-wash-2);
}

.cfg-row-option--recommend {
    background: #fef9ec;
    color: #8a6300;
    border: 1px dashed #e8c66a;
}

.cfg-row-option-tag {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: rgba(138, 99, 0, 0.12);
    color: #8a6300;
}

/* ─── Surface-sheet modal (2-column: form | help) ───────────────────────── */
.cfg-surface-sheet[hidden] { display: none !important; }

.cfg-surface-sheet {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease);
}

.cfg-surface-sheet.sheet-open {
    opacity: 1;
    pointer-events: auto;
}

.cfg-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cfg-sheet-panel {
    position: relative;
    width: 100%;
    max-width: 880px;
    max-height: 90vh;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(14px) scale(0.985);
    transition: transform 0.25s var(--ease);
}

.cfg-surface-sheet.sheet-open .cfg-sheet-panel {
    transform: translateY(0) scale(1);
}

/* Two-column layout inside the sheet body */
.cfg-sheet-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    gap: clamp(1rem, 2.5vw, 2rem);
}

@media (max-width: 720px) {
    .cfg-sheet-grid { grid-template-columns: 1fr; }
}

.cfg-sheet-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    min-width: 0;
}

@media (max-width: 520px) {
    .cfg-sheet-form { grid-template-columns: 1fr; }
}

.cfg-sheet-help {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
    align-self: start;
}

.cfg-help-intro {
    color: var(--text);
    font-weight: 500;
    line-height: 1.5;
}

.cfg-help-section h4 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.005em;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cfg-help-section h4::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--brand-blue);
    display: inline-block;
}

.cfg-help-section p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* Right-column upsales block (shown once m² + materiaal zijn ingevuld) */
.cfg-help-prompt {
    background: var(--brand-blue-wash);
    border: 1px solid var(--brand-blue-wash-2);
    border-radius: var(--radius-md);
    padding: 0.85rem 0.95rem;
}

.cfg-help-prompt h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-blue);
    margin-bottom: 0.25rem;
    letter-spacing: -0.005em;
}

.cfg-help-prompt p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.cfg-upsales-block {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.cfg-upsales-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.cfg-upsales-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

.cfg-sheet-upsales-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.cfg-sheet-upsale-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.65rem;
    padding: 0.8rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s var(--ease);
}

.cfg-sheet-upsale-row:hover {
    border-color: var(--text-faint);
    background: var(--bg-subtle);
}

.cfg-sheet-upsale-row:has(input:checked) {
    border-color: var(--brand-blue);
    background: var(--brand-blue-wash);
}

.cfg-sheet-upsale-chk {
    width: 17px;
    height: 17px;
    margin: 0.2rem 0 0 0;
    accent-color: var(--brand-blue);
    cursor: pointer;
    flex-shrink: 0;
}

.cfg-sheet-upsale-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.cfg-sheet-upsale-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.3;
}

.cfg-sheet-upsale-name { font-weight: 600; }

.cfg-sheet-upsale-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.cfg-badge-same-day {
    background: rgba(30, 58, 138, 0.1);
    color: var(--brand-blue);
}

.cfg-badge-next-day {
    background: var(--bg-muted);
    color: var(--text-muted);
}

.cfg-sheet-upsale-purpose {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.cfg-sheet-upsale-meta {
    font-size: 0.74rem;
    color: var(--text-faint);
    line-height: 1.4;
    letter-spacing: 0.005em;
}

/* Form field / label / input styling inside the sheet */
.cfg-sheet-field { display: flex; flex-direction: column; gap: 0.35rem; }
.cfg-sheet-field.cfg-field-full { grid-column: 1 / -1; }

.cfg-sheet-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.005em;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.cfg-sheet-label-hint {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-faint);
}

.cfg-sheet-input,
.cfg-sheet-select,
.cfg-sheet-textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
    outline: none;
}

.cfg-sheet-input:focus,
.cfg-sheet-select:focus,
.cfg-sheet-textarea:focus {
    border-color: var(--text);
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.08);
}

.cfg-sheet-textarea { min-height: 68px; resize: vertical; line-height: 1.5; }

/* Radio cards (condition / access) */
.pe-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.pe-radio-card {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s var(--ease);
}

.pe-radio-card:hover {
    border-color: var(--text-faint);
    color: var(--text);
}

.pe-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pe-radio-card:has(input:checked) {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
}

.cfg-sheet-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 1.5rem;
}

.cfg-sheet-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.cfg-sheet-title {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}

.cfg-sheet-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    transition: all 0.15s var(--ease);
}

.cfg-sheet-close:hover {
    background: var(--bg-muted);
    color: var(--text);
}

.cfg-sheet-divider {
    height: 1px;
    background: var(--border);
}

.cfg-sheet-body {
    padding: 1.25rem 1.5rem 1.5rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cfg-sheet-body .cfg-sheet-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cfg-sheet-body label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.005em;
}

.cfg-sheet-body .cfg-sheet-hint {
    font-size: 0.8rem;
    color: var(--text-faint);
}

.cfg-sheet-body input[type="text"],
.cfg-sheet-body input[type="number"],
.cfg-sheet-body select,
.cfg-sheet-body textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
    outline: none;
}

.cfg-sheet-body input[type="text"]:focus,
.cfg-sheet-body input[type="number"]:focus,
.cfg-sheet-body select:focus,
.cfg-sheet-body textarea:focus {
    border-color: var(--text);
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.08);
}

.cfg-sheet-body textarea {
    min-height: 84px;
    resize: vertical;
}

.cfg-sheet-body .cfg-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cfg-sheet-body .cfg-radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s var(--ease);
}

.cfg-sheet-body .cfg-radio-group label:hover {
    border-color: var(--text-faint);
    color: var(--text);
}

.cfg-sheet-body .cfg-radio-group input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cfg-sheet-body .cfg-radio-group label:has(input:checked) {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
}

.cfg-sheet-footer {
    display: flex;
    gap: 0.6rem;
    padding: 1rem 1.5rem;
    background: var(--bg-subtle);
    border-top: 1px solid var(--border);
}

.btn-cfg-cancel,
.btn-cfg-add {
    flex: 1;
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    border: 1px solid transparent;
    transition: all 0.15s var(--ease);
    cursor: pointer;
}

.btn-cfg-cancel {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
}
.btn-cfg-cancel:hover { background: var(--bg-muted); border-color: var(--text-faint); }

.btn-cfg-add {
    background: var(--text);
    color: var(--bg);
}
.btn-cfg-add:hover { background: #262626; }

/* ─── Buttons (pe-btn) ───────────────────────────────────────────────────── */
.pe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.35rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.15s var(--ease);
    border: 1px solid transparent;
    white-space: nowrap;
}

.pe-btn-primary {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}
.pe-btn-primary:hover:not(:disabled) {
    background: #262626;
    border-color: #262626;
}
.pe-btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pe-btn-ghost {
    background: transparent;
    color: var(--text-muted);
}
.pe-btn-ghost:hover {
    background: var(--bg-muted);
    color: var(--text);
}

/* ─── Form fields ────────────────────────────────────────────────────────── */
.pe-field-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 1.25rem;
    max-width: var(--content-w);
    margin: 0 auto;
}

@media (max-width: 640px) { .pe-field-grid { grid-template-columns: 1fr; } }

.pe-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.pe-field-full { grid-column: 1 / -1; }

.pe-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.005em;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.pe-label.pe-required::after {
    content: "*";
    color: var(--error);
    font-weight: 600;
}

.pe-optional {
    font-weight: 400;
    color: var(--text-faint);
    font-size: 0.82rem;
}

.pe-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
    outline: none;
}

.pe-input::placeholder { color: var(--text-faint); }

.pe-input:hover { border-color: var(--text-faint); }

.pe-input:focus {
    border-color: var(--text);
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.08);
}

.pe-input-error,
.pe-input.pe-input-error {
    border-color: var(--error);
}

.pe-input-error:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.pe-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.pe-form-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid var(--error-border);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.pe-gdpr-notice {
    max-width: var(--content-w);
    margin: 1.5rem auto 0;
    padding: 0.85rem 1rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ─── Photo upload ───────────────────────────────────────────────────────── */
.pe-upload-zone {
    max-width: var(--content-w);
    margin: 0 auto;
    position: relative;
}

.pe-upload-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

.pe-upload-label {
    display: block;
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius-md);
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s var(--ease);
    background: var(--bg-subtle);
}

.pe-upload-label:hover,
.pe-upload-zone.pe-upload-dragover .pe-upload-label {
    border-color: var(--text);
    background: var(--bg-muted);
}

.pe-upload-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 0.75rem;
    color: var(--text-muted);
}

.pe-upload-icon svg { width: 100%; height: 100%; }
.pe-upload-icon svg path { stroke: var(--text-muted); }

.pe-upload-text {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 0.35rem;
    line-height: 1.45;
}

.pe-upload-text small {
    display: block;
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.pe-upload-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-faint);
    margin-top: 0.5rem;
}

.pe-photo-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
}

.pe-photo-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-muted);
    border: 1px solid var(--border);
}

.pe-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pe-photo-heic-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    height: 100%;
    padding: 0.5rem;
    text-align: center;
}

.pe-photo-heic-name {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
    line-height: 1.3;
    max-width: 100%;
}

.pe-photo-heic-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.3;
    text-align: center;
}

.pe-photo-thumb button,
.pe-photo-thumb .pe-photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.75);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    line-height: 1;
    border: none;
    cursor: pointer;
    transition: background 0.15s var(--ease);
}

.pe-photo-thumb button:hover,
.pe-photo-thumb .pe-photo-remove:hover {
    background: var(--error);
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.pe-footer {
    margin-top: 3rem;
    padding: 2rem 0 0;
    border-top: 1px solid var(--border);
    color: var(--text-faint);
    font-size: 0.82rem;
    text-align: center;
}

.pe-footer a { color: var(--text-muted); }
.pe-footer a:hover { color: var(--text); }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .site-header-inner { padding: 0.6rem var(--gutter); gap: 0.75rem; }
    .header-subtitle { display: none; }
    .header-text { display: none; }
    .header-contact-link { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

    .pe-step-nav {
        flex-direction: column-reverse;
        gap: 0.6rem;
        align-items: stretch;
    }
    .pe-step-nav .pe-btn { width: 100%; }

    .pe-progress-labels { gap: 0.5rem; font-size: 0.72rem; }
    .pe-progress-labels span { min-width: 56px; }

    .cfg-sidebar { position: static; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Mobile-UX fixes — 360px-first
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. iOS font-size zoom prevention ────────────────────────────────────── */
/* iOS Safari zooms in when input font-size < 16px. Force 16px on mobile.    */
@media (max-width: 640px) {
    .pe-input,
    .cfg-sheet-input,
    .cfg-sheet-select,
    .cfg-sheet-textarea,
    .cfg-sheet-body input[type="text"],
    .cfg-sheet-body input[type="number"],
    .cfg-sheet-body select,
    .cfg-sheet-body textarea {
        font-size: 16px;
    }
}

/* ── 2. Touch target sizes ───────────────────────────────────────────────── */
/* All small action buttons enlarged to 44px minimum touch area.              */
@media (max-width: 640px) {
    /* Selected-surface row edit / remove buttons */
    .cfg-selected-row .cfg-row-edit,
    .cfg-selected-row .cfg-row-remove {
        width: 44px;
        height: 44px;
        border-radius: 8px;
    }

    /* Photo remove button */
    .pe-photo-thumb button,
    .pe-photo-thumb .pe-photo-remove {
        width: 32px;
        height: 32px;
        top: 2px;
        right: 2px;
        font-size: 0.9rem;
    }

    /* Sheet close button */
    .cfg-sheet-close {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }

    /* Step nav buttons already full-width — ensure min height */
    .pe-btn { min-height: 48px; }
    .pe-hero-cta { min-height: 52px; padding: 0.9rem 1.75rem; font-size: 1.05rem; }
}

/* ── 3. Surface sheet — bottom sheet on mobile ───────────────────────────── */
/* On desktop: centered modal. On mobile: slides up from bottom edge.         */
@media (max-width: 640px) {
    .cfg-surface-sheet {
        align-items: flex-end;
        padding: 0;
    }

    .cfg-sheet-panel {
        width: 100%;
        max-width: 100%;
        max-height: 92dvh;       /* use dvh to respect mobile browser chrome */
        max-height: 92vh;        /* fallback for browsers without dvh */
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        transform: translateY(100%);
        transition: transform 0.32s var(--ease);
    }

    .cfg-surface-sheet.sheet-open .cfg-sheet-panel {
        transform: translateY(0);
    }

    /* Drag handle visual cue */
    .cfg-sheet-header::before {
        content: "";
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        border-radius: 2px;
        background: var(--border-strong);
    }

    .cfg-sheet-header {
        position: relative;
        padding-top: 1.4rem;
    }

    /* Right-column help/upsales: collapse behind toggle on mobile */
    .cfg-sheet-help {
        display: none;
    }

    .cfg-sheet-help.cfg-help-expanded {
        display: flex;
    }

    /* Toggle button for the help column */
    .cfg-help-toggle {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--accent-blue);
        background: var(--accent-blue-bg);
        border: 1px solid rgba(74, 127, 214, 0.25);
        border-radius: var(--radius-md);
        padding: 0.6rem 0.9rem;
        cursor: pointer;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
        min-height: 44px;
    }

    /* Sheet grid: single column, no visual right-col gap */
    .cfg-sheet-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Hide toggle on desktop */
@media (min-width: 641px) {
    .cfg-help-toggle { display: none; }
    .cfg-sheet-help { display: flex !important; }
}

/* ── 4. Header nav — hide pill on narrow screens ─────────────────────────── */
/* The nav pill with 5 items is too wide at 360px. Hide nav, keep brand + tel. */
@media (max-width: 520px) {
    .primary-nav { display: none; }
    .site-header-inner { justify-content: space-between; }
    /* Show brand text (logo only is too bare without the nav for context) */
    .header-text { display: flex !important; }
    .header-title { font-size: 0.9rem; }
}

/* ── 5. Steam background — skip on low-power / narrow viewport ───────────── */
/* 48 animated blobs are expensive on budget phones. Disable on ≤480px.       */
@media (max-width: 480px) {
    #bg-atmosphere { display: none; }
}

/* ── 6. Configurator padding — tighter on mobile ─────────────────────────── */
@media (max-width: 480px) {
    #pe-configurator {
        padding: 1rem 0.85rem;
        border-radius: var(--radius-md);
    }

    .page-wrapper { padding: 0 0.75rem; }

    .pe-hero { padding: 1.5rem 0 1.25rem; }
    .pe-hero h1 { font-size: clamp(1.65rem, 7vw, 2.5rem); }
    .pe-hero p  { font-size: 0.95rem; }

    .cfg-sheet-body { padding: 1rem 1rem 1.25rem; }
    .cfg-sheet-footer { padding: 0.85rem 1rem; }
    .cfg-sheet-header { padding: 1.4rem 1rem 0.7rem; }
}

/* ── 7. Step 1: house wrap on small screens ──────────────────────────────── */
@media (max-width: 640px) {
    .cfg-house-wrap {
        gap: 0.5rem;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .cfg-surface-icons {
        gap: 0.4rem;
        padding: 0.1rem 0.1rem 0.4rem;
    }

    .cfg-icon-ball {
        min-width: 44px;
        gap: 0.25rem;
    }

    .cfg-icon-ball-thumb {
        width: 42px;
        height: 42px;
    }

    .cfg-icon-ball-inner {
        font-size: 1.1rem;
    }

    .cfg-icon-ball-badge {
        width: 13px;
        height: 13px;
        font-size: 9px;
        line-height: 13px;
    }

    .cfg-icon-ball-label {
        font-size: 0.7rem;
    }

    .cfg-house-svg-container {
        width: 100%;
        aspect-ratio: 12 / 7;
    }
}

@media (max-width: 420px) {
    .cfg-house-svg-container {
        aspect-ratio: 12 / 7;
    }
    .cfg-house-wrap {
        min-height: unset;
        padding: 0.4rem;
    }
}

/* ── 8. Photo grid — ensure remove button doesn't overlap tiny thumbs ──────  */
@media (max-width: 480px) {
    .pe-photo-previews {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.5rem;
    }
}

/* ── 9. Radio cards — larger tap area on mobile ─────────────────────────── */
@media (max-width: 640px) {
    .pe-radio-card,
    .cfg-sheet-body .cfg-radio-group label {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
        min-height: 44px;
    }
}

/* ── 10. Upsale rows — larger tap area on mobile ─────────────────────────── */
@media (max-width: 640px) {
    .cfg-sheet-upsale-row {
        padding: 0.9rem 1rem;
    }
    .cfg-sheet-upsale-chk {
        width: 20px;
        height: 20px;
        margin-top: 0.15rem;
    }
}

/* ── 11. Selected row — ensure sufficient row height for tap ────────────── */
@media (max-width: 640px) {
    .cfg-selected-row {
        padding: 0.85rem 0.85rem;
        min-height: 52px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   First-time tutorial overlay
   ── Eenmalig bij eerste bezoek (localStorage pe_configurator_tutorial_seen).
   ── 4 stappen, skippable, mobile-first 360px.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Overlay backdrop */
#cfg-tutorial-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transition: opacity 0.2s var(--ease);
    pointer-events: none;
}

#cfg-tutorial-overlay.tut-visible {
    opacity: 1;
    pointer-events: auto;
}

/* Tutorial card — bottom sheet on all sizes */
.cfg-tutorial-card {
    width: 100%;
    max-width: 520px;
    background: var(--surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-lg);
    padding: 1.5rem 1.5rem 2rem;
    transform: translateY(100%);
    transition: transform 0.3s var(--ease);
    position: relative;
}

#cfg-tutorial-overlay.tut-visible .cfg-tutorial-card {
    transform: translateY(0);
}

/* Drag handle visual cue */
.cfg-tutorial-card::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--border-strong);
}

/* Skip button — top right */
.cfg-tutorial-skip {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-faint);
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s var(--ease);
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--border);
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}

.cfg-tutorial-skip:hover {
    color: var(--text-muted);
    border-color: var(--text-faint);
    background: var(--bg-muted);
}

/* Step counter */
.cfg-tutorial-step-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-faint);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

/* Step icon */
.cfg-tutorial-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.6rem;
    display: block;
}

/* Step title */
.cfg-tutorial-title {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

/* Step body */
.cfg-tutorial-body {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 1.25rem;
    max-width: 42ch;
}

/* Progress dots */
.cfg-tutorial-dots {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.1rem;
}

.cfg-tutorial-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-strong);
    transition: background 0.2s var(--ease), width 0.2s var(--ease);
}

.cfg-tutorial-dot.dot-active {
    background: var(--brand-blue);
    width: 18px;
    border-radius: 3px;
}

/* CTA button row */
.cfg-tutorial-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.cfg-tutorial-next {
    flex: 1;
    padding: 0.72rem 1.25rem;
    background: var(--text);
    color: var(--bg);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    cursor: pointer;
    border: 1px solid var(--text);
    transition: background 0.15s var(--ease);
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.cfg-tutorial-next:hover { background: #262626; border-color: #262626; }

/* On desktop, center the card with a bit more breathing room */
@media (min-width: 641px) {
    #cfg-tutorial-overlay {
        align-items: center;
        padding: 1.5rem;
    }
    .cfg-tutorial-card {
        border-radius: var(--radius-lg);
        max-width: 440px;
        padding: 1.75rem 1.75rem 2rem;
        transform: translateY(16px) scale(0.97);
    }
    #cfg-tutorial-overlay.tut-visible .cfg-tutorial-card {
        transform: translateY(0) scale(1);
    }
    .cfg-tutorial-card::before { display: none; }
    .cfg-tutorial-skip { top: 1.1rem; right: 1.1rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Mobile mini-step engine — surface sheet
   ── Only active on ≤640px (same breakpoint as the bottom-sheet layout).
   ── Desktop: .cfg-sheet-ms-container is hidden; .cfg-sheet-grid--desktop
      is shown normally.
   ── Mobile: .cfg-sheet-grid--desktop is hidden; .cfg-sheet-ms-container
      drives step-by-step navigation.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Desktop: hide the mini-step container, show the normal grid */
.cfg-sheet-ms-container { display: none; }

/* Mobile: swap visibility */
@media (max-width: 640px) {
    .cfg-sheet-grid--desktop { display: none !important; }
    .cfg-sheet-ms-container  { display: block; }

    /* ── Progress bar (dots + step count) ─── */
    .cfg-ms-progress {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.1rem 0 1rem;
        border-bottom: 1px solid var(--border);
        margin-bottom: 1.25rem;
    }

    .cfg-ms-dots {
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    .cfg-ms-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--border-strong);
        transition: background 0.2s var(--ease), width 0.2s var(--ease);
        flex-shrink: 0;
    }

    .cfg-ms-dot--active {
        background: var(--brand-blue);
        width: 20px;
        border-radius: 4px;
    }

    .cfg-ms-dot--done {
        background: var(--success);
    }

    .cfg-ms-step-count {
        font-size: 0.72rem;
        font-weight: 600;
        color: var(--text-faint);
        letter-spacing: 0.04em;
        text-transform: uppercase;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* ── Step fields area ─── */
    .cfg-ms-fields {
        display: flex;
        flex-direction: column;
        gap: 1.1rem;
        animation: fadeIn 0.2s var(--ease);
    }

    /* Unwrap the copied field wrappers so they look identical to desktop fields */
    .cfg-ms-field-wrap {
        display: contents;
    }

    /* ── Inline error ─── */
    .cfg-ms-error {
        background: var(--error-bg);
        color: var(--error);
        border: 1px solid var(--error-border);
        padding: 0.7rem 0.9rem;
        border-radius: var(--radius-md);
        font-size: 0.875rem;
        font-weight: 500;
        margin-top: 0.5rem;
    }

    /* ── Navigation row ─── */
    .cfg-ms-nav {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
    }

    .cfg-ms-back {
        min-width: 100px;
        flex-shrink: 0;
    }

    .cfg-ms-back--hidden {
        visibility: hidden;
        pointer-events: none;
    }

    .cfg-ms-next {
        flex: 1;
    }

    /* Both nav buttons: 48px min-height for tap comfort */
    .cfg-ms-nav .pe-btn {
        min-height: 48px;
        font-size: 0.95rem;
    }

    /* ── Upsales empty-state ─── */
    .cfg-ms-upsales-empty {
        background: var(--bg-subtle);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 1.1rem 1.15rem;
        font-size: 0.875rem;
        color: var(--text-muted);
        line-height: 1.5;
    }

    /* ── Upsales slot: full-width, no extra wrappers ─── */
    .cfg-ms-upsales-slot .cfg-upsales-block { margin: 0; }
    .cfg-ms-upsales-slot .cfg-help-prompt   { margin: 0; }

    /* ── Material field inside step: remove the nested wrapper ─── */
    .cfg-ms-field-wrap > .cfg-sheet-field {
        /* Ensure the material dropdown field inside the copy-wrap renders normally */
        display: flex;
    }
}

/* ── In-SVG legacy labels uitschakelen ────────────────────────────────────
   Het illu-house-selector.svg bevat <text class="pe-label-text"> en
   <path class="pe-label-line"> elementen voor "Dak", "Gevel", etc. die de
   oude aanduiding-stijl waren. Sinds we de pill-knoppen op het vlak
   plaatsen, zijn deze SVG-labels overbodig — verbergen voorkomt dubbele
   aanduiding op de illustratie. */
.cfg-house-svg-container .pe-label-text,
.cfg-house-svg-container .pe-label-line {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Quick-contact sectie — alternatief vangnet-formulier
   Visueel minder dominant dan de configurator boven. Geen primaire actie.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Secundaire knop (pe-btn-secondary) ──────────────────────────────────── */
/* Gebruikt in het quick-contact formulier. Minder gewicht dan pe-btn-primary. */
.pe-btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-strong);
}
.pe-btn-secondary:hover:not(:disabled) {
    background: var(--bg-muted);
    border-color: var(--text-faint);
}
.pe-btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ─── Sectie-wrapper ─────────────────────────────────────────────────────── */
.qc-section {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 0;
}

/* ─── Visuele scheiding tussen configurator en formulier ─────────────────── */
.qc-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 3.5rem 0 2rem;
    color: var(--text-faint);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.qc-divider::before,
.qc-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}
.qc-divider-label {
    flex-shrink: 0;
    padding: 0 0.5rem;
}

/* ─── Intro-tekst (stuurt richting configurator, biedt formulier als vangnet) */
.qc-intro {
    max-width: var(--content-w);
    margin: 0 auto 2rem;
    text-align: center;
}
.qc-intro-pref {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.5rem;
    padding: 0.85rem 1.1rem;
    background: var(--accent-blue-bg);
    border: 1px solid #ccdaf6;
    border-radius: var(--radius-md);
    display: inline-block;
    text-align: left;
    width: 100%;
}
.qc-intro-pref strong {
    color: var(--accent-blue);
}
.qc-scroll-up-link {
    background: none;
    border: none;
    color: var(--accent-blue);
    font-size: inherit;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ─── Item 1: "Verder zonder foto's" — outline knop ─────────────────────── */

/* Outline-stijl: subordinate aan primary, clearly secondary */
.pe-btn-outline {
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border-strong);
}
.pe-btn-outline:hover {
    background: var(--bg-muted);
    color: var(--text);
    border-color: var(--text-muted);
}

/* Rechter knoppengroep in step-nav: "Verder zonder foto's" + "Volgende stap" naast elkaar */
.pe-step-nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Helper-tekst onder de upload zone */
.pe-photo-skip-hint {
    max-width: var(--content-w);
    margin: 0.75rem auto 0;
    font-size: 0.875rem;
    color: var(--text-faint);
    text-align: center;
    line-height: 1.5;
}

/* Mobile: knoppen onder elkaar full-width */
@media (max-width: 640px) {
    .pe-step-nav-right {
        flex-direction: column-reverse;
        align-items: stretch;
        width: 100%;
    }
    .pe-step-nav-right .pe-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ─── Item 2: Restore-banner ─────────────────────────────────────────────── */

.pe-restore-banner {
    max-width: var(--content-w);
    margin: 0 auto 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    padding: 1rem 1.25rem;
    animation: pe-banner-slide-in 0.25s var(--ease) both;
}

@keyframes pe-banner-slide-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pe-restore-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.pe-restore-banner-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    flex-wrap: wrap;
}

.pe-restore-privacy {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-faint);
}

.pe-restore-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (max-width: 580px) {
    .pe-restore-banner-inner { flex-direction: column; align-items: stretch; }
    .pe-restore-banner-actions { flex-direction: column-reverse; }
    .pe-restore-banner-actions .pe-btn { width: 100%; justify-content: center; }
}

/* ─── Resume-banner (klant komt via ?resume=<token> uit een triage-mail) ── */
.pe-resume-banner {
    max-width: var(--content-w);
    margin: 0 auto 1.5rem;
    border: 1px solid var(--brand-blue-wash-2);
    border-left: 4px solid var(--brand-blue);
    border-radius: var(--radius-md);
    background: var(--brand-blue-wash);
    padding: 1rem 1.25rem;
    animation: pe-banner-slide-in 0.25s var(--ease) both;
}

.pe-resume-banner-inner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.pe-resume-banner-icon {
    flex-shrink: 0;
    color: var(--brand-blue);
    margin-top: 2px;
}

.pe-resume-banner-text {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text);
}

.pe-resume-banner-text strong {
    color: var(--brand-blue-strong);
    margin-right: 4px;
}

@media (max-width: 640px) {
    .pe-resume-banner-inner { gap: 0.65rem; }
    .pe-resume-banner-text { font-size: 0.88rem; }
}

.qc-scroll-up-link:hover {
    color: var(--brand-blue);
}
.qc-intro-alt {
    font-size: 0.88rem;
    color: var(--text-faint);
    margin-top: 0.35rem;
}

/* ─── Form wrapper ───────────────────────────────────────────────────────── */
.qc-form {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem);
    max-width: var(--content-w);
    margin: 0 auto;
}

/* ─── Werktype-pills ─────────────────────────────────────────────────────── */
.qc-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.1rem;
}
.qc-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.13s var(--ease);
    white-space: nowrap;
    letter-spacing: -0.005em;
}
.qc-pill:hover {
    border-color: var(--text-faint);
    color: var(--text);
    background: var(--bg-muted);
}
.qc-pill.qc-pill-selected {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}
.qc-pill.qc-pill-selected:hover {
    background: #262626;
    border-color: #262626;
}

/* ─── Upload zone — compact variant voor het quick-contact ───────────────── */
.qc-upload-zone .pe-upload-label {
    padding: 1.25rem 1rem;
}
.qc-upload-zone .pe-upload-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 0.5rem;
}
.qc-upload-zone .pe-upload-text {
    font-size: 0.88rem;
}

/* ─── Submit rij ─────────────────────────────────────────────────────────── */
.qc-submit-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

/* ─── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .qc-submit-row {
        justify-content: stretch;
    }
    .qc-submit-row .pe-btn {
        width: 100%;
        min-height: 48px;
    }
    .qc-intro-pref {
        font-size: 0.88rem;
        text-align: center;
    }
    .qc-pills {
        gap: 0.4rem;
    }
    .qc-pill {
        font-size: 0.84rem;
        padding: 0.45rem 0.8rem;
        min-height: 44px;   /* touch target */
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   B2B-modus — stijlen voor ?b2b=1 (stap 0, banner, nudge, segment-cards)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── B2B nudge (duidelijke doorverwijzingskaart voor zakelijke aanvragen) ── */
.pe-b2b-nudge {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--brand-blue-wash);
    border: 1px solid var(--brand-blue-wash-2);
    border-left: 3px solid var(--brand-blue);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.pe-b2b-nudge-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--brand-blue-wash-2);
    border-radius: var(--radius-md);
    color: var(--brand-blue);
}
.pe-b2b-nudge-body {
    flex: 1;
    min-width: 0;
}
.pe-b2b-nudge-heading {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.3;
}
.pe-b2b-nudge-sub {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 8px;
}
.pe-b2b-nudge-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}
.pe-b2b-nudge-points li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: var(--text-muted);
}
.pe-b2b-nudge-points svg { color: var(--brand-blue); flex-shrink: 0; }
.pe-b2b-nudge-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-blue);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.1s ease;
    border: 1px solid var(--brand-blue);
}
.pe-b2b-nudge-cta:hover {
    background: var(--brand-blue-dark, #1f4f8c);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}
.pe-b2b-nudge-cta svg { flex-shrink: 0; }

/* Mobile: stack vertically, CTA full-width */
@media (max-width: 640px) {
    .pe-b2b-nudge {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 16px;
    }
    .pe-b2b-nudge-icon { align-self: flex-start; }
    .pe-b2b-nudge-cta { justify-content: center; }
}

/* ─── B2B active banner (zichtbaar in b2b-modus) ────────────────────────── */
.pe-b2b-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--brand-blue);
    color: #fff;
    border-radius: var(--radius-md);
    padding: 10px 16px;
    font-size: 13px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.pe-b2b-badge {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}
.pe-b2b-banner-text { flex: 1; }
.pe-b2b-banner-switch {
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    text-decoration: none;
    flex-shrink: 0;
}
.pe-b2b-banner-switch:hover { color: #fff; text-decoration: underline; }

/* ─── Section labels in stap 0 ──────────────────────────────────────────── */
.pe-b2b-section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 20px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.pe-b2b-segment-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}
.pe-required-star { color: var(--error); margin-left: 2px; }

/* ─── Segment card selector ─────────────────────────────────────────────── */
.pe-b2b-segment-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 8px;
}
@media (max-width: 560px) {
    .pe-b2b-segment-cards { grid-template-columns: 1fr; }
}
.pe-b2b-seg-card {
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 12px;
    cursor: pointer;
    text-align: center;
    background: var(--bg);
    transition: border-color 0.18s, background 0.18s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.pe-b2b-seg-card:hover {
    border-color: var(--brand-blue);
    background: var(--brand-blue-wash);
}
.pe-b2b-seg-card.selected,
.pe-b2b-seg-card[aria-pressed="true"] {
    border-color: var(--brand-blue);
    background: var(--brand-blue-wash);
}
.pe-b2b-seg-icon { font-size: 22px; }
.pe-b2b-seg-title { font-size: 13px; font-weight: 600; color: var(--text); }
.pe-b2b-seg-sub { font-size: 11px; color: var(--text-muted); }

/* ─── Field hint ────────────────────────────────────────────────────────── */
.pe-field-hint {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 3px;
}

/* ─── B2B step hint (optioneel-boodschap bij stap 1/2) ──────────────────── */
.pe-b2b-step-hint {
    font-size: 13px;
    color: var(--text-muted);
    background: var(--brand-blue-wash);
    border: 1px solid var(--brand-blue-wash-2);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin: 8px 0 12px;
}
