/* Side bar: on screens wider than 900px the top bar stands down the left edge instead.
   It is the same element (header.topbar) with the same contents: the logo, the six views, and at
   the bottom the progress note, Settings, theme, the account menu and a button that shrinks the
   bar to icons (html.side-mini, kept by layout.js). Narrower screens keep the bar along the top,
   and phones the tabs along the bottom (phone.css). The printed pages have no bar at all. */
.topbar .lbl, #btnSideMini, #btnProblem { display: none; }   /* off the side bar, "Report a problem" is in the account menu */

@media (min-width: 901px) {
  html:not(.print-layout) { --side-w: 212px; }
  html.side-mini:not(.print-layout) { --side-w: 60px; }
  html:not(.print-layout) #app { grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  html:not(.print-layout) main { grid-column: 2; grid-row: 1; }
  html:not(.print-layout) .topbar { grid-column: 1; grid-row: 1; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 2px;
    min-height: 0; padding: 14px 10px 10px; border-bottom: none; border-right: 1px solid var(--line); }
  html:not(.print-layout) .progress { top: 0; left: var(--side-w); }
  /* Settings takes the whole window, the bar included: its own menu is the only one on screen, and Back returns */
  html:not(.print-layout) .settings-page { top: 0; left: 0; }

  html:not(.print-layout) .brand { width: auto; padding: 0 4px 14px; }
  /* the views, one under another */
  html:not(.print-layout) .seg.views { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; background: none; border-radius: 0; }
  html:not(.print-layout) .seg.views span { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--radius-sm);
    font-size: 13.5px; font-weight: 550; color: var(--ink-2); white-space: nowrap; }
  html:not(.print-layout) .seg.views label:hover span { background: var(--surface-2); color: var(--ink); }
  html:not(.print-layout) .seg.views svg { display: block; width: 17px; height: 17px; flex: none; }
  html:not(.print-layout) .seg.views input:checked + span { background: color-mix(in srgb, var(--accent) 15%, transparent); box-shadow: none; color: var(--ink); font-weight: 650; }
  /* the bottom of the bar */
  html:not(.print-layout) .topbar .busy { height: auto; margin-bottom: 6px; padding: 8px 10px; align-items: flex-start; border-radius: var(--radius-sm); }
  html:not(.print-layout) .topbar .busy span:last-child { white-space: normal; line-height: 1.3; }
  html:not(.print-layout) .topbar .lbl { display: inline; }
  html:not(.print-layout) :is(#btnProblem, #btnSettings, #btnThemeQuick, #btnSideMini, #btnAcct) { display: flex; justify-content: flex-start; gap: 11px; width: 100%; height: 36px; padding: 0 10px;
    border: none; border-radius: var(--radius-sm); background: none; box-shadow: none; font-size: 13.5px; font-weight: 550; color: var(--ink-2); }
  html:not(.print-layout) :is(#btnProblem, #btnSettings, #btnThemeQuick, #btnSideMini, #btnAcct):hover { background: var(--surface-2); color: var(--ink); }
  html:not(.print-layout) :is(#btnProblem, #btnSettings, #btnThemeQuick, #btnSideMini) svg { width: 17px; height: 17px; }
  html:not(.print-layout) #btnAcct .ini { display: grid; place-items: center; width: 22px; height: 22px; margin-left: -2px; flex: none; border-radius: 50%;
    background: var(--accent-wash); color: var(--ink); font-size: 11.5px; font-weight: 650; }
  html:not(.print-layout) #btnAcct .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html:not(.print-layout) #btnAcct.attn { box-shadow: none; }
  html:not(.print-layout) #btnAcct.attn .ini { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--warning); }
  html:not(.print-layout) .topbar .menu { position: relative; }
  html:not(.print-layout) .topbar .menu .menu-list { left: calc(100% + 12px); right: auto; top: auto; bottom: 0; }
  html:not(.print-layout) #btnSideMini { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding-top: 4px; height: 40px; color: var(--muted); }
  html:not(.print-layout) #btnSideMini svg { transition: transform .15s; }

  /* shrunk to icons */
  html.side-mini:not(.print-layout) .topbar { padding-left: 8px; padding-right: 8px; }
  html.side-mini:not(.print-layout) .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  html.side-mini:not(.print-layout) :is(.brand-txt, .topbar .lbl, #busyText) { display: none; }
  html.side-mini:not(.print-layout) .seg.views span { justify-content: center; padding: 10px 0; font-size: 0; gap: 0; }
  html.side-mini:not(.print-layout) :is(#btnProblem, #btnSettings, #btnThemeQuick, #btnSideMini, #btnAcct) { justify-content: center; padding: 0; gap: 0; }
  html.side-mini:not(.print-layout) #btnAcct .ini { margin-left: 0; }
  html.side-mini:not(.print-layout) .topbar .busy { justify-content: center; padding: 8px 0; background: none; }
  html.side-mini:not(.print-layout) #btnSideMini svg { transform: rotate(180deg); }
}
/* with the bar open on a laptop and three or four pickers showing, there is no room for the acreage beside them */
@media (min-width: 901px) and (max-width: 1480px) {
  html:not(.side-mini):not(.print-layout) .filterbar:has(.filt:not([hidden]) > #ranchSel:not([hidden])):has(#varietySel:not([hidden])) .crumb { display: none; }
  html:not(.side-mini):not(.print-layout) .filterbar #btnPrint { margin-left: auto; }
}
