/* The application frame: top bar, module rail, drawer, main
 * area, page header and status bar.
 *
 * Laid out the way enterprise applications are (Dynamics 365, Fiori,
 * Lightning) and the way the legacy OSM-Pro desktop app was: modules down the
 * left, the chosen module's pages beside them under headings, the page in the
 * rest. Every colour is a theme token (themes.css, generated and audited by
 * Tools/Theme/build.py) - the frame is where each theme's identity lives.
 *
 * The page scrolls with the window rather than inside a box, so the browser's
 * own scroll restoration, find-in-page, printing and a phone's collapsing
 * address bar all keep working. The top bar, rail and pane stick instead.
 */

:root {
  --osm-topbar-h: 56px;
  /* The phone's own status bar and gesture bar. Zero in a browser; the phone
     app (OSM.Platform.Mobile, mobile.css) draws under both and sets these, so
     the top bar and drawer start below the clock and the status bar ends
     above the gesture handle. */
  --osm-safe-top: 0px;
  --osm-safe-bottom: env(safe-area-inset-bottom, 0px);
  --osm-frame-top: calc(var(--osm-topbar-h) + var(--osm-safe-top));
  --osm-rail-w: 248px;
  --osm-page-pad: 24px;
  /* Where something inside a page should stop when it sticks: under the top
     bar and the page's own sticky header (whose height shell.js publishes). */
  --osm-page-header-h: 0px;
  --osm-sticky-top: calc(var(--osm-frame-top) + var(--osm-page-header-h));
}

@media (max-width: 767.98px) {
  :root { --osm-page-pad: 16px; }
}

html { scroll-padding-top: calc(var(--osm-sticky-top) + 8px); }

.osm-app {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "top  top"
    "nav  main"
    "nav  foot";
  min-height: 100vh;
  min-height: 100dvh;
}

.osm-app.is-bare {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "top" "main" "foot";
}

/* ---------------------------------------------------------------------------
 * Skip link: the first thing a keyboard reaches, invisible until it does.
 * ------------------------------------------------------------------------ */
.osm-skip-link {
  position: fixed; left: 8px; top: 8px; z-index: 1100;
  transform: translateY(-200%);
  background: var(--osm-accent); color: var(--osm-on-accent);
  border: 0; border-radius: var(--osm-radius);
  padding: 8px 16px; font-weight: 600;
}
.osm-skip-link:focus { transform: none; outline: 2px solid var(--osm-ink); outline-offset: 2px; }

/* ---------------------------------------------------------------------------
 * Top bar: fixed height, the theme's own colour.
 * ------------------------------------------------------------------------ */
/* The head of the frame: the MudAppBar, under the TEST/DEMO ribbon and the
   support-session banner (both fixed, and counted in --osm-safe-top, which the
   head leaves as top padding). Its height is exactly --osm-frame-top, where the
   side menu and sticky page headers stop. */
.osm-frame-head {
  grid-area: top;
  position: sticky; top: 0; z-index: 1050;
  padding-top: var(--osm-safe-top);
  background: var(--osm-chrome);
  min-width: 0;
}
.osm-topbar.mud-appbar {
  background: var(--osm-chrome);
  color: var(--osm-on-chrome);
  /* The theme's rule along the bottom, inside the bar's height. */
  box-shadow: inset 0 -2px 0 var(--osm-chrome-rule), var(--osm-shadow-sm);
  z-index: auto;
}
.osm-topbar .osm-topbar-row {
  height: var(--osm-topbar-h); min-height: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 0 8px 0 4px;
  min-width: 0;
}
.osm-topbar-brand { display: flex; align-items: center; color: var(--osm-on-chrome); text-decoration: none; flex: none; }
.osm-topbar-brand .osm-lockup { height: 22px; color: var(--osm-on-chrome); --osm-accent: var(--osm-chrome-accent); }
.osm-topbar-brand:focus-visible { outline: 2px solid var(--osm-chrome-accent); outline-offset: 2px; }

.osm-topbar-org {
  display: inline-flex; align-items: center; gap: 6px;
  padding-left: 12px; margin-left: 4px;
  border-left: 1px solid var(--osm-on-chrome-soft);
  color: var(--osm-on-chrome-soft);
  font-size: 0.8125rem; font-weight: 600;
  min-width: 0; flex: 0 1 auto;
}
.osm-topbar-org-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; }
/* The organization's own logo (V0884). Nothing behind it unless it would
   blend into what it sits on (logo.js): then light behind a dark logo, dark
   behind a light one - the QR code's fixed white and black. */
.osm-topbar-org-logo {
  height: 24px; width: auto; max-width: 96px; object-fit: contain;
  border-radius: 4px; padding: 2px 4px; box-sizing: content-box;
}
.osm-logo-ground-light { background: var(--osm-qr-bg); }
.osm-logo-ground-dark { background: var(--osm-qr-ink); }
.osm-org-logo-preview {
  display: flex; align-items: center; justify-content: center; min-height: 72px;
  border: 1px dashed var(--osm-rule); border-radius: 6px; padding: 8px;
}
.osm-org-logo-image { max-height: 64px; max-width: 100%; object-fit: contain; border-radius: 4px; padding: 4px; box-sizing: content-box; }

.osm-topbar-search { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; padding: 0 8px; }
.osm-topbar-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; flex: none; }

.osm-topbar-button,
.osm-topbar-account,
.osm-topbar-text-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 40px; height: 40px; padding: 0 8px;
  background: transparent; color: var(--osm-on-chrome);
  border: 1px solid transparent; border-radius: 999px;
  position: relative;
}
.osm-topbar .mud-icon-button.osm-topbar-button { padding: 8px; color: var(--osm-on-chrome); }
.osm-topbar-account { padding: 0 6px 0 2px; gap: 8px; }
.osm-topbar .mud-button.osm-topbar-text-button { color: var(--osm-on-chrome); }
.osm-topbar-button:hover,
.osm-topbar-account:hover,
.osm-topbar-text-button:hover,
.osm-topbar-button[aria-expanded='true'],
.osm-topbar-account[aria-expanded='true'] {
  background: var(--osm-chrome-field); color: var(--osm-on-chrome);
}
.osm-topbar-button:focus-visible,
.osm-topbar-account:focus-visible,
.osm-topbar-text-button:focus-visible {
  outline: 2px solid var(--osm-chrome-accent); outline-offset: 1px;
}

/* The bell's count: a MudBadge in the top bar's own accent pair. */
.osm-bell-badge .mud-badge.osm-topbar-count {
  min-width: 18px; height: 18px; padding: 0 5px; inset: auto auto calc(100% - 22px) calc(100% - 22px);
  border-radius: 9px; font-size: 0.6875rem; font-weight: 700; line-height: 18px;
  background: var(--osm-chrome-accent); color: var(--osm-chrome);
  font-variant-numeric: tabular-nums;
}

.osm-avatar, .mud-avatar.osm-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--osm-chrome-accent); color: var(--osm-chrome);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; flex: none;
}
.osm-avatar-lg, .mud-avatar.osm-avatar-lg { width: 44px; height: 44px; font-size: 0.9375rem; background: var(--osm-accent); color: var(--osm-on-accent); }
.osm-topbar-account-name { font-size: 0.875rem; font-weight: 600; }

.mud-popover.osm-account-menu { width: min(22rem, calc(100vw - 16px)); }
.osm-account-head { display: flex; align-items: center; gap: 12px; padding: 8px 16px 12px; }
.osm-account-theme { padding: 4px 8px 8px; }
.mud-popover.osm-bell-menu { width: min(24rem, calc(100vw - 16px)); }
.osm-bell-head { display: flex; align-items: center; gap: 8px; padding: 0 8px 6px 16px; border-bottom: 1px solid var(--osm-rule); }
.osm-bell-list { max-height: min(60vh, 480px); overflow-y: auto; }
.osm-bell-item { display: flex; border: 0; color: var(--osm-ink); flex-direction: column; align-items: stretch; gap: 2px; border-bottom: 1px solid var(--osm-rule) !important; padding: 10px 16px; white-space: normal; text-align: start; width: 100%; background: transparent; }
.osm-bell-item:hover, .osm-bell-item:focus-visible { background: color-mix(in srgb, var(--osm-ink) 7%, transparent); }
.osm-bell-item.is-unread .osm-bell-title { font-weight: 700; }
.osm-bell-item.is-unread { box-shadow: inset 3px 0 0 var(--osm-accent); }

/* The nav toggle only exists for the drawer. */
.osm-nav-toggle { margin-right: 2px; }


/* Global search, in the bar. */
.osm-search { position: relative; width: 100%; max-width: 520px; }
.osm-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--osm-on-chrome-soft); pointer-events: none; }
.osm-search-input {
  width: 100%; height: 40px;
  padding: 0 16px 0 40px;
  background: var(--osm-chrome-field); color: var(--osm-on-chrome);
  border: 1px solid transparent; border-radius: 999px;
  font-size: 0.875rem;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.osm-search-input:hover { border-color: var(--osm-on-chrome-soft); }
:root[data-theme='flare'] .osm-search-input, :root[data-theme='mesquite'] .osm-search-input { border-radius: var(--osm-radius); border-color: var(--osm-on-chrome-soft); }
.osm-search-input::placeholder { color: var(--osm-on-chrome-soft); opacity: 1; }
.osm-search-input:focus { outline: 2px solid var(--osm-chrome-accent); outline-offset: 0; border-color: var(--osm-chrome-accent); }
.osm-search-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 1040;
  max-height: min(70vh, 560px); overflow-y: auto;
  margin: 0; padding: 4px 0;
  background: var(--osm-surface); color: var(--osm-ink);
  border: 1px solid var(--osm-rule-strong); border-radius: var(--osm-radius);
  box-shadow: var(--osm-shadow-md);
}
.osm-search-group + .osm-search-group { border-top: 1px solid var(--osm-rule); }
.osm-search-group-title {
  padding: 8px 12px 4px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--osm-ink-mute);
}
.osm-search-option {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px;
  padding: 6px 12px; color: var(--osm-ink); text-align: left; cursor: pointer;
}
.osm-search-option:hover, .osm-search-option.is-active { background: var(--osm-sunk); }
.osm-search-option.is-active { box-shadow: inset 3px 0 0 var(--osm-accent); }
.osm-search-option-text { display: flex; flex-direction: column; min-width: 0; }
.osm-search-option-title { font-size: 0.9375rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osm-search-option-context { font-size: 0.75rem; color: var(--osm-ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osm-search-empty { padding: 12px; color: var(--osm-ink-mute); font-size: 0.875rem; }
.osm-search-close { display: none; }
.osm-search-toggle { display: none; }

@media (max-width: 767.98px) {
  .osm-topbar-org { display: none; }
  /* On a phone the box opens as a row under the bar from the search button. */
  .osm-topbar-search { display: none; }
  .osm-search-toggle { display: inline-flex; }
  /* On a phone the search opens over the whole screen, results under the box. */
  .osm-topbar-search.is-open {
    display: flex; position: fixed; inset: 0; z-index: 1300; align-items: flex-start;
    padding: 8px; background: var(--osm-chrome);
  }
  .osm-search { max-width: none; display: flex; align-items: center; gap: 4px; }
  .osm-search.is-expanded .osm-search-close {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px;
    border: 0; background: transparent; color: var(--osm-on-chrome); border-radius: 50%;
  }
  .osm-search.is-expanded .osm-search-menu {
    position: fixed; left: 0; right: 0; top: 60px; bottom: 0; max-height: none;
    border-radius: 0; border-left: 0; border-right: 0; box-shadow: none;
  }
  .osm-search-option { min-height: 48px; }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
  .osm-topbar-org-name { max-width: 14ch; }
}

/* ---------------------------------------------------------------------------
 * Navigation: the module rail and the section pane.
 * ------------------------------------------------------------------------ */
/* MudLayout and MudMainContent position things for a fixed app bar and
   drawer; this frame is a grid with a sticky head instead (the page scrolls
   with the window), so their own offsets are switched off here. */
.osm-app.mud-layout { height: auto; }
.osm-app .mud-main-content { margin: 0 !important; padding-top: 0 !important; transition: none; }
.osm-app .mud-appbar { margin: 0 !important; width: auto !important; }
.osm-app > .mud-drawer ~ div:not(.mud-main-content) { margin: 0 !important; }

/* On a desk: the drawer is a column of the grid, sticking under the head.
   "Hide menu" (the top bar's button, or the foot of the menu) takes it off
   the screen and the page takes the whole width. */
.osm-app .mud-drawer.osm-nav-drawer.is-rail-drawer {
  grid-area: nav;
  position: sticky; top: var(--osm-frame-top);
  left: auto !important;
  height: calc(100vh - var(--osm-frame-top));
  height: calc(100dvh - var(--osm-frame-top));
  width: var(--osm-rail-w);
  z-index: 1020;
  background: var(--osm-nav); color: var(--osm-on-nav);
  border-right: 1px solid var(--osm-nav-rule);
  box-shadow: none;
  overflow: hidden;
}
.osm-app .mud-drawer.osm-nav-drawer.is-rail-drawer.mud-drawer--closed { display: none; }
.osm-app.nav-hidden { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main" "foot"; }

.osm-nav { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.osm-navmenu {
  flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 0;
  scrollbar-width: thin; scrollbar-color: var(--osm-nav-rule) transparent;
}

/* A menu entry: a Material navigation item, its active indicator a pill in
   the theme's own "chosen" pair (nav-active / on-nav-active, audited), with
   the theme's marker colour down its leading edge. */
.osm-navmenu .mud-nav-item { padding: 1px 8px; }
.osm-navmenu .mud-nav-link {
  align-items: center; min-height: 40px; padding: 8px 12px;
  border-radius: var(--osm-m-pill, 999px);
  color: var(--osm-on-nav); font-size: 0.875rem; font-weight: 600; line-height: 1.25;
}
.osm-navmenu .mud-nav-link:hover:not(.mud-nav-link-disabled) { background-color: var(--osm-nav-hover); }
.osm-navmenu .mud-nav-link .mud-nav-link-icon { color: var(--osm-on-nav-soft); flex: none; font-size: 1.25rem; }
.osm-navmenu .mud-nav-link .mud-nav-link-text { margin-inline-start: 14px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.osm-navmenu .mud-nav-item.osm-nav-chosen .mud-nav-link,
.osm-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled) {
  background-color: var(--osm-nav-active); color: var(--osm-on-nav-active);
  box-shadow: inset 4px 0 0 var(--osm-nav-accent);
  font-weight: 700 !important;
}
.osm-navmenu .mud-nav-item.osm-nav-chosen .mud-nav-link .mud-nav-link-icon,
.osm-navmenu .mud-nav-link.active .mud-nav-link-icon { color: var(--osm-on-nav-active); }
.osm-navmenu .mud-nav-link:focus-visible { outline: 2px solid var(--osm-nav-accent); outline-offset: -2px; }

.osm-nav-foot { flex: none; padding: 6px 8px; border-top: 1px solid var(--osm-nav-rule); }
.osm-nav-foot .mud-button.osm-nav-hide { color: var(--osm-on-nav-soft); width: 100%; justify-content: flex-start; padding-left: 12px; }
.osm-nav-foot .mud-button.osm-nav-hide:hover { background: var(--osm-nav-hover); color: var(--osm-on-nav); }

.osm-nav-loading { display: grid; gap: 12px; padding: 16px; }
.osm-nav-loading .mud-skeleton { background-color: var(--osm-nav-hover); }
.osm-nav-external { margin-left: auto; opacity: 0.8; flex: none; }

/* ---------------------------------------------------------------------------
 * The drawer, on a phone or a narrow window: a modal navigation drawer under
 * the top bar (so the menu button stays in reach to close it), above a dimmed
 * page. Big rows: a phone is used with a thumb, often with gloves.
 * ------------------------------------------------------------------------ */
@media (max-width: 991.98px) {
  .osm-app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main" "foot"; }
}
.osm-app .mud-drawer.osm-nav-drawer.is-drawer {
  position: fixed; left: 0;
  top: var(--osm-frame-top) !important; bottom: 0; height: auto !important;
  width: min(360px, 88vw);
  padding-bottom: var(--osm-safe-bottom);
  background: var(--osm-nav); color: var(--osm-on-nav);
  border-radius: 0 var(--osm-m-radius-lg, 12px) var(--osm-m-radius-lg, 12px) 0;
  box-shadow: var(--osm-shadow-lg);
  z-index: 1045;
}
.osm-app .mud-drawer.osm-nav-drawer.is-drawer.mud-drawer--closed { visibility: hidden; box-shadow: none; }
.osm-nav-backdrop {
  position: fixed; inset: var(--osm-frame-top) 0 0 0; z-index: 1040;
  background: var(--osm-backdrop);
}
@media (min-width: 992px) { .osm-nav-backdrop { display: none; } }
.osm-drawer-list .mud-nav-link { min-height: 52px; font-size: 1rem; padding: 12px 16px; }
.osm-drawer-list .mud-nav-link .mud-nav-link-icon { font-size: 1.5rem; }
/* ---------------------------------------------------------------------------
 * Main area and the page container.
 * ------------------------------------------------------------------------ */
.osm-main { grid-area: main; min-width: 0; outline: none; }

/* The page wrapper. Every page wraps itself in .container.osm-page (or
   .container-fluid.osm-page). The names are Bootstrap's and stay, as plain
   class names with their own rules here (Bootstrap went 2026-10-05): the full
   width with a gutter either side, and for .container a centered column that
   steps up at the old breakpoints. */
.container, .container-fluid {
  width: 100%;
  padding-right: 0.75rem; padding-left: 0.75rem;
  margin-right: auto; margin-left: auto;
}
@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

/* Inside the frame every page uses the full width it is given, however wide
   the screen (the owner's rule); running text keeps its own measure
   (.osm-page-lede). */
.osm-main > .container.osm-page,
.osm-main > .container-fluid.osm-page,
.osm-main > div > .container.osm-page {
  max-width: none;
  margin-left: 0; margin-right: auto;
  padding-left: var(--osm-page-pad); padding-right: var(--osm-page-pad);
}
.osm-app.is-bare .osm-main > .container { margin-left: auto; margin-right: auto; }

/* A reading or form page (settings, a record, a set-up screen) keeps a
   comfortable width on a wide screen instead of stretching inputs and tables
   edge to edge. Data grids, lists and the board keep the full width. */
.osm-main > .container.osm-page.osm-page-readable,
.osm-main > .container-fluid.osm-page.osm-page-readable,
.osm-main > div > .container.osm-page.osm-page-readable,
.osm-page.osm-page-readable { max-width: calc(1400px + 2 * var(--osm-page-pad, 0.75rem)); }


/* ---------------------------------------------------------------------------
 * Page header: breadcrumb, title, command bar, sentence, tabs.
 * ------------------------------------------------------------------------ */
.osm-page-header { padding-bottom: 8px; }

@media (min-width: 768px) {
  /* Under the top bar on a long page, full width of the page so content
     scrolling beneath does not show at the sides. */
  .osm-page-header.is-sticky {
    position: sticky; top: var(--osm-frame-top); z-index: 1010;
    background: var(--osm-ground);
    margin: 0 calc(-1 * var(--osm-page-pad));
    padding: 12px var(--osm-page-pad) 10px;
    border-bottom: 1px solid transparent;
  }
  /* At the very top of the page it takes over the page's own top padding,
     so the bar does not float 16px below the top bar. */
  .osm-page > .osm-page-header.is-sticky:first-child { margin-top: -16px; }
  .osm-page-header.is-sticky:has(+ *) { border-bottom-color: var(--osm-rule); }
}

.osm-breadcrumb ol {
  display: flex; flex-wrap: wrap; align-items: center;
  list-style: none; margin: 0 0 4px; padding: 0;
  font-size: 0.8125rem; color: var(--osm-ink-soft);
}
.osm-breadcrumb li { display: inline-flex; align-items: center; min-width: 0; }
/* The separators are MudBreadcrumbs' own. */

.osm-breadcrumb a { color: var(--osm-ink-soft); text-decoration: none; }
.osm-breadcrumb a:hover { color: var(--osm-accent); text-decoration: underline; }
.osm-breadcrumb [aria-current='page'] { color: var(--osm-ink); font-weight: 600; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.osm-page-eyebrow { margin-bottom: 2px; }

.osm-page-titlebar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px;
}
.osm-page-titlegroup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.osm-page-titlegroup .osm-page-title { margin: 0; overflow-wrap: anywhere; }

.osm-commandbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
@media (max-width: 575.98px) {
  .osm-commandbar { margin-left: 0; width: 100%; }
}

.osm-page-tabs { margin: 0 0 16px; border-bottom: 1px solid var(--osm-rule); }

/* ---------------------------------------------------------------------------
 * Status bar.
 * ------------------------------------------------------------------------ */
.osm-statusbar {
  grid-area: foot;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px;
  min-height: 28px; padding: 4px var(--osm-page-pad) calc(4px + var(--osm-safe-bottom));
  background: var(--osm-surface); color: var(--osm-ink-soft);
  border-top: 1px solid var(--osm-rule);
  font-size: 0.75rem;
}
.osm-statusbar-sync, .osm-statusbar-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.osm-statusbar-item { display: inline-flex; align-items: center; gap: 6px; }
.osm-statusbar-quiet { color: var(--osm-ink-mute); }
/* Something to say: the caution colour, pinned to the bottom of the screen. */
.osm-statusbar.has-attention {
  position: sticky; bottom: 0; z-index: 1015;
  background: var(--osm-warn-soft); color: var(--osm-ink);
  border-top: 2px solid var(--osm-warn);
  font-size: 0.875rem; min-height: 36px;
}
.osm-env-badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: var(--osm-info-soft); color: var(--osm-info);
  font-weight: 700; font-size: 0.6875rem; letter-spacing: 0.04em; text-transform: uppercase;
}

/* Toasts sit above the status bar. */
.osm-toast-stack { bottom: calc(40px + var(--osm-safe-bottom)); }

/* Flare: a striped band under the top bar - the theme's mark. */
:root[data-theme='flare'] .osm-topbar.mud-appbar {
  box-shadow: var(--osm-shadow-sm);
  background-image: repeating-linear-gradient(-45deg, var(--osm-chrome-accent) 0 10px, var(--osm-chrome) 10px 20px);
  background-size: 100% 6px; background-repeat: no-repeat; background-position: bottom;
}

@media (prefers-reduced-motion: reduce) {
  .osm-nav, .osm-nav-drawer { transition: none !important; }
}

/* A narrow phone: the top bar's icons fit its width - never a sideways page.
   Tighter gaps for everybody; and CYOPS, whose bar has one more tool ("View
   an organization"), leaves out the wordmark (Home is in the menu). */
@media (max-width: 420px) {
  .osm-topbar .osm-topbar-row { gap: 2px; padding: 0 4px 0 2px; }
  .osm-topbar-tools { gap: 0; }
  .osm-topbar-row:has(.osm-organization-view-anchor) .osm-topbar-brand { display: none; }
}
