/* BB CARS EXPRESS fast-book & customer chat */
.bbxh-quick{margin:14px 0 22px;padding:20px;background:linear-gradient(115deg,#e8f3fd,#f5fafc);border:1px solid #b6d4ec;border-radius:16px;color:#14283e}
.bbxh-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap}.bbxh-heading h2{margin:6px 0;font-size:clamp(1.4rem,3vw,2rem)}.bbxh-heading p{margin:3px 0 12px}.bbxh-kicker{font-size:.8rem;letter-spacing:.1em;font-weight:800;color:#145690}.bbxh-state{border-radius:24px;padding:7px 10px;font-size:.82rem;background:#fff6de;border:1px solid #f1d68b}.bbxh-state.ready{background:#def5e4;border-color:#80c69c}
#bbxh-quick-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-items:end}#bbxh-quick-form label{display:grid;gap:6px;font-weight:700;font-size:.91rem}#bbxh-quick-form select,#bbxh-quick-form input{width:100%;min-width:0;box-sizing:border-box;font:inherit;padding:10px;border:1px solid #a9bfd5;border-radius:9px;background:#fff;color:#14283e}#bbxh-quick-form button{grid-column:1/-1}
.bbxh-primary{border:0!important;border-radius:10px!important;padding:13px 17px!important;background:#16834c!important;color:#fff!important;font-weight:800!important;cursor:pointer!important;font-size:1rem!important}.bbxh-primary:hover{filter:brightness(.94)}.bbxh-primary:disabled{opacity:.55;cursor:wait}
.bbxh-small{color:#51616f;font-size:.83rem;line-height:1.45;margin:9px 0}.bbxh-quick .bbxh-small{margin:12px 0 0}
#bbxh-help-fab{position:fixed;right:18px;bottom:22px;z-index:1040;border:0;background:#19548c;color:white;padding:13px 17px;border-radius:40px;box-shadow:0 5px 22px #0004;font-size:.94rem;font-weight:800;cursor:pointer}#bbxh-help-fab[hidden]{display:none!important}
#bbxh-dialog{border:1px solid #b6c8d9;border-radius:16px;width:min(960px,95vw);max-height:88vh;padding:20px;background:white;color:#14283e;box-shadow:0 12px 60px #0005}#bbxh-dialog::backdrop{background:#172a47ab}.bbxh-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.bbxh-dialog-head h2{margin:0}.bbxh-dialog-head button{background:transparent;border:0;font-size:1.6rem;cursor:pointer}.bbxh-dialog-grid{display:grid;grid-template-columns:minmax(200px,1fr) minmax(300px,1.8fr);gap:18px;margin-top:14px}.bbxh-dialog-grid section{min-width:0}.bbxh-dialog-grid label{display:grid;font-weight:700;gap:6px;margin:12px 0}.bbxh-dialog-grid textarea,.bbxh-dialog-grid select{width:100%;min-width:0;box-sizing:border-box;border:1px solid #bccfe0;border-radius:9px;background:#fff;color:#14283e;padding:12px;font:inherit}.bbxh-thread-link{display:block;width:100%;text-align:left;margin:7px 0;padding:10px;border:1px solid #d5e2eb;border-radius:9px;background:#f5f8fb;color:#183757;cursor:pointer}.bbxh-thread-link strong,.bbxh-thread-link small{display:block}.bbxh-thread-link small{margin-top:5px;font-size:.74rem}.bbxh-bubbles{max-height:300px;overflow:auto;display:flex;flex-direction:column;gap:9px;padding:8px}.bbxh-bubble{max-width:90%;border-radius:12px;padding:10px 12px;background:#eaf3fa}.bbxh-bubble.staff{align-self:flex-end;background:#e2f4e9}.bbxh-bubble p{margin:6px 0;white-space:normal;overflow-wrap:anywhere}.bbxh-bubble small{font-size:.73rem;color:#536575}
@media(max-width:700px){#bbxh-quick-form{grid-template-columns:repeat(2,minmax(0,1fr))}.bbxh-dialog-grid{grid-template-columns:1fr}#bbxh-help-fab{right:10px;bottom:10px}#bbxh-dialog{padding:14px}}
@media(max-width:430px){#bbxh-quick-form{grid-template-columns:1fr}#bbxh-help-fab{bottom:14px;font-size:.83rem}}

/* V3 – visible, persistent unread support alerts and email choice */
#bbxh-nav-help.bbxh-has-unread,#bbxh-help-fab.bbxh-has-unread{background:#ae2139!important;color:#fff!important;font-weight:800;border-radius:18px;padding:9px 13px}
#bbxh-nav-help.bbxh-has-unread{box-shadow:0 0 0 2px #fbd7dc}
.bbxh-thread-new{border:2px solid #c02f46;background:#fff5f6}
.bbxh-thread-new strong{color:#a21732}
#bbxh-settings{margin-top:14px;padding:12px 14px;background:#eef6ff;border:1px solid #bcd5ea;border-radius:10px}
#bbxh-settings[hidden]{display:none!important}
#bbxh-settings label{display:flex;gap:10px;align-items:flex-start;font-weight:750;font-size:.92rem}
#bbxh-settings input{width:20px;height:20px;flex-shrink:0;accent-color:#19649b}
#bbxh-settings .bbxh-small{margin:8px 0 0}

/* V4: signed answers, visibly locked cases and persistent staff notification */
#bbxh-staff-alert{position:fixed;top:88px;right:20px;width:min(350px,calc(100vw - 28px));z-index:1300;background:#fff;border:2px solid #b82b3e;border-left-width:7px;border-radius:13px;box-shadow:0 12px 36px #142a3b50;padding:14px;color:#1b2a3f;display:grid;gap:6px}
#bbxh-staff-alert[hidden]{display:none!important}
#bbxh-staff-alert strong{font-size:1.03rem;color:#a81b34}
#bbxh-staff-alert span{font-size:.88rem}
#bbxh-staff-alert div{display:flex;gap:10px;justify-content:flex-end}
#bbxh-staff-alert button{cursor:pointer;border:1px solid #acbace;border-radius:7px;background:#f3f6fa;padding:7px 11px;color:#18334d;font-weight:700}
#bbxh-staff-alert [data-bbxh-open]{background:#a81b34;color:#fff;border-color:#a81b34}
.bbxh-closed-note{padding:10px;border:1px solid #adbdca;background:#eef2f5;border-radius:9px;line-height:1.5;font-weight:600}
.bbxh-closed-note[hidden],#bbxh-reply[hidden],[data-bbxh-close][hidden],[data-bbxh-reopen][hidden]{display:none!important}
.bbxh-case-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.bbxh-anon{display:flex!important;align-items:center;gap:8px!important;font-weight:650!important;flex-wrap:wrap}
.bbxh-anon input{width:19px;height:19px;accent-color:#205a8a}
.bbxh-anon small{font-size:.76rem;font-weight:400;color:#55677a}
.bbxh-newquestion{margin-top:10px}
@media(max-width:600px){#bbxh-staff-alert{top:72px;right:14px}}

/* V5: clear customer names, employee handover and robust loading indication */
.bbxh-customer-name{margin:9px 0;padding:11px 13px;border-radius:9px;background:#edf5ff;border:1px solid #c1d8ee;font-size:1.05rem}
.bbxh-assignment{padding:12px 14px;margin-top:12px;border:1px solid #c5d6e4;background:#f7fafc;border-radius:10px;display:flex;align-items:end;gap:9px;flex-wrap:wrap}
.bbxh-assignment label{flex:1 1 220px;margin:0!important}
.bbxh-assignment button{min-height:41px;cursor:pointer}
.bbxh-assignment[hidden]{display:none!important}
#bbxh-assignment-note{width:100%;margin:2px 0 0}
.bbxh-load-error{padding:12px;border:1px solid #d2a3a9;background:#fff3f3;color:#8b1729;border-radius:8px}
.bbxh-bubble strong{font-size:.87rem}

/* V5.1: accessible visual traffic-light statuses for the STAFF case list */
#bbxh-list .bbxh-case-legend{display:flex;gap:7px;flex-wrap:wrap;margin:4px 0 12px}
#bbxh-list .bbxh-case-legend span{display:inline-flex;align-items:center;font-weight:700;font-size:.78rem;border-radius:20px;padding:4px 8px}
.bbxh-legend-new{background:#ffe4e6;color:#991b1b}.bbxh-legend-progress{background:#fff0ce;color:#8f4700}.bbxh-legend-closed{background:#dcfce7;color:#166534}
#bbxh-list .bbxh-thread-link.bbxh-case--new{background:#fff1f2;border:2px solid #e35159;border-left:8px solid #bd1f2d}
#bbxh-list .bbxh-thread-link.bbxh-case--progress{background:#fff7e6;border:2px solid #e9a43a;border-left:8px solid #bf6900}
#bbxh-list .bbxh-thread-link.bbxh-case--closed{background:#edfff3;border:2px solid #62b57d;border-left:8px solid #23844c}
#bbxh-list .bbxh-thread-link.bbxh-case--new strong{color:#881924}
#bbxh-list .bbxh-thread-link.bbxh-case--progress strong{color:#71400d}
#bbxh-list .bbxh-thread-link.bbxh-case--closed strong{color:#175c38}
.bbxh-case-badge{display:inline-block;padding:4px 9px;margin:7px 0 3px;border-radius:20px;font-size:.8rem;font-weight:800;border:1px solid transparent}
.bbxh-case-badge--new{color:#9e192b;background:#ffe0e4;border-color:#f6b2bb}
.bbxh-case-badge--progress{color:#8f4500;background:#ffe5b2;border-color:#f2bd5f}
.bbxh-case-badge--closed{color:#166534;background:#d6f7e1;border-color:#82d4a0}
.bbxh-handover-note{flex:1 1 100%!important}
.bbxh-handover-history{flex:1 1 100%;max-height:230px;overflow:auto;border-top:1px solid #d6e0e8;margin-top:5px;padding-top:9px}
.bbxh-handover-history h4{margin:3px 0 7px;font-size:.9rem}
.bbxh-handover-entry{background:#fff;border:1px solid #d9e3ec;border-radius:9px;padding:9px;margin:5px 0;overflow-wrap:anywhere}
.bbxh-handover-entry b,.bbxh-handover-entry small{display:block}
.bbxh-handover-entry small{font-size:.75rem;color:#52687a;margin-top:3px}
.bbxh-handover-entry p{margin:6px 0 0;font-size:.87rem;white-space:pre-wrap}

/* V5.2.1: closed cases never offer a customer close action. Author CSS overrides theme/button rules. */
#bbxh-dialog [data-bbxh-customer-close][hidden],
#bbxh-dialog [data-bbxh-customer-close][aria-hidden="true"]{display:none!important;visibility:hidden!important;pointer-events:none!important}
