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

/* Thema-paginatitel ("Offerte aanvragen") in de huisstijl, meegelijnd met
   de gecentreerde formulier-kolom. */
body.vs-quote-form-page .page-header,
body.vs-quote-form-page .entry-header {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    border: 0;
}
body.vs-quote-form-page .entry-title {
    font-family: 'Lato', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #061b3d;
    letter-spacing: normal !important;
    max-width: 760px;
    margin: 26px auto 22px;
}

.vs-quote-wrap {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    /* Lucht tussen het formulier en de footer eronder. */
    margin-bottom: 64px;
}

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

/* Alles in het offertedeel echt in de huisstijl-font (Lato); het thema/
   Elementor-kit drukt anders zijn eigen font door op losse elementen. */
.vs-quote-wrap,
.vs-quote-wrap *,
.vs-quote-picker,
.vs-quote-picker * {
    font-family: 'Lato', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    letter-spacing: normal !important;
}

.vs-quote {
    --vs-q-accent: var(--vs-color-primary, #061b3d);
    --vs-q-border: #e6e9ef;
    --vs-q-radius: 10px;
    counter-reset: vs-step;
    display: flex !important;
    flex-direction: column !important;
    gap: 22px !important;
    max-width: 760px;
    font-family: 'Lato', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    letter-spacing: normal !important;
    color: #1f2a37;
}

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

.vs-quote__step {
    counter-increment: vs-step;
    padding: 26px 28px !important;
    background: #fff !important;
    border: 1px solid var(--vs-q-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 14px 40px rgba(6, 27, 61, 0.06) !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: #1f2733 !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(42, 48, 101, 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: 18px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 18px;
}

.vs-quote__checks legend {
    grid-column: 1 / -1;
    padding: 0;
    margin-bottom: 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: #1f2a37;
}

.vs-quote__check {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 5px 0 !important;
    font-size: 14.5px !important;
    color: #1f2a37;
    cursor: pointer;
}

.vs-quote__check input[type="checkbox"] {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    accent-color: var(--vs-q-accent);
    cursor: pointer;
}

/* ---- Diensten: keuze-toggles met contextvelden ---- */
.vs-quote__services {
    margin-top: 20px !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vs-quote__services-title {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1f2a37 !important;
}

.vs-quote__services .vs-quote__hint {
    margin: -4px 0 6px !important;
}

.vs-quote__service {
    border: 1px solid var(--vs-q-border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

/* Aangevinkt = subtiel oplichten zodat de keuze duidelijk is. */
.vs-quote__service:has(input:checked) {
    border-color: var(--vs-q-accent);
    background: #f7f9fd;
}

.vs-quote__service-head {
    display: flex !important;
    align-items: flex-start !important;
    gap: 13px !important;
    padding: 14px 16px !important;
    margin: 0 !important;
    cursor: pointer;
}

.vs-quote__service-head input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 1px;
    flex: 0 0 auto;
    accent-color: var(--vs-q-accent);
    cursor: pointer;
}

.vs-quote__service-info strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1f2a37;
    line-height: 1.35;
}

.vs-quote__service-info span {
    display: block;
    margin-top: 1px;
    font-size: 13px;
    color: #5c676d;
}

/* Reveal-paneel: contextveld dat onder een toggle / "anders" verschijnt. */
.vs-quote__reveal[hidden] { display: none !important; }

.vs-quote__service .vs-quote__reveal {
    padding: 0 16px 16px 49px;
}

.vs-quote__reveal {
    margin-top: 12px;
}

.vs-quote__reveal .vs-quote__field {
    margin: 0;
}

/* 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: 14px !important;
    padding: 12px 14px !important;
    background: #fff !important;
    border: 1px solid var(--vs-q-border) !important;
    border-radius: 12px !important;
}

.vs-quote__item-thumb {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 10px;
    background: #f5f7fa;
    border: 1px solid var(--vs-q-border);
}

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

.vs-quote__item-body strong {
    display: block;
    color: #1f2a37;
    font-weight: 700;
    line-height: 1.35;
}

.vs-quote__item-sub {
    display: block;
    margin-top: 2px;
    font-size: 12.5px;
    color: #5c676d;
}

/* Hoeveelheid + vaste eenheid als één veld (de eenheid hoort bij het product). */
.vs-quote__item-qty {
    display: flex;
    align-items: stretch;
    flex: 0 0 auto;
    border: 1px solid var(--vs-q-border);
    border-radius: var(--vs-q-radius);
    overflow: hidden;
    background: #fff;
}

.vs-quote__item-qty .vs-quote__qty {
    width: 76px !important;
    padding: 9px 10px !important;
    border: 0 !important;
    border-radius: 0 !important;
    text-align: right;
    font-size: 15px !important;
    font-family: inherit !important;
    background: #fff !important;
    color: #1f2a37 !important;
}

.vs-quote__item-qty .vs-quote__qty:focus {
    outline: none !important;
    box-shadow: none !important;
}

.vs-quote__item-qty:focus-within {
    border-color: var(--vs-q-accent);
}

.vs-quote__item-unit {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    background: #f5f7fa;
    color: #5c676d;
    font-size: 13.5px;
    font-weight: 600;
    border-left: 1px solid var(--vs-q-border);
    white-space: nowrap;
}

.vs-quote__remove,
.vs-quote__custom-remove {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border: 0 !important;
    border-radius: 8px;
    background: transparent !important;
    color: #9aa3b2 !important;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.12s ease, background-color 0.12s ease;
}

.vs-quote__remove:hover,
.vs-quote__custom-remove:hover {
    background: #fdf0ee !important;
    color: #c0392b !important;
}

.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 {
    max-width: 760px;
    margin: 0 auto;
    padding: 36px;
    text-align: center;
    background: #eef7f0;
    border: 1px solid #b8e0c2;
    border-radius: 16px;
    font-family: 'Lato', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1f2a37;
}

/* 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(6, 27, 61, 0.55) !important;
    font-family: 'Lato', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    letter-spacing: normal !important;
}

.vs-quote-picker__box {
    position: relative;
    width: 100%;
    max-width: 580px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(6, 27, 61, 0.3);
}

/* Kopbalk: titel links, sluitknop netjes rechts. */
.vs-quote-picker__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 14px 22px;
    border-bottom: 1px solid #eef1f6;
}

.vs-quote-picker__title {
    font-size: 16px;
    font-weight: 800;
    color: #061b3d;
}

/* Theme-resistant met !important: het actieve thema (Elementor-kit) zet
   anders zijn eigen knop-stijl (navy vlakken) op deze buttons. */
.vs-quote-picker__close {
    flex: 0 0 auto;
    width: 36px !important;
    height: 36px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: #f5f7fa !important;
    font-size: 22px !important;
    line-height: 1 !important;
    padding: 0 !important;
    cursor: pointer;
    color: #5c676d !important;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.vs-quote-picker__close:hover {
    background: #e9edf4 !important;
    color: #1f2a37 !important;
}

.vs-quote-picker__search {
    width: calc(100% - 44px) !important;
    margin: 16px 22px 12px !important;
    padding: 13px 16px !important;
    font-size: 15px !important;
    font-family: inherit !important;
    color: #1f2a37 !important;
    background: #fff !important;
    border: 1px solid #dbe1ea !important;
    border-radius: 10px !important;
}

.vs-quote-picker__search:focus {
    outline: none !important;
    border-color: #061b3d !important;
    box-shadow: 0 0 0 3px rgba(6, 27, 61, 0.12) !important;
}

.vs-quote-picker__results {
    overflow-y: auto;
    overflow-x: hidden;
    display: grid;
    gap: 6px;
    padding: 0 18px 18px;
}

.vs-quote-picker__item {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    width: 100%;
    padding: 9px 10px !important;
    text-align: left !important;
    background: #fff !important;
    border: 1px solid #eef1f6 !important;
    border-radius: 10px !important;
    cursor: pointer;
    color: #1f2a37 !important;
    font-family: inherit !important;
    transition: background-color 0.12s ease, border-color 0.12s ease;
}

.vs-quote-picker__item:hover {
    background: #f5f7fa !important;
    border-color: #c9d2e0 !important;
}

.vs-quote-picker__item img {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 8px;
    background: #f5f7fa;
}

.vs-quote-picker__name {
    flex: 1 1 auto;
    font-size: 14.5px;
    font-weight: 600;
    color: #1f2a37;
    line-height: 1.35;
}

.vs-quote-picker__price {
    font-size: 14px;
    font-weight: 700;
    color: #061b3d;
    white-space: nowrap;
}

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

@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;
    }
}

.vs-quote__intro {
    max-width: 760px;
    margin: 0 0 20px !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: #4a5263;
    font-family: 'Lato', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !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(6, 27, 61, 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(6, 27, 61, 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: #ef7d00;
}

.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(6, 27, 61, 0.2);
    border-top-color: #ef7d00;
    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(6, 27, 61, 0.25);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #061b3d;
    cursor: pointer;
    padding: 8px;
    transition: border-color 0.15s ease, color 0.15s ease;
}

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

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