/* Dine Check client portal - the app shell (UI v4, v94).
   portal.js (Shell) draws a bottom tab bar on a phone, a slim rail on a tablet and a sidebar on a
   computer, over the same screens as before. Everything below waits for html.shell-on, which the
   script sets once someone is signed in with the shell switched on (?shell=1); without it nothing
   here applies. Colours come from the design-system tokens (dc.css), so light and dark both work.
   Widths: phone < 768 px · tablet 768-1023 px · computer ≥ 1024 px. */

.skip{position:absolute;left:12px;top:-80px;z-index:100;background:var(--accent);color:var(--accent-on);padding:10px 14px;border-radius:10px;font-weight:700;text-decoration:none}
.skip:focus{top:calc(12px + env(safe-area-inset-top))}
.sh-back,.sh-venue,.sh-crumbs,.sh-side,.sh-tabs{display:none}
#view:focus{outline:none}

/* ---- shared pieces */
.shi{display:inline-grid;place-items:center;flex:none}
.shi svg{width:20px;height:20px;display:block;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
html.shell-on .shhead{display:flex;flex-wrap:wrap;gap:12px 16px;align-items:flex-end;margin:4px 0 18px}
html.shell-on .shhead .grow{flex:1 1 280px;min-width:0}
html.shell-on .shhead h1{margin:0}
html.shell-on #view h1:focus{outline:none}
html.shell-on #view h1:focus-visible{outline:2.5px solid var(--accent);outline-offset:4px;border-radius:4px}
.shlead{margin:6px 0 0;color:var(--ink2);max-width:70ch}
.shacts{display:flex;flex-wrap:wrap;gap:8px}
.shlist{border:1px solid var(--line);border-radius:14px;background:var(--surface);overflow:hidden}
.shrow{display:flex;align-items:center;gap:12px;width:100%;text-align:left;font:inherit;color:var(--ink);background:none;border:0;border-bottom:1px solid var(--line-soft,var(--line));
  padding:11px 14px;min-height:60px;cursor:pointer;transition:background .12s}
.shrow:last-child{border-bottom:0}
.shrow:hover{background:var(--surface2)}
.shrow:active{background:var(--surface2)}
.shrow:focus-visible{outline:2.5px solid var(--accent);outline-offset:-3px}
.shrow-ic{width:38px;height:38px;border-radius:10px;background:var(--accent-soft);color:var(--ds-brand-ink,var(--accent))}
.shrow-ic svg{width:19px;height:19px}
.shrow-t{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:1px}
.shrow-t b{font-weight:650;line-height:1.35;overflow-wrap:anywhere}
.shrow-s{font-size:13.5px;color:var(--ink2)}
.shrow-s.todo{color:var(--bad);font-weight:600}
.shrow .pill{flex:none}
.shrow-go{color:var(--ink3)}
.shrow-go svg{width:18px;height:18px}
.shsec{margin-top:22px}
.shsec h2{margin:0 0 10px}
.shgrp{font-size:11px!important;font-weight:650;font-stretch:112%;letter-spacing:.11em;text-transform:uppercase;color:var(--ink3);margin:24px 0 8px!important}
.shout{width:100%;margin-top:24px;min-height:50px;display:flex;gap:8px;justify-content:center;align-items:center;color:var(--bad)!important;
  border-color:color-mix(in srgb,var(--bad) 45%,transparent)!important;background:transparent!important}
.shlegal{text-align:center;margin-top:14px}
/* a part that is not on the plan: what it does, and one way to ask */
.shupsell{display:flex;flex-wrap:wrap;padding:0!important;overflow:hidden}
.shup-main{flex:1 1 360px;padding:24px}
.shup-ic{width:50px;height:50px;border-radius:14px;background:var(--accent-soft);color:var(--ds-brand-ink,var(--accent));margin-bottom:14px}
.shup-ic svg{width:24px;height:24px}
.shup-main h2{margin:4px 0 8px;font-size:22px;line-height:1.25}
.shup-main p{margin:0;color:var(--ink2);max-width:62ch}
.shup-acts{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0 6px}
.shup-list{flex:1 1 280px;list-style:none;margin:0;padding:24px;background:var(--surface2);display:flex;flex-direction:column;gap:14px;justify-content:center}
.shup-list li{display:flex;gap:10px;align-items:flex-start}
.shup-list .shi{color:var(--ok);margin-top:1px}
.shup-list .shi svg{stroke-width:2.4}

/* ---- the place buttons (tab bar and sidebar share them) */
.nic{position:relative;display:grid;place-items:center}
.nbadge{position:absolute;top:-5px;left:calc(50% + 6px);min-width:18px;height:18px;padding:0 5px;box-sizing:border-box;border-radius:9px;
  background:var(--bad);color:var(--bg);font-size:11px;font-weight:800;line-height:18px;text-align:center;font-variant-numeric:tabular-nums}
.nlock{position:absolute;top:-3px;left:calc(50% + 5px);width:17px;height:17px;border-radius:50%;display:grid;place-items:center;
  background:var(--surface);color:var(--ink2);box-shadow:0 0 0 1px var(--line)}
.nlock .shi svg{width:10px;height:10px;stroke-width:2.8}

/* ====================================================================== phone (< 768 px) */
@media (max-width:767.98px){
  html.shell-on .bar .brand,html.shell-on #menuwrap{display:none!important}
  html.shell-on .bar .in{padding:8px 12px 8px 10px;min-height:60px}
  html.shell-on .bellwrap{margin-left:auto}
  html.shell-on .sh-back:not([hidden]){display:inline-flex}
  html.shell-on .sh-venue:not([hidden]){display:block;flex:1 1 auto;min-width:0}
  html.shell-on main{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
  html.shell-on .legalfoot{display:none}
  html.shell-on .sh-tabs:not([hidden]){display:flex}
  /* a module's own section tabs become a row of chips that scrolls sideways */
  html.shell-on #view .tabs{flex-wrap:nowrap;overflow-x:auto;gap:8px;margin:-4px -18px 16px;padding:4px 18px 8px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  html.shell-on #view .tabs::-webkit-scrollbar{display:none}
  html.shell-on #view .tab{flex:none;min-width:0;display:inline-flex;align-items:center;gap:6px;border-radius:99px;padding:8px 14px;min-height:42px;box-shadow:none;transform:none}
  html.shell-on #view .tab b{font-size:14px;white-space:nowrap}
  html.shell-on #view .tab .sub{display:none}
  html.shell-on #view .tab .sub.todo{display:inline-block;margin:0;font-size:12px}
  html.shell-on #view .tab[aria-selected=true]{background:var(--accent);border-color:var(--accent);box-shadow:none}
  html.shell-on #view .tab[aria-selected=true] b,html.shell-on #view .tab[aria-selected=true] .sub.todo{color:var(--accent-on)}
  /* the landing pages' tiles become one list, as on a phone's settings screen */
  html.shell-on #view .hub{display:flex;flex-direction:column;gap:0;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--surface)}
  html.shell-on #view .hubtile{position:relative;border:0;border-radius:0;border-bottom:1px solid var(--line-soft,var(--line));background:transparent;min-height:60px;padding:11px 44px 11px 14px;justify-content:center}
  html.shell-on #view .hubtile:last-child{border-bottom:0}
  html.shell-on #view .hubtile::after{content:"";position:absolute;right:18px;top:50%;width:8px;height:8px;border-right:2px solid var(--ink3);border-top:2px solid var(--ink3);transform:translateY(-50%) rotate(45deg)}
}
/* the establishment (or the way back) in the phone's and tablet's top bar */
.sh-back{align-items:center;gap:2px;min-height:44px;padding:0 10px 0 4px;margin-left:-4px;border:0;border-radius:10px;background:none;color:var(--ds-navy-ink);
  font:inherit;font-size:15.5px;font-weight:650;cursor:pointer;min-width:0}
.sh-back .shi svg{width:24px;height:24px;stroke-width:2.2}
.sh-back span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sh-back:hover{background:rgba(231,238,247,.08)}
.sh-back:focus-visible{outline:2.5px solid var(--p-teal,var(--accent));outline-offset:2px}
.tvenue{display:block;min-width:0;color:var(--ds-navy-ink)}
.tvenue .tiny{display:none}
.tvenue select{width:100%;max-width:100%;min-height:44px;font:inherit;font-size:16px;font-weight:760;font-stretch:108%;color:var(--ds-navy-ink);
  background:rgba(231,238,247,.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23B6C4D6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border:1px solid rgba(231,238,247,.22);border-radius:10px;padding:8px 34px 8px 12px;-webkit-appearance:none;appearance:none;color-scheme:dark;text-overflow:ellipsis}
.tvenue select:focus-visible{outline:2.5px solid var(--p-teal,var(--accent));outline-offset:2px}
.tvenue option{background:#0E1A2E;color:#E6EDF6}
.tvenue.one{display:flex;flex-direction:column;line-height:1.25;padding:2px 2px}
.tvenue.one b{font-size:16px;font-weight:760;font-stretch:108%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tvenue.one span{font-size:12.5px;color:var(--ds-navy-ink-2)}
/* the bottom tab bar */
.sh-tabs{position:fixed;left:0;right:0;bottom:0;z-index:30;justify-content:space-around;gap:2px;
  padding:6px max(6px,env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-right));
  background:color-mix(in srgb,var(--surface) 94%,transparent);-webkit-backdrop-filter:saturate(1.4) blur(14px);backdrop-filter:saturate(1.4) blur(14px);
  border-top:1px solid var(--line);box-shadow:0 -10px 28px -22px rgba(5,12,23,.55)}
.tbi{flex:1 1 0;min-width:0;max-width:120px;display:flex;flex-direction:column;align-items:center;gap:3px;padding:4px 0 2px;min-height:54px;
  color:var(--ink2);text-decoration:none;-webkit-tap-highlight-color:transparent;border-radius:12px}
.tbi .nic{width:60px;height:32px;border-radius:16px;transition:background .18s var(--ds-ease,ease)}
.tbi .nic>.shi svg{width:22px;height:22px}
.tbi .nl{font-size:11.5px;font-weight:560;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.tbi[aria-current=page]{color:var(--ds-brand-ink,var(--accent))}
.tbi[aria-current=page] .nic{background:var(--accent-soft)}
.tbi[aria-current=page] .nl{color:var(--ink);font-weight:760}
.tbi:active .nic{transform:scale(.95)}
.tbi:focus-visible{outline:2.5px solid var(--accent);outline-offset:-2px}
html.kb-open .sh-tabs{display:none!important}

/* ====================================================================== tablet and computer (≥ 768 px) */
@media (min-width:768px){
  html.shell-on .sh-side:not([hidden]){display:flex}
  .sh-side{position:fixed;left:0;top:0;bottom:0;z-index:25;flex-direction:column;overflow-y:auto;overscroll-behavior:contain;
    padding:calc(14px + env(safe-area-inset-top)) 12px 18px;background:linear-gradient(180deg,var(--ds-navy-2,#111E35),var(--ds-navy,#0B1527));color:var(--ds-navy-ink);
    box-shadow:inset -1px 0 0 rgba(231,238,247,.10),inset -3px 0 0 rgba(67,185,172,.35);scrollbar-width:thin;scrollbar-color:rgba(231,238,247,.2) transparent}
  .sbrand{display:flex;align-items:center;gap:10px;padding:4px 8px 16px;color:var(--ds-navy-ink);text-decoration:none}
  .sbrand img{border-radius:7px;box-shadow:0 0 0 1px rgba(231,238,247,.14);flex:none}
  .sbrand span{display:flex;align-items:baseline;gap:9px;font-weight:760;font-stretch:110%;font-size:15.5px;white-space:nowrap}
  .sbrand small{font-weight:500;font-stretch:100%;font-size:12.5px;color:var(--ds-navy-ink-2);padding-left:9px;border-left:1px solid rgba(231,238,247,.24)}
  .sbrand:focus-visible{outline:2.5px solid var(--p-teal);outline-offset:2px;border-radius:10px}
  .svenue{display:block;margin:0 2px 16px}
  .svenue .tiny{display:block;margin:0 0 6px 4px;color:var(--ds-navy-ink-2)}
  .svenue select{width:100%;min-height:46px;font:inherit;font-size:14.5px;font-weight:700;color:var(--ds-navy-ink);border-radius:10px;padding:8px 32px 8px 12px;
    background:rgba(231,238,247,.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23B6C4D6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    border:1px solid rgba(231,238,247,.22);-webkit-appearance:none;appearance:none;color-scheme:dark;text-overflow:ellipsis}
  .svenue select:hover{border-color:rgba(231,238,247,.4)}
  .svenue select:focus-visible{outline:2.5px solid var(--p-teal);outline-offset:2px}
  .svenue option{background:#0E1A2E;color:#E6EDF6}
  .svenue.one{display:flex;flex-direction:column;padding:8px 12px;border-radius:10px;background:rgba(231,238,247,.06);border:1px solid rgba(231,238,247,.16);line-height:1.3}
  .svenue.one b{font-size:14.5px}
  .svenue.one span{font-size:12.5px;color:var(--ds-navy-ink-2)}
  .sitems{display:flex;flex-direction:column;gap:2px}
  .sbi{display:flex;align-items:center;gap:12px;min-height:44px;padding:0 12px;border-radius:10px;color:var(--ds-navy-ink-2);text-decoration:none;font-size:14.5px;font-weight:540;transition:background .12s,color .12s}
  .sbi .nic>.shi svg{width:20px;height:20px}
  .sbi:hover{background:rgba(231,238,247,.07);color:var(--ds-navy-ink)}
  .sbi[aria-current=page]{background:rgba(67,185,172,.20);color:#fff;font-weight:700}
  .sbi[aria-current=page] .nic{color:#8ADBD1}
  .sbi:focus-visible,.ssub:focus-visible{outline:2.5px solid var(--p-teal);outline-offset:1px}
  .sbi{position:relative}
  .sbi .nic{position:static}
  .sbi .nbadge{left:auto;right:10px;top:50%;transform:translateY(-50%);background:#FF8A80;color:#0B1527}
  .sbi .nlock{left:auto;right:10px;top:50%;transform:translateY(-50%);background:transparent;color:var(--ds-navy-ink-2);box-shadow:none}
  .sbi .nlock .shi svg{width:13px;height:13px;stroke-width:2.4}
  .sgrp{font-size:10.5px;font-weight:650;font-stretch:112%;letter-spacing:.11em;text-transform:uppercase;color:var(--ds-navy-ink-2);margin:20px 0 6px 12px}
  .ssubs{display:flex;flex-direction:column;gap:1px;margin:2px 0 8px 22px;padding-left:12px;border-left:1px solid rgba(231,238,247,.18)}
  .ssub{display:flex;align-items:center;gap:8px;width:100%;min-height:36px;padding:6px 10px;border:0;border-radius:8px;background:none;color:var(--ds-navy-ink-2);
    font:inherit;font-size:13.5px;text-align:left;cursor:pointer;line-height:1.3}
  .ssub span:first-child{flex:1 1 auto;min-width:0}
  .ssub:hover{background:rgba(231,238,247,.07);color:var(--ds-navy-ink)}
  .ssub[aria-current=true]{background:rgba(231,238,247,.12);color:#fff;font-weight:650}
  .ssub-n{flex:none;font-size:11.5px;font-weight:700;color:#FFB3AB;white-space:nowrap}
  html.shell-on .sh-tabs{display:none!important}
}

/* ---- tablet (768-1023 px): a slim rail with icons and short names; the top bar stays as on a phone */
@media (min-width:768px) and (max-width:1023.98px){
  .sh-side{width:96px;padding-left:8px;padding-right:8px}
  html.shell-on .bar,html.shell-on main,html.shell-on .legalfoot{margin-left:96px}
  html.shell-on .bar .brand,html.shell-on #menuwrap{display:none!important}
  html.shell-on .bellwrap{margin-left:auto}
  html.shell-on .sh-back:not([hidden]){display:inline-flex}
  html.shell-on .sh-venue:not([hidden]){display:block;flex:0 1 420px;min-width:0}
  .sbrand{justify-content:center;padding:4px 0 14px}
  .sbrand span,.svenue,.sgrp,.ssubs{display:none!important}
  .sbi{flex-direction:column;justify-content:center;gap:4px;padding:8px 2px;min-height:62px;font-size:11.5px;text-align:center}
  .sbi .nl{line-height:1.2}
  .sbi .nic{position:relative}
  .sbi .nbadge,.sbi .nlock{right:auto;top:-5px;left:calc(50% + 6px);transform:none}
  .sbi .nlock{background:#0B1527;box-shadow:0 0 0 1px rgba(231,238,247,.3)}
  .sitems{gap:4px}
}

/* ---- computer (≥ 1024 px): the sidebar names every place and the sections of the one you are in */
@media (min-width:1024px){
  .sh-side{width:264px}
  html.shell-on .bar,html.shell-on main,html.shell-on .legalfoot{margin-left:264px}
  /* the page sits in the middle of the space beside the sidebar, up to 1200 px wide, so a wide screen
     keeps even margins on both sides (percentages here are of the whole window, less the scrollbar) */
  html.shell-on main,html.shell-on .legalfoot{max-width:1200px;margin-left:calc(264px + max(0px, (100% - 264px - 1200px) / 2));margin-right:0}
  html.shell-on main{padding:26px 40px 56px}
  html.shell-on .legalfoot{padding-inline:40px;text-align:left}
  /* the top bar turns quiet: a breadcrumb, the bell and your name */
  html.shell-on .bar{background:var(--surface);box-shadow:none;border-bottom:1px solid var(--line)}
  html.shell-on .bar::before,html.shell-on .bar::after{display:none}
  html.shell-on .bar .in{max-width:1200px;margin:0 auto;padding:10px 40px;min-height:62px}
  html.shell-on .bar .brand{display:none}
  html.shell-on .sh-crumbs:not([hidden]){display:flex;align-items:center;gap:8px;flex:1 1 auto;min-width:0;font-size:14.5px;color:var(--ink2)}
  .sh-crumbs a{color:var(--ink2);text-decoration:none;font-weight:600}
  .sh-crumbs a:hover{color:var(--accent);text-decoration:underline}
  .sh-crumbs .sep{color:var(--ink3)}
  .sh-crumbs [aria-current]{color:var(--ink);font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html.shell-on .bellwrap{margin-left:auto}
  html.shell-on .bellbtn{background:var(--surface);border-color:var(--line);color:var(--ink2)}
  html.shell-on .bellbtn:hover{background:var(--surface2);color:var(--ink)}
  html.shell-on .bellcount{box-shadow:0 0 0 2px var(--surface)}
  html.shell-on .whobtn{background:var(--surface);border-color:var(--line);color:var(--ink)}
  html.shell-on .whobtn:hover{background:var(--surface2)}
  html.shell-on .bar .bellbtn:focus-visible,html.shell-on .bar .whobtn:focus-visible{outline-color:var(--accent)}
  /* the sidebar lists the open module's sections, so its own tab row steps aside */
  html.shell-on.has-subnav #view .tabs{display:none}
}

/* the shell replaces the home page's own establishment switcher, and the modules' own "← Home" buttons
   (the top bar's back arrow, the breadcrumb and the phone's back gesture do that now) */
html.shell-on .vpick,html.shell-on .homeback{display:none!important}

@media (prefers-reduced-motion:reduce){
  .tbi .nic,.sbi,.shrow{transition:none}
}
@media print{
  .sh-side,.sh-tabs,.skip{display:none!important}
  html.shell-on .bar,html.shell-on main,html.shell-on .legalfoot{margin-left:0!important}
}
