/* ROUND 116 — tablet + phone fixes (inc/round116.php). Loaded on every page after home.css, inner.css, r63,
   r77, r93, r99, r101 and r112. */

/* ============================================================ 1. Mobile header: cream, no green, no shadow at rest */
@media (max-width:1023px){
  /* round 99 made the bar cream at rest on every page; About Sentinel Homes, the First-time builders guide (r93)
     and Already Have Plans (r77) still painted it #637468 on phones. Same cream as the sticky bar, no shadow at
     rest; the sticky (scrolled) state and the open drawer (html.mnav-lock, transparent) are as round 99 left them. */
  .sh-r116 .nav::before,
  .sh-r116.sh-r93.sh-r67.sh-page-first-time-builders-guide .nav.sh-nav-top:not(.panel-open)::before,
  .sh-r116.sh-r93.sh-r67.sh-page-about-sentinel-homes .nav.sh-nav-top:not(.panel-open)::before,
  .sh-r116.sh-r63.sh-r77.sh-page-already-have-plans .nav::before,
  .sh-r116.sh-r66.sh-r77.sh-page-already-have-plans .nav.sh-nav-top::before{display:block;background:var(--cream);box-shadow:none}
  .sh-r116 .nav.scrolled::before{background:var(--cream);box-shadow:0 4px 24px rgba(66,64,64,.14)}
  html.mnav-lock .sh-r116 .nav::before,html.mnav-lock .sh-r116 .nav.scrolled::before{background:transparent;box-shadow:none}
  /* the open drawer on those three pages too (AJ, 9 Oct: Already Have Plans kept the cream bar over the drawer):
     the page-specific cream selectors above outrank the generic transparent one, so they get their own */
  html.mnav-lock .sh-r116.sh-r93.sh-r67.sh-page-first-time-builders-guide .nav.sh-nav-top:not(.panel-open)::before,
  html.mnav-lock .sh-r116.sh-r93.sh-r67.sh-page-about-sentinel-homes .nav.sh-nav-top:not(.panel-open)::before,
  html.mnav-lock .sh-r116.sh-r63.sh-r77.sh-page-already-have-plans .nav::before,
  html.mnav-lock .sh-r116.sh-r66.sh-r77.sh-page-already-have-plans .nav.sh-nav-top::before{background:transparent;box-shadow:none}
  /* the logo and burger read dark on the cream bar on those pages too */
  .sh-r116 .nav__logo img,.sh-r116 .nav.scrolled .nav__logo img{filter:brightness(0) invert(.26)}
  .sh-r116 .nav__toggle,.sh-r116 .nav.scrolled .nav__toggle{color:var(--sage)}
  html.mnav-lock .sh-r116 .nav__logo img,html.mnav-lock .sh-r116 .nav.scrolled .nav__logo img{filter:brightness(0) invert(1)}
  html.mnav-lock .sh-r116 .nav__toggle,html.mnav-lock .sh-r116 .nav.scrolled .nav__toggle{color:var(--off-white)}

  /* ============================================================ 2. Filter & Search: opaque while stuck (r80-filters.js sets .is-stuck) */
  .sh-r116.sh-r101.sh-r80 .sh-r80-bar.is-stuck .sh-r80-open{opacity:1}

  /* ============================================================ 3. Gallery: the Featured switch never shows under the button,
        not even before r80-filters.js has run (round 112 hid it only once the script had) */
  .sh-r116.sh-r80 .gal__grid-wrap > .gal__toggle{display:none}
}

/* ============================================================ 4. Gallery: two columns from the first paint on phones */
@media (max-width:768px){
  /* the page is served with the desktop's four columns and r78-gallery.js re-deals into two once it runs; until
     then the four columns wrap two by two, so the grid never shows four narrow columns */
  .sh-r116 .gal__grid{flex-wrap:wrap}
  .sh-r116 .gal__col{flex:0 0 calc(50% - 6px);width:calc(50% - 6px)}

  /* ============================================================ 5. Plans: the view button under Filter & Search is centred */
  .sh-r116 .pl__actions{justify-content:center}
}
