/* AQUILA_COMMERCIAL_FIRSTPAINT_R1
   Desktop menu deck appears with first paint; POS loading cues.
   Does not own checkout, receipts, or protected runtimes. */

@media (min-width: 768px) {
  html:not([data-ubz-auth="login"]) #ubz-commercial-deck-skeleton {
    position: fixed !important;
    top: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 2147482900 !important;
    display: flex !important;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(105, 128, 121, 0.22);
    background: rgba(250, 252, 251, 0.92);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    pointer-events: none;
  }

  html[data-ubuzima-workspace-dock-mounted="true"] #ubz-commercial-deck-skeleton,
  html[data-ubz-auth="login"] #ubz-commercial-deck-skeleton {
    display: none !important;
  }

  #ubz-commercial-deck-skeleton span {
    display: block;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(75, 83, 32, 0.08), rgba(75, 83, 32, 0.18), rgba(75, 83, 32, 0.08));
    background-size: 200% 100%;
    animation: ubz-commercial-shimmer 1.1s linear infinite;
  }

  #ubz-commercial-deck-skeleton span:nth-child(1) { width: 34px; }
  #ubz-commercial-deck-skeleton span:nth-child(2) { width: 88px; }
  #ubz-commercial-deck-skeleton span:nth-child(3) { width: 72px; }
  #ubz-commercial-deck-skeleton span:nth-child(4) { width: 96px; }
  #ubz-commercial-deck-skeleton span:nth-child(5) { width: 70px; }
  #ubz-commercial-deck-skeleton span:nth-child(6) { width: 84px; }
  #ubz-commercial-deck-skeleton span:nth-child(7) { width: 34px; }

  html[data-ubuzima-workspace-dock-mounted="true"]
  nav.ubuzima-workspace-dock-v5[data-ubuzima-workspace-dock-v5="UBIZIMA_CONTINUOUS_MAC_WORKSPACE_DOCK_V7"]:not([data-aquila-r109-hidden="1"]) {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 2147483000 !important;
  }
}

@keyframes ubz-commercial-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* POS commercial loading / responsiveness */
html[data-ubz-pos-cat="loading"] .pos-drug-list--ten::before {
  content: "Loading sellable products…";
  display: block;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(75, 83, 32, 0.08);
  color: #4b5320;
  font-size: 0.78rem;
  font-weight: 700;
}

html.aquila-r108-pos-active .pos-search-input,
html[data-ubz-pos-cat] .pos-search-input {
  font-size: 16px;
  touch-action: manipulation;
  min-height: 44px;
}

html.aquila-r108-pos-active .pos-drug-list--ten button,
html.aquila-r108-pos-active .pos-drug-list--ten [role="button"] {
  min-height: 44px;
  touch-action: manipulation;
}

html.aquila-r108-pos-active .pos-drug-list--ten,
.pos-drug-list--ten {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  will-change: scroll-position;
}

@media (min-width: 768px) {
  html.aquila-r108-pos-active .pos-counter-page,
  html.aquila-r108-pos-active .pos-dedicated-counter-shell {
    contain: layout style;
  }

  html.aquila-r108-pos-active .pos-builder-product-panel,
  html.aquila-r108-pos-active .pos-product-stock-section {
    content-visibility: auto;
    contain-intrinsic-size: 480px;
  }
}
