/* === BOOTSTRAP TABLE OVERRIDES - OPTIMIZED === */

/* Initial loading state */
.kr-bootstrap-table.hide-until-ready {
  opacity: 0;
}

/* Main table container */
.kr-bootstrap-table .bootstrap-table.bootstrap5 {
  width: 100%;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #d9d9d9;
  box-shadow: 0 4px 12px 3px rgba(0, 0, 0, 0.122);
  border-radius: 18px;
  overflow: auto;
  padding: 0;
}

/* Remove all table borders */
.kr-bootstrap-table .bootstrap-table.bootstrap5 tr,
.kr-bootstrap-table .bootstrap-table.bootstrap5 td,
.kr-bootstrap-table .bootstrap-table.bootstrap5 th {
  border: none;
}

/* Toolbar layout */
.fixed-table-toolbar {
  display: flex;
  flex-wrap: nowrap;
  margin: 33px 33px 32px 34px;
}

.kr-bootstrap-table .bootstrap-table.bootstrap5 .bs-bars {
  display: flex;
  flex: 1;
  margin: 0;
}

/* Custom toolbar styling */
.kr-bootstrap-table .bootstrap-table.bootstrap5 #custom-toolbar {
  width: 100%;
  padding: 0;
  margin-top: 5px;
}

/* Toolbar rows - consolidated */
.kr-bootstrap-table .bootstrap-table.bootstrap5 #custom-toolbar .toolbar-row-1 {
  width: 100%;
  height: 48px;
  display: flex;
  justify-content: space-between;
  align-content: center;
}

.kr-bootstrap-table .bootstrap-table.bootstrap5 #custom-toolbar .toolbar-row-2 {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-content: center;
  margin-top: 10px;
  gap: 15px;
  padding: 10px 0;
}

.kr-bootstrap-table .bootstrap-table.bootstrap5 #custom-toolbar .toolbar-row-3 {
  width: 100%;
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  align-content: center;
  align-items: center;
  margin-top: 10px;
  gap: 15px;
  flex-wrap: wrap;
}

/* Input field wrappers - consolidated */
.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  #custom-toolbar
  .toolbar-row-2
  .kr-input-field-wrapper,
.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  #custom-toolbar
  .toolbar-row-3
  .kr-input-field-wrapper {
  flex: 1;
  min-width: 200px;
}

.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  #custom-toolbar
  .toolbar-row-2
  .kr-input-field-input-wrapper,
.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  #custom-toolbar
  .toolbar-row-3
  .kr-input-field-input-wrapper {
  width: 100%;
}

.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  #custom-toolbar
  .toolbar-row-2
  .form-control,
.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  #custom-toolbar
  .toolbar-row-3
  .form-control,
.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  #custom-toolbar
  .toolbar-row-3
  .form-select {
  width: 100%;
}

/* Special styling for toolbar row 3 selects */
#custom-toolbar .toolbar-row-3 select,
#custom-toolbar select:focus {
  border: none;
  box-shadow: none;
  height: 48px !important;
}

.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  #custom-toolbar
  .toolbar-row-3
  .form-select {
  height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 2.25rem 0.375rem 0.75rem;
}

/* Search components */
.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  #custom-toolbar
  .search-selector-wrapper {
  margin-right: 15px;
}

.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  #custom-toolbar
  .search-selector {
  min-width: 160px;
  height: 48px;
}

.kr-bootstrap-table .bootstrap-table.bootstrap5 .columns {
  flex: 0 0 auto;
}

/* Search wrapper and states */
.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  .bootstrap-table-search-wrapper {
  display: flex;
  flex-wrap: nowrap;
  width: 95%;
  border-radius: 4px;
  border: 1px solid #d9d9d9;
  margin-right: 30px;
}

.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  .bootstrap-table-search-wrapper:hover {
  border-color: black;
}

.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  .bootstrap-table-search-wrapper:focus-within {
  border-color: blue;
}

/* Search components - consolidated */
.kr-bootstrap-table .bootstrap-table.bootstrap5 .bootstrap-table-search-icon {
  padding: 16px 0 0 10px;
  opacity: 0.8;
  fill: rgba(0, 0, 0, 0.54);
  width: 30px;
  height: 30px;
}

.kr-bootstrap-table .bootstrap-table.bootstrap5 .bootstrap-table-search-input {
  border: none;
  box-shadow: none;
  padding-left: 8px;
}

.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  .bootstrap-table-search-input::placeholder {
  color: rgba(0, 0, 0, 0.54);
  font-size: 14px;
  line-height: 48px;
  padding: 0;
}

.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  .bootstrap-table-search-clear-button {
  width: 30px;
  height: 30px;
  margin-top: 2px;
  padding: 14px 10px 0 0;
  cursor: pointer;
}

/* New resource button */
.kr-bootstrap-table .bootstrap-table.bootstrap5 .new-resource-button {
  width: 200px;
  display: inline-flex !important;
  align-items: center;
}

.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  .new-resource-button
  .create-button-icon {
  height: 20px;
}

.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  .new-resource-button
  .create-button-text {
  font-weight: bold;
  padding-left: 5px;
}

/* Table body */
.kr-bootstrap-table .bootstrap-table.bootstrap5 .fixed-table-body {
  max-height: 50vh;
}

/* Table headers */
.kr-bootstrap-table .bootstrap-table.bootstrap5 table thead th {
  position: sticky;
  top: 0;
  background-color: #f4f6f8;
  padding: 4px 5px;
  font-size: 12px;
  line-height: 14px;
  white-space: nowrap;
  color: #637480;
}

/* Table body cells */
.kr-bootstrap-table .bootstrap-table.bootstrap5 table tbody td {
  padding: 16px 22px 16px 0;
  font-size: 14px;
  line-height: 16px;
  white-space: nowrap;
  color: #3c3c3c;
  height: 16px;
}

/* Pagination container */
.kr-bootstrap-table .bootstrap-table.bootstrap5 .fixed-table-pagination {
  border-top: 1px solid #e5e8eb;
  color: rgba(0, 0, 0, 0.87);
  font-size: 0.875rem;
  display: flex;
  justify-content: flex-start;
  position: relative;
  padding: 20px 35px;
  min-height: 52px;
  align-items: center;
}

/* Pagination detail */
.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  .fixed-table-pagination
  .pagination-detail {
  margin: 0;
  height: auto;
}

.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  .fixed-table-pagination
  .pagination-detail
  .page-list {
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.43;
  letter-spacing: 0.01071em;
  flex-shrink: 0;
}

.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  .fixed-table-pagination
  .pagination-detail
  .page-list
  .btn-group
  button {
  background-color: white;
  border: none;
  color: black;
  font-weight: 400;
  line-height: 1.4375em;
  letter-spacing: 0.00938;
  box-sizing: border-box;
  position: relative;
  cursor: text;
  display: inline-flex;
  align-items: center;
  margin: 0 8px 0 32px;
  font-size: 0.875rem;
  padding: 4px 0 5px 0;
}

/* Dropdown states - consolidated */
.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  .fixed-table-pagination
  .pagination-detail
  .page-list
  .dropdown-item.active,
.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  .fixed-table-pagination
  .pagination-detail
  .page-list
  .dropdown-item:active {
  background-color: rgba(25, 118, 210, 0.08);
  color: black;
}

/* Pagination info and controls */
.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  .fixed-table-pagination
  .pagination-info {
  position: absolute;
  right: 215px;
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.43;
  letter-spacing: 0.01071em;
  flex-shrink: 0;
}

.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  .fixed-table-pagination
  .pagination {
  position: absolute;
  right: 15px;
  margin: 0 0 50px 0;
  font-size: 16px;
}

/* Pagination links - consolidated */
.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  .fixed-table-pagination
  .pagination
  .page-item
  .page-link {
  background-color: white;
  color: rgba(0, 0, 0, 0.54);
  font-size: 1.5rem;
  border: none;
  height: 40px;
  width: 40px;
}

.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  .fixed-table-pagination
  .pagination
  .page-item.disabled
  .page-link {
  background-color: white;
  color: rgba(0, 0, 0, 0.26);
}

/* First column padding - consolidated selectors */
.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  thead
  tr
  th:not([data-visible='false']):first-of-type,
.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  tbody
  tr
  td:first-child:not(.d-none),
.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  thead
  tr
  th:not([data-visible='false']):first-of-type,
.kr-bootstrap-table
  .bootstrap-table.bootstrap5
  tbody
  tr
  td:not([style*='display: none']):first-of-type {
  padding-left: 20px !important;
}

.kr-bootstrap-table .bootstrap-table-button {
  background-color: #1d4c7e;
  color: white;
  border-radius: 5px;
  height: 48px;
}

.kr-bootstrap-table .bootstrap-table-button-secondary {
  background-color: #aed136;
  border-color: #aed136;
  color: black;
  border-radius: 5px;
  height: 48px;
}

.kr-bootstrap-table .bootstrap-table-button-left {
  margin-right: 5px;
}

.kr-bootstrap-table .dropdown-label {
  margin: 0px;
}
