:root {
  --primary: #327EF1;
  --secondary: #6C757D;
}

.btn_blue_border {
  background: none;
  border-color: #0747A8;
  color: #0747A8;
  height: 38px;
}

.custom-row-cols>.col {
  flex-basis: calc(100% / 8);
  max-width: calc(100% / 8);
  min-width: 200px;
}

.item-card-text {
  white-space: normal;
  overflow: overlay;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  font-size: smaller;
  text-wrap: wrap;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  max-height: 60px;
}

.navi-style {
  width: 260px;
  height: 100vh;
  background-color: #327EF1;
}

.navi-item-style {
  color: white;
  width: 100%;
  box-sizing: border-box;
  display: block;
  text-decoration: none !important;
  padding: 10px;
}

p:has(>.navi-item-style) {
  margin-bottom: 0.25rem;
}

.navi-item-style.active {
  background-color: rgba(255, 255, 255, 0.24);
  border-radius: 6px;
}

.navi-item-style:hover {
  background-color: rgba(255, 255, 255, 0.48);
  border-radius: 6px;
  color: inherit !important;
}

.expandable-item>.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.48);
  border-radius: 6px;
  color: inherit !important;
}

ul#expandableContent {
  padding-inline-start: 32px;
}

.navbar-style {
  box-shadow: none !important;
  color: white !important;
  background: white !important;
}

.search-input {
  background: url(/images/icon_search2-8185400d46ac964e5a8963af9698a0d9.png) no-repeat;
  background-position: 6px 50%;
}

.icon-button {
  background: none;
  border: none;
  padding: 6px;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: var(--primary);
}

.icon-button:hover {
  color: inherit !important;
  background-color: rgba(177, 208, 255, 0.48);
}

.icon-button.active {
  background-color: rgba(177, 208, 255, 0.48);
}

.btn_bookshelf_body {
  display: flex;
  justify-content: space-between;
}

.table {
  max-width: 100%;
  table-layout: fixed;
}

.table thead th {
  border-top: none;
}

/* Add book screen*/
.dropArea {
  background-color: rgba(177, 208, 255, 0.12);
  border: black dashed 1px;
  height: 200px;
  align-items: center;
  justify-content: center;
  display: flex;
  color: #000;
  flex-direction: column;
  border-radius: 10px;
  padding-top: 12px;
}

.icon-trash {
  background-position: right center;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.icon-trash:focus {
  background-color: #fff;
}

div.radio_textbox .custom-control-label::before,
div.radio_textbox .custom-control-label::after {
  top: -8px !important;
}

.disabled-row {
  pointer-events: none;
  opacity: 0.5;
}

.scrollable-modal-body {
  max-height: 40vh;
  overflow-y: auto;
}

@media (max-width: 1199.98px) {
  .modal-tablet {
    max-width: 90%;
  }
}

.icon-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

input[type="radio"] {
  width: 15px;
  height: 15px;
}

.btn_dark_blue {
  background: none;
  border-color: #0747A8;
  color: #0747A8;
  font-weight: bold;
  font-size: 14px;
}

.btn_dark_blue_filled {
  font-size: 14px;
  background-color: #0747A8;
  border-color: #0747A8;
}

.item-card-dialog-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-radio-center {
  display: flex;
  align-items: center;
}

.font-size-12 {
  font-size: 12px;
}

.font-size-16 {
  font-size: 16px;
}

.font-size-14 {
  font-size: 14px;
}

.font-size-20 {
  font-size: 20px;
}

.icon-folder {
  color: #FEBC5A;
}

.grid-folder-background {
  background: white;
  border: 1px solid #93989D;
  height: 179px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative; /* Ensure relative positioning */
  overflow: visible;
}

.grid-favorite-button {
  position: absolute;
  bottom: 5px;
  right: 5px;
  max-width: 100%;
}

.table-truncate-text {
  display: inline-block;
  max-width: calc(100% - 40px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private {
  opacity: 0.5;
}
.course-mark {
  margin-top: 0.1em;
}

.background-loader {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.center-loader {
  width: 150px;
  height: 150px;
  animation: spin 1s linear infinite;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  background-image: url(/images/loader1-74f19e87dbdeb3790b2382e7a0cff13a.png) , url(/images/loader2-a522974314e4c0426019e9296f9e4250.png);
  background-size: contain;
}

@keyframes spin {
  100% {
      transform: rotate(-360deg);
  }
}

.div-center-end {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.sort-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.column-space-between {
  justify-content: space-between;
  align-items: center;
}

.toggle-icon i {
  transition: transform 0.5s;
}

.user-row-title {
  width: 10%;
}

.error-cell {
  height: 20px;
  font-size: 14px;
  color: red;
}

.no-link-style {
  text-decoration: none;
  color: black;
}

/*----------------------------------------------
 * Buttons
 *--------------------------------------------*/
.btn {
  font-weight: bold;
  font-size: 14px;
}

/* Primary (Solid) Button */
.btn-primary,
.btn-primary.disabled, .btn-primary:disabled {
  border-color: var(--primary);
  background-color: var(--primary);
}
.btn-primary:not(:disabled):not(.disabled).active,
.btn-primary:not(:disabled):not(.disabled):active {
  background-color: #0069D9;
  border-color: #0062CC;
  box-shadow: 0 0 0 .2rem rgba(38, 143, 255, .5);
}

/* Secondary Button */
.btn-secondary,
.btn-secondary.disabled, .btn-secondary:disabled {
  border-color: var(--secondary);
  background-color: var(--secondary);
}
.btn-secondary:not(:disabled):not(.disabled).active,
.btn-secondary:not(:disabled):not(.disabled):active {
  background-color: #5A6268;
  border-color: #545B62;
  box-shadow: 0 0 0 .2rem rgba(130, 138, 145, 0.5);
}

/* Outlined Button */
.btn-outline-primary,
.btn-outline-primary.disabled, .btn-outline-primary:disabled {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-primary:not(:disabled):not(.disabled):hover,
.btn-outline-primary:not(:disabled):not(.disabled).active,
.btn-outline-primary:not(:disabled):not(.disabled):active,
.btn-outline-primary:not(:disabled):not(.disabled)[aria-expanded="true"] {
  background-color: var(--primary);
  border-color: #0062CC;
  color: #fff;
  box-shadow: none;
}

.btn-action {
  background: none;
}

.btn-icon {
  background: none;
  border: none;
  border-radius: 50%;
  color: var(--primary);
  cursor: pointer;
  line-height: normal !important;
  padding: 6px;
}

/* Icon Button: Hover */
a:not(:disabled) > .btn-icon:hover,
button:not(:disabled) > .btn-icon:hover,
.btn-icon:not(.disabled):hover {
  text-shadow: 0 0 1px #0747A8
}

a:not(:disabled) > .btn-icon:hover,
button:not(:disabled) > .btn-icon:hover,
.btn-icon:not(.disabled):hover,
/* Icon Button: Focus */
a:not(:disabled) > .btn-icon:focus,
button:not(:disabled) > .btn-icon:focus,
.btn-icon:not(.disabled):focus,
/* Icon Button: Active */
a:not(:disabled) > .btn-icon:active,
button:not(:disabled) > .btn-icon:active,
.btn-icon:not(.disabled):active {
  background-color: rgba(177, 208, 255, 0.48);
}
/* Icon Button: Disabled */
a:disabled > .btn-icon,
button:disabled > .btn-icon,
.btn-icon.disabled {
  opacity: 0.65;
}

/* Special Icon */
.star-icon {
  color: #E9E9E9;
}
.star-icon.checked {
  color: var(--primary);
}
.fa-bookmark.star-icon {
  padding: 6px 9px;
}

.gray-dark {
  color: #93989D;
}

.login-form {
  width: 25%;
}

/* Highlight sortable headers on hover */
th[data-sort-key] {
  cursor: pointer;
  position: relative;
  background-color: transparent;
  transition: background-color 0.2s ease-in-out;
}

/* Arrow indicator styling */
th[data-sort-key] .sort-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #E9E9E9; /* Light gray by default */
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  pointer-events: none;
}

#bookroll-usermanagment .sort,
th[data-sort-key] .sort-arrow .arrow-up,
th[data-sort-key] .sort-arrow .arrow-down {
  opacity: 0.7;
  transition: opacity 0.2s;
}

/* Highlight UP arrow when sorted ascending */
th.sort-asc .arrow-up {
  opacity: 1;
  color: #333;
}

/* Highlight DOWN arrow when sorted descending */
th.sort-desc .arrow-down {
  opacity: 1;
  color: #333;
}

/* Brighten both on hover */
th[data-sort-key]:hover .arrow-up,
th[data-sort-key]:hover .arrow-down {
  opacity: 1;
}

.resizable-table-container {
  overflow-x: auto;
  width: 100%;
}

#resizable-table {
  width: 100%;
}

#resizable-table th,
#resizable-table td:not(.icon-content) {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#resizable-table td.icon-content {
  overflow: unset !important;
}

/* Resizer grip shown only in headers */
.grip {
  width: 2px;
  background-color: rgba(0, 0, 0, 0.1);
  height: 100%;
  position: absolute;
  top: 0;
  right: 0;
  cursor: col-resize;
  z-index: 1;
}

aside.block-region {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#bookroll-navi {
  flex-grow: 1;
  overflow-y: auto;
}

.recycle-bin-fixed {
  padding: 10px;
  border-top: 1px solid #ccc;
  text-align: center;
}

.recycle-bin-fixed a {
  font-weight: 400;
  font-size: 1rem;
}

#bookroll-usermanagment .sort {
  font-size: 14px;
  line-height: 1;
}

.bookmark-grid-info {
  text-align: center;
  margin-top: 10px;
}

.bookmark-grid-pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  max-height: 60px; /* roughly fits 2 lines */
  overflow-y: auto;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #ccc transparent; /* Firefox */
}

/* Chrome / Edge scrollbar */
.bookmark-grid-pages::-webkit-scrollbar {
  width: 6px;
}
.bookmark-grid-pages::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 3px;
}
.bookmark-grid-pages::-webkit-scrollbar-thumb:hover {
  background-color: #aaa;
}

.bookmark-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 2px 4px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.bookmark-icon i {
  color: #007bff;
  font-size: 24px;
}

.bookmark-icon .page-number {
  position: absolute;
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  top: 45%;
  transform: translateY(-50%);
}

.bookmark-icon:hover i {
  color: #0747A8;
  transform: scale(1.1);
}

.bookmark-list-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.scrollable-dropdown {
    max-height: 150px;
    overflow-y: auto;
}

/*----------------------------------------------
 * Timer Settings
 *--------------------------------------------*/
#timerBody {
  overflow: auto;
  height: 500px;
}
#timerBody .row {
  margin: 0px;
}
#timerBody .tooltipclock-inner {
  color: #D1D1D1;
}
#timerBody .table {
  width: max-content;
  max-width: unset;
}
#timerBody .table thead th {
  border: none;
  /* box-shadow: inset 0 -2px 0 #B8B8B8; */
  font-weight: normal;
  padding-top: 0;
  padding-bottom: 1.5rem;
  vertical-align: top;
  position: sticky;
  top: 0;
  background-color: #fff;
  z-index: 10;
}
#timerBody .table thead th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #B8B8B8;
}
#timerBody .table th,
#timerBody .table td {
  white-space: nowrap;
  border-color: #B8B8B8;
}
#timerBody .table td {
  white-space: nowrap;
  padding-top: 1.3rem;
}
#timerBody .form-inline {
  margin-bottom: 4px;
}
#timerBody .table tr:first-child td {
  border: none;
}

/*----------------------------------------------
 * User Management
 *--------------------------------------------*/
#bookroll-usermanagment tr:first-child th {
  border-top: none;
  border-bottom: 0.15rem solid #dee2e6;
}

#bookroll-usermanagment tr:first-child th a:hover {
  text-decoration: none;
}

#bookroll-usermanagment .center-id,
#bookroll-usermanagment .center-name,
#bookroll-usermanagment .center-type,
#bookroll-usermanagment .center-auth {
  font-weight: normal;
}
