/*
 * The app's tab bar and account picture (app-tabs.js), on the app-mode homepage (html.app-shell) and the
 * app-mode info pages (html.app-shell-page), which also get a back bar here in place of the website's header
 * and footer.
 */
html.app-shell, html.app-shell-page {
  -webkit-tap-highlight-color: transparent;
  --shell-safe-top: env(safe-area-inset-top, 0px);
  --shell-safe-bottom: env(safe-area-inset-bottom, 0px);
  --shell-tabs-h: calc(62px + var(--shell-safe-bottom));
}
:is(html.app-shell, html.app-shell-page) .shell-tabs {
  position: fixed; z-index: 80; left: 0; right: 0; bottom: 0; height: var(--shell-tabs-h);
  padding-bottom: var(--shell-safe-bottom);
  display: grid; grid-template-columns: repeat(var(--shell-tab-count, 3), 1fr);
  background: white; border-top: 1px solid var(--card-border);
  transition: transform 0.3s ease;
}
:is(html.app-shell, html.app-shell-page) .shell-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: 0; font: inherit; font-size: 11px; font-weight: 600; color: var(--muted);
  cursor: pointer; text-decoration: none;
}
:is(html.app-shell, html.app-shell-page) .shell-tab[aria-current="page"] { color: var(--sun-700); }
:is(html.app-shell, html.app-shell-page) .shell-tab { position: relative; }
/* the Sun report tab's "new" dot, until the sun report has been opened once - just outside the icon's top right, clear
   of the little sun drawn in it */
:is(html.app-shell, html.app-shell-page) .shell-tab-new {
  position: absolute; top: 6px; left: calc(50% + 14px); width: 8px; height: 8px; border-radius: 50%;
  background: var(--sun-500); box-shadow: 0 0 0 2px white;
}

:is(html.app-shell, html.app-shell-page) .shell-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden;
  border-radius: 50%; background: #E8E1D3; color: white; font-weight: 700;
}
:is(html.app-shell, html.app-shell-page) .shell-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
:is(html.app-shell, html.app-shell-page) .shell-avatar--big { width: 56px; height: 56px; font-size: 22px; }
:is(html.app-shell, html.app-shell-page) .shell-avatar--tab { width: 24px; height: 24px; font-size: 12px; }
:is(html.app-shell, html.app-shell-page) .shell-tab[aria-current="page"] .shell-avatar--tab { box-shadow: 0 0 0 2px white, 0 0 0 4px var(--sun-700); }

/* --- Info pages in the app ------------------------------------------------------------------------------------ */
html.app-shell-page body > header,
html.app-shell-page .home-footer { display: none !important; }
html.app-shell-page body { padding-bottom: calc(var(--shell-tabs-h) + 16px); }
html.app-shell-page .shell-page-bar {
  position: sticky; top: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: calc(8px + var(--shell-safe-top)) 8px 8px;
  background: var(--header-bg); border-bottom: 1px solid var(--card-border);
}
html.app-shell-page .shell-page-back {
  justify-self: start; display: inline-flex; align-items: center; gap: 2px; padding: 8px 6px;
  color: var(--sun-700); font-size: 15px; font-weight: 600; text-decoration: none;
}
html.app-shell-page .shell-page-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--shade-900); text-align: center; }
/* The pages' own sticky parts stick under the bar instead of sliding behind it */
html.app-shell-page .bl-sky { top: var(--shell-page-bar-h, 56px); }
html.app-shell-page .hiw-stage { top: calc(var(--shell-page-bar-h, 56px) + 8px); }
html.app-shell-page .lg-toc { top: calc(var(--shell-page-bar-h, 56px) + 8px); }

/* --- The analytics question, in the app: one small card in the middle of a dimmed screen, answered once
   (Profile has the choice afterwards), rather than a banner across the map and the list ---------------------- */
:is(html.app-shell, html.app-shell-page) .cookie-consent-banner {
  top: 50%; bottom: auto; left: 50%; right: auto; transform: translate(-50%, -50%);
  width: min(340px, calc(100vw - 40px)); z-index: 500;
  flex-direction: column; align-items: stretch; gap: 16px; padding: 22px 20px 18px;
  border: 0; border-radius: 18px; background: var(--cream);
  box-shadow: 0 0 0 100vmax rgba(22, 48, 63, 0.45), 0 12px 32px rgba(22, 48, 63, 0.28);
}
:is(html.app-shell, html.app-shell-page) .cookie-consent-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--shade-900); }
:is(html.app-shell, html.app-shell-page) .cookie-consent-text { flex: none; font-size: 14px; }
:is(html.app-shell, html.app-shell-page) .cookie-consent-actions { gap: 10px; }
:is(html.app-shell, html.app-shell-page) .cookie-consent-btn { flex: 1; min-width: 0; padding: 12px 0; font-size: 15px; }
html.app-shell-page .shell-page-back-label { white-space: nowrap; }   /* "Sunniest terraces" as a back label stays on one line */
html.app-shell-page .city-page .lb-crumb { display: none; }   /* a city page: the back bar already goes to "Terraces by place" */
