/* CoreBiz IR v7.0 final compatibility fixes. */

/* The previous 100vh wrapper plus header padding created an extra header-height
   of document overflow on short/empty tables. Include padding in the height. */
body.corebiz-ui #wrapper {
  box-sizing: border-box !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
}

body.corebiz-ui #wrapper > .content,
body.corebiz-ui .content {
  box-sizing: border-box;
  padding-bottom: 12px !important;
}

/* DataTables sometimes leaves the scrollY container at a fixed height even
   when it contains only a handful of rows. JS applies this class only when the
   actual table is shorter than the viewport reserved for it. */
body.corebiz-ui .dataTables_scrollBody.corebiz-ir-auto-height {
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
}

body.corebiz-ui .dataTables_scrollBody.corebiz-ir-auto-height table {
  margin-bottom: 0 !important;
}

/* Keep date controls visually consistent after native date inputs are changed
   to text so the Persian picker can own parsing and display. */
body.corebiz-ui input.corebiz-ir-date-input {
  direction: rtl;
  text-align: right;
}

body.corebiz-ui .pwt-datepicker-input-element,
body.corebiz-ui .datepicker,
body.corebiz-ui .datetimepicker {
  font-variant-numeric: tabular-nums;
}

/* Prevent legacy FA4 brand icons from inheriting the solid icon font. */
body.corebiz-ui .fa-facebook,
body.corebiz-ui .fa-facebook-f,
body.corebiz-ui .fa-linkedin,
body.corebiz-ui .fa-linkedin-in,
body.corebiz-ui .fa-skype,
.customers .fa-facebook,
.customers .fa-facebook-f,
.customers .fa-linkedin,
.customers .fa-linkedin-in,
.customers .fa-skype {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
}

/* Theme chooser empty/error state. */
.si-ct-theme-empty-state {
  clear: both;
  margin: 20px 0 70px;
  text-align: center;
}

@media (max-width: 767px) {
  body.corebiz-ui #wrapper {
    min-height: 100dvh !important;
  }
}
