/* console-shell.css - companion sheet for fleet PHP hosts running the dapp-family
 * console DOM (send.u.cash structure) on the ds/72 kit (ustrap/72 + ds/72/console.css).
 * Byte-cousin of the React family's shell overrides (/root/ucash-dapp/src/app/globals.css
 * 86-230), re-scoped html.uxc-dapp -> html.uxc-console (the marker class js/shell-boot.js
 * stamps pre-paint). Dapp-only rules dropped (wallet CTA fit, Ctrl+K chip); one PHP-only
 * addition at the bottom (boot-gate JS-failure fallback - a React host always hydrates,
 * a PHP host can have its JS blocked). NEVER pin this sheet together with
 * uxc/<ver>/css/admin.css - the z-index scales are incompatible (pay 999995+ vs ds 40..46). */

/* Box-sizing reset (the apps.u.cash lander law): the dapp family inherits
 * *,::before,::after{box-sizing:border-box} from Tailwind preflight - ustrap does NOT
 * ship it universally, and without it every bordered shell surface measures 1-2px over
 * (sidebar 162 vs 160, mobile bar 43 vs 42). Every console-sheet consumer needs it. */
*, *::before, *::after { box-sizing: border-box; }

/* Static inline styles are CSP-violating on strict style-src hosts (apps.u.cash law):
 * the shell's own markup must carry NO style attributes - these two declarations moved
 * out of uxc_shell.php (home anchor display:contents; legacy sidebar-head burger hidden
 * - the live burger is the .uxc-page-header one, ds/72 console.css 1280+ owns it). */
.uxc-home-link { display: contents; }
.uxc-sidebar-head > .uxc-nav-open-btn { display: none; }

/* Horizontal overflow law: the console layout is width-locked; clip stray overflow at
 * the viewport (the same rule the dapp family ships). */
html.uxc-console, html.uxc-console body { overflow-x: clip; }

/* Mobile ghost strip (operator 2026-09-12): ustrap's pay-extraction still paints the
 * aside as pay's mobile top bar (background #fff/#000 !important, z-43) - but in this
 * shell the top bar is the .uxc-page-header (z-42), so that opaque 32px film sits OVER
 * the brand/title/avatar/burger and hides them. The drawer's real surfaces are fixed
 * children with their own backgrounds, so on mobile the aside itself must paint NOTHING. */
@media (max-width: 767.99px) {
  .uxc-dapp-console .uxc-sidebar,
  html:is(.uxc-dark-mode, .dark) .uxc-dapp-console .uxc-sidebar { background: none !important; }
}

/* Mobile header FIT (operator 2026-09-12): the row (brand | title | apps | avatar |
 * burger) must fit a 375px bar - the burger takes ustrap's own 42px mobile intent (its
 * plain 42 lost to the global 48px !important), and the brand icon is uncrushable so a
 * future overflow can never silently zero it again. */
@media (max-width: 767.99px) {
  .uxc-page-header > .uxc-nav-open-btn { width: 42px !important; }
  .uxc-page-header .uxc-mobile-brand img { flex: 0 0 auto; min-width: 22px; }
}

/* Mobile brand cell is ICON-ONLY (operator 2026-09-20): the wordmark (img pair, or the
 * wallet-style text span on image-less hosts) drops out of the 375px row
 * (brand | title | apps | avatar | burger); the U mark / letter mark carries the brand. */
@media (max-width: 767.99px) {
  .uxc-page-header .uxc-mobile-brand .uxc-logo { display: none; }
}

/* Mobile title divider (operator 2026-09-12): the title carries the base border-RIGHT,
 * but the mobile row's divider language is all-left and the brand cell precedes the
 * title - flip to border-left on mobile only; desktop keeps the right divider. */
@media (max-width: 767.99px) {
  html.uxc-console .uxc-page-header .uxc-title {
    border-right: none;
    border-left: 1px solid var(--uxc-border-color, #e6e6e6);
  }
}

/* Header search slot (operator 2026-09-20): apps pass opts['search'] to uxc_shell_top; ustrap
 * flexes the trigger 1 1 auto on desktop (the spacer pushing the right cluster flush-right) and
 * collapses it to a 40px icon cell on mobile - hide the label + kbd hint there. */
@media (max-width: 767.99px) {
  .uxc-page-header .uxc-cmd-search-trigger span, .uxc-page-header .uxc-cmd-search-trigger kbd { display: none; }
}

/* Appdrawer trigger cell (operator 2026-09-12): the right cluster's generic cell rule
 * (> * { padding: 0 10px }) wraps the 40px ad-btn host in dead space - the apps trigger
 * is a flush 40px cell like the burger cell, not a padded cluster cell. */
html.uxc-console .uxc-page-header .uxc-page-header-right > #uxc-appdrawer-host { padding: 0; }

/* Mobile drawer settings footer: the Language + Theme row in the burger drawer.
 * ustrap ships the rail chrome (.uxc-drawer-footer, max-767 only) but the v67 one-div
 * re-key left it without a slide-in transform (only .uxc-navdrawer translates now) -
 * restore it here, stop the nav panel 34px short so items don't scroll under the rail,
 * and style the two cells (compact navdrawer look: gold values, center divider).
 * Desktop never shows the rail. */
.uxc-drawer-footer { display: none; }
@media (max-width: 767.99px) {
  body.uxc-nav-open .uxc-dapp-console .uxc-sidebar > .uxc-drawer-footer { transform: translateX(0); }
  html.uxc-console .uxc-dapp-console .uxc-sidebar > .uxc-navdrawer { bottom: 34px; }
  .uxc-df-btn {
    flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 0 8px; min-width: 0; background: none; border: 0;
    border-left: 1px solid var(--uxc-border-color, #e6e6e6);
    color: var(--uxc-text-primary, var(--uc-text, #1c1a17)); cursor: pointer;
    font: 600 12px Inter, system-ui, sans-serif; white-space: nowrap;
  }
  .uxc-df-btn:first-child { border-left: 0; }
  .uxc-df-btn:hover { color: var(--gold, var(--uc-accent, #cc9933)); }
  html:is(.uxc-dark-mode, .dark) .uxc-df-btn { color: var(--uxc-text-primary, #f1f1f1); }
  .uxc-df-v { color: var(--gold, var(--uc-accent, #cc9933)); }
  .uxc-df-chev { opacity: .6; }
}

/* Mobile drawer covers the header (operator 2026-09-12, homepage u.cash parity): the
 * panel opens from y=0 - its own close/profile head row IS the top chrome, instead of
 * sliding under the 42px page-header bar. */
@media (max-width: 767.99px) {
  html.uxc-console .uxc-dapp-console .uxc-sidebar > .uxc-navdrawer { top: 0; }
}

/* Drawer footer cell divider (operator): one full-height vertical line BETWEEN the two
 * cells, piercing the rail's top border down to its bottom edge. The per-button
 * border-left is retired for the rail pseudo. */
@media (max-width: 767.99px) {
  .uxc-df-btn + .uxc-df-btn { border-left: 0; }
  html.uxc-console .uxc-dapp-console .uxc-sidebar > .uxc-drawer-footer { position: fixed; }
  html.uxc-console .uxc-dapp-console .uxc-sidebar > .uxc-drawer-footer::before {
    content: ''; position: absolute; left: 50%; top: -1px; bottom: 0; width: 1px;
    transform: translateX(-0.5px); background: var(--uxc-border-color, #e6e6e6); z-index: 1;
  }
}

/* Drawer dashcell icons (operator): inline SVG plates render at pay's 16px dashcell
 * idiom, fill-based ones follow currentColor (without the fill they are black-on-black
 * in the dark drawer; stroke-based glyphs are excluded - a CSS fill would blob them). */
.uxc-drawer-dashcell svg { width: 16px; height: 16px; }
.uxc-drawer-dashcell svg:not([stroke]) { fill: currentColor; }

/* Dashcell casing (operator): ustrap uppercases the cells; the wording canon is title
 * case - Login / Signup, not LOGIN / SIGNUP. */
html.uxc-console .uxc-drawer-dashcell { text-transform: none; }

/* Account dropdown plate icons (accountmenu.js): the fill-based plates (Login/Account
 * person, Browser Language globe) carry no fill - same currentColor law as dashcells. */
html.uxc-console .uxc-account-dropdown .uxc-account-item svg:not([stroke]) { fill: currentColor; }

/* Console info card: pay console .uxc-transactions-info idiom - one plain
 * square-bordered explainer card (square corners per the fleet law). */
.uxc-info-card {
  padding: 20px; margin: 0 0 20px;
  background: none; border: 1px solid var(--uxc-border-color, #e6e6e6); border-radius: 0;
  color: var(--uxc-text-secondary, #999);
  font-size: 13.5px; line-height: 1.55;
}

/* Page-header bottom gap (operator 2026-09-12): ustrap's desktop base gives the console
 * header bar 14px of clearance; 20px reads better above the content. Desktop only. */
@media (min-width: 768px) {
  html.uxc-console .uxc-page-header { margin-bottom: 20px; }
}

/* Sidebar boot gate (operator 2026-09-12): the server ships the sidebar EXPANDED and
 * the persisted collapse (uxc-nav-collapsed) only applies when console-shell.js runs -
 * without the gate a returning collapsed user watches the menu scramble then slide into
 * the rail. While .uxc-boot is on (dropped one paint after the collapse state lands),
 * the sidebar is invisible with transitions dead - geometry kept so the content column
 * never shifts. */
.uxc-dapp-console.uxc-boot .uxc-sidebar { visibility: hidden; transition: none !important; }
.uxc-dapp-console.uxc-boot .uxc-sidebar * { transition: none !important; }

/* PHP-only fallback (absent on the React family, which always hydrates): if
 * console-shell.js never runs (blocked, CSP regression, 404), the boot class stays on
 * forever and the sidebar would be invisible - force it back after 3s. When JS is
 * healthy the class is gone long before the animation starts, so this never fires. */
.uxc-dapp-console.uxc-boot .uxc-sidebar { animation: uxc-boot-fallback 0s 3s forwards; }
@keyframes uxc-boot-fallback { to { visibility: visible; } }

/* Footer outer spacing (operator 2026-09-12): ustrap ships .footer with a 70px/40px
 * block padding - far too much air on console pages. Very small margins instead. */
.uxc-console-content .footer { padding-block: 10px !important; }
