/*
 * Vloershop Core — offerteformulier (.vs-quote) + product-picker.
 * Theme-resistant onder .vs-quote-wrap.
 */

.vs-quote-wrap,
.vs-quote-wrap * {
    box-sizing: border-box;
}

.vs-quote {
    --vs-q-accent: var(--vs-color-primary, #4056b4);
    --vs-q-border: #e1e4ec;
    --vs-q-radius: 8px;
    counter-reset: vs-step;
    display: flex !important;
    flex-direction: column !important;
    gap: 26px !important;
    max-width: 760px;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif !important;
    color: #2a3065;
}

.vs-quote__hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.vs-quote__step {
    counter-increment: vs-step;
    padding: 22px !important;
    background: #fff !important;
    border: 1px solid var(--vs-q-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(15, 18, 25, 0.04) !important;
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.vs-quote__step:focus-within {
    border-color: var(--vs-q-accent) !important;
    box-shadow: 0 4px 18px rgba(15, 18, 25, 0.08) !important;
}

.vs-quote__h {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 0 16px !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    color: var(--vs-q-accent) !important;
}

/* Genummerde stap-badge via CSS-counter (geen markup-wijziging nodig). */
.vs-quote__h::before {
    content: counter(vs-step);
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: var(--vs-q-accent);
    border-radius: 50%;
}

.vs-quote__grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
}

.vs-quote__field {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

.vs-quote__field > span {
    color: #55585f;
}

.vs-quote .vs-quote__field input,
.vs-quote .vs-quote__field select,
.vs-quote textarea {
    width: 100% !important;
    padding: 11px 12px !important;
    font-family: inherit !important;
    font-size: 15px !important;
    color: #2a3065 !important;
    background: #fff !important;
    border: 1px solid var(--vs-q-border) !important;
    border-radius: var(--vs-q-radius) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vs-quote .vs-quote__field input:focus,
.vs-quote .vs-quote__field select:focus,
.vs-quote textarea:focus {
    outline: none !important;
    border-color: var(--vs-q-accent) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--vs-q-accent) 18%, transparent) !important;
}

/* Fallback voor browsers zonder color-mix: zichtbare focus-ring. */
@supports not (color: color-mix(in srgb, red 50%, transparent)) {
    .vs-quote .vs-quote__field input:focus,
    .vs-quote .vs-quote__field select:focus,
    .vs-quote textarea:focus {
        box-shadow: 0 0 0 3px rgba(44, 87, 68, 0.18) !important;
    }
}

/* Ongeldige verplichte velden subtiel markeren na invoerpoging. */
.vs-quote .vs-quote__field input:user-invalid {
    border-color: #d2402f !important;
}

.vs-quote__checks {
    margin: 14px 0 0 !important;
    padding: 14px !important;
    border: 1px solid var(--vs-q-border) !important;
    border-radius: var(--vs-q-radius) !important;
}

.vs-quote__checks legend {
    padding: 0 6px;
    font-weight: 600;
    color: var(--vs-q-accent);
}

.vs-quote__check {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 6px 0 !important;
    font-size: 14px !important;
}

.vs-quote__check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--vs-q-accent);
}

/* Geselecteerde producten */
.vs-quote__selected {
    list-style: none !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vs-quote__item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px !important;
    background: #f7f8fb !important;
    border-radius: var(--vs-q-radius) !important;
}

.vs-quote__item-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    background: #fff;
}

.vs-quote__item-body {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
}

.vs-quote__item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #55585f;
}

.vs-quote__item-qty .vs-quote__qty {
    width: 80px !important;
    padding: 7px 8px !important;
}

.vs-quote__item-qty .vs-quote__unit {
    width: auto !important;
    padding: 7px 8px !important;
}

.vs-quote__remove,
.vs-quote__custom-remove {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #c0392b;
    cursor: pointer;
    font-size: 14px;
}

.vs-quote__hint {
    font-size: 13px !important;
    color: #667 !important;
    margin: 10px 0 0 !important;
}

.vs-quote__custom-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    align-items: flex-start;
}

.vs-quote__custom-row textarea {
    flex: 1 1 auto;
}

.vs-quote .vs-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 11px 18px !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--vs-q-accent) !important;
    background: #fff !important;
    border: 1px solid var(--vs-q-accent) !important;
    border-radius: var(--vs-q-radius) !important;
    cursor: pointer !important;
}

.vs-quote .vs-button--primary {
    color: #fff !important;
    background: var(--vs-q-accent) !important;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--vs-q-accent) 28%, transparent);
    transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.vs-quote .vs-button:hover {
    filter: brightness(0.97);
}

.vs-quote .vs-button--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 22px color-mix(in srgb, var(--vs-q-accent) 34%, transparent);
}

.vs-quote .vs-button:active {
    transform: translateY(0);
}

.vs-quote .vs-button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--vs-q-accent) 45%, transparent);
    outline-offset: 2px;
}

.vs-quote__submit-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin-top: 18px !important;
}

.vs-quote .vs-quote__submit {
    width: 100% !important;
    padding: 15px 22px !important;
    font-size: 16.5px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
}

.vs-quote__status {
    font-size: 14px;
    text-align: center;
    color: #c0392b;
}

.vs-quote__status:empty {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .vs-quote .vs-button--primary,
    .vs-quote__step,
    .vs-quote .vs-quote__field input,
    .vs-quote .vs-quote__field select,
    .vs-quote textarea {
        transition: none !important;
    }
}

.vs-quote__thanks {
    padding: 32px;
    text-align: center;
    background: #eef7f0;
    border: 1px solid #b8e0c2;
    border-radius: 12px;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    color: #2a3065;
}

/* Product-picker modal */
.vs-quote-picker {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 6vh 16px !important;
    background: rgba(15, 18, 25, 0.6) !important;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif !important;
}

.vs-quote-picker__box {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    overflow: hidden;
}

.vs-quote-picker__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    color: #55585f;
}

.vs-quote-picker__search {
    width: 100%;
    padding: 12px 14px;
    margin: 6px 0 14px;
    font-size: 15px;
    border: 1px solid #e1e4ec;
    border-radius: 8px;
}

.vs-quote-picker__results {
    overflow-y: auto;
    display: grid;
    gap: 8px;
}

.vs-quote-picker__item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px;
    text-align: left;
    background: #f7f8fb;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
}

.vs-quote-picker__item:hover {
    border-color: var(--vs-color-primary, #4056b4);
}

.vs-quote-picker__item img {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 6px;
}

.vs-quote-picker__name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

/* Kaartindeling: beeld, dan een tekstkolom die mag krimpen, dan de prijs.
   Zonder die eigen kolom drukte een lange productnaam de prijs tegen de rand
   en liep de regel door de titel heen. */
.vs-quote-picker__tekst {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vs-quote-picker__merknaam {
    font-size: 12.5px;
    color: #55585f;
}

.vs-quote-picker__price {
    flex: 0 0 auto;
    align-self: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--vs-color-primary, #4056b4);
    white-space: nowrap;
    text-align: right;
}

.vs-quote-picker__msg {
    padding: 16px;
    text-align: center;
    color: #667;
}

/* Sneltoetsen boven de resultaten: 1 klik naar de groep waar de bezoeker
   voor komt, in plaats van de productnaam al moeten kennen. */
.vs-quote-picker__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 10px;
}

.vs-quote-picker__chip {
    border: 1px solid #e1e4ec;
    background: #fff;
    color: var(--vs-color-primary, #4056b4);
    border-radius: 999px;
    padding: 6px 13px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.3;
}

.vs-quote-picker__chip:hover { border-color: var(--vs-color-primary, #4056b4); }

.vs-quote-picker__chip.is-actief {
    background: var(--vs-color-primary, #4056b4);
    border-color: var(--vs-color-primary, #4056b4);
    color: #fff;
}

/* Merkfilter en teller naast elkaar, boven de resultaten. */
.vs-quote-picker__merk {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
}

.vs-quote-picker__merkselect {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 260px;
    border: 1px solid #e1e4ec;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 14px;
    background: #fff;
    color: #2a3065;
}

.vs-quote-picker__telling {
    font-size: 13px;
    color: #55585f;
    white-space: nowrap;
}

.vs-quote-picker__meer {
    margin: 10px 0 0;
    border: 1px solid #e1e4ec;
    background: #fff;
    color: var(--vs-color-primary, #4056b4);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.vs-quote-picker__meer:hover {
    border-color: var(--vs-color-primary, #4056b4);
    background: #f7f8fb;
}

@media (max-width: 600px) {
    .vs-quote {
        gap: 18px !important;
    }

    .vs-quote__grid {
        grid-template-columns: 1fr !important;
    }

    .vs-quote__step {
        padding: 16px !important;
    }

    .vs-quote__h {
        font-size: 17px !important;
        gap: 10px !important;
    }

    .vs-quote__h::before {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }

    .vs-quote__item {
        flex-wrap: wrap;
    }

    /* iOS zoomt in bij font-size < 16px op focus; voorkomen. */
    .vs-quote .vs-quote__field input,
    .vs-quote .vs-quote__field select,
    .vs-quote textarea {
        font-size: 16px !important;
    }
}

/* ---- Geruststelling-balk + intro (boven het formulier) ---- */
.vs-quote__reassure {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px 22px !important;
    max-width: 760px;
    margin: 0 0 18px !important;
    padding: 14px 18px !important;
    list-style: none !important;
    background: #f9fafb !important;
    border: 1px solid #e1e4ec !important;
    border-radius: 12px !important;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif !important;
}

.vs-quote__reassure-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #2a3065 !important;
}

.vs-quote__reassure-icon {
    flex: 0 0 auto;
    color: #22c55e;
}

.vs-quote__intro {
    max-width: 760px;
    margin: 0 0 20px !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: #4a5263;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif !important;
}

@media (max-width: 520px) {
    .vs-quote__reassure {
        flex-direction: column !important;
        gap: 8px !important;
    }
}

/* ---- Foto-upload (optioneel) ---- */
.vs-quote__photos {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}

.vs-quote__photo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vs-quote__photo {
    position: relative;
    width: 92px;
    height: 92px;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f3f7;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(35, 36, 39, 0.08);
}

.vs-quote__photo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vs-quote__photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: rgba(35, 36, 39, 0.78);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs-quote__photo-remove:hover {
    background: #324696;
}

.vs-quote__photo.is-uploading {
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    color: #4a5263;
}

.vs-quote__photo-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(35, 36, 39, 0.2);
    border-top-color: #324696;
    border-radius: 50%;
    animation: vs-quote-spin 0.7s linear infinite;
}

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

.vs-quote__photo-add {
    width: 92px;
    height: 92px;
    border-radius: 12px;
    border: 2px dashed rgba(35, 36, 39, 0.25);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #232427;
    cursor: pointer;
    padding: 8px;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.vs-quote__photo-add:hover {
    border-color: #324696;
    color: #324696;
}

.vs-quote__photo-add input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* Picker-prijs: doorgestreepte oude prijs gedempt naast de actieprijs. */
.vs-quote-picker__price del { color: #a2a3a6; font-weight: 400; font-size: 0.85em; margin-left: 6px; }
.vs-quote-picker__price ins { text-decoration: none; }
/* De eenheid hoort bij het bedrag: een plint is per meter geoffreerd. */
.vs-quote-picker__unit { color: #6c757d; font-weight: 400; font-size: 0.85em; }
