/* ERP Plus Global Toolbar V2 SAFE
   UI-only. Does not change toolbar/container display, visibility, position or structure. */
:root {
  --ai-toolbar-v2-height: 30px;
  --ai-toolbar-v2-min-width: 68px;
  --ai-toolbar-v2-bg: #f59a23;
  --ai-toolbar-v2-bg-hover: #e88912;
  --ai-toolbar-v2-bg-active: #cf7306;
  --ai-toolbar-v2-border: #d77808;
  --ai-toolbar-v2-text: #111827;
  --ai-toolbar-v2-focus: #12a8ff;
}

/* Only buttons positively identified by JS as toolbar buttons are styled.
   IMPORTANT: no display/visibility rule is applied to any toolbar container. */
button.ai-global-toolbar-btn-v2,
input[type="button"].ai-global-toolbar-btn-v2,
input[type="submit"].ai-global-toolbar-btn-v2 {
  box-sizing: border-box !important;
  height: var(--ai-toolbar-v2-height) !important;
  min-height: var(--ai-toolbar-v2-height) !important;
  max-height: var(--ai-toolbar-v2-height) !important;
  min-width: var(--ai-toolbar-v2-min-width) !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 10px !important;
  border: 1px solid var(--ai-toolbar-v2-border) !important;
  border-radius: 0 !important;
  background: var(--ai-toolbar-v2-bg) !important;
  background-image: none !important;
  color: var(--ai-toolbar-v2-text) !important;
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 28px !important;
  text-align: center !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  text-shadow: none !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: box-shadow .08s ease, background-color .10s ease, border-color .10s ease !important;
  transform: translateY(0) !important;
  transform-origin: center !important;
}

button.ai-global-toolbar-btn-v2:hover:not(:disabled),
input.ai-global-toolbar-btn-v2:hover:not(:disabled) {
  background: var(--ai-toolbar-v2-bg-hover) !important;
  border-color: #c86b04 !important;
  transform: none !important;
  box-shadow: 0 2px 4px rgba(0,0,0,.16) !important;
}

button.ai-global-toolbar-btn-v2:focus-visible,
input.ai-global-toolbar-btn-v2:focus-visible {
  outline: 2px solid var(--ai-toolbar-v2-focus) !important;
  outline-offset: 1px !important;
  box-shadow: none !important;
}

button.ai-global-toolbar-btn-v2:active:not(:disabled),
input.ai-global-toolbar-btn-v2:active:not(:disabled) {
  background: var(--ai-toolbar-v2-bg-active) !important;
  border-color: #b45f03 !important;
  transform: none !important;
  box-shadow: inset 0 3px 5px rgba(0,0,0,.32) !important;
}

button.ai-global-toolbar-btn-v2:disabled,
input.ai-global-toolbar-btn-v2:disabled {
  opacity: .52 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

button.ai-global-toolbar-btn-v2 i,
button.ai-global-toolbar-btn-v2 svg,
input.ai-global-toolbar-btn-v2 i,
input.ai-global-toolbar-btn-v2 svg {
  width: 13px !important;
  height: 13px !important;
  font-size: 13px !important;
}


/* ERP Plus permanent form order is controlled by each form: Header Details -> Toolbar -> Details Grid.
   These rules only standardize appearance; they do not reposition the toolbar. */
.erpplus-standard-toolbar {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 40px !important;
  margin: 8px 0 !important;
}
.erpplus-standard-toolbar :is(.erp-toolbar-actions,.clean-toolbar-buttons,.po6-buttons) {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

@media (max-width: 768px) {
  button.ai-global-toolbar-btn-v2,
  input.ai-global-toolbar-btn-v2 {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    min-width: 72px !important;
    line-height: 34px !important;
  }
}

/* ERP Plus V1.1 — ABSOLUTE STATIC BUTTON POSITION
   Final override: tactile feedback is colour + inset shadow only.
   No hover, focus, mouse-down or active state may move, lift, scale or resize a toolbar button. */
html body button.ai-global-toolbar-btn-v2,
html body input[type="button"].ai-global-toolbar-btn-v2,
html body input[type="submit"].ai-global-toolbar-btn-v2,
html body button.ai-global-toolbar-btn-v2:hover,
html body input[type="button"].ai-global-toolbar-btn-v2:hover,
html body input[type="submit"].ai-global-toolbar-btn-v2:hover,
html body button.ai-global-toolbar-btn-v2:focus,
html body input[type="button"].ai-global-toolbar-btn-v2:focus,
html body input[type="submit"].ai-global-toolbar-btn-v2:focus,
html body button.ai-global-toolbar-btn-v2:focus-visible,
html body input[type="button"].ai-global-toolbar-btn-v2:focus-visible,
html body input[type="submit"].ai-global-toolbar-btn-v2:focus-visible,
html body button.ai-global-toolbar-btn-v2:active,
html body input[type="button"].ai-global-toolbar-btn-v2:active,
html body input[type="submit"].ai-global-toolbar-btn-v2:active {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  translate: none !important;
  rotate: none !important;
  scale: none !important;
  transform: none !important;
  transform-origin: center center !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  vertical-align: middle !important;
  filter: none !important;
  animation: none !important;
  transition-property: background-color, border-color, box-shadow, color !important;
  transition-duration: .08s !important;
}

/* Hover gives colour feedback only—no outside shadow that can look like lifting. */
html body button.ai-global-toolbar-btn-v2:hover:not(:disabled),
html body input[type="button"].ai-global-toolbar-btn-v2:hover:not(:disabled),
html body input[type="submit"].ai-global-toolbar-btn-v2:hover:not(:disabled) {
  background: var(--ai-toolbar-v2-bg-hover) !important;
  border-color: #c86b04 !important;
  box-shadow: none !important;
}

/* Press feel without any positional or dimensional change. */
html body button.ai-global-toolbar-btn-v2:active:not(:disabled),
html body input[type="button"].ai-global-toolbar-btn-v2:active:not(:disabled),
html body input[type="submit"].ai-global-toolbar-btn-v2:active:not(:disabled) {
  background: var(--ai-toolbar-v2-bg-active) !important;
  border-color: #8f4700 !important;
  box-shadow:
    inset 0 3px 5px rgba(0,0,0,.38),
    inset 0 0 0 1px rgba(255,255,255,.10) !important;
}

/* Keep icon/text fixed as well. */
html body .ai-global-toolbar-btn-v2 > *,
html body .ai-global-toolbar-btn-v2:hover > *,
html body .ai-global-toolbar-btn-v2:active > * {
  position: static !important;
  translate: none !important;
  transform: none !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}


/* ERP Plus Toolbar R8 — NO HOVER / ZERO MOVEMENT
   User-approved final interaction: hover has no visual effect.
   Press feedback uses colour only; no transform, shadow, animation or layout change. */
html body button.ai-global-toolbar-btn-v2,
html body input[type="button"].ai-global-toolbar-btn-v2,
html body input[type="submit"].ai-global-toolbar-btn-v2 {
  transition: none !important;
  animation: none !important;
  transform: none !important;
  box-shadow: none !important;
}

html body button.ai-global-toolbar-btn-v2:hover:not(:disabled),
html body input[type="button"].ai-global-toolbar-btn-v2:hover:not(:disabled),
html body input[type="submit"].ai-global-toolbar-btn-v2:hover:not(:disabled) {
  background: var(--ai-toolbar-v2-bg) !important;
  border-color: var(--ai-toolbar-v2-border) !important;
  color: var(--ai-toolbar-v2-text) !important;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
}

html body button.ai-global-toolbar-btn-v2:active:not(:disabled),
html body input[type="button"].ai-global-toolbar-btn-v2:active:not(:disabled),
html body input[type="submit"].ai-global-toolbar-btn-v2:active:not(:disabled) {
  background: #d97908 !important;
  border-color: #9a4e00 !important;
  color: var(--ai-toolbar-v2-text) !important;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
}

html body button.ai-global-toolbar-btn-v2:focus,
html body input[type="button"].ai-global-toolbar-btn-v2:focus,
html body input[type="submit"].ai-global-toolbar-btn-v2:focus,
html body button.ai-global-toolbar-btn-v2:focus-visible,
html body input[type="button"].ai-global-toolbar-btn-v2:focus-visible,
html body input[type="submit"].ai-global-toolbar-btn-v2:focus-visible {
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

html body .ai-global-toolbar-btn-v2 > *,
html body .ai-global-toolbar-btn-v2:hover > *,
html body .ai-global-toolbar-btn-v2:focus > *,
html body .ai-global-toolbar-btn-v2:active > * {
  transform: none !important;
  translate: none !important;
  position: static !important;
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
