/* /booknew v2 — SPA wizard styling.
   Inspired by /book's clean card UI but kept self-contained so we don't
   inherit /book/assets/css/style.css transitively. */

* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #1f6feb;
    --secondary: #475569;
    --bg-app: #f8fafc;
    --bg-card: #fff;
    --text: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,.06);
    --shadow-lg: 0 20px 60px rgba(0,0,0,.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --success: #16a34a;
    --danger: #ef4444;
    --warning: #f59e0b;
}
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg-app); color: var(--text); line-height: 1.5; min-height: 100vh; }

/* Header */
.bn-header { background: var(--primary); padding: 14px 20px; position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-md); }
.bn-header-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bn-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-size: 16px; }
.bn-brand-logo { height: 36px; width: auto; border-radius: 6px; background: #fff; padding: 4px; }
.bn-brand-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.9); }
.bn-header-nav { display: flex; gap: 16px; }
.bn-nav-link { color: #fff; text-decoration: none; font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.3); background: transparent; cursor: pointer; font-family: inherit; }
.bn-nav-link:hover { background: rgba(255,255,255,.1); }
.bn-nav-reset { background: transparent; }
.bn-nav-reset:hover { background: rgba(255,255,255,.15); }

/* ====================================================================== */
/* AI fill flash — gives the customer a visible "the AI just typed this"  */
/* signal when set_field / set_package fires while the form is being      */
/* filled rapidly.                                                         */
/* ====================================================================== */
@keyframes bnFlashFill {
    0%   { background-color: #fff3c4; box-shadow: 0 0 0 3px rgba(245, 158, 11, .35); }
    100% { background-color: transparent; box-shadow: 0 0 0 0 transparent; }
}
.bn-flash-fill { animation: bnFlashFill 1.1s ease-out 1; }

@keyframes bnFlashPick {
    0%   { background-color: #dbeafe; box-shadow: 0 0 0 4px rgba(59, 130, 246, .35); transform: scale(1.02); }
    100% { background-color: transparent; box-shadow: 0 0 0 4px rgba(31,111,235,.12); transform: scale(1); }
}
.bn-flash-pick { animation: bnFlashPick 1.1s ease-out 1; }

/* ====================================================================== */
/* Start-over confirm overlay (no native confirm())                       */
/* ====================================================================== */
.bn-confirm-overlay {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(2px);
    animation: bnFadeIn .12s ease-out;
}
.bn-confirm-dialog {
    background: #fff; border-radius: 12px;
    padding: 24px 22px 18px; width: min(420px, calc(100vw - 32px));
    box-shadow: 0 18px 48px rgba(0,0,0,.25);
    animation: bnSlideUp .15s ease-out;
}
.bn-confirm-title { font-size: 18px; font-weight: 700; color: #0f172a; margin-bottom: 8px; }
.bn-confirm-body { margin: 0 0 18px; color: #475569; font-size: 14px; line-height: 1.5; }
.bn-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Package-change toast (shown when AI updates the package on a later step) */
.bn-pkg-toast {
    position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
    background: #1f6feb; color: #fff;
    padding: 12px 20px; border-radius: 999px;
    font-size: 14px; font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    z-index: 10001;
    animation: bnToastIn .25s ease-out;
}
.bn-pkg-toast-out { animation: bnToastOut .4s ease-in forwards; }
@keyframes bnToastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes bnToastOut { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, 12px); } }

/* Main */
.bn-main { max-width: 880px; margin: 0 auto; padding: 24px 16px 96px; }

/* Stepper */
.bn-stepper { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 4px; }
.bn-step { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 8px; border: 0; background: transparent; cursor: pointer; font-family: inherit; color: var(--muted); }
.bn-step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-card); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; transition: all .15s; }
.bn-step-label { font-size: 12px; font-weight: 500; }
.bn-step-active .bn-step-num { background: var(--primary); color: #fff; border-color: var(--primary); }
.bn-step-active .bn-step-label { color: var(--primary); font-weight: 600; }
.bn-step-done .bn-step-num { background: var(--success); color: #fff; border-color: var(--success); }
.bn-step-done .bn-step-label { color: var(--success); }
.bn-step-sep { flex: 1; height: 2px; background: var(--line); margin: 0 4px; align-self: center; transform: translateY(-8px); min-width: 8px; }
.bn-step-sep.done { background: var(--success); }

/* Step content cards */
.bn-step-content { background: var(--bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 28px; min-height: 360px; }
.bn-step-content .bn-step-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.bn-step-content .bn-step-sub   { color: var(--muted); margin-bottom: 22px; font-size: 14px; }
.bn-loading { padding: 60px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bn-loading svg { animation: bn-spin 1s linear infinite; }
@keyframes bn-spin { to { transform: rotate(360deg); } }

/* Buttons */
.bn-btn { padding: 10px 18px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; cursor: pointer; border: 1px solid transparent; transition: filter .12s, transform .08s; display: inline-flex; align-items: center; gap: 6px; font-family: inherit; }
.bn-btn:hover { filter: brightness(1.05); }
.bn-btn:active { transform: translateY(1px); }
.bn-btn:disabled { opacity: .5; cursor: not-allowed; }
.bn-btn-primary { background: var(--primary); color: #fff; }
.bn-btn-ghost   { background: transparent; color: var(--text); border-color: var(--line); }
.bn-btn-large   { padding: 12px 22px; font-size: 15px; }
.bn-btn-block   { width: 100%; justify-content: center; }

/* Wizard footer (Back / Next per step) */
.bn-step-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.bn-step-nav-spacer { flex: 1; }

/* Step 1: package cards */
.bn-pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.bn-pkg-card { background: var(--bg-card); border: 2px solid var(--line); border-radius: var(--radius-md); padding: 18px; cursor: pointer; transition: border-color .15s, transform .1s, box-shadow .15s; position: relative; overflow: hidden; }
.bn-pkg-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.bn-pkg-card.selected { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(31,111,235,.12); }
.bn-pkg-img { width: 100%; height: 140px; object-fit: cover; border-radius: var(--radius-sm); background: #f1f5f9; margin-bottom: 12px; }
.bn-pkg-img-placeholder { width: 100%; height: 140px; border-radius: var(--radius-sm); background: linear-gradient(135deg, #f1f5f9, #e2e8f0); margin-bottom: 12px; display: flex; align-items: center; justify-content: center; font-size: 48px; color: #94a3b8; }
.bn-pkg-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
.bn-pkg-price { font-size: 28px; font-weight: 700; color: var(--primary); margin: 6px 0 8px; }
.bn-pkg-price.free { color: var(--success); font-size: 22px; }
.bn-pkg-price-tbc { font-size: 14px; color: var(--warning); font-weight: 600; margin: 6px 0 8px; }
.bn-pkg-meta { font-size: 12px; color: var(--muted); display: flex; gap: 12px; margin-bottom: 8px; }
.bn-pkg-desc { font-size: 13px; color: var(--muted); line-height: 1.45; }
.bn-pkg-badge { position: absolute; top: 10px; right: 10px; background: rgba(31,111,235,.95); color: #fff; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }

/* Step 2: pest verify */
.bn-yes-no { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.bn-yes-no button { padding: 16px; border: 2px solid var(--line); border-radius: var(--radius-md); background: var(--bg-card); cursor: pointer; font-size: 15px; font-weight: 600; font-family: inherit; transition: all .12s; }
.bn-yes-no button.selected { border-color: var(--primary); background: rgba(31,111,235,.05); color: var(--primary); }
.bn-yes-no button:hover { border-color: var(--primary); }
.bn-pest-ref { display: grid; grid-template-columns: 200px 1fr; gap: 16px; margin-bottom: 24px; align-items: center; }
.bn-pest-ref img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--line); background: #f1f5f9; }
.bn-pest-ref-placeholder { width: 100%; aspect-ratio: 1; border-radius: var(--radius-md); background: linear-gradient(135deg, #f1f5f9, #e2e8f0); display: flex; align-items: center; justify-content: center; font-size: 64px; color: #94a3b8; }
.bn-form-label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.bn-form-input, .bn-form-select, .bn-form-textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 15px; font-family: inherit; background: #fff; color: var(--text); }
.bn-form-input:focus, .bn-form-select:focus, .bn-form-textarea:focus { outline: 2px solid rgba(31,111,235,.4); border-color: var(--primary); }
.bn-form-row { margin-bottom: 18px; }
.bn-safety-note { background: #fef3c7; border-left: 3px solid var(--warning); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; color: #78350f; margin-top: 16px; }

/* Step 3: photos */
.bn-photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.bn-photo-slot { aspect-ratio: 1; border: 2px dashed var(--line); border-radius: var(--radius-md); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; transition: border-color .12s; background: #f8fafc; position: relative; overflow: hidden; }
.bn-photo-slot:hover { border-color: var(--primary); }
.bn-photo-slot.filled { border-style: solid; border-color: var(--primary); padding: 0; }
.bn-photo-slot.filled img { width: 100%; height: 100%; object-fit: cover; }
.bn-photo-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%; }
.bn-photo-preview { width: 100%; height: 100%; object-fit: cover; }
.bn-photo-status {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 4px 8px; font-size: 11px; line-height: 1.2;
    background: rgba(15,23,42,.78); color: #fff; text-align: center;
}
.bn-photo-status[data-kind="ok"]    { background: rgba(22,163,74,.85); }
.bn-photo-status[data-kind="error"] { background: rgba(220,38,38,.85); }
.bn-photo-status[data-kind="warn"]  { background: rgba(245,158,11,.85); }

.bn-photo-results {
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px;
    padding: 12px 14px; margin: 8px 0 12px; font-size: 13px; line-height: 1.5;
}
.bn-photo-results strong { color: #1e40af; }
.bn-photo-results-list { margin: 6px 0 0; padding-left: 18px; color: #334155; }
.bn-photo-results-list li { margin: 4px 0; }
.bn-photo-slot .bn-photo-remove { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 50%; width: 26px; height: 26px; cursor: pointer; font-size: 14px; line-height: 1; }
.bn-photo-slot .bn-photo-analysis { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.7); color: #fff; padding: 4px 8px; font-size: 11px; }

/* =======================================================================
   Voice — Floating "Talk to AI" button (entry point)
   ======================================================================= */
.bn-fab { position: fixed; right: 20px; bottom: 20px; z-index: 9500; padding: 14px 22px 14px 18px; background: var(--primary); color: #fff; border: 0; border-radius: 32px; font-size: 15px; font-weight: 600; box-shadow: 0 12px 32px rgba(31,111,235,.35); cursor: pointer; display: inline-flex; align-items: center; gap: 10px; font-family: inherit; }
.bn-fab[aria-pressed="true"] { background: var(--danger); }
.bn-fab .bn-pulse { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.95); }
.bn-fab[aria-pressed="true"] .bn-pulse { animation: bn-pulse 1.2s ease-in-out infinite; }
@keyframes bn-pulse { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
/* When the sticky drawer is open the FAB hides — drawer is the live control. */
body.bn-drawer-open .bn-fab { display: none; }

/* =======================================================================
   Voice — Sticky bottom AI bar (drawer)
   Two states:
     .bn-drawer-compact   ~64 px tall, status + mic + expand + close
     .bn-drawer-expanded  ~360 px, opens transcript panel ABOVE the head row
   Body class `bn-drawer-open` reserves space at page bottom.
   ======================================================================= */
.bn-drawer { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 24px rgba(0,0,0,.12); z-index: 9501; display: flex; flex-direction: column-reverse; max-height: 80vh; transition: box-shadow 200ms ease; }
.bn-drawer[hidden] { display: none; }
.bn-drawer-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; cursor: pointer; user-select: none; min-height: 60px; }
.bn-drawer-head:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.bn-drawer-indicator { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; }
.bn-drawer-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 0 rgba(31,111,235,.4); animation: bn-drawer-pulse 1.6s ease-in-out infinite; }
@keyframes bn-drawer-pulse { 0% { box-shadow: 0 0 0 0 rgba(31,111,235,.45); } 70% { box-shadow: 0 0 0 12px rgba(31,111,235,0); } 100% { box-shadow: 0 0 0 0 rgba(31,111,235,0); } }
.bn-drawer-status-text { flex: 0 1 auto; font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn-drawer-head-spacer { flex: 1 1 auto; }
.bn-drawer-head .bn-mic { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; font-size: 17px; cursor: pointer; transition: background 150ms, transform 120ms; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.bn-drawer-head .bn-mic:hover { transform: scale(1.05); }
.bn-drawer-head .bn-mic.bn-mic-muted { background: var(--muted); }
.bn-drawer-icon-btn { background: transparent; border: 0; color: var(--muted); font-size: 17px; cursor: pointer; padding: 8px 10px; border-radius: 8px; line-height: 1; transition: background 150ms, color 150ms; flex-shrink: 0; }
.bn-drawer-icon-btn:hover { background: var(--line); color: var(--text); }
.bn-drawer-icon-btn.bn-drawer-close-btn:hover { background: rgba(220, 38, 38, .1); color: var(--danger); }
.bn-drawer-chevron { display: inline-block; transition: transform 220ms ease; font-size: 14px; }
.bn-drawer.bn-drawer-expanded .bn-drawer-chevron { transform: rotate(180deg); }

.bn-drawer-body { display: none; flex-direction: column; padding: 16px 18px 12px; border-top: 1px solid var(--line); background: #f8fafc; max-height: calc(80vh - 64px); overflow: hidden; }
.bn-drawer.bn-drawer-expanded .bn-drawer-body { display: flex; }
.bn-drawer-transcript { flex: 1 1 auto; font-size: 14px; line-height: 1.5; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 120px; max-height: 320px; }
.bn-drawer-transcript .bn-msg { padding: 4px 0; }
.bn-drawer-transcript .bn-msg.ai { color: var(--primary); }
.bn-drawer-transcript .bn-msg.user { color: var(--success); }
.bn-drawer-transcript:empty::before { content: 'The conversation will appear here once it starts.'; color: var(--muted); font-style: italic; }
.bn-drawer-body-foot { display: flex; justify-content: flex-end; padding-top: 10px; }
.bn-cost { font-size: 12px; color: var(--muted); }

/* Page reserves space so step content doesn't hide behind the sticky bar. */
body.bn-drawer-open { padding-bottom: 72px; }
body.bn-drawer-open.bn-drawer-expanded-mode { padding-bottom: 0; }
@media (max-width: 640px) {
    body.bn-drawer-open { padding-bottom: 68px; }
}

/* =======================================================================
   Photo upload modal
   State machine: choose → analysing → result | error
   ======================================================================= */
.bn-photo-modal { position: fixed; inset: 0; z-index: 9700; display: flex; align-items: center; justify-content: center; padding: 24px; }
.bn-photo-modal[hidden] { display: none; }
.bn-photo-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .6); backdrop-filter: blur(4px); }
.bn-photo-modal-dialog { position: relative; background: #fff; border-radius: 18px; max-width: 480px; width: 100%; max-height: calc(100vh - 80px); overflow: auto; padding: 28px 26px 24px; box-shadow: 0 32px 64px rgba(0,0,0,.28); }
.bn-photo-modal-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: #f1f5f9; color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background 150ms; }
.bn-photo-modal-close:hover { background: var(--line); }
.bn-photo-modal-title { font-size: 18px; font-weight: 600; margin: 0 36px 6px 0; color: var(--text); }
.bn-photo-modal-sub { color: var(--muted); font-size: 14px; line-height: 1.45; margin: 6px 0 14px; }

.bn-photo-modal-dropzone { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 20px; border: 2px dashed var(--line); border-radius: 12px; cursor: pointer; background: #f8fafc; transition: border-color 150ms, background 150ms; }
.bn-photo-modal-dropzone:hover { border-color: var(--primary); background: #f1f5fd; }
.bn-photo-modal-input { display: none; }
.bn-photo-modal-dropzone-icon { font-size: 38px; }
.bn-photo-modal-dropzone-text { color: var(--text); font-weight: 500; }
.bn-photo-modal-dropzone-hint { color: var(--muted); font-size: 12px; }

.bn-photo-modal-preview { margin: 8px 0 14px; text-align: center; }
.bn-photo-modal-preview-img { max-width: 100%; max-height: 280px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }

.bn-photo-modal-result { background: #f8fafc; padding: 12px 14px; border-radius: 10px; margin: 4px 0 12px; border-left: 3px solid var(--primary); }
.bn-photo-modal-result-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 4px; }
.bn-photo-modal-result-text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text); white-space: pre-wrap; }

.bn-photo-modal-error { background: rgba(220, 38, 38, .08); padding: 14px; border-radius: 10px; margin: 4px 0 12px; border-left: 3px solid var(--danger); }
.bn-photo-modal-error strong { display: block; color: var(--danger); margin-bottom: 4px; }
.bn-photo-modal-error-text { margin: 0; font-size: 13px; color: var(--text); }

.bn-photo-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.bn-photo-modal-actions .bn-btn { min-width: 100px; }

.bn-photo-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: bn-spin 0.8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes bn-spin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
    .bn-photo-modal { padding: 12px; }
    .bn-photo-modal-dialog { padding: 22px 18px 18px; border-radius: 14px; }
    .bn-photo-modal-title { font-size: 17px; }
    .bn-photo-modal-actions { justify-content: stretch; }
    .bn-photo-modal-actions .bn-btn { flex: 1 1 auto; }
}

/* GDPR modal (same as before but scoped) */
.bn-gdpr-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.6); backdrop-filter: blur(6px); z-index: 10000; display: none; align-items: center; justify-content: center; padding: 24px; }
.bn-gdpr-overlay:not([hidden]) { display: flex; }
.bn-gdpr-card { background: #fff; border-radius: 16px; max-width: 480px; width: 100%; padding: 28px; box-shadow: var(--shadow-lg); }
.bn-gdpr-card h2 { font-size: 20px; margin: 0 0 10px; }
.bn-gdpr-sub { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.bn-gdpr-list { padding: 0; list-style: none; margin: 0 0 18px; }
.bn-gdpr-list li { padding: 6px 0; font-size: 14px; }
.bn-gdpr-check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; font-size: 14px; cursor: pointer; }
.bn-gdpr-check input { margin-top: 3px; transform: scale(1.15); }
.bn-gdpr-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.bn-gdpr-fineprint { margin-top: 14px; font-size: 12px; color: #94a3b8; line-height: 1.4; }

/* Per-step "AI assist" banner shown above the step body */
.bn-ai-assist { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: linear-gradient(135deg, rgba(31,111,235,.06), rgba(31,111,235,.02)); border: 1px solid rgba(31,111,235,.15); border-radius: var(--radius-sm); margin-bottom: 20px; gap: 12px; }
.bn-ai-assist-text { font-size: 13px; color: var(--muted); }
.bn-ai-assist-text strong { color: var(--primary); }
.bn-ai-assist button { padding: 8px 14px; background: var(--primary); color: #fff; border: 0; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 13px; }
.bn-voice-active .bn-ai-assist { display: none; }

/* Mobile */
@media (max-width: 640px) {
    .bn-header { padding: 12px 14px; }
    .bn-main { padding: 14px 12px 100px; }
    .bn-step-content { padding: 18px; }
    .bn-step-label { display: none; } /* keep just numbers on tight screens */
    .bn-pest-ref { grid-template-columns: 1fr; }
    .bn-photo-grid { gap: 8px; }
    .bn-fab .bn-fab-label { display: none; }
    .bn-fab { padding: 14px 16px; }
    /* Sticky drawer is already full-width by default; tighten head padding. */
    .bn-drawer-head { padding: 8px 12px; min-height: 56px; gap: 8px; }
    .bn-drawer-status-text { font-size: 13px; }
    .bn-drawer-head .bn-mic { width: 38px; height: 38px; font-size: 16px; }
    .bn-drawer-body { padding: 12px 14px 10px; }
}

/* ====================================================================== */
/* Pest info — small ℹ button on cards + modal that pops the content      */
/* ====================================================================== */
.bn-pkg-info-btn {
    position: absolute; top: 8px; right: 8px;
    width: 28px; height: 28px; padding: 0;
    border: none; border-radius: 50%;
    background: rgba(255,255,255,.9); color: #1f6feb;
    font-size: 16px; line-height: 1; font-weight: 600; font-style: italic;
    cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.18);
    transition: background .15s, transform .1s, color .15s;
    z-index: 2;
}
.bn-pkg-info-btn:hover { background: #1f6feb; color: #fff; transform: scale(1.08); }
.bn-pkg-info-btn:focus-visible { outline: 2px solid #1f6feb; outline-offset: 2px; }

.bn-info-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: flex-end; justify-content: center;
    padding: 0;
}
.bn-info-modal[hidden] { display: none; }
.bn-info-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(2px);
    animation: bnFadeIn .15s ease-out;
}
.bn-info-modal-dialog {
    position: relative; z-index: 1;
    background: #fff;
    width: 100%; max-width: 640px;
    max-height: 90vh;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,.2);
    display: flex; flex-direction: column;
    animation: bnSlideUp .2s ease-out;
}
.bn-info-modal-close {
    position: absolute; top: 10px; right: 12px;
    width: 36px; height: 36px; padding: 0;
    border: none; background: transparent;
    font-size: 28px; line-height: 1; color: #64748b;
    cursor: pointer; border-radius: 6px;
    transition: background .15s, color .15s;
    z-index: 2;
}
.bn-info-modal-close:hover { background: #f1f5f9; color: #0f172a; }
.bn-info-modal-body { flex: 1; overflow-y: auto; padding: 32px 24px 16px; }
.bn-info-modal-loading { padding: 40px; text-align: center; color: #94a3b8; }
.bn-info-modal-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 20px; border-top: 1px solid #e2e8f0; background: #f8fafc;
    border-radius: 0;
}
.bn-info-modal-newtab { color: #64748b; font-size: 13px; text-decoration: none; }
.bn-info-modal-newtab:hover { color: #1f6feb; text-decoration: underline; }
.bn-info-error { padding: 24px; color: #9a3412; text-align: center; }

/* Info content shared with standalone pest-info.php page */
.bn-info-head { border-bottom: 1px solid #e2e8f0; padding-bottom: 14px; margin-bottom: 18px; }
.bn-info-title { margin: 0 0 6px; font-size: 26px; font-weight: 700; color: #0f172a; }
.bn-info-tagline { margin: 0; color: #475569; font-size: 15px; }
.bn-info-section { margin: 18px 0; }
.bn-info-section h2 { margin: 0 0 8px; font-size: 16px; font-weight: 600; color: #0f172a; }
.bn-info-section p { margin: 0; line-height: 1.55; color: #334155; font-size: 14px; }
.bn-info-list { margin: 6px 0 0; padding: 0 0 0 18px; }
.bn-info-list li { margin: 5px 0; line-height: 1.5; color: #334155; font-size: 14px; }
.bn-info-warn { background: #fff7ed; border-left: 3px solid #f59e0b; padding: 12px 14px; border-radius: 6px; }
.bn-info-warn h2 { color: #9a3412; }
.bn-info-cta { background: #eff6ff; border-left: 3px solid #1f6feb; padding: 12px 14px; border-radius: 6px; }
.bn-info-cta h2 { color: #1e40af; }

/* ====================================================================== */
/* Calendar picker (datetime step) — ported from /book                    */
/* ====================================================================== */
.bn-cal { display: flex; gap: 24px; align-items: flex-start; }
.bn-cal-calendar {
    flex: 1; min-width: 0;
    background: #fff; border: 1px solid #e2e8f0;
    border-radius: 10px; padding: 16px;
}
.bn-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.bn-cal-month-label { font-size: 1rem; font-weight: 600; color: #0f172a; user-select: none; }
.bn-cal-nav {
    width: 32px; height: 32px; border: none; background: transparent;
    border-radius: 50%; cursor: pointer; color: #64748b;
    font-size: 18px; line-height: 1; transition: background .15s, color .15s;
}
.bn-cal-nav:hover { background: #f1f5f9; color: #0f172a; }
.bn-cal-nav:disabled { opacity: .3; cursor: not-allowed; }
.bn-cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; margin-bottom: 4px; }
.bn-cal-weekdays span { font-size: .72rem; font-weight: 600; color: #64748b; padding: 4px 0; text-transform: uppercase; letter-spacing: .03em; }
.bn-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.bn-cal-day {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 100%; aspect-ratio: 1; border: none; background: transparent;
    border-radius: 50%; font-size: .875rem; font-weight: 500; color: #0f172a;
    cursor: default; transition: background .15s, color .15s; padding: 0;
}
.bn-cal-day-empty { visibility: hidden; }
.bn-cal-day-disabled { color: #cbd5e1; }
.bn-cal-day-available { color: #1f6feb; cursor: pointer; font-weight: 600; }
.bn-cal-day-available:hover { background: rgba(31,111,235,.1); }
.bn-cal-day-today:not(.bn-cal-day-selected) { box-shadow: inset 0 0 0 2px #1f6feb; }
.bn-cal-day-selected { background: #1f6feb !important; color: #fff !important; font-weight: 600; }
.bn-cal-day-dot::after { content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: #1f6feb; }
.bn-cal-day-selected.bn-cal-day-dot::after { background: #fff; }
.bn-cal-no-dates { text-align: center; color: #64748b; font-size: .85rem; margin: 8px 0 0; }

.bn-cal-time {
    width: 220px; flex-shrink: 0;
    opacity: 0; transform: translateX(8px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}
.bn-cal-time-visible { opacity: 1; transform: translateX(0); pointer-events: auto; }
.bn-cal-time-header { font-size: .875rem; font-weight: 600; color: #0f172a; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #e2e8f0; }
.bn-cal-slots { display: flex; flex-direction: column; gap: 8px; }
.bn-cal-slot {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    width: 100%; padding: 14px 16px;
    border: 2px solid #e2e8f0; border-radius: 8px; background: #fff;
    cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s;
    text-align: left;
}
.bn-cal-slot strong { font-size: .9rem; color: #0f172a; }
.bn-cal-slot span { font-size: .8rem; color: #64748b; }
.bn-cal-slot:hover:not(:disabled) { border-color: #1f6feb; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.bn-cal-slot-selected { border-color: #1f6feb !important; background: #1f6feb !important; }
.bn-cal-slot-selected strong, .bn-cal-slot-selected span { color: #fff !important; }
.bn-cal-slot:disabled { opacity: .35; cursor: not-allowed; }
.bn-cal-slot-error { display: none; color: #dc2626; font-size: .85rem; margin-top: 10px; padding: 8px 12px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 6px; }

@media (max-width: 600px) {
    .bn-cal { flex-direction: column; gap: 16px; }
    .bn-cal-time { width: 100%; transform: translateY(8px); }
    .bn-cal-time-visible { transform: translateY(0); }
    .bn-cal-slots { flex-direction: row; }
    .bn-cal-slot { flex: 1; }
}

/* Identification visuals grid (pest photo + droppings/signs/damage) */
.bn-info-visuals {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 8px;
}
.bn-info-visual {
    margin: 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.bn-info-visual img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}
.bn-info-visual figcaption {
    padding: 8px 10px 10px;
    font-size: 12px;
    line-height: 1.35;
    color: #334155;
}
.bn-info-visual figcaption strong {
    display: block;
    color: #0f172a;
    font-size: 13px;
    margin-bottom: 2px;
}
.bn-info-credit {
    color: #94a3b8;
    font-size: 11px;
}

@keyframes bnFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bnSlideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (min-width: 720px) {
    .bn-info-modal { align-items: center; padding: 24px; }
    .bn-info-modal-dialog { border-radius: 12px; max-height: 85vh; }
    .bn-info-modal-foot { border-radius: 0 0 12px 12px; }
}
@media (max-width: 480px) {
    .bn-info-modal-body { padding: 28px 18px 12px; }
    .bn-info-title { font-size: 22px; }
    .bn-info-modal-foot { flex-direction: column-reverse; align-items: stretch; }
    .bn-info-modal-foot .bn-btn { width: 100%; }
    .bn-info-modal-newtab { text-align: center; }
}
