/* =======================================================
   Wizt Color Configurator v2 — Stylesheet
   ======================================================= */

:root {
    --wz-dark:       #1a1a2e;
    --wz-mid:        #0f3460;
    --wz-accent:     #0A7A6E;       /* Wizt brand teal */
    --wz-accent-mid: #086d62;       /* hover teal */
    --wz-accent-bg:  #e8f5f3;       /* lichte teal achtergrond */
    --wz-bg:         #f8f9fb;
    --wz-surface:    #ffffff;
    --wz-border:     #e2e6ea;
    --wz-text:       #111827;
    --wz-muted:      #6b7280;
    --wz-radius:     10px;
    --wz-radius-sm:  6px;
    --wz-shadow:     0 2px 12px rgba(0,0,0,.07);
    --wz-transition: all .18s cubic-bezier(.4,0,.2,1);
    --wz-btn-font-size: .85rem; /* consistente tekstgrootte voor alle keuzeknoppen (view, vorm, kleur, frame) — iets subtieler dan voorheen */
}

.wizt-configurator {
    background: var(--wz-bg);
    border: 1px solid var(--wz-border);
    border-radius: var(--wz-radius);
    padding: 28px;
    margin: 28px auto;
    box-shadow: var(--wz-shadow);
    max-width: 960px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
}

/* Header */
.wizt-header {
    margin-bottom: 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.wizt-header-text { flex: 1; }
.wizt-title  { margin: 0 0 4px; font-weight: 700; color: var(--wz-dark); letter-spacing: -.02em; }
.wizt-subtitle { margin: 0; color: var(--wz-muted); }

/* Fullscreen knop */
.wizt-fullscreen-btn {
    height: 34px;
    padding: 0 12px;
    flex-shrink: 0;
    border: 1.5px solid var(--wz-border);
    border-radius: var(--wz-radius-sm);
    background: var(--wz-surface);
    color: var(--wz-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    transition: var(--wz-transition);
    white-space: nowrap;
}
.wizt-fullscreen-btn svg { flex-shrink: 0; }
.wizt-fullscreen-btn:hover { border-color: var(--wz-accent); color: var(--wz-accent); background: var(--wz-accent-bg); }
.wizt-configurator--fullscreen .wizt-fullscreen-btn { border-color: var(--wz-accent); color: var(--wz-accent); }

/* Fullscreen mode */
.wizt-configurator--fullscreen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    max-width: none !important;
    width: 100% !important;
    height: 100dvh !important;
    overflow-y: auto !important;
    background: var(--wz-bg) !important;
    padding: 20px !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* Layout grid — preview links, stappen rechts scrollen */
.wizt-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 24px;
}

/* Sticky preview — JS sticky via translateY (werkt ook in Elementor) */
.wizt-preview-col { }
.wizt-preview-sticky {
    position: relative;
    top: 0;
    will-change: transform;
}

/* Controls kolom */
.wizt-controls { display: flex; flex-direction: column; gap: 16px; }

/* Preview */
.wizt-preview {
    background: transparent;
    border: none;
    border-radius: var(--wz-radius);
    /* Defensief: sommige tab/accordion-wrappers (bijv. Bricks) erven visibility/opacity
       door naar kinderen bij het wisselen van tabblad, zonder dit voor dit specifieke
       element weer terug te zetten. Forceer daarom altijd zichtbaar — onze eigen
       2D/3D/ruimte-toggle regelt zichtbaarheid via display, dus dit conflicteert niet. */
    visibility: visible !important;
    opacity: 1 !important;
    aspect-ratio: 3 / 2;
    /* Vangnet: als een Bricks-tabblad de omliggende kolom tijdelijk 0 breed levert,
       zorgt aspect-ratio er dan óók voor dat de hoogte 0 wordt. Een minimale afmeting
       voorkomt dat de container ooit echt 0x0 kan zijn. */
    min-width: 260px;
    min-height: 173px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: aspect-ratio .3s ease;
}
.wizt-preview.is-portrait {
    aspect-ratio: 2 / 3;
}
/* Preview SVG — vult container altijd */
.wizt-preview svg {
    max-width: 100%; max-height: 100%; width: auto; height: auto;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.08));
    transition: var(--wz-transition);
    visibility: visible !important;
    opacity: 1 !important;
}
.wizt-preview-placeholder { text-align: center; color: var(--wz-muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }

.wizt-color-badge {
    display: flex; align-items: center; gap: 8px;
    margin-top: 10px; padding: 7px 12px;
    background: var(--wz-surface); border: 1px solid var(--wz-border);
    border-radius: var(--wz-radius-sm); }
.wizt-badge-swatch { width: 16px; height: 16px; border-radius: 3px; border: 1px solid rgba(0,0,0,.1); flex-shrink: 0; }
.wizt-badge-label  { color: var(--wz-text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Steps: altijd zichtbaar en vrij toegankelijk ── */
.wizt-step {
    background: var(--wz-surface);
    border: 1px solid var(--wz-border);
    border-radius: var(--wz-radius);
    overflow: hidden;
    transition: border-color .25s, box-shadow .25s;
}
.wizt-step-header {
    display: flex; align-items: center; gap: 9px;
    padding: 14px 18px; margin-bottom: 0; cursor: pointer;
}
.wizt-step-body { padding: 4px 16px 16px; }

.wizt-step-number {
    width: 24px; height: 24px; background: var(--wz-border); color: #fff;
    border-radius: 50%; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: background .25s;
}
.wizt-step-label { font-weight: 600 !important; color: #1a1a2e !important; flex: 1; }

/* Actief — teal rand, geen dubbele box-shadow */
.wizt-step.is-active {
    border-color: var(--wz-accent);
    border-width: 2px;
}
.wizt-step.is-active .wizt-step-number { background: var(--wz-accent); }
.wizt-step.is-active .wizt-step-body { padding: 4px 18px 20px; }

/* Voltooid — teal vinkje zonder rondje, duidelijk anders dan cijfer */
.wizt-step.is-done {
    border-color: var(--wz-border);
    box-shadow: none;
}
.wizt-step.is-done.is-active {
    border-color: var(--wz-accent);
    border-width: 2px;
}
.wizt-step.is-done .wizt-step-number {
    background: transparent;
    border: 2px solid var(--wz-accent);
    color: var(--wz-accent);
    font-size: 0; /* verberg cijfer */
}
.wizt-step.is-done .wizt-step-number::after {
    content: '✓';
    font-weight: 800;
    font-size: 12px; /* expliciet nodig — anders erft dit van de ouder (font-size:0, bedoeld om het cijfer te verbergen) en is het vinkje zelf ook onzichtbaar */
    color: var(--wz-accent);
    line-height: 1;
}

/* ── 3D laadindicator ── */
.wizt-3d-loading {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 14px;
    padding: 32px; color: var(--wz-muted); }
.wizt-3d-spinner {
    width: 44px; height: 44px;
    border: 3px solid var(--wz-border);
    border-top-color: var(--wz-accent);
    border-radius: 50%;
    animation: wizt-spin .8s linear infinite;
}
/* Whiteboard-silhouet in de spinner */
.wizt-3d-spinner-board {
    position: relative; width: 44px; height: 44px;
}
.wizt-3d-spinner-board::before {
    content: '';
    position: absolute; inset: 4px;
    border: 2px solid var(--wz-border);
    border-radius: 4px;
    animation: wizt-board-fill 1.2s ease-in-out infinite alternate;
}
@keyframes wizt-spin { to { transform: rotate(360deg); } }
@keyframes wizt-board-fill {
    from { background: transparent; border-color: var(--wz-border); }
    to   { background: var(--wz-accent-bg); border-color: var(--wz-accent); }
}

/* ── Mobiel ── */
@media (max-width: 680px) {
    .wizt-layout { grid-template-columns: 1fr; gap: 12px; }
    .wizt-preview-col { order: -1; }

    /* Sticky preview — plakt boven aan viewport */
    .wizt-preview-sticky,
    .wizt-preview-wrap {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 100;
        background: var(--wz-bg);
        padding-bottom: 8px;
        /* Padding compenseer voor thema's met vaste header */
        padding-top: 4px;
    }
    .wizt-preview { aspect-ratio: 16/9; min-height: 180px; }
    .wizt-view-toggle { padding-top: 2px; }
}

/* Shapes */
.wizt-shape-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; padding: 4px 0 8px; }
.wizt-shape-btn {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 10px 4px; border: 1.5px solid var(--wz-border);
    border-radius: var(--wz-radius-sm); background: var(--wz-surface);
    cursor: pointer; transition: var(--wz-transition);
    color: var(--wz-muted); font-weight: 500;
    font-size: var(--wz-btn-font-size) !important;
}
.wizt-shape-btn svg { width: 34px; height: 26px; display: block; }
.wizt-shape-btn svg rect,
.wizt-shape-btn svg circle { fill: #1a1a2e; transition: fill .15s; }

/* Hover — niet geselecteerd */
.wizt-shape-btn:not(.is-active):hover {
    border-color: var(--wz-accent);
    color: var(--wz-accent);
    background: var(--wz-accent-bg);
}
.wizt-shape-btn:not(.is-active):hover svg rect,
.wizt-shape-btn:not(.is-active):hover svg circle { fill: var(--wz-accent); }

/* Actief — licht teal, teal rand (consistent met kleuren en maten) */
.wizt-shape-btn.is-active {
    border-color: var(--wz-accent) !important;
    border-width: 2px !important;
    background: var(--wz-accent-bg) !important;
    color: var(--wz-accent) !important;
}
.wizt-shape-btn.is-active svg rect,
.wizt-shape-btn.is-active svg circle { fill: var(--wz-accent) !important; }

/* Tabs */
.wizt-tabs {
    display: flex; gap: 3px; margin-bottom: 11px;
    background: var(--wz-bg); padding: 3px; border-radius: var(--wz-radius-sm);
}
.wizt-tab {
    flex: 1; padding: 5px 8px; font-weight: 600;
    border: none; border-radius: 4px; background: transparent;
    color: var(--wz-muted); cursor: pointer; transition: var(--wz-transition);
}
.wizt-tab:hover   { color: var(--wz-accent); background: var(--wz-accent-bg); }
.wizt-tab.active  { background: var(--wz-accent) !important; color: #fff !important; box-shadow: var(--wz-shadow); font-weight: 700; }

/* Search */
.wizt-search-wrap { position: relative; margin-bottom: 9px; }
.wizt-search {
    width: 100%; padding: 7px 34px 7px 11px;
    border: 1.5px solid var(--wz-border); border-radius: var(--wz-radius-sm);
    background: var(--wz-surface); color: var(--wz-text);
    box-sizing: border-box; outline: none; transition: var(--wz-transition);
}
.wizt-search:focus { border-color: var(--wz-accent); box-shadow: 0 0 0 3px rgba(10,122,110,.09); }
.wizt-search-icon { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--wz-muted); pointer-events: none; display: flex; }
.wizt-search-icon svg { width: 15px; height: 15px; }

/* Color list */
.wizt-color-list {
    max-height: 200px; overflow-y: auto;
    border: 1px solid var(--wz-border); border-radius: var(--wz-radius-sm);
    background: var(--wz-surface); scrollbar-width: thin; scrollbar-color: var(--wz-border) transparent;
}
.wizt-color-list::-webkit-scrollbar { width: 4px; }
.wizt-color-list::-webkit-scrollbar-thumb { background: var(--wz-border); border-radius: 2px; }

/* Wizt collectie swatches — override de lijst container volledig */
.wizt-color-list.wizt-color-list--swatches {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 10px !important;
    max-height: none !important;
    height: auto !important;
    min-height: 0 !important;
    border: none !important;
    background: transparent !important;
    overflow: visible !important;
    box-shadow: none !important;
}

.wizt-color-item {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 11px; cursor: pointer;
    border-bottom: 1px solid var(--wz-border); transition: background .1s;
}
.wizt-color-item:last-child { border-bottom: none; }
.wizt-color-item:hover { background: var(--wz-bg); }
.wizt-color-item.is-selected {
    background: var(--wz-dark);
    border-left: 3px solid var(--wz-accent);
    padding-left: 8px;
}
.wizt-color-item.is-selected .wizt-color-code,
.wizt-color-item.is-selected .wizt-color-name { color: #fff; }

.wizt-color-swatch { width: 22px; height: 22px; border-radius: 4px; border: 1px solid rgba(0,0,0,.1); flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.wizt-color-info   { flex: 1; min-width: 0; }
.wizt-color-code   { font-weight: 700; color: var(--wz-dark); display: block; font-size: var(--wz-btn-font-size) !important; }
.wizt-color-name   { color: var(--wz-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--wz-btn-font-size) !important; }
.wizt-no-results   { padding: 18px; text-align: center; color: var(--wz-muted); }

/* Selected color */
.wizt-selected-color {
    display: flex; align-items: center; gap: 9px;
    margin-top: 10px; padding: 9px 11px;
    background: var(--wz-accent-bg);
    border: 1.5px solid var(--wz-accent);
    border-radius: var(--wz-radius-sm);
    animation: wz-pop .18s ease;
}
@keyframes wz-pop { from { opacity:0; transform:translateY(-3px); } to { opacity:1; transform:none; } }
.wizt-selected-swatch  { width: 28px; height: 28px; border-radius: 5px; border: 1px solid rgba(0,0,0,.12); flex-shrink: 0; }
.wizt-selected-info    { flex: 1; min-width: 0; }
.wizt-selected-info strong { display: block; color: var(--wz-accent-mid); }
.wizt-selected-info span   { display: block; color: var(--wz-accent); }
.wizt-clear-color {
    width: 20px; height: 20px; border: none; border-radius: 50%;
    background: rgba(10,122,110,.15); color: var(--wz-accent);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: var(--wz-transition); flex-shrink: 0; line-height: 1;
}
.wizt-clear-color:hover { background: var(--wz-accent); color: #fff; }

/* Wizt swatches wrapper — eigen element, los van colorList */
.wizt-swatches-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0 14px;
}

/* Wizt collectie swatch items */
.wizt-configurator .wizt-collectie-swatch {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    border: 2px solid transparent; border-radius: var(--wz-radius-sm);
    background: transparent !important; cursor: pointer; padding: 4px;
    transition: var(--wz-transition); width: 58px;
    color: inherit;
}
.wizt-configurator .wizt-collectie-swatch:not(.is-active):hover {
    border-color: var(--wz-accent) !important;
    background: var(--wz-accent-bg) !important;
}
.wizt-configurator .wizt-collectie-swatch.is-active {
    border-color: var(--wz-accent) !important;
    background: var(--wz-accent-bg) !important;
}
.wizt-configurator .wizt-collectie-swatch .wizt-cs-label {
    color: #333 !important;
    font-weight: 600;
    text-align: center; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56px;
}
.wizt-configurator .wizt-collectie-swatch.is-active .wizt-cs-label {
    color: var(--wz-accent) !important;
    font-weight: 700;
}
.wizt-cs-color {
    width: 42px; height: 42px; border-radius: 50%;
    border: 1px solid rgba(0,0,0,.1) !important; display: block;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    background-color: inherit;
}

/* ── Room preview ── */
.wizt-preview-room {
    border: 1px solid var(--wz-border);
    border-radius: var(--wz-radius);
    overflow: hidden;
    background: var(--wz-surface);
    box-shadow: var(--wz-shadow);
}
/* ── In ruimte — controls card ── */
.wizt-room-controls {
    padding: 12px 14px 8px;
    border-top: 1px solid var(--wz-border);
    background: var(--wz-bg);
}
.wizt-room-controls-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.wizt-room-sliders {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wizt-room-slider-row {
    display: grid;
    grid-template-columns: 120px 1fr 36px;
    align-items: center;
    gap: 8px;
}
.wizt-room-slider-label {
    font-weight: 600;
    color: var(--wz-muted);
    white-space: nowrap;
}
.wizt-room-slider-label em {
    font-style: normal;
    font-weight: 400;
    display: block;
    opacity: .7;
}
.wizt-room-slider-val {
    font-weight: 600;
    color: var(--wz-accent);
    text-align: right;
    white-space: nowrap;
}
.wizt-room-hint-drag {
    color: var(--wz-muted);
    font-style: italic;
    margin: 6px 0 0;
}
.wizt-room-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    border-top: 1px solid var(--wz-border);
    background: var(--wz-bg);
    flex-wrap: wrap;
}
.wizt-room-dims {
    color: var(--wz-muted);
    margin-left: auto;
    white-space: nowrap;
}
.wizt-room-dims-value { color: var(--wz-accent); font-weight: 700; }
.wizt-room-dims-nearest { color: var(--wz-muted); margin-left: 4px; }
.wizt-room-wrap {
    position: relative;
    width: 100%;
    min-height: 200px;
    background: #e8e8e8;
}
.wizt-room-canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: grab;
}
.wizt-room-canvas:active { cursor: grabbing; }

/* Placeholder */
.wizt-room-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--wz-muted);
    background: #f0f0f0;
    pointer-events: none;
}
.wizt-room-placeholder label { pointer-events: all; }

/* Toolbar bovenop foto */
.wizt-room-toolbar {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.10);
    z-index: 10;
}
.wizt-room-toolbar .wizt-room-slider-wrap {
    flex: 1;
    min-width: 80px;
    gap: 3px;
}
.wizt-room-toolbar .wizt-room-slider-label {
    font-weight: 600;
    color: var(--wz-muted);
    min-height: auto;
}

/* Perspectief L/R — horizontale strip onder foto */
.wizt-room-persp-h {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 6px;
    padding: 6px 10px;
    z-index: 10;
}
.wizt-room-persp-h input { flex: 1; }

/* Perspectief O/N — verticale strip rechts van foto */
.wizt-room-persp-v {
    position: absolute;
    right: 10px;
    top: 56px;
    bottom: 10px;
    width: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 6px;
    padding: 8px 6px;
    z-index: 10;
}
.wizt-room-persp-v input[type="range"] {
    width: 80px;
    transform: rotate(-90deg);
    cursor: pointer;
    flex-shrink: 0;
}

/* Label op de persp controls */
.wizt-room-persp-label {
    font-weight: 700;
    color: var(--wz-muted);
    white-space: nowrap;
    line-height: 1.2;
    text-align: center;
}
.wizt-room-persp-label .wizt-slider-reset-hint {
    display: block;
    font-weight: 400;
    }

/* Footer onder foto: muurmaten + schatting */
.wizt-room-footer {
    padding: 10px 14px;
    border-top: 1px solid var(--wz-border);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--wz-bg);
}
.wizt-room-footer-left {
    flex: 0 0 auto;
}
.wizt-room-footer-right {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.wizt-room-hint-drag {
    color: var(--wz-muted);
    font-style: italic;
}
.wizt-room-dims {
    color: var(--wz-muted);
    white-space: nowrap;
}
.wizt-room-dims-value { color: var(--wz-accent); }
.wizt-room-dims-nearest { color: var(--wz-muted); margin-left: 4px; }

/* Upload knoppen */
.wizt-room-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--wz-accent);
    color: #fff;
    border-radius: var(--wz-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--wz-transition);
    white-space: nowrap;
}
.wizt-room-upload-btn:hover { background: var(--wz-accent-mid); }
.wizt-room-upload-btn--small {
    padding: 5px 10px;
    background: var(--wz-surface);
    color: var(--wz-dark);
    border: 1.5px solid var(--wz-border);
    flex-shrink: 0;
}
.wizt-room-upload-btn--small:hover { border-color: var(--wz-accent); color: var(--wz-accent); }

/* Muurmaten */
.wizt-wall-ref {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.wizt-wall-ref-field {
    display: flex;
    align-items: center;
    gap: 4px;
}
.wizt-wall-ref-label {
    color: var(--wz-muted);
    white-space: nowrap;
}
.wizt-wall-field {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--wz-border);
    border-radius: var(--wz-radius-sm);
    overflow: hidden;
    background: var(--wz-surface);
}
.wizt-wall-field input {
    width: 60px;
    border: none;
    padding: 4px 6px;
    background: transparent;
    color: var(--wz-dark);
    -moz-appearance: textfield;
}
.wizt-wall-field input::-webkit-outer-spin-button,
.wizt-wall-field input::-webkit-inner-spin-button { -webkit-appearance: none; }
.wizt-wall-field:focus-within { border-color: var(--wz-accent); }
.wizt-wall-unit {
    padding: 4px 6px;
    color: var(--wz-muted);
    background: var(--wz-bg);
    border-left: 1px solid var(--wz-border);
}
.wizt-wall-warning {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--wz-radius-sm);
    padding: 5px 10px;
    width: 100%;
}

/* Slider stijlen */
.wizt-room-size-slider,
.wizt-room-skewx-slider,
.wizt-room-skewy-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    border: none;
    background: var(--wz-border);
    display: block;
    width: 100%;
}
    height: auto;
    cursor: crosshair;
}
.wizt-room-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--wz-muted);
    background: #f0f0f0;
    pointer-events: none;
}
.wizt-room-placeholder label { pointer-events: all; }
.wizt-room-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--wz-accent);
    color: #fff;
    border-radius: var(--wz-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--wz-transition);
}
.wizt-room-upload-btn:hover { background: var(--wz-accent-mid); }
.wizt-room-upload-btn--small {
    padding: 5px 10px;
    background: var(--wz-surface);
    color: var(--wz-dark);
    border: 1.5px solid var(--wz-border);
}
.wizt-room-upload-btn--small:hover { border-color: var(--wz-accent); color: var(--wz-accent); background: var(--wz-accent-bg); }
.wizt-room-controls {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--wz-border);
    background: var(--wz-bg);
}
.wizt-room-row-main {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 10px 14px;
    flex-wrap: wrap;
}
.wizt-room-row-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 14px 8px;
    border-top: 1px solid var(--wz-border);
    gap: 12px;
    flex-wrap: wrap;
}
.wizt-wall-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: var(--wz-accent);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}
.wizt-wall-toggle-icon { transition: transform .2s; }
.wizt-wall-toggle-btn.is-open .wizt-wall-toggle-icon { transform: rotate(180deg); }
.wizt-wall-expand { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.wizt-wall-expand.is-open { max-height: 160px; }
.wizt-wall-expand-inner {
    padding: 10px 14px 12px;
    border-top: 1px solid var(--wz-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wizt-wall-expand-hint { color: var(--wz-muted); margin: 0; line-height: 1.5; }
.wizt-room-slider-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 100px;
}
.wizt-room-slider-label {
    font-weight: 600;
    color: var(--wz-muted);
    white-space: nowrap;
    min-height: 2.4em;
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 2px;
    line-height: 1.3;
}
/* ── Sliders — gebruiksvriendelijk ── */
.wizt-room-size-slider,
.wizt-room-skewx-slider,
.wizt-room-skewy-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    border: none;
    background: var(--wz-border);
    display: block;
    padding: 0;
    margin: 0;
    vertical-align: middle;
}
.wizt-room-size-slider::-webkit-slider-thumb,
.wizt-room-skewx-slider::-webkit-slider-thumb,
.wizt-room-skewy-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--wz-accent);
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
    margin-top: -7px;
}
.wizt-room-size-slider::-webkit-slider-thumb:hover,
.wizt-room-skewx-slider::-webkit-slider-thumb:hover,
.wizt-room-skewy-slider::-webkit-slider-thumb:hover {
    transform: scale(1.18);
    box-shadow: 0 3px 10px rgba(10,122,110,.3);
}
.wizt-room-size-slider::-moz-range-thumb,
.wizt-room-skewx-slider::-moz-range-thumb,
.wizt-room-skewy-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--wz-accent);
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
    cursor: pointer;
}
.wizt-room-size-slider::-webkit-slider-runnable-track,
.wizt-room-skewx-slider::-webkit-slider-runnable-track,
.wizt-room-skewy-slider::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 4px;
}
.wizt-room-size-slider::-moz-range-track,
.wizt-room-skewx-slider::-moz-range-track,
.wizt-room-skewy-slider::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: var(--wz-border);
}
.wizt-room-size-slider:focus,
.wizt-room-skewx-slider:focus,
.wizt-room-skewy-slider:focus { outline: none; }
.wizt-room-size-slider:focus::-webkit-slider-thumb,
.wizt-room-skewx-slider:focus::-webkit-slider-thumb,
.wizt-room-skewy-slider:focus::-webkit-slider-thumb {
    border-color: var(--wz-accent-mid);
    box-shadow: 0 0 0 4px rgba(10,122,110,.18);
}

/* Waarde naast sliderlabel */
.wizt-slider-value {
    font-weight: 700;
    color: var(--wz-accent);
    margin-left: 2px;
}
.wizt-room-hint-drag {
    width: 100%;
    color: var(--wz-muted);
    font-style: italic;
}
.wizt-slider-reset-hint {
    color: var(--wz-muted);
    opacity: .7;
    font-style: italic;
    margin-left: 4px;
}

/* Op mobiel: sliders op volle breedte */
@media (max-width: 680px) {
    .wizt-room-controls {
        gap: 8px;
        padding: 10px 12px;
    }
    .wizt-room-slider-wrap {
        min-width: calc(50% - 8px);
        flex: 0 0 calc(50% - 8px);
    }
    .wizt-wall-ref {
        width: 100%;
    }
}

/* ── Muurmaat referentie ── */
.wizt-wall-ref {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.wizt-wall-ref-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 70px;
}
.wizt-wall-ref-label {
    font-weight: 600;
    color: var(--wz-muted);
    white-space: nowrap;
    min-height: 2.2em;
    display: flex;
    align-items: flex-end;
}
.wizt-wall-field {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--wz-border);
    border-radius: var(--wz-radius-sm);
    background: var(--wz-surface);
    overflow: hidden;
    transition: var(--wz-transition);
}
.wizt-wall-field:focus-within {
    border-color: var(--wz-accent);
    box-shadow: 0 0 0 3px rgba(10,122,110,.1);
}
.wizt-wall-field input {
    width: 100%;
    padding: 5px 3px 5px 7px;
    border: none;
    background: transparent;
    color: var(--wz-text);
    outline: none;
    -webkit-appearance: none;
    border-radius: 0;
}
.wizt-wall-unit {
    color: var(--wz-muted);
    padding: 0 6px 0 2px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Wall warning ── */
.wizt-wall-warning {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    width: 100%;
    padding: 8px 12px;
    background: #fef9ec;
    border: 1.5px solid #f4c842;
    border-radius: var(--wz-radius-sm);
    color: #7a5c00;
    line-height: 1.4;
    animation: wz-pop .2s ease;
}

/* ── Live afmeting label ── */
.wizt-room-dims {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-top: 1px solid var(--wz-border);
    background: var(--wz-bg);
    flex-wrap: wrap;
}
.wizt-room-dims-label { color: var(--wz-muted); }
.wizt-room-dims-value { color: var(--wz-accent); font-weight: 700; }
.wizt-room-dims-nearest { color: var(--wz-muted); }

/* ── Oriëntatie / frame overlay ── */
.wizt-orient-overlay,
.wizt-size-overlay,
.wizt-frame-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 2;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.wizt-orient-overlay.is-visible,
.wizt-size-overlay.is-visible,
.wizt-frame-overlay.is-visible {
    display: flex;
}
.wizt-orient-overlay-msg,
.wizt-size-overlay-msg,
.wizt-frame-overlay-msg {
    background: var(--wz-surface);
    color: var(--wz-muted);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--wz-radius-sm);
    border: 1px solid var(--wz-border);
    box-shadow: var(--wz-shadow);
    white-space: nowrap;
}

/* ── Oriëntatie stap ── */
.wizt-orient-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 4px 0 8px;
}
.wizt-orient-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 4px;
    border: 1.5px solid var(--wz-border);
    border-radius: var(--wz-radius-sm);
    background: var(--wz-surface);
    cursor: pointer;
    transition: var(--wz-transition);
    color: var(--wz-muted);
    font-weight: 500;
    font-size: var(--wz-btn-font-size) !important;
}
.wizt-orient-btn svg { width: 34px; height: 26px; display: block; }
.wizt-orient-btn:not(.is-active):hover { border-color: var(--wz-accent); color: var(--wz-accent); background: var(--wz-accent-bg); }
.wizt-orient-btn.is-active { border-color: var(--wz-accent); border-width: 2px; background: var(--wz-accent-bg); color: var(--wz-accent); font-weight: 600; }

/* ── Size grid ── */
.wizt-view-toggle { display: flex; gap: 4px; margin-bottom: 20px; }
.wizt-view-btn {
    display: inline-block;
    padding: 5px 16px;
    font-size: var(--wz-btn-font-size) !important;
    font-weight: 600;
    border: 1.5px solid var(--wz-border);
    border-radius: 20px;
    background: var(--wz-surface);
    color: var(--wz-muted);
    cursor: pointer;
    transition: var(--wz-transition);
    line-height: 1.4;
    user-select: none;
}
.wizt-view-btn:hover { border-color: var(--wz-accent); color: var(--wz-accent); background: var(--wz-accent-bg); }
.wizt-view-btn.is-active { border-color: var(--wz-accent); border-width: 2px; background: var(--wz-accent); color: #fff; font-weight: 700; }

/* ── 3D canvas ── */
.wizt-preview-3d {
    background: transparent;
    border: none;
    border-radius: var(--wz-radius);
    overflow: hidden;
}
.wizt-3d-canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: grab;
}
.wizt-3d-canvas:active { cursor: grabbing; }
.wizt-3d-hint {
    margin: 0;
    padding: 6px 12px;
    color: var(--wz-muted);
    text-align: center;
    border-top: 1px solid var(--wz-border);
}

/* ── Custom size input ── */
.wizt-custom-wrap {
    margin-top: 10px;
    animation: wz-pop .18s ease;
    position: relative;
}
.wizt-custom-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--wz-accent);
    border-radius: var(--wz-radius-sm);
    background: var(--wz-surface);
    color: var(--wz-text);
    box-sizing: border-box;
    outline: none;
    transition: var(--wz-transition);
}
.wizt-custom-input:focus {
    box-shadow: 0 0 0 3px rgba(10,122,110,.12);
}
/* Ingevuld + bevestigd */
.wizt-custom-input.is-confirmed {
    border-color: var(--wz-dark);
    background: var(--wz-dark);
    color: #fff;
    font-weight: 600;
}
.wizt-custom-wrap.is-filled .wizt-custom-hint {
    color: var(--wz-accent);
    font-style: normal;
    font-weight: 600;
}
.wizt-custom-hint {
    margin: 5px 0 0;
    color: var(--wz-muted);
    font-style: italic;
    transition: color .2s;
}

/* ── Field hints ── */
.wizt-field-hint {
    color: var(--wz-muted);
    font-style: italic;
    margin-top: 3px;
    display: block;
}

/* ── iOS / Safari fixes ── */
input, textarea, select {
    -webkit-appearance: none;
    border-radius: 0;
}
.wizt-configurator input,
.wizt-configurator textarea {
    border-radius: var(--wz-radius-sm);
    font-size: 16px;
}
.wizt-configurator .wizt-clear-size,
.wizt-configurator .wizt-clear-color {
    border-radius: 50% !important;
    flex-shrink: 0;
}
.wizt-configurator * {
    box-sizing: border-box;
}

/* ── Size grid ── */
.wizt-size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
    padding: 4px 0 4px;
}
.wizt-size-btn {
    padding: 6px 12px;
    border: 1.5px solid var(--wz-border);
    border-radius: var(--wz-radius-sm);
    background: var(--wz-bg);
    color: var(--wz-dark);
    cursor: pointer;
    transition: var(--wz-transition);
    white-space: nowrap;
}
.wizt-size-btn:hover    { border-color: var(--wz-accent); color: var(--wz-accent); background: var(--wz-accent-bg); }
.wizt-configurator .wizt-size-btn.is-active { border-color: var(--wz-accent) !important; border-width: 2px !important; background: var(--wz-accent-bg) !important; color: var(--wz-accent) !important; font-weight: 600; }
.wizt-size-btn.is-suggested { border-color: var(--wz-accent); border-style: dashed; color: var(--wz-accent); }

.wizt-selected-size {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 11px;
    background: var(--wz-accent-bg);
    border: 1.5px solid var(--wz-accent);
    border-radius: var(--wz-radius-sm);
    animation: wz-pop .18s ease;
}
.wizt-size-label { font-weight: 600; color: var(--wz-accent-mid); flex: 1; }
.wizt-clear-size {
    width: 20px; height: 20px; border: none; border-radius: 50%;
    background: rgba(10,122,110,.15); color: var(--wz-accent);
    cursor: pointer; display: flex; align-items: center;
    justify-content: center; transition: var(--wz-transition); line-height: 1;
}
.wizt-clear-size:hover { background: var(--wz-accent); color: #fff; }
/* ── Download toolbar ── */
.wizt-download-bar {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.wizt-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1.5px solid var(--wz-border);
    border-radius: var(--wz-radius-sm);
    background: var(--wz-surface);
    color: var(--wz-muted);
    font-weight: 600;
    cursor: pointer;
    transition: var(--wz-transition);
    white-space: nowrap;
}
.wizt-dl-btn:hover {
    border-color: var(--wz-accent);
    color: var(--wz-accent);
    background: var(--wz-accent-bg);
}

/* =======================================================
   FRAME STAP (stap 4)
   ======================================================= */
/* Frame grid — 3 opties op een rij */
.wizt-frame-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 4px 0 4px;
}
.wizt-frame-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 12px 8px 10px;
    border: 1.5px solid var(--wz-border);
    border-radius: var(--wz-radius-sm);
    background: var(--wz-bg);
    color: var(--wz-muted);
    cursor: pointer;
    font-weight: 600;
    font-size: var(--wz-btn-font-size) !important;
    transition: var(--wz-transition);
    text-align: center;
    line-height: 1.3;
}
.wizt-frame-btn:hover {
    border-color: var(--wz-accent);
    color: var(--wz-accent);
    background: var(--wz-accent-bg);
}
.wizt-frame-btn.is-active {
    border-color: var(--wz-accent);
    border-width: 2px;
    background: var(--wz-accent-bg);
    color: var(--wz-accent);
    font-weight: 700;
}
.wizt-frame-icon {
    line-height: 0;
    flex-shrink: 0;
    color: inherit;
}
.wizt-frame-icon svg { display: block; }

/* Houtkleur sectie */
.wizt-frame-color-wrap {
    margin-top: 16px;
    animation: wz-pop .18s ease;
    background: var(--wz-surface);
    border: 1.5px solid var(--wz-accent);
    border-radius: var(--wz-radius-sm);
    padding: 14px 16px 16px;
}
.wizt-frame-color-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
}
.wizt-frame-color-title {
    font-weight: 700;
    color: var(--wz-accent);
    letter-spacing: .01em;
}
.wizt-frame-color-swatches {
    display: flex;
    gap: 10px;
}
.wizt-frame-color-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border: 1.5px solid var(--wz-border);
    border-radius: var(--wz-radius-sm);
    background: var(--wz-bg);
    cursor: pointer;
    font-weight: 600;
    font-size: var(--wz-btn-font-size) !important;
    color: var(--wz-muted);
    transition: var(--wz-transition);
    flex: 1;
}
.wizt-frame-color-btn:hover { border-color: var(--wz-accent); color: var(--wz-dark); }
.wizt-frame-color-btn.is-active {
    border-color: var(--wz-accent);
    border-width: 2px;
    background: var(--wz-accent-bg);
    color: var(--wz-dark);
    font-weight: 700;
}
.wizt-frame-swatch {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: block;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,.12);
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

/* =======================================================
   FORMULIER (stap 6)
   ======================================================= */
    background: var(--wz-surface);
    border: 1px solid var(--wz-border);
    border-radius: var(--wz-radius);
    padding: 24px;
    border-top: 3px solid var(--wz-accent);
    margin-top: 20px;
}
.wizt-form-header { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; }

.wizt-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
}
@media (max-width: 520px) { .wizt-form-grid { grid-template-columns: 1fr; } }

.wizt-field { display: flex; flex-direction: column; gap: 5px; }
.wizt-field--full  { grid-column: 1 / -1; }
.wizt-field--half  { min-width: 0; }

.wizt-field label {
    font-weight: 600 !important; color: #1a1a2e !important; line-height: 1.3 !important; margin-bottom: 4px !important;
}
.wizt-field label em { color: var(--wz-accent); font-style: normal; margin-left: 2px; }

.wizt-field input,
.wizt-field textarea {
    padding: 9px 12px !important;
    border: 1.5px solid var(--wz-border) !important;
    border-radius: var(--wz-radius-sm) !important;
    background: var(--wz-bg) !important; color: var(--wz-text);
    outline: none; transition: var(--wz-transition);
    box-sizing: border-box; width: 100%;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none !important;
}
.wizt-field input:focus,
.wizt-field textarea:focus {
    border-color: var(--wz-accent) !important;
    background: var(--wz-surface) !important;
    box-shadow: 0 0 0 3px rgba(10,122,110,.09) !important;
    outline: none !important;
}
.wizt-field textarea { resize: vertical; min-height: 80px; }
.wizt-field-hint { color: var(--wz-muted); line-height: 1.4; }

/* Submit row */
.wizt-form-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.wizt-submit-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 28px;
    background: var(--wz-accent); color: #fff;
    border: none; border-radius: var(--wz-radius-sm);
    font-weight: 700;
    cursor: pointer; transition: var(--wz-transition);
    letter-spacing: .01em;
    box-shadow: 0 2px 8px rgba(74,124,89,.25);
}
.wizt-submit-btn:hover   { background: var(--wz-accent-mid); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(10,122,110,.35); }
.wizt-submit-btn:active  { transform: none; }
.wizt-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.wizt-form-note { color: var(--wz-muted); }

/* Alerts */
.wizt-alert {
    margin-top: 14px; padding: 11px 14px;
    border-radius: var(--wz-radius-sm); line-height: 1.5;
    animation: wz-pop .2s ease;
}
.wizt-alert--error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.wizt-alert--success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }

/* =======================================================
   MOBIEL — alles onder 680px
   ======================================================= */
@media (max-width: 680px) {

    .wizt-configurator {
        padding: 16px;
        margin: 16px 0;
        border-radius: 8px;
    }

    /* Preview boven controls op mobiel */
    .wizt-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Preview niet sticky op mobiel */
    .wizt-preview-wrap {
        position: static;
    }

    /* Preview iets kleiner op mobiel */
    .wizt-preview {
        aspect-ratio: 3/2;
    }

    /* Vormen naast elkaar maar kleiner */
    .wizt-shape-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .wizt-shape-btn {
        padding: 8px 2px;
        }

    .wizt-shape-btn svg {
        width: 28px;
        height: 22px;
    }

    /* Tabs kleinere tekst */
    .wizt-tab {
        padding: 5px 4px;
    }

    /* Collectie swatches kleiner op mobiel */
    .wizt-collectie-swatch {
        width: 50px;
    }

    .wizt-cs-color {
        width: 36px;
        height: 36px;
    }

    .wizt-cs-label {
        max-width: 48px;
    }

    /* Afmetingen knoppen kleinere tekst */
    .wizt-size-btn {
        padding: 5px 8px;
        }

    /* Formulier 1 kolom */
    .wizt-form-grid {
        grid-template-columns: 1fr;
    }

    .wizt-field--half {
        grid-column: auto;
    }

    /* Submit knop full width */
    .wizt-form-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .wizt-submit-btn {
        width: 100%;
        justify-content: center;
        padding: 15px 20px;
        }

    .wizt-form-note {
        text-align: center;
    }
}
