/* Pune Rental Hub — booking form (booking-form.js). Load after tokens.css + site.css.
   Builds on site.css .field/.input/.select/.textarea/.checkbox/.segmented/.progress/.btn; everything else is .bf-*. */

.bf { --bf-gap: 16px; color: var(--text); }
.bf .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.bf-form { display: flex; flex-direction: column; gap: var(--bf-gap); }

/* steps */
.bf-steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; counter-reset: none; }
.bf-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 700; color: var(--muted); min-width: 0; }
.bf-step-n { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .84rem; border: 2px solid var(--line); background: var(--surface); transition: all .3s var(--ease-spring); }
.bf-step-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-steps li.is-current { color: var(--text); }
.bf-steps li.is-current .bf-step-n { background: var(--zendu); border-color: var(--zendu); color: var(--ink); transform: scale(1.08); }
.bf-steps li.is-done .bf-step-n { background: var(--sahyadri); border-color: var(--sahyadri); color: var(--ink); font-size: 0; }
.bf-steps li.is-done .bf-step-n::after { content: "✓"; font-size: .9rem; }
@media (max-width: 420px) { .bf-steps li:not(.is-current) .bf-step-l { display: none; } }
.bf-progress { margin-top: -6px; }

.bf-panel { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--bf-gap); animation: bf-in .45s var(--ease-out); }
.bf-panel[hidden] { display: none; }
@keyframes bf-in { from { opacity: 0; transform: translateX(16px); } }
.bf-legend { font: 800 1.25rem/1.1 var(--font-display); font-variation-settings: "wdth" 80; padding: 0; margin-bottom: 2px; outline: none; }
.bf-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.bf-row > :first-child:nth-last-child(3) { grid-column: 1 / -1; }
.bf-row--2 { grid-template-columns: 1fr; }
@media (min-width: 560px) { .bf-row { grid-template-columns: 1.3fr 1fr .8fr; } .bf-row > :first-child:nth-last-child(3) { grid-column: auto; } .bf-row--2 { grid-template-columns: 1fr 1fr; } }
.vd-aside .bf-row { grid-template-columns: 1fr 1fr; }
.vd-aside .bf-row > :first-child:nth-last-child(3) { grid-column: 1 / -1; }
.vd-aside .bf-row--2 { grid-template-columns: 1fr; }
.bf-req { color: var(--link); }
.bf-opt { font-weight: 500; color: var(--muted); font-size: .84em; }
.bf-error:empty { display: none; }
.bf-error { margin: 0; }
.bf-field.has-error .bf-hint { color: var(--muted); font-weight: 400; } /* keep hint neutral; error line carries the message */
.bf-field.has-error .bf-seg, .bf-field.has-error .bf-docs { outline: 2px solid var(--danger); outline-offset: 2px; border-radius: var(--r-md); }
.bf-field.is-locked .select { background-color: var(--surface-2, var(--chai-2)); }
.bf-hint { margin: 0; }
.bf-return { margin: -6px 0 0; font-size: .86rem; color: var(--muted); font-weight: 600; }

/* type segmented with icons */
.bf-seg--type span { gap: 8px; }
.bf-seg--type svg { width: 26px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* quote */
.bf-quote:empty { display: none; }
.bf-quote-card { padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2, var(--chai-2)); border: 1px solid var(--line); animation: bf-in .35s var(--ease-out); }
.bf-quote-card.is-estimate { border-style: dashed; }
.bf-quote-title { margin: 0 0 8px; font-weight: 700; }
.bf-quote-card dl { margin: 0 0 8px; display: grid; gap: 4px; }
.bf-quote-card dl div { display: flex; justify-content: space-between; gap: 10px; }
.bf-quote-card dt { color: var(--muted); }
.bf-quote-card dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.bf-quote-total { border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 2px; font-size: 1.12rem; }
.bf-quote-total dt { color: var(--text) !important; font-weight: 700; }
.bf-quote-meta { margin: 0; font-size: .82rem; color: var(--muted); }
.bf-quote-empty { margin: 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2, var(--chai-2)); font-size: .9rem; }
.bf-quote--mini p { margin: 0; font-size: .86rem; color: var(--muted); padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface-2, var(--chai-2)); }
.bf-sk { display: block; height: 18px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2, var(--chai-2)) 25%, color-mix(in srgb, var(--surface-2, var(--chai-2)) 40%, var(--surface)) 50%, var(--surface-2, var(--chai-2)) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.bf-sk--q { height: 110px; border-radius: var(--r-md); }

/* docs */
.bf-docs { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.bf-doc { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 12px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--surface); transition: border-color .2s, background .2s; }
.bf-doc:has(input[name="docsAvailable"]:checked) { border-color: color-mix(in srgb, var(--zendu) 55%, var(--line)); }
.bf-doc.has-file { border-color: var(--sahyadri); background: color-mix(in srgb, var(--sahyadri) 8%, var(--surface)); }
.bf-doc.has-upload-error { border-color: var(--danger); }
.bf-doc .bf-check { flex: 1 1 220px; }
.bf-check span { display: block; }
.bf-check strong { display: block; font-size: .95rem; }
.bf-check small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.bf-upload { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 1 auto; }
.bf-upload-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: var(--r-pill); border: 1.5px dashed color-mix(in srgb, var(--text) 30%, transparent); font-size: .84rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.bf-upload-btn:hover { border-style: solid; border-color: var(--text); }
.bf-upload-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bf-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.bf-file:focus-visible + .bf-upload-st, .bf-upload:focus-within .bf-upload-btn { box-shadow: var(--focus); }
.bf-upload-st { margin: 0; font-size: .78rem; color: var(--muted); max-width: 260px; text-align: right; }
.has-upload-error .bf-upload-st { color: var(--danger); font-weight: 600; }
.has-file .bf-upload-st { color: var(--sahyadri); font-weight: 700; }
[data-theme="dark"] .has-file .bf-upload-st { color: #3FD39C; }
@media (max-width: 480px) { .bf-upload { align-items: flex-start; } .bf-upload-st { text-align: left; } }

/* consents */
.bf-consents { display: grid; gap: 12px; padding: 14px; border-radius: var(--r-md); background: var(--surface-2, var(--chai-2)); border: 1px solid var(--line); }
.bf-consents .checkbox { font-size: .9rem; line-height: 1.45; }
.bf-check--soft { color: var(--muted); }
.bf-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* nav + summary */
.bf-nav { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.bf-nav [data-next] { margin-left: auto; flex: 1 1 auto; max-width: 360px; }
.bf-nav [data-back][hidden] { display: none; }
.bf-submit { --btn-bg: var(--zendu); }
.btn.is-busy { pointer-events: none; }
.btn.is-busy::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.bf-foot { margin: 0; font-size: .8rem; color: var(--muted); text-align: center; }
.bf-summary-err { padding: 12px 14px; border-radius: var(--r-md); border: 1.5px solid var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); font-size: .9rem; outline: none; }
.bf-summary-err[hidden] { display: none; }
.bf-summary-err p { margin: 0 0 6px; font-weight: 700; }
.bf-summary-err ul { margin: 0; padding-left: 18px; }
.bf-summary-err a { color: var(--danger); font-weight: 600; }
.bf-err-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bf-err-actions .btn { min-height: 40px; font-size: .9rem; }
.bf-warn .cat-state { padding: 16px; border-width: 1px; text-align: left; }
.bf-warn .cat-state-icon { display: none; }
.bf-warn .cat-state h3 { font-size: 1.05rem; }
.bf-warn .cat-state p { margin: 0; font-size: .86rem; }
.bf-warn .cat-state-actions { justify-content: flex-start; }
.bf-warn .btn { min-height: 38px; font-size: .86rem; }

/* success */
.bf-success { text-align: center; padding: 8px 4px; outline: none; animation: bf-in .5s var(--ease-out); }
.bf-success h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 10px 0 6px; }
.bf-success h3 { font-size: 1.05rem; margin: 18px 0 8px; }
.bf-ref { font-size: 1rem; }
.bf-ref strong { font: 800 1.3rem/1 ui-monospace, monospace; letter-spacing: .05em; background: var(--vadapav); color: var(--ink); padding: 4px 10px; border-radius: 8px; display: inline-block; margin-left: 4px; user-select: all; }
.bf-success-burst svg { width: 72px; height: 72px; fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.bf-success-burst circle { stroke: var(--sahyadri); stroke-dasharray: 176; stroke-dashoffset: 176; animation: bf-draw .7s var(--ease-out) forwards; }
.bf-success-burst path { stroke: var(--sahyadri); stroke-dasharray: 50; stroke-dashoffset: 50; animation: bf-draw .5s var(--ease-out) .5s forwards; }
@keyframes bf-draw { to { stroke-dashoffset: 0; } }
.bf-bring { text-align: left; max-width: 420px; margin: 0 auto; padding-left: 20px; font-size: .92rem; }
.bf-bring li { margin: 4px 0; }
.bf-success-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 18px 0 12px; }

/* compact hero widget */
.bf--compact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-lg); }
.bfc { display: flex; flex-direction: column; gap: 12px; }
.bfc-h { font-size: 1.25rem; margin: 0; }
.bfc-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; }
.bfc .label { font-size: .8rem; }
.bfc .input, .bfc .select { min-height: 44px; }
.bfc-return { margin: -2px 0 0; font-size: .8rem; color: var(--muted); }
.bfc-price { min-height: 58px; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface-2, var(--chai-2)); display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.bfc-from { font-size: .95rem; }
.bfc-from strong { font: 700 1.5rem/1 var(--font-body); font-variant-numeric: tabular-nums; }
.bfc-dep { font-size: .8rem; color: var(--muted); }
.bfc-count { font-size: .76rem; font-weight: 700; color: var(--sahyadri); }
[data-theme="dark"] .bfc-count { color: #3FD39C; }
.bfc-go { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .bf-panel, .bf-quote-card, .bf-success, .bf-steps .bf-step-n { animation: none !important; transition: none !important; }
  .bf-success-burst circle, .bf-success-burst path { animation: none; stroke-dashoffset: 0; }
}

/* ---------- online booking closed: call-to-book card ---------- */
.bf-closed { display: flex; flex-direction: column; gap: 14px; padding: clamp(20px, 4vw, 32px); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 40px -24px rgba(22,19,46,.35); color: var(--text); }
.bf-closed-tag { align-self: flex-start; background: var(--zendu); color: var(--ink); font-weight: 800; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; padding: 5px 12px; border-radius: var(--r-pill); }
.bf-closed-h { margin: 0; }
.bf-closed-actions { gap: 10px; }
.bf-closed-actions .btn { flex: 1 1 auto; justify-content: center; }
.bf-closed-list { margin: 0; padding-left: 1.1em; color: var(--muted); display: grid; gap: 4px; }
.card .bf-closed, .vd-book-card .bf-closed { padding: 0; border: 0; box-shadow: none; background: none; }
.bfc-note { margin: 8px 0 0; color: var(--muted); text-align: center; }
