/* THE NEW PACE (R-613). Everything in this file applies only while a person has the preview switch on
   (public/js/00a-preview-switch.js): it styles elements that exist only then. With the switch off nothing here matches
   anything — today's PACE is untouched. The new look's values land here (R-601). */

/* "Preview · switch back", beside the page title: says which PACE this is and takes the person back in one press.
   In the row, not floating — it cannot cover anything. */
.new-pace-chip{display:inline-flex;align-items:center;gap:4px;margin-left:10px;min-height:28px;padding:0 10px;vertical-align:middle;
  border-radius:999px;border:1px solid rgba(255,255,255,.45);background:rgba(255,255,255,.1);color:#fff;
  font:500 12px/1 system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;letter-spacing:0;text-transform:none;white-space:nowrap;cursor:pointer}
.new-pace-chip b{font-weight:700}
@media (hover:hover) and (pointer:fine){.new-pace-chip:hover{background:rgba(255,255,255,.2)}}
.new-pace-chip:focus-visible{outline:2px solid #fff;outline-offset:2px}
@media (max-width:640px){.new-pace-chip{min-height:32px;font-size:13px;margin-left:8px}}

/* Redesign step 15 (99j-shell.js; D-0430, D-0432). The menu is one list of places: no group headings. The top bar is search,
   New and the person: the bolt goes, the bell comes back only with a notification centre (R-345). Light / dark: My Profile, and
   (D-0445) the switch below. */
html[data-new-pace] #sidebar .sb-lbl{display:none}
html[data-new-pace] #topbar .tb-icons{display:none}

/* LIGHT / DARK AT ONCE (D-0445, owner 17 Nov 2026: "a toggle … No wording required"). 04's own top-bar button (.tb-theme →
   toggleTheme: flips what is on screen and saves it to the person's account, D-0022) drawn as a switch at the top right: the sun
   at one end, the moon at the other, a knob on the one in use. No words on it (its name is for screen readers, aria-label). Both
   icons are always in 04's markup (theme.css shows one in today's PACE); here both show, so changing theme repaints colour only. */
html[data-new-pace] #topbar .tb-theme{display:inline-flex;position:relative;align-items:center;justify-content:space-between;flex:none;box-sizing:border-box;
  width:60px;height:32px;padding:0 8px;border-radius:999px;background:var(--fx-glass);border:1px solid var(--fx-glass-edge);color:var(--text3);cursor:pointer}
html[data-new-pace] #topbar .tb-theme .ic-sun,html[data-new-pace] #topbar .tb-theme .ic-moon{display:block;position:relative;z-index:1;line-height:0}
html[data-new-pace] #topbar .tb-theme .ic-sun{order:0}
html[data-new-pace] #topbar .tb-theme .ic-moon{order:1}
html[data-new-pace] #topbar .tb-theme svg{width:15px;height:15px}
html[data-new-pace] #topbar .tb-theme::after{content:'';position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;
  background:var(--card-solid);box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .2s ease}
html[data-new-pace][data-theme="dark"] #topbar .tb-theme::after{transform:translateX(28px)}
html[data-new-pace]:not([data-theme="dark"]) #topbar .tb-theme .ic-sun,html[data-new-pace][data-theme="dark"] #topbar .tb-theme .ic-moon{color:var(--text)}
html[data-new-pace] #topbar .tb-theme:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media (prefers-reduced-motion:reduce){html[data-new-pace] #topbar .tb-theme::after{transition:none}}

/* The phone bar: Today, Inbox, New, and the person's next two places. A region of its own (04 renderApp, 03 patchShell); shown
   only on a phone, where it sits at the bottom and the page makes room for it. */
#phonebar{display:none}
@media (max-width:860px){
  /* R-1425 (owner, 27 Nov 2026): a compact pill that floats above the page — soft glass, rounded, off the edges — instead of a full-width bar */
  html[data-new-pace] #phonebar{position:fixed;left:12px;right:12px;bottom:calc(10px + env(safe-area-inset-bottom,0px));z-index:60;display:flex;justify-content:space-around;align-items:stretch;
    min-height:60px;padding:4px 6px;border-radius:999px;border:1px solid var(--fx-glass-edge,var(--border2));
    background:color-mix(in srgb,var(--card-solid) 72%,transparent);-webkit-backdrop-filter:blur(22px) saturate(1.5);backdrop-filter:blur(22px) saturate(1.5);
    box-shadow:0 12px 30px rgba(20,30,70,.18)}
  html[data-new-pace] #content{padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))}
  html[data-new-pace] .pb-item{flex:1 1 0;min-width:0;min-height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
    border:0;background:none;color:var(--text3);font:600 12px/1.2 var(--font);cursor:pointer;border-radius:999px}
  html[data-new-pace] .pb-item .pb-ic svg{width:20px;height:20px}
  html[data-new-pace] .pb-item .pb-l{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  html[data-new-pace] .pb-item.is-on{color:var(--accent);background:var(--accent-l)}
  html[data-new-pace] .pb-new{color:var(--accent)}
  html[data-new-pace] .pb-item:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
  /* The + menu, above the bar (R-2166). A float: opaque. It scrolls in its own box on a short phone. Put away while the side drawer is open, where "+ New" shows its own. */
  html[data-new-pace] #phonebar .pb-sheet{position:absolute;left:0;right:0;bottom:calc(100% + 8px);display:flex;flex-direction:column;gap:2px;padding:8px;border-radius:20px;
    background:var(--card-solid);border:1px solid var(--border2);box-shadow:0 12px 30px rgba(20,30,70,.18);max-height:calc(100vh - 170px);max-height:calc(100dvh - 170px);overflow-y:auto;overscroll-behavior:contain}
  html[data-new-pace] body.nav-open #phonebar .pb-sheet{display:none}
  html[data-new-pace] .pb-row{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-height:52px;padding:8px 12px;border:0;border-radius:12px;background:none;text-align:left;cursor:pointer;justify-content:center}
  html[data-new-pace] .pb-row-l{font:600 16px/1.3 var(--font);color:var(--text)}
  html[data-new-pace] .pb-row-s{font:400 14px/1.3 var(--font);color:var(--text3)}
  html[data-new-pace] .pb-row.is-off{opacity:.55;cursor:default}
  html[data-new-pace] .pb-row:active:not(.is-off){background:var(--hover)}
  html[data-new-pace] .pb-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
}
