/* Global ng-select — never clip values (match Nestora/ERP) */

.page-container2,
.page-container2 .container-fluid,
.section__content,
.card,
.card-body,
.form-group,
.row,
[class^='col-'],
[class*=' col-'] {
  overflow: visible !important;
}

.ng-select {
  display: block;
  width: 100%;
}

.ng-select .ng-select-container,
.ng-select.ng-select-single .ng-select-container,
.ng-select.ng-select-single:not(.payment-ng-select):not(.payment-project-select)
  .ng-select-container {
  min-height: 42px !important;
  height: 42px !important;
  border-radius: 0.375rem !important;
  overflow: hidden !important;
  align-items: center !important;
}

.ng-select.ng-select-opened > .ng-select-container,
.ng-select.ng-select-focused > .ng-select-container {
  border-radius: 0.375rem !important;
}

.ng-select .ng-value-container {
  overflow: hidden !important;
  flex-wrap: nowrap !important;
}

.ng-select .ng-value,
.ng-select .ng-value-label,
.ng-select .ng-value span,
.ng-select .ng-placeholder,
.ng-select .ng-input > input {
  max-width: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.4 !important;
}

.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value {
  position: static !important;
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.ng-dropdown-panel {
  z-index: var(--us-z-dialog-dropdown, 10050) !important;
  border-radius: 0.375rem !important;
}

.ng-dropdown-panel .ng-dropdown-panel-items .ng-option {
  white-space: normal !important;
  overflow: visible !important;
}

/* Page selects (appendTo=body). Dialog selects append to pane — see factoryhub-shell.css */
body > .ng-dropdown-panel {
  position: absolute !important;
  z-index: var(--us-z-dialog-dropdown, 10050) !important;
  pointer-events: auto !important;
}

/* Keep body-appended panels clickable above the scrollable main content */
body.fh-app > .ng-dropdown-panel {
  z-index: 12000 !important;
  pointer-events: auto !important;
}

body.fh-app > .ng-dropdown-panel .ng-option {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* select-with-add: (+) same height as ng-select, never wrap under */
app-select-with-add {
  display: block !important;
  width: 100% !important;
  overflow: visible !important;
}

app-select-with-add .us-select-with-add {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  width: 100% !important;
  gap: 0 !important;
}

app-select-with-add .us-select-with-add > .ng-select,
app-select-with-add .us-select-with-add > ng-select {
  flex: 1 1 auto !important;
  width: calc(100% - 42px) !important;
  max-width: calc(100% - 42px) !important;
  min-width: 0 !important;
}

app-select-with-add .us-select-with-add > .ng-select .ng-select-container,
app-select-with-add .us-select-with-add > ng-select .ng-select-container {
  min-height: 42px !important;
  height: 42px !important;
  border-start-end-radius: 0 !important;
  border-end-end-radius: 0 !important;
}

[dir='rtl'] app-select-with-add .us-select-with-add > .ng-select .ng-select-container,
[dir='rtl'] app-select-with-add .us-select-with-add > ng-select .ng-select-container {
  border-radius: 0 0.375rem 0.375rem 0 !important;
}

[dir='ltr'] app-select-with-add .us-select-with-add > .ng-select .ng-select-container,
[dir='ltr'] app-select-with-add .us-select-with-add > ng-select .ng-select-container {
  border-radius: 0.375rem 0 0 0.375rem !important;
}

app-select-with-add .us-select-with-add__btn {
  flex: 0 0 42px !important;
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  align-self: stretch !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  border-radius: 0 0.375rem 0.375rem 0 !important;
}

[dir='rtl'] app-select-with-add .us-select-with-add__btn {
  border-radius: 0.375rem 0 0 0.375rem !important;
  border-inline-start: 1px solid #ced4da !important;
  border-inline-end: none !important;
}

app-select-with-add .us-select-with-add__btn .fa,
app-select-with-add .us-select-with-add__btn .zmdi {
  font-size: 16px !important;
  line-height: 1 !important;
}

app-select-with-add .us-select-with-add > .ng-select.ng-select-multiple .ng-select-container,
app-select-with-add .us-select-with-add > ng-select.ng-select-multiple .ng-select-container {
  height: auto !important;
  min-height: 42px !important;
}
