/* solo-route.css — the whole visual half of a solo route.
 *
 * `/Focus-Timer` and its siblings (js/app-shell/solo_route.js) are the ordinary
 * app booted into one view with its chrome hidden. Everything that makes them
 * look like a single-purpose page is in this file, and it is three elements and
 * two custom properties.
 *
 * 🔴 Linked LAST in index.html, after mobile.css. The rails are shown by
 * `html[data-nav-rail] .nav-rail` and `html[data-panel-rail] .panel-rail` —
 * exactly as specific as the rules below — so these win on document order and
 * nothing else. Moving this <link> up the list silently un-hides both rails.
 *
 * ⚠️ Keyed on `<html>`, not `<body>`: the class is stamped by an inline script
 * in <head>, where there is no body yet. See solo_route.js's header for why that
 * script exists at all (a deferred module would flash the full chrome).
 */

html.dn-solo {
  /* The rails are hidden below, but the shell is padded by their WIDTH — two
     separate rules on two separate selectors (nav-rail.css, panel-rail.css).
     Zeroing the widths retires every one of them at once, including the
     expanded-rail variant and the `right:` offset that holds an open side panel
     clear of the strip, without restating any of that arithmetic here. */
  --nav-rail-width: 0px;
  --nav-rail-expanded-width: 0px;
  --panel-rail-width: 0px;
}

/* The three pieces of app chrome. Not `visibility` and not opacity: the topbar
   is a flex item that reserves its own height, and the rails are focusable rows
   that would still be reachable by keyboard from a page they no longer belong
   to. */
html.dn-solo .nav-rail,
html.dn-solo .panel-rail,
html.dn-solo .topbar {
  display: none;
}

/* The scroll pad under the view (`layout.css`) is room to put the caret when an
   editing surface ends at the bottom of the window. A solo route is a single
   surface sized against the window it was opened for, so the pad is just a
   third of a screen of nothing — the same reasoning that already exempts the
   Do route and the three read-only overviews. */
html.dn-solo #view-container:not([data-view='settings']) {
  padding-bottom: 0;
}

/* ── The way out ──────────────────────────────────────────────────────────
   The only navigation on the page, and deliberately almost invisible: the route
   exists so that nothing but the surface is on screen, but a page with no topbar
   and no rails is otherwise a window you cannot leave. Bottom-left, which is the
   one corner no panel docks against and no surface puts a control in. */
html.dn-solo .dn-solo-exit {
  position: fixed;
  left: 10px;
  bottom: 10px;
  z-index: 60;
  padding: 4px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--card);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.6;
  text-decoration: none;
  opacity: 0.25;
  transition: opacity 0.15s ease;
}

html.dn-solo .dn-solo-exit:hover,
html.dn-solo .dn-solo-exit:focus-visible {
  opacity: 1;
}

/* Printing a solo route should print the surface, not the escape hatch. */
@media print {
  html.dn-solo .dn-solo-exit {
    display: none;
  }
}

/* ── /Cowork: the one link that keeps chrome ─────────────────────────────
   The Co-work view (js/app-shell/cowork_mode.js) opened as a link: the LEFT
   navigation rail goes, the topbar (Calendar · Focus Timer) and the right panel
   rail stay. Same width trick as `html.dn-solo` above, for the left rail only.
   Here for the same document-order reason: the rail is shown by a rule exactly
   this specific. */
html.dn-cowork-link {
  --nav-rail-width: 0px;
  --nav-rail-expanded-width: 0px;
}

html.dn-cowork-link .nav-rail {
  display: none;
}
