/* src/components/jr/chrome/chrome.css — the 76px top bar and the 72px nav.
   Transcribed from SJ2 Today's own chrome; SJ2 Welcome draws the same bar without the star
   count or the avatar chip. */

/* ---------------------------------------------------------------- the top bar */
.jr-chrome {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--sj-chrome-h);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: var(--sj-card);
  border-bottom: 1px solid var(--sj-line);
  box-sizing: border-box;
}

.jr-wordmark {
  flex: none;
  white-space: nowrap;
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 27px;
  color: var(--sj-ink);
  letter-spacing: -.01em;
}
.jr-wordmark-jr { color: var(--sj-teal); }

.jr-chrome-right { display: flex; align-items: center; gap: 18px; }

/* HER 44px TARGET. The house floor is 64px for a child control; this one is the door out of
   the child's side, and her frames outrank the rule on pixels (plan ruling 1). Named in
   tools/audit/rules_audit.mjs. */
.jr-grownups {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--sj-r-pill);
  white-space: nowrap;
  background: var(--sj-teal-tint);
  border: 1px solid var(--sj-teal-line);
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 16px;
  color: var(--sj-teal-ink);
  cursor: pointer;
}

.jr-starcount {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 20px;
  color: var(--sj-ink);
}
.jr-starcount svg { color: var(--sj-sun); fill: var(--sj-sun); }

.jr-avatar-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 18px 4px 5px;
  border-radius: var(--sj-r-pill);
  border: 1.5px solid var(--sj-line);
  background: var(--sj-stage);
  cursor: pointer;
}

.jr-avatar-chip-face {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--sj-teal-line);
  display: block;
  /* The face's own tint is what shows while the picture decodes, and if a child has no
     picture yet this IS the chip — a coloured disc, not a grey box. */
  background-color: var(--sj-sand);
  background-size: cover;
  background-position: center;
}

.jr-avatar-chip-name {
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 17px;
  color: var(--sj-ink);
}

/* ---------------------------------------------------------------- the five destinations */
.jr-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--sj-nav-h);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 42px;
  background: var(--sj-card);
  border-top: 1px solid var(--sj-line);
  box-sizing: border-box;
}

.jr-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  color: var(--sj-ink);
  font-family: var(--sj-font);
  font-weight: 500;
  font-size: 18px;
  text-decoration: none;
}

/* Where you are: her filled green pill, one shade tighter than the others. */
.jr-nav-here {
  min-height: 46px;
  padding: 0 21px;
  border-radius: var(--sj-r-pill);
  background: var(--sj-green);
  color: var(--sj-card);
  font-weight: 600;
  font-size: 17px;
}

/* ---------------------------------------------------------------- phones (DECISIONS #164)
   The shared chrome is an absolute 76px band across the top of her stage. On a phone, on a
   grown-up route, the page flows instead, so the band flows with it and is allowed to grow a
   row taller rather than crush the wordmark against the avatar chip. The child's bottom nav
   never comes through here: no child screen runs in phone-natural mode. */
@media (max-width: 767px) {
  .jr-phone-natural .jr-chrome {
    position: static;
    flex: none;
    height: auto;
    min-height: var(--sj-chrome-h);
    flex-wrap: wrap;
    row-gap: 8px;
    padding-top: calc(8px + env(safe-area-inset-top));
    padding-bottom: 8px;
  }
  .jr-phone-natural .jr-chrome-right { flex-wrap: wrap; gap: 10px; }
}
