/* Extension from Bootstrap */
@media (min-width: 576px) {
  /* sm */
}

@media (min-width: 768px) {
  /* md */
}

@media (min-width: 992px) {
  /* lg */
}

@media (min-width: 1200px) {
  /* xl */
}

@media (min-width: 1400px) {
  /* xxl */
}

.full-width {
  width: calc(100vw - var(--scrollbar-width));
}

.fs-7 {
  font-size: 0.75rem !important;
}

.fs-8 {
  font-size: 0.5rem !important;
}

.form-control.appear-disabled:read-only {
  background-color: var(--bs-secondary-bg);
  opacity: 1;
}

.validation {
  background-color: var(--bs-danger-bg-subtle);
  border-color: var(--bs-danger-border-subtle);
  color: var(--bs-danger-text-emphasis);
}

.img-thumbnail.img-thumbnail-transparent {
  background-color: transparent;
  border: none;
  box-shadow: none;
}

/* Chrome, Safari, Edge, Opera */
input.number-hidden-arrow::-webkit-outer-spin-button,
input.number-hidden-arrow::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number].number-hidden-arrow {
  -moz-appearance: textfield;
}

thead.sticky-top.border-bottom-sticky th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: inset 0 -2px 0;

}

tfoot.sticky-bottom.border-top-sticky td {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 2;
  box-shadow: inset 0 2px 0;
}

.carousel-control-prev-icon:after,
.carousel-control-next-icon:after {
  content: "";
}

.dataTables_wrapper .dataTables_length label>select.form-select.form-select-sm {
  width: 3.5rem;
  background-position: right 10% bottom 45%;
}

.v-img-fluid {
  max-height: 100%;
  width: auto;
}

/* pad right by 0.25rem only */
.table-nopad> :not(caption)>*>* {
  padding: 0 0.25rem 0 0;
}

td.fit-width {
  width: 1px;
  white-space: nowrap;
}


.form-check-input-success.form-check-input[type=checkbox]:checked {
  background-color: var(--bs-success);
  border-color: var(--bs-success);
}

.form-switch .form-check-input-success.form-check-input[type=checkbox]:checked:after {
  background-color: var(--bs-success);
}

.disable-dbl-tap-zoom {
  touch-action: manipulation;
}

.disable-user-highlight {
  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -o-user-select: none;
  user-select: none;
}

.text-outline {
  text-shadow:
    var(--ext-text-outline-width) var(--ext-text-outline-width) 0 var(--ext-text-outline-color),
    calc(var(--ext-text-outline-width) * -1) var(--ext-text-outline-width) 0 var(--ext-text-outline-color),
    calc(var(--ext-text-outline-width) * -1) calc(var(--ext-text-outline-width) * -1) 0 var(--ext-text-outline-color),
    var(--ext-text-outline-width) calc(var(--ext-text-outline-width) * -1) 0 var(--ext-text-outline-color);
}

.text-outline.text-outline-thin {
  --ext-text-outline-width: var(--ext-text-outline-thin);
}

@media (min-width: 767.98px) {
  .text-outline-lg-none {
    text-shadow: none !important;
  }
}

:root {
  --ext-text-outline-thin: 0.05rem;
  --ext-text-outline-default: 0.075rem;
  --ext-text-outline-width: var(--ext-text-outline-default);
  --ext-text-outline-color: #000;
  --bs-lightgrey-rgb: 233, 236, 239;
  --bs-lightgrey: #e9ecef;
}

.bg-lightgrey {
  --bs-bg-opacity: 1;
  background-color: rgba(var(--bs-lightgrey-rgb), var(--bs-bg-opacity)) !important;
}

.text-bg-lightgrey {
  color: #000 !important;
  background-color: rgba(var(--bs-lightgrey-rgb), var(--bs-bg-opacity, 1)) !important;
}

.bg-grey {
  background-color: var(--bs-gray) !important;
}

.w-fit {
  width: fit-content;
}

[data-bs-theme="dark"] {
  .dropdown-menu {
    --bs-dropdown-link-color: #aeb0b3;
  }
}

.rounded-top-start-0 {
  border-top-left-radius: 0 !important;
}

.rounded-top-end-0 {
  border-top-right-radius: 0 !important;
}

.rounded-bottom-start-0 {
  border-bottom-left-radius: 0 !important;
}

.rounded-bottom-end-0 {
  border-bottom-right-radius: 0 !important;
}

.datepicker-container {
  color: #000;
}

input[type="submit"].submitted,
button[type="submit"].submitted {
  opacity: 0.8;
  pointer-events: none;
  cursor: wait;
}

.table-inherit {
  --bs-table-bg: inherit;
  --bs-table-color: inherit;
}

table.table-borderless {
  border-collapse: separate;
}

table.table-rounded {
  --table-border-radius: 0.5rem;

  >thead {

    tr:first-of-type {

      &>th:first-child,
      >td:first-child {
        border-top-left-radius: var(--table-border-radius);
      }

      &>th:last-child,
      >td:last-child {
        border-top-right-radius: var(--table-border-radius);
      }
    }
  }

  >tfoot {

    tr:last-of-type {

      &>th:first-child,
      >td:first-child {
        border-bottom-left-radius: var(--table-border-radius);
      }

      &>th:last-child,
      >td:last-child {
        border-bottom-right-radius: var(--table-border-radius);
      }
    }
  }

  &>thead:empty+tbody {
    tr:first-of-type {

      &>th:first-child,
      >td:first-child {
        border-top-left-radius: var(--table-border-radius);
      }

      &>th:last-child,
      >td:last-child {
        border-top-right-radius: var(--table-border-radius);
      }
    }
  }

  &.no-footer>tbody {
    tr:last-of-type {

      &>th:first-child,
      >td:first-child {
        border-bottom-left-radius: var(--table-border-radius);
      }

      &>th:last-child,
      >td:last-child {
        border-bottom-right-radius: var(--table-border-radius);
      }
    }
  }
}

.bg-follow-theme {
  --bs-bg-opacity: 1;
  background-color: rgba(var(--bs-theme-rgb), var(--bs-bg-opacity)) !important;
}

.text-follow-theme {
  color: rgb(var(--bs-theme-opp-rgb)) !important;
}

.bg-opposite-theme {
  --bs-bg-opacity: 1;
  background-color: rgba(var(--bs-theme-opp-rgb), var(--bs-bg-opacity)) !important;
}

.text-opposite-theme {
  color: rgb(var(--bs-theme-rgb)) !important;
}

[data-bs-theme="light"] {
  --bs-theme-rgb: 255, 255, 255;
  --bs-theme-opp-rgb: 0, 0, 0;
}

[data-bs-theme="dark"] {
  --bs-theme-rgb: 0, 0, 0;
  --bs-theme-opp-rgb: 255, 255, 255;
}

.positive-value,
.numeric-color-change[sy-validate-float][sy-validation-result~="gt0"],
.numeric-color-change-not[sy-validate-float][sy-validation-result~="lt0"] {
  color: var(--theme-positive-text) !important;
}

.negative-value,
.numeric-color-change[sy-validate-float][sy-validation-result~="lt0"],
.numeric-color-change-not[sy-validate-float][sy-validation-result~="gt0"] {
  color: var(--theme-negative-text) !important;
}

.form-control.disabled{
  background-color: var(--bs-secondary-bg);
}

.overflow-auto,
.overflow-x-auto,
.overflow-y-auto,
.overflow-scroll,
.overflow-x-scroll,
.overflow-y-scroll {

  /* width */
  &::-webkit-scrollbar {
    width: 5px;
    height: 5px;
  }

  /* Track */
  &::-webkit-scrollbar-track {
    background: #f1f1f1;
    background: inherit;
  }

  /* Handle */
  &::-webkit-scrollbar-thumb {
    background: #888;
  }

  /* Handle on hover */
  &::-webkit-scrollbar-thumb:hover {
    background: #555;
  }
}

.pointer-events-auto{
  pointer-events: auto;
}
.pointer-events-none{
  pointer-events: none;
}

.bg-opacity-10 {
  --bs-bg-opacity: 0.1;
}

.bg-opacity-25 {
  --bs-bg-opacity: 0.25;
}

.bg-opacity-50 {
  --bs-bg-opacity: 0.5;
}

.bg-opacity-75 {
  --bs-bg-opacity: 0.75;
}

.bg-opacity-100 {
  --bs-bg-opacity: 1;
}