/*
 * Valuation form 2026 - each answer opens the next question (markup: front-2024/slider/form-2026-manual-number-plate.blade.php,
 * behaviour: the script in front-2024/slider/form-2026-manual-number-plate-js.blade.php). Everything is scoped under .vf.
 *
 * Naming: .vf-block / .vf-block__element / .vf-block--modifier, state class: .has-error
 */

/* ---------- tokens ---------- */
.vf {
    --vf-green: #3fbf1a;
    --vf-green-dark: #2fa10f;
    --vf-navy: #33335c;
    --vf-text: #1d2033;
    --vf-muted: #7b7f94;
    --vf-border: #dcdfe8;
    --vf-bg-soft: #f6f6f8;
    --vf-error: #e5484d;
    --vf-radius: 8px;
    max-width: 100%;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(51, 51, 92, .14);
    padding: 22px 22px 18px;
    font-family: 'Roboto', Arial, sans-serif;
    color: var(--vf-text);
}
.vf *,
.vf *::before,
.vf *::after { box-sizing: border-box; }

/* ---------- steps: the script shows them one after the other (.show() / .hide()), the answered ones stay visible ---------- */
.vf-step {
    display: none;
    position: relative;
    margin-bottom: 20px;
}
/* the first questions are always on screen */
.vf-step--first { display: block; }
/* a step higher up must cover the next one when its dropdown is open */
.vf-step:nth-child(1) { z-index: 13; }
.vf-step:nth-child(2) { z-index: 12; }
.vf-step:nth-child(3) { z-index: 11; }
.vf-step:nth-child(4) { z-index: 10; }
.vf-step:nth-child(5) { z-index: 9; }
.vf-step:nth-child(6) { z-index: 8; }
.vf-step:nth-child(7) { z-index: 7; }
.vf-step:nth-child(8) { z-index: 6; }
.vf-step:nth-child(9) { z-index: 5; }
.vf-step:nth-child(10) { z-index: 4; }
.vf-step:nth-child(11) { z-index: 3; }
.vf-step:nth-child(12) { z-index: 2; }
.vf-step:nth-child(13) { z-index: 1; }
.vf-question {
    display: block;
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--vf-text);
}
.vf-label {
    display: block;
    margin: 14px 0 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--vf-muted);
}

/* ---------- text inputs ---------- */
.vf-input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--vf-border);
    border-radius: var(--vf-radius);
    background: var(--vf-bg-soft);
    font-size: 15px;
    color: var(--vf-text);
    box-shadow: none;
    outline: 0;
    transition: border-color .15s, background .15s;
}
.vf-input::placeholder { color: var(--vf-muted); }
.vf-input:focus {
    border-color: var(--vf-green);
    background: #fff;
}
.vf-input--plate {
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ---------- searchable select (bootstrap-select) ---------- */
.vf .bootstrap-select { width: 100% !important; }
.vf .bootstrap-select > .dropdown-toggle {
    height: 48px;
    padding: 0 40px 0 16px;
    border: 1px solid var(--vf-border);
    border-radius: var(--vf-radius);
    background: var(--vf-bg-soft);
    font-size: 15px;
    color: var(--vf-text);
    box-shadow: none !important;
    outline: 0 !important;
}
.vf .bootstrap-select > .dropdown-toggle.bs-placeholder,
.vf .bootstrap-select > .dropdown-toggle.bs-placeholder:hover { color: var(--vf-muted); }
.vf .bootstrap-select.show > .dropdown-toggle,
.vf .bootstrap-select.open > .dropdown-toggle,
.vf .bootstrap-select > .dropdown-toggle:focus {
    border-color: var(--vf-green);
    background: #fff;
}
.vf .bootstrap-select.disabled > .dropdown-toggle,
.vf .bootstrap-select > .dropdown-toggle.disabled {
    border-color: #e6e6ea;
    background: #efefef;
    color: #b5b8c4;
    opacity: 1;
    cursor: not-allowed;
}
.vf .bootstrap-select .filter-option { display: flex; align-items: center; height: 100%; }
.vf .bootstrap-select .dropdown-toggle .caret { right: 16px; }

.vf .bootstrap-select .dropdown-menu {
    width: 100%;
    min-width: 100%;
    margin-top: 6px;
    padding: 0;
    border: 1px solid var(--vf-border);
    border-radius: var(--vf-radius);
    box-shadow: 0 10px 28px rgba(51, 51, 92, .16);
    overflow: hidden;
}
.vf .bootstrap-select .bs-searchbox { padding: 8px; border-bottom: 1px solid var(--vf-border); }
.vf .bootstrap-select .bs-searchbox .form-control {
    height: 40px;
    border: 1px solid var(--vf-border);
    border-radius: 6px;
    box-shadow: none;
}
.vf .bootstrap-select .dropdown-menu li a { padding: 10px 16px; font-size: 14px; color: var(--vf-text); }
/* hover / selected / keyboard highlight is green, not the bootstrap blue */
.vf .bootstrap-select .dropdown-menu li.selected a,
.vf .bootstrap-select .dropdown-menu li.active a,
.vf .bootstrap-select .dropdown-menu li a:hover,
.vf .bootstrap-select .dropdown-menu li a:focus { background: #eaf8e4; color: var(--vf-text); outline: 0; }
.vf .bootstrap-select .dropdown-menu li.active a,
.vf .bootstrap-select .dropdown-menu li.selected.active a { background: #d9f2cf; }
.vf .bootstrap-select .dropdown-menu .inner { padding: 6px; }
.vf .bootstrap-select .dropdown-menu li a { border-radius: 6px; }

/* ---------- option buttons (body type, doors, fuel, gearbox, power): <li><input type="radio"><label> ---------- */
.vf-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.vf-options li { margin: 0; }
.vf-options li input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.vf-options li label {
    display: block;
    margin: 0;
    padding: 10px 18px;
    border: 1px solid var(--vf-green);
    border-radius: var(--vf-radius);
    background: #fff;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--vf-green);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.vf-options li label small { font-size: 12px; }
.vf-options li label:hover { background: #eaf8e4; }
.vf-options li input:checked + label {
    background: var(--vf-green);
    color: #fff;
}
.vf-options li input:focus-visible + label {
    outline: 2px solid var(--vf-navy);
    outline-offset: 2px;
}
/* one big button per row (gearbox) */
.vf-options--block li { flex: 1 1 100%; }
.vf-options--block li label { text-align: center; }


/* ---------- error: the question turns red and the message shows under the answer ---------- */
.vf-error {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--vf-error);
}
.vf-error:empty { display: none; }
.vf-error .error { display: block; font-weight: 400; color: var(--vf-error); }
.vf-step.has-error .vf-question { color: var(--vf-error); }
.vf-step.has-error .vf-input,
.vf-step.has-error .bootstrap-select > .dropdown-toggle { border-color: var(--vf-error); }
.vf-step.has-error .vf-options li label { border-color: var(--vf-green); }
.vf .form-group { margin: 0; }

/* ---------- footer: send button and progress ---------- */
.vf-footer { position: relative; z-index: 0; }
.vf-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 56px;
    border: 0;
    border-radius: var(--vf-radius);
    background: var(--vf-green);
    font-size: 17px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: background .15s;
}
.vf-btn:hover,
.vf-btn:focus { background: var(--vf-green-dark); outline: 0; }
.vf-btn--small { height: 44px; margin-top: 12px; font-size: 15px; }

.vf-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    margin: 4px 0 14px;
    font-size: 12px;
    color: var(--vf-muted);
}
.vf-progress__text b { font-size: 14px; color: var(--vf-navy); }
.vf-progress__track { stroke: #e3e6ee; }
.vf-progress__bar {
    stroke: var(--vf-green);
    stroke-linecap: round;
    transition: stroke-dasharray .35s ease;
}

/* ---------- small screens ---------- */
@media (max-width: 767px) {
    .vf { padding: 18px 16px 14px; }
    .vf-options li label { padding: 10px 14px; }
}

/* the inner list of bootstrap-select is itself a .dropdown-menu: no second frame */
.vf .bootstrap-select .dropdown-menu.inner {
    width: auto;
    min-width: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* =====================================================================
 * Car info process (front-2024/slider/car-info-process.blade.php): tip, accordion, answer buttons
 * ===================================================================== */

/* ---------- tip box on top ---------- */
.vf-tip {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--vf-green);
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #2b7a14;
}
.vf-tip .fa { margin-top: 2px; font-size: 18px; }

/* ---------- accordion: 1 di 3 / 2 di 3 / 3 di 3 ---------- */
.vf-section { border-top: 1px solid var(--vf-border); }
.vf-section:first-child { border-top: 0; }
.vf-section__head {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 16px 0;
    border: 0;
    background: none;
    text-align: left;
    font-size: 15px;
    color: var(--vf-navy);
    cursor: default;
}
.vf-section.is-done .vf-section__head { cursor: pointer; }
.vf-section__num { color: var(--vf-muted); font-weight: 500; }
.vf-section__title { font-weight: 700; }
.vf-section__done { display: none; color: var(--vf-green); font-size: 13px; }
.vf-section.is-done .vf-section__done { display: inline; }
.vf-section__arrow { margin-left: auto; font-size: 20px; transition: transform .2s; }
.vf-section.is-open .vf-section__arrow { transform: rotate(180deg); }
.vf-section__body { display: none; padding-bottom: 6px; }
.vf-section.is-open .vf-section__body { display: block; }

/* ---------- question with the (i) icon ---------- */
.vf-question-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.vf-question-row .vf-question { margin: 0; font-size: 14px; }
.vf-info { flex: 0 0 auto; color: var(--vf-green); font-size: 18px; line-height: 1; cursor: pointer; text-decoration: none; }
.vf-info:hover, .vf-info:focus { color: var(--vf-green-dark); outline: 0; text-decoration: none; }
.vf-subquestion { margin-top: 18px; }
.vf-subquestion.has-error .vf-question { color: var(--vf-error); }

/* the popover of the (i) icon */
.vf .popover {
    max-width: 300px;
    border: 1px solid var(--vf-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(51, 51, 92, .15);
    font-family: inherit;
}
.vf .popover-content { padding: 12px 14px; font-size: 12px; line-height: 1.55; color: var(--vf-text); }

/* ---------- answer buttons: equal columns ---------- */
.vf-options--2,
.vf-options--3,
.vf-options--stack { display: grid; gap: 10px; }
.vf-options--2 { grid-template-columns: repeat(2, 1fr); }
.vf-options--3 { grid-template-columns: repeat(3, 1fr); }
.vf-options--stack { grid-template-columns: 1fr; }
.vf-options--2 li label,
.vf-options--3 li label,
.vf-options--stack li label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

/* ---------- colours ---------- */
.vf-options--colors li label { display: flex; align-items: center; gap: 8px; }
.vf-dot { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); }
.vf-dot--arancione { background: #ef7d1a; }
.vf-dot--beige { background: #cfc3a0; }
.vf-dot--bianco { background: #fff; }
.vf-dot--blu-azzurro { background: #1f3d8a; }
.vf-dot--bronzo { background: #98674a; }
.vf-dot--giallo { background: #e8b800; }
.vf-dot--grigio { background: #9b9ba6; }
.vf-dot--marrone { background: #6a3c27; }
.vf-dot--nero { background: #111; }
.vf-dot--oro { background: #c4a24a; }
.vf-dot--rosso { background: #d8352a; }
.vf-dot--verde { background: #2e9e4f; }

/* ---------- photos and last details (the old fields, new look comes next) ---------- */
.vf-note { margin: 8px 0 0; font-size: 12px; color: var(--vf-muted); line-height: 1.5; }
.vf .photo_upload_validation { margin: 10px 0 0; font-size: 14px; }
.vf-check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; font-weight: 400; font-size: 13px; line-height: 1.5; cursor: pointer; }
.vf-check input { flex: 0 0 auto; margin-top: 3px; }
.vf-consents #privacy_text { max-height: 140px; overflow: auto; margin-bottom: 8px; padding: 10px; border: 1px solid var(--vf-border); border-radius: 8px; font-size: 11px; }

/* ---------- information box (the photos are optional) ---------- */
.vf-alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--vf-border);
    border-radius: 12px;
    background: #fff;
}
.vf-alert .fa { flex: 0 0 auto; margin-top: 1px; font-size: 20px; color: var(--vf-navy); }
.vf-alert p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--vf-text); }
.vf-alert strong { color: var(--vf-navy); }
