/** */

:root {
  --bs-body-bg: #f8f9fc;
  --bs-nav-tabs-border-width: 2px;
  --bs-grid-gutter-w: 16px;
}

body {
  height: auto;
}

#wrapper,
#content-wrapper {
  height: 100vh;
}

#content > .static-top {
  position: sticky;
  top: 0;
  z-index: 12;
}

#content > .container-fluid > .header-summary {
  position: sticky;
  top: calc(4.375rem + 4px);
  z-index: 11;
}

/** BOTTONI */

.btn:is(:disabled, .disabled) {
  pointer-events: none;
  opacity: 0.3;
}

/** CARD */

.card-header {
  padding: 0.25rem 0.75rem;
  font-weight: 600;
}

/** TABELLE */

.table td,
.table th {
  line-height: 1.2;
  padding: 0.25rem 0.5rem;
}

.table .row {
  --bs-grid-gutter-w: 0.5rem;
}

/** /TABELLE */

.nav-link:not(.disabled, :disabled) {
  cursor: pointer;
}

.nav-link:where(.disabled, :disabled) {
  pointer-events: none;
}

/** TABULAZIONI */

.nav-tabs,
.nav-tabs .nav-link {
  border-width: var(--bs-nav-tabs-border-width);
}

.nav-tabs .nav-item {
  display: block;
  position: relative;
  z-index: 1;
  margin-bottom: calc(-1 * var(--bs-nav-tabs-border-width));
  border-bottom-color: 4px solid var(--bs-body-bg);
}

.nav-tabs .nav-link {
  display: block;
}

.nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-link.active {
  background-color: var(--bs-body-bg);
  border-bottom-color: var(--bs-body-bg);
  border-bottom-width: 0;
  font-weight: 700;
  position: relative;
  transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
  z-index: 1;
}

.nav-tabs .nav-item.show,
.nav-tabs .nav-item:has(.nav-link:is(.active, :active)) {
  z-index: 2;
}

.nav-tabs .nav-item.show .nav-link:after,
.nav-tabs .nav-link.active:after {
  content: '';
  background-color: var(--bs-body-bg);
  display: block;
  height: calc(2 * var(--bs-nav-tabs-border-width));
  inset: auto 0 calc(-1 * var(--bs-nav-tabs-border-width));
  position: absolute;
}

.nav-tabs .nav-link.active {
  pointer-events: none;
}

.nav-tabs .nav-link:is(:focus, :hover) {
  border-bottom: transparent;
}

/** /TABULAZIONI */

/** BUDGET ACTION BAR */

.budget-action-bar .btn:last-child {
  margin-left: auto;
}

[class^='BudgetTable_budget-table'] {
  position: relative;
  z-index: 5;
}

/** /BUDGET ACTION BAR */

/** SIDEBAR */

.sidebar {
  position: relative;
  z-index: 99;
}

/* .sidebar:not(.toggled) .nav-item .nav-link {
	align-items: center;
	display: flex;
	gap: 1em;
	justify-content: flex-start;
} */

/* .sidebar:not(.toggled) .nav-item .nav-link i {
	margin: 0;
} */

.sidebar .nav-item .nav-link span {
  flex: 1;
}

.sidebar .nav-item .collapse .collapse-inner .collapse-item,
.sidebar .nav-item .collapsing .collapse-inner .collapse-item {
  gap: 1em;
  display: flex;
  align-items: center;
}

.sidebar .collapse-item .fas {
  align-items: center;
  display: flex;
  flex: 0 0 0.85rem;
  height: 0.85rem;
  justify-content: center;
  line-height: 1;
  width: 0.85rem;
}

.sidebar .collapse-item span {
  flex: 1;
}

/** /SIDEBAR */

/** FORM */

.form-control-file,
::-webkit-file-upload-button {
  cursor: pointer;
}

::-webkit-file-upload-button {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  border: 1px solid #4e73df;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.35rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;

  color: #fff;
  background-color: #4e73df;
  margin-right: 1em;
}

.form-control-file:is(.focus, :focus) ::-webkit-file-upload-button,
::-webkit-file-upload-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(105, 136, 228, 0.5);
}

.form-control-file:is(.hover, :hover) ::-webkit-file-upload-button,
::-webkit-file-upload-button:hover {
  color: #fff;
  background-color: #2e59d9;
  border-color: #2653d4;
}

.form-group > label {
  display: block;
  font-size: 0.9rem;
}

[class*='col-']:where([style='margin-top: 22px;'], [style='margin-top: 23px;']) {
  margin-top: 0 !important;
}

[class*='col-']:where([style='margin-top: 22px;'], [style='margin-top: 23px;']):before {
  content: '';
  display: block;
  height: calc(0.9rem * 1.5);
}

textarea.form-control {
  min-height: 100px;
}

/** /FORM */

/** COMMESSE */

.header-summary
  :where(.bg-primary, .bg-danger)
  :where(.header-summary__title, .header-summary__close, .header-summary__close a) {
  color: white;
}

.header-summary__close {
  text-align: right;
}

.header-summary__close a {
  display: inline-block;
  text-decoration-thickness: 0;
  text-underline-offset: 1px;
  transform: scale3d(1.5, 1.5, 1);
}

.header-summary__close a:is(:focus, :hover, :active) {
  color: currentColor;
}

:where(.header-summary-commission, .header-summary-purchase-order) .header-summary__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/** /COMMESSE */

.gap-3 {
  column-gap: 15px;
  row-gap: 15px;
}

.gap-x-3 {
  column-gap: 15px;
}

.gap-y-3 {
  row-gap: 15px;
}

/** GRIGLIA */

.container,
.container-fluid,
[class*='col'] {
  padding-left: calc(0.5 * var(--bs-grid-gutter-w));
  padding-right: calc(0.5 * var(--bs-grid-gutter-w));
}

.row {
  margin-left: calc(-0.5 * var(--bs-grid-gutter-w));
  margin-right: calc(-0.5 * var(--bs-grid-gutter-w));
}

/** /GRIGLIA */

/** CARD */

.card-body {
  padding: calc(0.5 * var(--bs-grid-gutter-w));
}

/** /CARD */

@media (max-width: 1023px) {
  /** */

  :root {
    --bs-grid-gutter-w: 16px;
  }

  /** */
}

@media (min-width: 2000px) {
  /** */

  :root {
    --bs-grid-gutter-w: 30px;
  }

  /** */
}

.topbar .dropdown .dropdown-menu {
  overflow-y: auto;
  max-height: 70vh;
}

.p-dialog .p-dialog-header,
.p-dialog .p-dialog-content {
  color: inherit !important;
}

.p-dialog .p-dialog-header .p-dialog-title {
  font-weight: 400 !important;
}

.p-dialog-top .p-dialog {
  width: auto;
  max-width: 500px;
  margin: 0.5rem !important;
}

@media screen and (min-width: 576px) {
  .p-dialog-top .p-dialog {
    margin: 1.75rem !important;
  }
}

.react-tooltip {
  z-index: 10000 !important;
  font-size: 0.75rem !important;
  padding: 0.35rem !important;
  white-space: normal !important;
  /* width: auto !important; */
  max-width: 90vw !important;
}

.opacity-30 {
  opacity: 0.3;
}
