/*
 * AQUILA_OPS_WORKSPACE_CHROME_R1
 * TEST Outlook ops-rail: POS-like frame fitting + remove page-local nav / progress shells.
 */

html[data-ubz-ops-rail] {
  --ubz-ops-chrome-top: calc(var(--ubz-ops-bar, 48px) + var(--ubz-ops-expiry, 86px));
}

html[data-ubz-ops-rail] #root {
  padding-top: var(--ubz-ops-chrome-top) !important;
  box-sizing: border-box !important;
}

/* Never let module pages cover the ops header / near-expiry strip */
html[data-ubz-ops-rail] .section-page,
html[data-ubz-ops-rail] .module-page,
html[data-ubz-ops-rail] [data-finance-workspace],
html[data-ubz-ops-rail] .finance-workspace,
html[data-ubz-ops-rail] main,
html[data-ubz-ops-rail] .dashboard-content,
html[data-ubz-ops-rail] .workspace-shell {
  max-width: 100% !important;
}

html[data-ubz-ops-rail] .section-page,
html[data-ubz-ops-rail] .module-page {
  position: relative !important;
  top: auto !important;
  z-index: 1 !important;
}

/* Inter-module nav lives in the ops head bar — hide page-dedicated duplicates */
html[data-ubz-ops-rail] .module-page-navigation,
html[data-ubz-ops-rail] .module-page-sticky-header:has(.module-page-navigation),
html[data-ubz-ops-rail] .navigation.main-dashboard,
html[data-ubz-ops-rail] button.main-dashboard,
html[data-ubz-ops-rail] button.user-security-exit-button,
html[data-ubz-ops-rail] button[data-action="main"],
html[data-ubz-ops-rail] .pos-context-navigation,
html[data-ubz-ops-rail] [data-ubz-page-nav="legacy"] {
  display: none !important;
}

/* Hide empty / progress-only intro shells that add no operational value */
html[data-ubz-ops-rail] [data-ubz-ops-progress-shell="1"],
html[data-ubz-ops-rail] .ubz-ops-progress-shell {
  display: none !important;
}

/* POS: edge-to-edge counter — kill gray gutters / floating card frame */
html[data-ubz-ops-rail][data-ubz-pos-work="1"] #root,
html[data-ubz-ops-rail]:has(.pos-counter-page--dedicated) #root,
html[data-ubz-ops-rail]:has(.pos-dedicated-counter-shell) #root {
  background: #ffffff !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
}

html[data-ubz-ops-rail] .section-page.pos-dedicated-counter-shell,
html[data-ubz-ops-rail] .pos-counter-page--dedicated,
html[data-ubz-ops-rail][data-ubz-pos-work="1"] .section-page {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #ffffff !important;
}

html[data-ubz-ops-rail][data-ubz-pos-work="1"] .pos-operating-cockpit-v2,
html[data-ubz-ops-rail] .pos-counter-page--dedicated .pos-operating-cockpit-v2 {
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #ffffff !important;
}

html[data-ubz-ops-rail][data-ubz-pos-work="1"] .pos-product-stock-section,
html[data-ubz-ops-rail][data-ubz-pos-work="1"] .pos-sale-cart-section,
html[data-ubz-ops-rail][data-ubz-pos-work="1"] .pos-transaction-setup-section,
html[data-ubz-ops-rail][data-ubz-pos-work="1"] .pos-payment-summary-section,
html[data-ubz-ops-rail][data-ubz-pos-work="1"] .pos-sale-transaction-section,
html[data-ubz-ops-rail][data-ubz-pos-work="1"] .pos-session-control-card {
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Collapse oversized empty catalogue placeholder while stock is loading */
html[data-ubz-ops-rail][data-ubz-pos-work="1"] .pos-inventory-empty-state,
html[data-ubz-ops-rail] .pos-product-stock-section .pos-inventory-empty-state {
  min-height: 72px !important;
  max-height: 120px !important;
  margin: 8px 0 !important;
  padding: 12px !important;
}
