/* flow module: Van, Layouts and My designs tabs, the first-run guide and the "Get this built" request.
   Every rule is prefixed with .flow- and uses the core tokens so light and dark both work. */

/* ---- shared bits ---- */
.flow-list { margin-top: 10px; }
.flow-toprow { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.flow-toprow .vb-btn, .flow-actions .vb-btn, .flow-save .vb-btn, .flow-form-foot .vb-btn { display: inline-flex; align-items: center; gap: 6px; }
.flow-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.flow-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.flow-current { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; background: var(--vb-accent); color: #fff; font-size: 11.5px; font-weight: 600; }
.flow-linkbtn { border: 0; background: none; padding: 2px 0; font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; justify-self: start; }
.flow-kv { font-size: 12.5px; gap: 2px 12px; }
.flow-count { margin-top: 8px; font-size: 12px; }
.flow-small { font-size: 11.5px; }
.flow-more { font-size: 12.5px; }
.flow-more summary { cursor: pointer; color: var(--vb-muted); padding: 2px 0; }
.flow-more[open] summary { margin-bottom: 4px; }
.flow-highlights { margin: 4px 0 0; padding-left: 18px; }
.flow-highlights li { padding: 1px 0; font-size: 12.5px; }

.flow-filter { display: flex; gap: 6px; margin: 8px 0 2px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.flow-filter::-webkit-scrollbar { display: none; }
.flow-chipbtn { flex: none; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--vb-border); background: var(--vb-surface); color: var(--vb-text); font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.flow-chipbtn:hover { background: var(--vb-surface-2); }
.flow-chipbtn.is-on { background: var(--vb-accent); border-color: var(--vb-accent); color: #fff; }
.flow-chipbtn:focus-visible, .flow-option:focus-visible, .flow-cta:focus-visible { outline: 2px solid var(--vb-select, var(--vb-accent)); outline-offset: 2px; }

/* ---- top-view drawings made from the data ---- */
.flow-thumb { display: block; width: 100%; height: auto; max-height: 150px; border-radius: 8px; background: var(--vb-surface-2); }
.flow-thumb-small { width: 96px; flex: none; max-height: 48px; background: none; }
.flow-thumb-floor { fill: var(--vb-surface); stroke: var(--vb-muted); stroke-width: 1.2; }
.flow-thumb-cab { fill: var(--vb-border); stroke: var(--vb-muted); stroke-width: 1; opacity: 0.8; }
.flow-thumb-well { fill: var(--vb-muted); opacity: 0.4; }
.flow-thumb-item { stroke: rgba(0, 0, 0, 0.45); stroke-width: 0.6; fill-opacity: 0.92; }
.flow-thumb-door { stroke: var(--vb-accent); stroke-width: 2.4; stroke-linecap: round; }

/* ---- Van tab ---- */
.flow-van, .flow-layout, .flow-design { display: grid; gap: 6px; }
.flow-van.is-current, .flow-design.is-current { border-color: var(--vb-accent); box-shadow: 0 0 0 1px var(--vb-accent); }
.flow-van-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.flow-van-head strong { font-size: 14px; }
.flow-price { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12.5px; }

/* ---- Layouts tab ---- */
.flow-layout-name { font-size: 14px; }
.flow-bestfor { font-size: 12.5px; }
.flow-field { margin-top: 8px; }

/* ---- My designs ---- */
.flow-save { display: flex; gap: 6px; margin-top: 10px; }
.flow-save .vb-input { flex: 1 1 auto; min-width: 0; }
.flow-design-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.flow-design-head strong { font-size: 14px; overflow-wrap: anywhere; }

/* ---- the always-visible "Get this built" button over the view ---- */
.flow-cta { position: absolute; top: 10px; right: 10px; z-index: 6; display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 0; border-radius: 999px; background: var(--vb-accent); color: #fff; font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28); }
.flow-cta:hover { filter: brightness(1.07); }
.flow-cta:active { transform: translateY(1px); }
.vb-hint:not([hidden]) ~ .flow-cta { top: 50px; }

/* ---- dialogs made by this module (guide and request): the footer is drawn inside the body ---- */
.flow-modal .vb-modal-foot { display: none; }
.flow-modal .vb-modal-body { padding-bottom: 16px; }
.flow-form-foot, .flow-guide-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.flow-guide-foot { justify-content: space-between; position: sticky; bottom: -16px; margin: 12px -16px -16px; padding: 10px 16px 14px; background: var(--vb-surface); border-top: 1px solid var(--vb-border); border-radius: 0 0 14px 14px; }

/* ---- first-run guide ---- */
.flow-steps { display: flex; gap: 6px; margin-bottom: 10px; }
.flow-step { flex: 1 1 0; display: flex; align-items: center; gap: 7px; min-width: 0; padding: 6px 8px; border-radius: 9px; background: var(--vb-surface-2); color: var(--vb-muted); font-size: 12.5px; }
.flow-step b { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--vb-border); color: var(--vb-text); font-size: 11.5px; }
.flow-step span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-step.is-on { color: var(--vb-text); font-weight: 600; }
.flow-step.is-on b, .flow-step.is-done b { background: var(--vb-accent); color: #fff; }
.flow-guide-lead { font-size: 13.5px; margin-bottom: 6px; }
.flow-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 8px; }
.flow-options-wide { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.flow-option { display: grid; gap: 3px; align-content: start; padding: 9px 10px; border: 1px solid var(--vb-border); border-radius: var(--vb-radius); background: var(--vb-surface); color: var(--vb-text); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.flow-option:hover { background: var(--vb-surface-2); }
.flow-option.is-on { border-color: var(--vb-accent); box-shadow: 0 0 0 2px var(--vb-accent); }
.flow-option strong { font-size: 13.5px; }
.flow-option .flow-thumb { max-height: 96px; margin-bottom: 3px; }
.flow-tips { margin: 6px 0 10px; padding-left: 22px; display: grid; gap: 8px; }
.flow-tips li { font-size: 13px; }
.flow-tips li strong { display: block; }
.flow-tips li span { color: var(--vb-muted); }

/* ---- "Get this built" request ---- */
.flow-quote { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 18px; align-items: start; }
.flow-quote-summary { display: grid; gap: 10px; }
.flow-shot { display: block; width: 100%; height: auto; max-height: 240px; object-fit: cover; border-radius: 10px; border: 1px solid var(--vb-border); background: var(--vb-surface-2); }
.flow-estimate { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--vb-surface-2); font-size: 12px; }
.flow-estimate-figure { font-size: 20px; line-height: 1.25; }
.flow-finishes { font-size: 12px; }
.flow-keyitems { list-style: none; margin: 0; padding: 0; }
.flow-keyitems li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--vb-border); font-size: 12.5px; }
.flow-keyitems li:last-child { border-bottom: 0; }
.flow-keyitem-name { min-width: 0; overflow-wrap: anywhere; }
.flow-quote-form { display: grid; gap: 4px; }
.flow-honest { padding: 9px 11px; border-radius: 9px; border-left: 3px solid var(--vb-accent); background: var(--vb-surface-2); font-size: 13px; }
.flow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.flow-radios { display: grid; gap: 6px; margin-top: 2px; }
.flow-radio { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--vb-border); border-radius: 9px; color: var(--vb-text); font-size: 13.5px; cursor: pointer; }
.flow-radio input { flex: none; width: 17px; height: 17px; accent-color: var(--vb-accent); }
.flow-radio:has(input:checked) { border-color: var(--vb-accent); background: var(--vb-surface-2); }
.flow-notes { width: 100%; min-height: 76px; height: auto; padding-top: 8px; padding-bottom: 8px; resize: vertical; font-family: inherit; }
.flow-hint { font-size: 11px; }
.flow-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.flow-result { grid-column: 1 / -1; display: grid; gap: 8px; padding: 8px 0; }
.flow-result h3 { font-size: 17px; }
.flow-send { min-width: 170px; justify-content: center; }

/* ---- phone ---- */
.flow-rent { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border-radius: var(--vb-radius); border: 1px solid color-mix(in srgb, var(--vb-accent) 45%, var(--vb-border)); background: color-mix(in srgb, var(--vb-accent) 8%, var(--vb-surface)); }
.flow-rent-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 180px; }
.flow-rent-btn { border-color: var(--vb-accent); color: var(--vb-accent); white-space: nowrap; }

@media (max-width: 860px), (max-width: 960px) and (max-height: 500px) {
  .flow-cta { top: 8px; right: 8px; padding: 8px 12px; font-size: 13px; }
  .vb-hint:not([hidden]) ~ .flow-cta { top: 58px; }
  .flow-quote { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .flow-shot { max-height: 170px; }
  .flow-chipbtn { padding: 8px 13px; font-size: 13.5px; }
  .flow-actions .vb-btn, .flow-toprow .vb-btn { min-height: 38px; padding-left: 12px; padding-right: 12px; }
  .flow-save .vb-btn { min-height: 38px; }
  .flow-options, .flow-options-wide { grid-template-columns: minmax(0, 1fr); }
  .flow-option { padding: 11px 12px; font-size: 13.5px; }
  .flow-step span { display: none; }
  .flow-step { justify-content: center; }
  .flow-step.is-on span { display: inline; }
  .flow-step.is-on { flex: 3 1 0; }
  .flow-form-foot .vb-btn { flex: 1 1 auto; min-height: 42px; justify-content: center; }
  .flow-guide-foot .vb-btn { min-height: 42px; min-width: 96px; justify-content: center; }
  .flow-radio { padding: 11px 12px; }
}

@media (max-width: 420px) {
  .flow-grid { grid-template-columns: minmax(0, 1fr); }
  .flow-cta span { max-width: 9.5em; }
}
