/* =============================================================================================
   THE OFFICE FRAME - the top bar and the grouped menu, in the shape of the redesign the owner
   approved (demo\AERetail.WebOffice.Demo, October 2026) and in the office's OWN theme: the charcoal
   bar and rail, the amber accent, the light page (OFFICE LIGHT in app.css). No colour is new here;
   every one is the theme's.

   Linked after app.css (App.razor). Nothing here reaches a page's content: only .topbar, the
   top bar's pieces (.topbar-menu, .qf, .scope-chip, .acct), and .sidenav and its lines. The shared
   stylesheet (UICommon aeretail.css, which WebMaster, LytAdmin and ScanData also load) is untouched.
   ============================================================================================= */

/* ---- the top bar ---------------------------------------------------------------------------- */

:root.office-light .topbar { gap: 12px; padding: 0 14px 0 10px; flex-wrap: nowrap; }

.topbar-menu {
    display: none; width: 36px; height: 36px; flex: none; place-items: center; border: 0; border-radius: 8px;
    background: transparent; color: #E4E4EA; cursor: pointer;
}
.topbar-menu svg { width: 20px; height: 20px; }
.topbar-menu:hover { background: rgba(255, 255, 255, .07); }

/* Quick find, in the middle of the bar. */
.qf { position: relative; flex: 0 1 520px; min-width: 0; margin-left: 12px; }
.qf-box {
    display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: 8px;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: #8C8C99;
}
.qf-box svg { width: 17px; height: 17px; flex: none; }
.qf-box input { flex: 1; min-width: 0; border: 0; background: transparent; color: #FFFFFF; font: inherit; font-size: 13.5px; outline: none; }
.qf-box input::placeholder { color: #8C8C99; }
.qf-box kbd {
    font-family: inherit; font-size: 11px; padding: 1px 6px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, .16);
    background: transparent; color: #8C8C99;
}
.qf-box:focus-within { background: var(--surface); border-color: var(--brand); color: var(--ink-3); }
.qf-box:focus-within input { color: var(--ink); }
.qf-box:focus-within kbd { display: none; }
.qf-list {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; margin: 0; padding: 6px; list-style: none;
    background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 10px;
    box-shadow: var(--shadow-2); max-height: 60vh; overflow: auto;
}
.qf-opt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.qf-opt[aria-selected="true"] { background: var(--brand-tint); }
.qf-t { font-weight: 600; }
.qf-g { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.qf-opt small { grid-column: 1 / -1; color: var(--ink-2); font-size: 12px; }
.qf-empty { padding: 10px; color: var(--ink-2); }

/* Which retailer and store: shown, not chosen. */
.scope-chip {
    display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; max-width: 280px; flex: none;
    border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px; background: rgba(255, 255, 255, .05); color: #E4E4EA;
}
.scope-chip svg { width: 17px; height: 17px; flex: none; color: #F5A524; }
.scope-who { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.scope-who small { font-size: 10.5px; color: #8C8C99; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scope-who b { font-size: 13px; font-weight: 600; color: #FFFFFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* The store switcher, for a person with several stores: the chip opens a panel of their stores. */
.scope-menu { position: relative; flex: none; }
.scope-menu > summary { list-style: none; cursor: pointer; }
.scope-menu > summary::-webkit-details-marker { display: none; }
.scope-menu > summary:hover, .scope-menu[open] > summary { background: rgba(255, 255, 255, .10); }
.scope-menu > summary:focus-visible { outline: 2px solid #F5A524; outline-offset: 2px; }
.scope-caret { width: 14px !important; height: 14px !important; color: #8C8C99 !important; }
.scope-panel { left: 0; right: auto; }
.scope-panel .acct-item.on { font-weight: 600; background: var(--brand-tint); }
.scope-tick { width: 16px; color: var(--brand-2); font-weight: 700; }

/* The account menu. */
.acct { position: relative; flex: none; }
.acct-btn {
    list-style: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
    background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 12px; user-select: none;
}
.acct-btn::-webkit-details-marker { display: none; }
.acct[open] .acct-btn { box-shadow: 0 0 0 2px rgba(245, 165, 36, .45); }
.acct-panel {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 260px; padding: 6px;
    background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow-2);
}
.acct-head { display: grid; gap: 2px; padding: 8px 10px 10px; border-bottom: 1px solid var(--rule); margin-bottom: 6px; font-size: 12.5px; color: var(--ink-2); }
.acct-head b { font-size: 14px; color: var(--ink); }
.acct-panel form { margin: 0; }
.acct-item {
    width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 7px;
    background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer;
}
.acct-item svg { width: 16px; height: 16px; color: var(--ink-3); }
.acct-item:hover { background: var(--brand-tint); }

/* ---- the grouped menu ------------------------------------------------------------------------ */

.sidenav { --nav-w: 248px; }
.sidenav.narrow { --nav-w: 60px; }
.sidenav-list { gap: 1px; }

/* A group's heading is a button drawn as a menu line (sidenav-item), with a chevron. */
button.sidenav-item { width: 100%; background: transparent; font: inherit; font-size: 13.5px; font-weight: 500; text-align: left; cursor: pointer; }
.sidenav-chev { width: 15px; height: 15px; margin-left: auto; flex: none; transition: transform .15s; opacity: .7; }
.sidenav-group[aria-expanded="true"] .sidenav-chev { transform: rotate(180deg); }
:root.office-light .sidenav-group.here { color: #FFFFFF; }
:root.office-light .sidenav-group.here .sidenav-ico { color: #F5A524; }

.sidenav-sub { list-style: none; margin: 1px 0 6px; padding: 0; }
.sidenav-subitem {
    display: block; padding: 6px 10px 6px 41px; border-radius: var(--r-ctl); font-size: 13px; text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
:root.office-light .sidenav-subitem { color: #A9A9B4; }
:root.office-light .sidenav-subitem:hover { background: rgba(255, 255, 255, .07); color: #FFFFFF; text-decoration: none; }
:root.office-light .sidenav-subitem.on { background: rgba(245, 165, 36, .16); color: #FFC25A; font-weight: 600; box-shadow: inset 3px 0 0 #F5A524; }

.sidenav-sep { height: 1px; margin: 6px 4px; background: rgba(255, 255, 255, .08); }
.sidenav-ext { margin-left: auto; display: inline-flex; opacity: .6; }
.sidenav-ext .sidenav-ico { width: 14px; height: 14px; }
.sidenav.narrow .sidenav-ext, .sidenav.narrow .sidenav-chev { display: none; }
.sidenav-scrim { display: none; }

@media (prefers-reduced-motion: reduce) { .sidenav-chev { transition: none; } }

/* ---- a narrow window: the menu is an overlay, opened by the menu key -------------------------- */
@media (max-width: 860px) {
    .topbar-menu { display: inline-grid; }
    .qf { flex: 1 1 auto; margin-left: 0; }
    .qf-box kbd, .scope-chip, .brandmark .sub { display: none; }

    .shell { flex-direction: row; }
    .sidenav, .sidenav.narrow {
        --nav-w: 280px;
        position: fixed; top: 58px; left: 0; bottom: 0; z-index: 50; height: auto; max-height: none;
        flex: none; width: var(--nav-w); overflow-y: auto;
        transform: translateX(-100%); visibility: hidden; transition: transform .18s ease-out, visibility .18s;
    }
    .sidenav .sidenav-list { flex-direction: column; overflow: visible; }
    .sidenav .sidenav-label { display: inline; }
    .sidenav .sidenav-toggle { display: none; }
    :root.nav-open .sidenav { transform: none; visibility: visible; box-shadow: var(--shadow-3); }
    :root.nav-open .sidenav-scrim { display: block; position: fixed; inset: 58px 0 0 0; z-index: 45; background: rgba(23, 23, 26, .35); }
}
@media (max-width: 560px) {
    .brandmark .name { display: none; }
}

/* aeretail.css's .fld makes a column of a label wrapping its control, and also of a select.fld,
 whose text Chromium then puts at the top of the box. A select is one control: a row, text centred. */
select.fld { flex-direction: row; align-items: center; }

/* The bell is drawn once the page's circuit starts (not prerendered); its slot keeps its room. */
.ntf-slot { display: inline-block; min-width: 40px; min-height: 40px; }
