html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, auto));
  gap: 10px;
  padding: 10px;
  border: 2px solid #ddd;
}

.grid-item {
  padding: 8px;
  text-align: center;
  /* border-bottom: 1px solid #ddd; */
  min-width: 150px;
  /* Base size */
  max-width: -webkit-fill-available;
  /* Expands if content is larger */
  white-space: nowrap;
  /* Prevents wrapping */
  overflow: hidden;
  text-overflow: ellipsis;
  /* Adds "..." if text is too long */
}

.grid-item-control {
  padding: 1px;
  text-align: center;
  border-bottom: 1px none #ddd;
  min-width: 50px;
}

.grid-header {
  display: contents;
  /* Makes header part of the same grid */
  font-weight: bold;
  background-color: #f8f9fa;
}

.grid-header-item {
  padding: 8px;
  text-align: center;
  border-bottom: 2px solid #ddd;
}

.grid-body {
  display: contents;
}

.grid-row {
  display: contents;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, auto));
    gap: 10px;
    padding: 10px;
    border: 2px solid #ddd;
    text-align: center; /* Add this */
}

/* Select2 box */
.select2-container--default {
    float: left;
    height: 38px;
    display: block;
    width: inherit;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--cui-body-color);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--cui-body-bg);
    background-clip: padding-box;
    border: var(--cui-border-width) solid var(--cui-border-color);
    border-radius: var(--cui-border-radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Main input box */
.select2-container--default .select2-selection--single {
font-size: 1rem;
font-weight: 400;
height: 100%;
width: 100%;
color: var(--cui-body-color);
background-color: var(--cui-body-bg);
border: var(--cui-border-width) solid var(--cui-border-color);
}

/* Selected text */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    height: 100%;
    color: var(--cui-body-color) !important;
}

/* Placeholder */
.select2-container--default .select2-selection__placeholder {
    color: var(--cui-body-color);
}

/* Dropdown arrow */
.select2-container--default .select2-selection__arrow b {
    background-color: var(--cui-body-bg);
}

/* Dropdown panel */
.select2-container--default .select2-dropdown {
    color: var(--cui-body-color);
    background-color: var(--cui-body-bg);
    border: var(--cui-border-width) solid var(--cui-border-color);
}

/* Options */
.select2-container--default .select2-results__option {
    color: var(--cui-body-color);
    background-color: var(--cui-body-bg);
}

/* Highlighted option */
.select2-container--default .select2-results__option--highlighted {
    color: var(--cui-body-color);
    background-color: var(--cui-body-bg);
}

/* Selected option in dropdown */
.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: var(--cui-body-bg);
}

/* Focused outline removal */
.select2-container--default .select2-selection--single:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Apply font style to the main input */
.select2-container--default .select2-selection--single {
    font-size: 1rem !important;
    font-weight: 400 !important;
    border: transparent !important;
    background-color: var(--cui-body-bg) !important;
}

/* Selected text inside the select box */
.select2-container--default .select2-selection__rendered {
    font-size: 1rem !important;
    font-weight: 400 !important;
}

/* Options in dropdown */
.select2-container--default .select2-results__option {
    font-size: 1rem !important;
    font-weight: 400 !important;
}

/* Placeholder text */
.select2-container--default .select2-selection__placeholder {
    font-size: 1rem !important;
    font-weight: 400 !important;
}

.select2-selection .select2-selection--single {
    height: 100% !important;
}

.select2-container {
    z-index: 9999 !important;
}

.select2-dropdown {
    z-index: 99999 !important;
}
/* update*/
/* Prevent forced scrollbar */
html, body {
    height: 100%;
    overflow: hidden;
}

/* Layout container */
.wrapper {
    height: 100vh;
}

/* Main scrollable content */
.body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Footer should not cause overflow */
.footer {
    flex-shrink: 0;
}

table.dataTable thead th,
table.dataTable tbody td {
    white-space: nowrap;
}

.table th,
.table td {
    white-space: nowrap;
}

.datagrid th,
.datagrid td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}