/* BUILD501 — dedicated BIR Supabase save */
/* BUILD 500 — Smooth Button / Bottom Controls Performance Layer
   Goal: instant cashier feedback with no layout-shifting animation or heavy paint. */
:root{--b500-press-opacity:.90}

button,
[role="button"],
.posBtn,
.navItem,
.actions button,
.toolbar button,
.checkoutActions button,
.paymentActions button{
  touch-action:manipulation!important;
  -webkit-tap-highlight-color:transparent!important;
  user-select:none!important;
  -webkit-user-select:none!important;
  transform:none!important;
  filter:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  transition:background-color .055s linear,border-color .055s linear,color .055s linear,opacity .055s linear!important;
}
button:hover,
[role="button"]:hover,
.posBtn:hover,
.navItem:hover{
  transform:none!important;
  filter:none!important;
}
button:active:not(:disabled),
[role="button"]:active,
.posBtn:active:not(:disabled),
.navItem:active{
  transform:none!important;
  opacity:var(--b500-press-opacity)!important;
  transition:none!important;
}
button:focus-visible,
[role="button"]:focus-visible,
.posBtn:focus-visible,
.navItem:focus-visible{
  outline:2px solid currentColor!important;
  outline-offset:2px!important;
}
button:disabled,
.posBtn:disabled{
  cursor:not-allowed!important;
  transform:none!important;
  animation:none!important;
  transition:none!important;
}

/* Cashier bottom controls: stable geometry, no shadow animation/reflow. */
.posScreen .checkoutActions,
.posScreen .paymentBar,
.posScreen .bottomActions,
.posScreen .transactionActions{
  contain:layout paint!important;
}
.posScreen .checkoutActions button,
.posScreen .checkoutActions .posBtn,
.posScreen .paymentBar button,
.posScreen .bottomActions button,
.posScreen .transactionActions button{
  box-shadow:none!important;
  text-shadow:none!important;
  transform:none!important;
  min-width:0!important;
}
.posScreen .checkoutActions button:active:not(:disabled),
.posScreen .paymentBar button:active:not(:disabled),
.posScreen .bottomActions button:active:not(:disabled),
.posScreen .transactionActions button:active:not(:disabled){
  opacity:.86!important;
}

/* Prevent expensive animated status decorations from stealing paint time at checkout. */
.posScreen .networkBadge i,
.posScreen .d1AutoLiveBadge::before,
.posScreen .liveDot,
.posScreen [class*="pulse"],
.posScreen [class*="blink"]{
  animation:none!important;
}

/* Large action areas paint independently from long tables/lists. */
.historyPanel .actions,
.inventoryActions,
.settingsSaveActions,
.modalBox .actions,
.modalBox footer,
.toolbar{
  contain:layout paint!important;
}

/* Respect reduced motion globally without changing functionality. */
@media(prefers-reduced-motion:reduce){
  button,[role="button"],.posBtn,.navItem{transition:none!important;animation:none!important}
}
