/* MundaApp — accessibility, kept small on purpose.
 *
 * Three things, all of them cheap and none of them cosmetic:
 *   1. A visible focus ring. The app is a touch app first, but a keyboard or a
 *      switch device has to be able to see where it is — WCAG 2.4.7.
 *   2. A darker muted colour for inactive doors, which brings the label to
 *      ~5.1:1 on the cream bar (WCAG 1.4.3 wants 4.5:1 for small text).
 *   3. A screen-reader-only class, and honouring forced-colours / more-contrast
 *      where the phone asks for it.
 */

:root {
  --mu-focus: #0A5334;
  --mu-focus-ring: 3px;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: var(--mu-focus-ring) solid var(--mu-focus);
  outline-offset: 2px;
  border-radius: 6px;
}

/* the bar: same design, slightly stronger contrast on the idle label */
.tabbar .tab,
.tabbar > a { color: #566860; }
.tabbar .tab.on,
.tabbar > a.on { color: #084429; }

/* text that only a screen reader should read */
.mu-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* a link or button that is only an icon still needs a name; this marks the
   decorative ones so the reader skips them */
.mu-deco { speak: none; }

@media (prefers-contrast: more) {
  .tabbar .tab,
  .tabbar > a { color: #22322B; }
  .tabbar { background: #FFF9E6; }
}

@media (forced-colors: active) {
  .tabbar .tab.on,
  .tabbar > a.on { outline: 1px solid CanvasText; }
}

html { -webkit-text-size-adjust: 100%; }

/* ---------------------------------------------------------------- the sheet
 * The orientation sheet is `position:fixed; inset:0` with a dark backdrop, and
 * its last button sits exactly where the tab bar sits. A real tap on MUNDA
 * SHARE therefore landed on the sheet's own button, which closed the sheet and
 * left the app on a different screen — the tab only worked the second time,
 * once the sheet was gone. The overlay now stops above the bar, so the bar is
 * never underneath it and never eats a press meant for a door.
 */
.orient {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: calc(62px + env(safe-area-inset-bottom)) !important;
}
.orient__sheet { max-height: 100% !important; }

/* ------------------------------------------------------------- the door label
 * The app's own sheet also styles `.tabbar span`, and it won: labels came out
 * italic and truncated ("MUNDAF…") with an underline and a dot under the active
 * door, because the markup is <em>Munda</em>Flow and an inline <em> inside a
 * nowrap/ellipsis span is exactly what truncates. Same design, stated once,
 * with the priority that cannot be overtaken.
 */
.tabbar a > span:not(.n),
#tabbar a > span:not(.n) {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: 100% !important;
  height: 21px !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: keep-all !important;
  font-style: normal !important;
  line-height: 11px !important;
  font-size: 9.5px !important;
  letter-spacing: .05em !important;
}

.tabbar a > span:not(.n) > em,
#tabbar a > span:not(.n) > em {
  display: block !important;
  font-style: normal !important;
  width: 100% !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  font-size: 7.2px !important;
  line-height: 9px !important;
  letter-spacing: .12em !important;
  font-weight: 650 !important;
  opacity: .68 !important;
}

/* one active signal: the gold chip. Nothing underneath the label. */
.tabbar .tab::after,
.tabbar > a::after,
.tabbar a > span::after,
#tabbar a::after,
#tabbar a > span::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
  background: none !important;
}
.tabbar .tab.on,
.tabbar > a.on { border-bottom: 0 !important; box-shadow: none !important; }
.tabbar .tab,
.tabbar > a { font-style: normal !important; text-decoration: none !important; }

@media (max-width: 359px) {
  .tabbar a > span:not(.n),
  #tabbar a > span:not(.n) { font-size: 8.9px !important; letter-spacing: .02em !important; }
  .tabbar a > span:not(.n) > em,
  #tabbar a > span:not(.n) > em { font-size: 6.8px !important; letter-spacing: .1em !important; }
}

/* The bar is part of every page. A view may set `hidden` on it (bare screens),
   and that is exactly when a reader taps where the tabs used to be and nothing
   happens. It stays on screen and stays tappable. */
#tabbar[hidden]{display:flex !important}
#tabbar{pointer-events:auto}
