/* shared/business-switch.css — "Switch business" row, the business sheet and the /app/ chooser (shared/business-switch.js).
   Colours come from shared/theme.css (light + dark); fallbacks keep it right on pages without it (/app/ sets its own). */
.bsw-row,.bsw-item,.bsw-close{ -webkit-tap-highlight-color:transparent; touch-action:manipulation; font-family:'Inter',system-ui,sans-serif; }
.bsw-sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* Seal: the business logo on white, or its initials on the brand navy (same as the menu's business card). */
.bsw-seal{ flex:none; width:40px; height:40px; border-radius:12px; display:grid; place-items:center; overflow:hidden;
  font:700 13px 'Rajdhani','Inter',sans-serif; letter-spacing:.06em; color:#fff; background:var(--brand-seal,#104872);
  border:1px solid var(--acc-line,rgba(255,170,0,.28)); } /* theme: fixed */
.bsw-seal img{ width:100%; height:100%; object-fit:contain; background:#fff; } /* theme: fixed */

/* ---------- Row: two seals stacked (current in front) + "Switch business" + current name ---------- */
.bsw-row{ position:relative; width:100%; min-height:48px; display:flex; align-items:center; gap:12px; padding:8px 10px; border:0; background:transparent;
  color:var(--ink,#fff); text-align:left; cursor:pointer; }
.bsw-stack{ position:relative; flex:none; width:38px; height:38px; }
.bsw-stack .bsw-seal{ position:absolute; z-index:1; left:0; bottom:0; width:32px; height:32px; border-radius:10px; font-size:11.5px; letter-spacing:.04em;
  box-shadow:0 0 0 2px var(--bsw-ring,var(--bg-2,#0b1729)); }
/* A blank card offset behind the seal: "another place to go", without a clipped second logo. */
.bsw-card{ position:absolute; right:0; top:0; width:32px; height:32px; border-radius:10px; border:1px solid var(--hair,rgba(255,255,255,.12));
  background:color-mix(in srgb,var(--ink,#fff) 8%,transparent); }
.bsw-row .bsw-tx{ flex:1; min-width:0; display:flex; flex-direction:column; }
.bsw-row b{ font:600 14px 'Inter',sans-serif; color:var(--ink,#fff); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bsw-row small{ font:500 12px 'Inter',sans-serif; color:var(--ink-3,rgba(255,255,255,.45)); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bsw-row .bsw-chev{ width:15px; height:15px; flex:none; color:var(--ink-3,rgba(255,255,255,.45)); transition:transform .16s var(--ease-out,ease-out); }
.bsw-row:hover .bsw-chev{ transform:translateX(2px); }
.bsw-row:active{ background:var(--acc-soft,rgba(255,170,0,.12)); }
.bsw-row:focus-visible,.bsw-item:focus-visible,.bsw-close:focus-visible{ outline:2px solid var(--acc-text,#FFAA00); outline-offset:2px; }

/* In the phone/tablet menu (admin/shell.js) the row hangs under the business card, as one card. */
:root.shell-on .shell-who:has(+ .shell-bizswitch:not([hidden])){ margin-bottom:0; border-bottom-left-radius:0; border-bottom-right-radius:0; }
:root.shell-on .shell-bizswitch{ margin-bottom:8px; border:1px solid var(--hair); border-top:0; border-radius:0 0 14px 14px; overflow:hidden;
  background:color-mix(in srgb,var(--ink) 5%,transparent); }
:root.shell-on[data-theme="light"] .shell-bizswitch{ background:rgba(255,255,255,.8); } /* theme: fixed */
:root.shell-on .shell-bizswitch .bsw-row{ border-top:1px dashed var(--hair); }
:root.shell-on .shell-bizswitch{ --bsw-ring:#16253d; } /* the card's tint over the drawer header */ /* theme: fixed */
:root.shell-on[data-theme="light"] .shell-bizswitch{ --bsw-ring:#fff; } /* theme: fixed */

/* In the desktop side menu (admin) it sits between the business and employee cards. */
.side-bizswitch{ border:1px solid var(--hair); border-top:0; background:var(--surface); }
.side-bizswitch .bsw-row{ min-height:46px; padding:6px 10px; gap:10px; }
.side-bizswitch{ --bsw-ring:var(--surface); }
.side-bizswitch .bsw-stack{ width:36px; height:36px; }
.side-bizswitch .bsw-stack .bsw-seal,.side-bizswitch .bsw-card{ width:30px; height:30px; border-radius:50%; }
.side-bizswitch .bsw-seal{ border:0; border-radius:50%; background:var(--surface-2); color:var(--ink-2); font-family:'Inter',sans-serif; font-weight:700; } /* like the side menu's round seals */
.side-bizswitch .bsw-row:hover{ background:var(--surface-2); }
.side-bizswitch .bsw-row b{ font-size:13.5px; }

/* ---------- Business list (sheet and /app/) ---------- */
.bsw-list{ display:flex; flex-direction:column; gap:6px; }
.bsw-item{ position:relative; width:100%; min-height:64px; display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:14px;
  border:1px solid var(--hair,rgba(255,255,255,.08)); background:var(--surface-2,rgba(255,255,255,.04)); color:var(--ink,#fff); text-align:left; cursor:pointer;
  transition:border-color .16s ease, background-color .16s ease, transform .12s ease; }
.bsw-item:hover:not(:disabled){ border-color:var(--acc-line,rgba(255,170,0,.28)); }
.bsw-item:active:not(:disabled){ transform:scale(.985); }
.bsw-item.is-current{ border-color:var(--acc-line,rgba(255,170,0,.28)); background:var(--acc-soft,rgba(255,170,0,.12)); }
:root[data-theme="dark"] .bsw-item.is-current{ background:color-mix(in srgb,var(--acc) 6%,var(--surface-2)); } /* a lighter tint: 12% gold on navy reads olive */
.bsw-item:disabled{ opacity:.45; cursor:default; }
.bsw-item .bsw-tx{ flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.bsw-name{ font:600 15px/1.3 'Inter',sans-serif; color:var(--ink,#fff); overflow-wrap:anywhere; }
.bsw-role{ font:500 12.5px 'Inter',sans-serif; color:var(--ink-2,rgba(255,255,255,.66)); }
.bsw-cur{ flex:none; display:inline-flex; align-items:center; gap:4px; font:600 12.5px 'Inter',sans-serif; color:var(--acc-text,#FFAA00); }
.bsw-cur .ic{ width:16px; height:16px; }
.bsw-go{ flex:none; display:grid; place-items:center; width:20px; height:20px; color:var(--ink-3,rgba(255,255,255,.45)); }
.bsw-go .ic{ width:15px; height:15px; }
.bsw-spin{ width:16px; height:16px; border-radius:50%; border:2px solid var(--hair,rgba(255,255,255,.15)); border-top-color:var(--acc-text,#FFAA00); animation:bsw-spin .7s linear infinite; }

/* ---------- Sheet: from the bottom on phones, a centred card on wider screens ---------- */
.bsw-scrim{ position:fixed; inset:0; z-index:94; background:var(--scrim,rgba(2,6,14,.6)); backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px); }
.bsw-sheet{ position:fixed; z-index:95; left:0; right:0; bottom:0; max-height:82vh; max-height:82dvh; overflow-y:auto; overscroll-behavior:contain;
  background:var(--surface,#0f1f36); color:var(--ink,#fff); border-radius:22px 22px 0 0; border-top:1px solid var(--acc-line,rgba(255,170,0,.28)); box-shadow:var(--shadow,0 18px 40px rgba(0,0,0,.45));
  padding:10px 14px calc(18px + env(safe-area-inset-bottom,0px)); animation:bsw-up .2s var(--ease-out,ease-out); }
.bsw-scrim[hidden],.bsw-sheet[hidden]{ display:none; }
.bsw-grip{ width:40px; height:4px; border-radius:3px; background:var(--hair,rgba(255,255,255,.12)); margin:2px auto 6px; }
.bsw-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.bsw-head h2{ margin:0 4px; font:700 17px 'Rajdhani',sans-serif; letter-spacing:.12em; text-transform:uppercase; color:var(--ink,#fff); }
.bsw-close{ width:44px; height:44px; display:grid; place-items:center; flex:none; border:0; border-radius:12px; background:transparent; color:var(--ink-2,rgba(255,255,255,.66)); cursor:pointer; }
.bsw-close:hover,.bsw-close:active{ background:var(--acc-soft,rgba(255,170,0,.12)); color:var(--ink,#fff); }
.bsw-note{ margin:0 4px 14px; font:400 13.5px/1.5 'Inter',sans-serif; color:var(--ink-2,rgba(255,255,255,.66)); max-width:46ch; }
@media (min-width:640px){
  .bsw-sheet{ left:50%; right:auto; top:50%; bottom:auto; width:min(440px,calc(100vw - 48px)); max-height:min(640px,calc(100vh - 64px));
    transform:translate(-50%,-50%); border-radius:20px; border:1px solid var(--acc-line,rgba(255,170,0,.28)); padding:14px 16px 18px; animation:bsw-pop .18s var(--ease-out,ease-out); }
  .bsw-grip{ display:none; }
}
:root.bsw-lock, :root.bsw-lock body{ overflow:hidden; }
/* The install hint (shared/pwa.js, z 9999) would cover the list: tuck it away while the sheet is open. */
body:has(.bsw-scrim:not([hidden])) .ax-install{ display:none; }

/* ---------- /app/ chooser ---------- */
.bsw-choose{ margin-top:4px; }
.bsw-choose .bsw-item{ min-height:68px; }

@keyframes bsw-up{ from{ transform:translateY(24px); opacity:0; } to{ transform:none; opacity:1; } }
@keyframes bsw-pop{ from{ opacity:0; transform:translate(-50%,-48%) scale(.98); } to{ opacity:1; transform:translate(-50%,-50%); } }
@keyframes bsw-spin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ .bsw-sheet,.bsw-item,.bsw-row .bsw-chev{ animation:none !important; transition:none !important; } .bsw-spin{ animation-duration:1.6s !important; } }
