/* THE APP-STYLE BOTTOM BAR, design "B" (CC-ASK-4457; A-695, T-1396) — drawn by brand/app-bar.js on the client portal, the vendor page
 * and the public site. ⚠️ COLOURS ARE TOKENS ONLY: --ab-panel, --ab-panel-2, --ab-line, --ab-ink, --ab-dim, --ab-accent, --ab-accent-soft,
 * --ab-accent-ink, --ab-down, --ab-warn. The defaults below are the site's own; a page that already has brand tokens maps them in one rule
 * (the portal: --accent → --ab-accent). No gradients, no glow: a pressed or current tab is a soft pill and a dot, the raised button a ring.
 * ⚠️ The bar is 56 px above the safe area and the page reserves that room (body.ar-abar) only while the bar is drawn. Phone only (≤ 860 px). */
:root{
  --ab-h:56px; --ab-panel:#fff; --ab-panel-2:#f7f3ec; --ab-line:#e5dccb; --ab-ink:#2c2417; --ab-dim:#6f6353;
  --ab-accent:#1f5f55; --ab-accent-soft:#e2efe9; --ab-accent-ink:#fff; --ab-down:#c43d3d; --ab-warn:#b4453f;
}
.ab[hidden]{ display:none !important }
@media (max-width:860px){
  body.ar-abar{ padding-bottom:calc(var(--ab-h) + env(safe-area-inset-bottom,0px)) !important }
  .ab{
    position:fixed; left:0; right:0; bottom:0; z-index:36; display:flex; align-items:stretch; justify-content:stretch;
    height:calc(var(--ab-h) + env(safe-area-inset-bottom,0px)); box-sizing:border-box; padding:0 0 env(safe-area-inset-bottom,0px); margin:0;
    background:var(--ab-panel); color:var(--ab-ink); border-top:1px solid var(--ab-line); overflow:visible;
    font-family:-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  }
  .ab-tab{
    position:relative; flex:1 1 0; min-width:0; min-height:44px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
    padding:4px 0 6px; border:0; background:none; font:inherit; color:var(--ab-dim); cursor:pointer; text-decoration:none; -webkit-tap-highlight-color:transparent;
  }
  .ab-tab:focus-visible{ outline:2px solid var(--ab-accent); outline-offset:-3px; border-radius:10px }
  .ab-ic{ position:relative; display:grid; place-items:center; width:48px; height:28px; border-radius:14px }
  .ab-svg{ width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round }
  .ab-lab{ font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; line-height:1.2; white-space:nowrap }
  /* the current page's tab, and a pressed tab: a soft pill behind the icon and a dot under the label; while a popover is open only its own button */
  .ab-tab.on, .ab-tab[aria-expanded="true"]{ color:var(--ab-accent) }
  .ab-tab.on .ab-ic, .ab-tab[aria-expanded="true"] .ab-ic{ background:var(--ab-accent-soft) }
  .ab-tab.on::after, .ab-tab[aria-expanded="true"]::after{
    content:""; position:absolute; bottom:2px; left:50%; width:4px; height:4px; margin-left:-2px; border-radius:50%; background:var(--ab-accent);
  }
  body.ar-ab-open .ab-tab.on:not([aria-expanded="true"]){ color:var(--ab-dim) }
  body.ar-ab-open .ab-tab.on:not([aria-expanded="true"]) .ab-ic{ background:none }
  body.ar-ab-open .ab-tab.on:not([aria-expanded="true"])::after{ content:none }
  /* the raised centre button: an ink circle above the bar; pressed, it gets a ring */
  .ab-raised .ab-ic{ width:52px; height:52px; margin-top:-22px; border-radius:50%; background:var(--ab-ink); color:var(--ab-panel); border:3px solid var(--ab-panel); box-sizing:border-box }
  .ab-raised .ab-svg{ width:24px; height:24px }
  .ab-raised[aria-expanded="true"] .ab-ic, .ab-raised.on .ab-ic{ background:var(--ab-ink); box-shadow:0 0 0 2px var(--ab-accent) }
  .ab-raised::after{ bottom:1px }
  .ab-raised .ab-lab{ margin-top:-2px }
  .ab-badge{
    position:absolute; top:-3px; right:3px; min-width:16px; height:16px; padding:0 4px; border-radius:8px; box-sizing:border-box;
    background:var(--ab-down); color:var(--ab-accent-ink); font-size:10px; font-weight:700; line-height:16px; text-align:center; letter-spacing:0;
  }
  .ab-badge[hidden]{ display:none }

  /* the popover: tiny, grows out of its button, a notch aims at it, no scrim */
  .ab-pop{
    position:fixed; z-index:37; bottom:calc(var(--ab-h) + env(safe-area-inset-bottom,0px) + 12px); left:8px;
    width:max-content; min-width:200px; max-width:calc(100vw - 16px); box-sizing:border-box; padding:6px;
    background:var(--ab-panel); color:var(--ab-ink); border:1px solid var(--ab-line); border-radius:14px; box-shadow:0 8px 24px rgba(0,0,0,.14);
    transform-origin:var(--ab-nx,50%) 100%; animation:ab-grow .16s ease-out; font-family:-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  }
  .ab-pop[hidden]{ display:none }
  .ab-pop::after{
    content:""; position:absolute; bottom:-6px; left:calc(var(--ab-nx,50%) - 6px); width:10px; height:10px; box-sizing:border-box;
    background:var(--ab-panel); border-right:1px solid var(--ab-line); border-bottom:1px solid var(--ab-line); transform:rotate(45deg);
  }
  @keyframes ab-grow{ from{ opacity:0; transform:scale(.6) } to{ opacity:1; transform:scale(1) } }
  .ab-pop[role="dialog"]{ width:min(310px,calc(100vw - 16px)) }
  .ab-h{ margin:2px 8px 6px; font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--ab-dim) }
  .ab-chev{ margin-left:auto; padding-left:10px; font-size:1.2rem; line-height:1; color:var(--ab-dim) }
  .ab-row{
    display:flex; align-items:center; gap:10px; width:100%; min-height:44px; box-sizing:border-box; padding:0 12px; margin:0 0 2px;
    border:1px solid transparent; border-radius:10px; background:none; font:inherit; font-size:15px; color:var(--ab-ink); text-align:left; text-decoration:none; cursor:pointer;
  }
  .ab-row:hover{ background:var(--ab-panel-2) }
  .ab-row:focus-visible, .ab-open:focus-visible{ outline:2px solid var(--ab-accent); outline-offset:1px }
  .ab-pop > .ab-row:first-child, .ab-h + .ab-row{ background:var(--ab-panel-2); border-color:var(--ab-line); box-shadow:0 1px 3px rgba(0,0,0,.08) }
  .ab-ri{ flex:0 0 auto; display:grid; place-items:center; width:22px; height:22px; color:var(--ab-accent) }
  .ab-ri .ab-svg{ width:20px; height:20px }
  .ab-rl{ flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
  .ab-rb{ flex:0 0 auto; min-width:18px; height:18px; padding:0 5px; border-radius:9px; box-sizing:border-box; background:var(--ab-down); color:var(--ab-accent-ink); font-size:11px; font-weight:700; line-height:18px; text-align:center }
  .ab-text{ gap:10px; padding:6px 10px; min-height:52px }
  .ab-av{ flex:0 0 auto; display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:var(--ab-accent-soft); color:var(--ab-accent); font-size:12px; font-weight:700 }
  .ab-tx{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; line-height:1.3 }
  .ab-tx b{ font-size:14px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
  .ab-tx span{ font-size:12.5px; color:var(--ab-dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
  .ab-text.unread .ab-tx b{ font-weight:800 }
  .ab-text.unread .ab-tx span{ color:var(--ab-ink) }
  .ab-when{ flex:0 0 auto; font-size:11.5px; color:var(--ab-dim); white-space:nowrap }
  .ab-note{ margin:6px 10px 10px; font-size:13px; color:var(--ab-dim) }
  .ab-open{
    display:flex; align-items:center; justify-content:center; width:100%; min-height:44px; margin:4px 0 0; box-sizing:border-box; border-radius:10px; border:1px solid var(--ab-line);
    font:inherit; font-size:14px; font-weight:700; color:var(--ab-accent); text-decoration:none; background:var(--ab-panel); cursor:pointer;
  }
  /* ask.js's chat and its floating button, while the bar is drawn: the chat sits above the bar, the floating button steps aside (the ASK tab is it) */
  body.ar-abar .ask-dock{ display:none !important }
  body.ar-abar .ask-panel{ bottom:calc(var(--ab-h) + env(safe-area-inset-bottom,0px) + 8px) !important; max-height:min(560px,calc(var(--ask-vh,100dvh) - var(--ab-h) - 20px)) }
  /* the 🐞 report button (brand/ops.js) rides above the bar and steps aside while a popover is open */
  body.ar-abar #rwBugBtn{ bottom:calc(var(--ab-h) + env(safe-area-inset-bottom,0px) + 6px) !important }
  body.ar-abar.ar-ab-open #rwBugBtn{ display:none !important }
  /* the public site's other fixed things ride above the bar (CC-ASK-4458): the sponsor bar sits on it, the free-tool floater, the home
     page's chips and the tour planner's button step up by the bar's height; with the sponsor bar showing too (html.has-sponsor-bar) they
     step up by both. The page keeps room for both. */
  body.ar-abar .sponsor-bar-slot{ bottom:calc(var(--ab-h) + env(safe-area-inset-bottom,0px)) }
  body.ar-abar .magnet-float, body.ar-abar .home-dreamchip, body.ar-abar .home-listchip, body.ar-abar .oht-barbtn, body.ar-abar .sponsor-box-slot{ bottom:calc(var(--ab-h) + env(safe-area-inset-bottom,0px) + 12px) }
  .has-sponsor-bar body.ar-abar{ padding-bottom:calc(var(--ab-h) + env(safe-area-inset-bottom,0px) + 130px) !important }
  .has-sponsor-bar body.ar-abar .magnet-float, .has-sponsor-bar body.ar-abar .home-dreamchip, .has-sponsor-bar body.ar-abar .home-listchip, .has-sponsor-bar body.ar-abar .sponsor-box-slot{ bottom:calc(var(--ab-h) + env(safe-area-inset-bottom,0px) + 136px) }
}
@media (min-width:861px){ .ab, .ab-pop{ display:none !important } }
@media (prefers-reduced-motion:reduce){ .ab-pop{ animation:none } }
