/* ------------------------------------------------------------------------ */
/*                                                     Bootstrap components */
/* ------------------------------------------------------------------------ */

/* Dropdown */
.dropdown-menu {
  z-index: 40;
}

.dropdown-item {
  cursor: default;
}

.dropdown-menu-dark .dropdown-item.active,
.dropdown-menu-dark .dropdown-item:active {
  color: #fff;
  background-color: rgb(33, 37, 41);
}

.dropdown-menu-dark .dropdown-item:hover,
.dropdown-menu-dark .dropdown-item:focus {
  color: rgba(255, 255, 255, 0.75);
  background-color: rgb(33, 37, 41);
}

.dropdown-menu-dark .dropdown-item {
  color: rgba(255, 255, 255, 0.55);
}

/* ------------------------------------------------------------------------ */
/*                                                        Custom components */
/* ------------------------------------------------------------------------ */

/* For the accordion on the Taxa Bone counts table in sites detail page */

#fine-taxa-tables {
  margin-bottom: 30px;
}

/* Custom background and border for dropdown button Add New Level modal in sites detail page */
.btn-custom {
  background-color: transparent;
  color: black;
  border: 1px solid #adb5bd;
}

.add-level-modal {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
}

.dropdown-scroll {
  /* Adjust the maximum height as needed */
  max-height: 200px; 
  overflow-y: scroll;
}

/* Display table header appropriately if table extends over multiple pages */
@media print {
  .no-break {
    break-inside: avoid;
  }

  .sticky {
    break-after: avoid;
    break-inside: avoid;
  }
}

/* datatable border */
#table-container .border-collapse {
  border-collapse: collapse;
}

/* For the spinning wheel when ingestion is going on */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  display: block;
}

.spinner-container-ingest {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px;
  border-radius: 10px;
}

.spinner-container-ingest .spinner-border {
  color: white;
}

/* For the spinning wheel when database download is going on */
.spinner-container-downloads {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px;
  border-radius: 10px;
}

.spinner-container-downloads .spinner-border {
  color: white;
}


/* Height Adjustment for Map to not Excavtions Table
 * on Sites Detail as well as layout
 */
@media (min-width: 200px) {
  .map-container {
    height: 475px;
  }
}

@media (min-width: 576px) {
  .map-container {
    height: 475px;
  }
}

@media (min-width: 992px) {
  .map-container {
    height: 530px;
  }
}

/* indicating the collection we're about to add to */
.collection-target {
  color: rgb(194,10,10);
}

/* Pseudo-class to show warning or important text */
.warn-imp-bold::before {
  font-weight: bold;
  color: rgb(194, 10, 10);
  content: attr(data-warn-imp-content);
}

.warn-imp-italic::before {
  font-style: italic;
  color: rgb(194, 10, 10);
  content: attr(data-warn-imp-content);
}

/* For the database download loading */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Semi-transparent black background */
  background: rgba(0, 0, 0, 0.5); 
  display: none;
  justify-content: center;
  align-items: center;
  /* Ensure it's on top of everything */
  z-index: 9999; 
}

.spinner-container {
  text-align: center;
}

/* Style for the filters common for Sites Meta Data,
 * Sites Bone Data and Home page
 */
.clear-apply-filter-buttons {
  display: flex;
  justify-content: flex-end;
}

.bonecount-range {
  margin-bottom: 20px;
}

#filter-sort-def-alph-tot {
  display: inline-flex;
  align-items: center;
  margin-bottom: 15px;
  margin-top: 10px;
}

.fa-solid.fa-filter {
  color: #f7f9fd;
}

.fa-solid.fa-filter-circle-xmark {
  color: #ffffff;
  margin-left: 5px;
}

/* Style for the button to open filter panel */

.filter-button-panel {
  color: #FFFFFF;
  background-color: #2176ab;
}

.filter-button-panel.btn-primary:hover,
.filter-button-panel.btn-primary:focus {
  /* Slightly darker color on hover */
  background-color: #0056b3; 
}

.toggled-filter-advanced-off:checked,
.toggled-selected-class-off:checked,
.toggled-update-off:checked {
  background-color: white;
}

.toggled-filter-advanced-on:checked,
.toggled-selected-class-on:checked,
.toggled-update-on:checked {
  background-color: #2176ab;
}

/* Style for Advanced Filter panel */

.advanced-filter-form-elements {
  padding-right: 1em;
  margin-bottom: 10px;
}

#information-filter-link {
  color: black;
}

#information-filter-link:hover {
  color: #ca0606;
}

#information-modal-advanced-filters-body {
  max-height: 400px;
  overflow-y: auto;
}

/* Margin for the level modals */

.level-margin-right {
  margin-right: auto;
}

/* Style for the users group listing modal */
#list-users-groups .modal-body {
  max-height: 400px;
  overflow-y: auto;
}

/* Style for the text with icon on the left */
.icon-text-margin {
  margin-right: 10px;
}

/* Style for the permission drag and drop */

.box-container {
  display: flex;
}

.box {
  border: 1px solid #ccc;
  height: 250px;
  padding: 10px;
}

@media screen and (max-width: 1024px) {
  #box5 {
    margin-top: 20px;
  }
}

@media screen and (min-width: 1024px) {
  #box6 {
    width: 50%;
    max-width: unset;
  }
}

.item-perm {
  padding: 5px;
  margin: 5px 0;
  cursor: move;
  /* Allow the text to wrap */
  word-wrap: break-word;
}

/* Style for the permission delete drag and drop */

.box-container-delete {
  display: flex;
}

.box-deleting {
  width: 50%;
  border: 1px solid #ccc;
  margin: 10px;
  padding: 10px;
}

.item-delete {
  padding: 5px;
  margin: 5px 0;
  cursor: move;
  word-wrap: break-word;
}

/* Styling for Manage Permission Modal Scrollbar */
.box {
  position: relative;
  overflow: hidden;
}

.box::-webkit-scrollbar {
  width: 12px;
}

.box::-webkit-scrollbar-thumb {
  background-color: #9e9e9e;
  border-radius: 10px;
}

.box::-webkit-scrollbar-track:hover {
  background-color: #f1f1f1;
}

.box::-webkit-scrollbar-thumb:hover {
  background-color: #202020;
}

.home-content-container-no-map {
  padding-top:50px;
  padding-bottom: 30px;
  background: #e9ecef;
}

/* Custom rounded corners for the maps and containers */
.custom-rounded {
  border-radius: 15px;
}

.custom-rounded-left {
  border-radius: 15px 0px 0px 15px;
}

.custom-rounded-right {
  border-radius: 0px 15px 15px 0px;
}

.btn-hover-scale {
  transition: transform 0.2s ease-in-out;
}

.btn-hover-scale:hover {
  transform: scale(1.05);
}

#level-summary-container {
  width: 94%;
  float: left; 
  margin-bottom: 20px; 
  padding-left: 20px; 
  padding-top: 15px; 
  margin-right: 50px; 
  background: #e9ecef;
}

#site-details-container {
  width: 94%; 
  float: left; 
  margin-bottom: 50px; 
  padding-left: 20px; 
  padding-top: 15px; 
  margin-right: 50px; 
  background: #e9ecef;
}

#sampling-details {
  float: left; 
  margin-bottom: 20px; 
  padding-left: 20px; 
  padding-top: 15px; 
  margin-right: 50px; 
  background: #e9ecef;
}

.dataTables_wrapper .dataTables_filter {
  float: right;
}

/* Loader for page loading */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.1); 
  transition: opacity 0.75s, visibility 0.75s;
  z-index: 9999;
}

.loader-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader::after {
  content: "";
  width: 75px;
  height: 75px;
  border: 15px solid #dddddd;
  border-top-color: #19191a;
  border-radius: 50%;
  animation: loading 0.75s ease infinite;
}

@keyframes loading {
  from {
    transform: rotate(0turn);
  }
  to {
    transform: rotate(1turn);
  }
}

/* Custom style for the links */
a {
  color: #648fcd;
  text-decoration: underline;
  font-weight: 500;
}

/* Styling for Datatables buttons and Input */
button.dt-button.buttons-copy.buttons-html5,
button.dt-button.buttons-excel.buttons-html5,
button.dt-button.buttons-csv.buttons-html5,
button.dt-button.buttons-collection.buttons-colvis,
button.dt-button.buttons-copy.buttons-html5:active:not(.disabled),
button.dt-button.buttons-excel.buttons-html5:active:not(.disabled),
button.dt-button.buttons-csv.buttons-html5:active:not(.disabled),
button.dt-button.buttons-collection.buttons-colvis:active:not(.disabled),
button.dt-button.buttons-copy.buttons-html5:focus:not(.disabled),
button.dt-button.buttons-excel.buttons-html5:focus:not(.disabled),
button.dt-button.buttons-csv.buttons-html5:focus:not(.disabled),
button.dt-button.buttons-collection.buttons-colvis:focus:not(.disabled) {
  background-color: #2176ab;
  color: #FFFFFF;
  border-color: #2176ab;
  border-radius: 3px;
}

button.dt-button.buttons-copy.buttons-html5:hover,
button.dt-button.buttons-excel.buttons-html5:hover,
button.dt-button.buttons-csv.buttons-html5:hover,
button.dt-button.buttons-collection.buttons-colvis:hover,
button.dt-button.buttons-copy.buttons-html5:focus,
button.dt-button.buttons-excel.buttons-html5:focus,
button.dt-button.buttons-csv.buttons-html5:focus,
button.dt-button.buttons-collection.buttons-colvis:focus {
  background-color: #0056b3; 
}

button.dt-button:focus:not(.disabled),
div.dt-button:focus:not(.disabled),
a.dt-button:focus:not(.disabled),
input.dt-button:focus:not(.disabled) {
  border:1px solid #2176ab;
  text-shadow:0 1px 0 #2176ab;
  outline:none;
  background-color:#2176ab;
  background:#2176ab;
}

span.dt-button-spacer.bar, .dataTables_filter label, .dataTables_length label {
  font-weight: 700;
}

button.dt-button.buttons-columnVisibility:active {
  background-color: #2176ab;
  color: #FFFFFF;
  border-color: #2176ab;
  border-radius: 3px;
}

.dt-button-collection.columns {
  padding: 15px;
}

div.dt-button-collection.columns div.dt-button-collection-title {
  font-weight: 700;
}

.dt-button-collection.columns .dt-button.buttons-columnVisibility {
  background-color: #0056b3;
  color: #FFFFFF;
}

.dt-button-collection.columns .dt-button.buttons-columnVisibility.active,
.dt-button-collection.columns .dt-button.buttons-columnVisibility:focus,
.dt-button-collection.columns .dt-button.buttons-columnVisibility.active:focus,
.dt-button-collection.columns .dt-button.buttons-columnVisibility:active:not(.disabled) {
  background-color: #2176ab;
  color: #FFFFFF;
  background: #2176ab;
  border-color: #2176ab;
  border-radius: 3px;
}

button.dt-button.buttons-copy.buttons-html5,
button.dt-button.buttons-excel.buttons-html5,
button.dt-button.buttons-csv.buttons-html5,
button.dt-button.buttons-collection.buttons-colvis,
button.dt-button.buttons-copy.buttons-html5:active:not(.disabled),
button.dt-button.buttons-excel.buttons-html5:active:not(.disabled),
button.dt-button.buttons-csv.buttons-html5:active:not(.disabled),
button.dt-button.buttons-collection.buttons-colvis:active:not(.disabled),
button.dt-button.buttons-copy.buttons-html5:focus:not(.disabled),
button.dt-button.buttons-excel.buttons-html5:focus:not(.disabled),
button.dt-button.buttons-csv.buttons-html5:focus:not(.disabled),
button.dt-button.buttons-collection.buttons-colvis:focus:not(.disabled) {
  background-color: #2176ab;
  color: #FFFFFF;
  background: #2176ab;
  border-radius: 3px;
  /* Apply Bootstrap themeing */
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border: none;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  border: 1px solid transparent;
  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;
}

button.dt-button.buttons-copy.buttons-html5:hover,
button.dt-button.buttons-excel.buttons-html5:hover,
button.dt-button.buttons-csv.buttons-html5:hover,
button.dt-button.buttons-collection.buttons-colvis:hover,
button.dt-button.buttons-copy.buttons-html5:focus,
button.dt-button.buttons-excel.buttons-html5:focus,
button.dt-button.buttons-csv.buttons-html5:focus,
button.dt-button.buttons-collection.buttons-colvis:focus {
  background-color: #0056b3;
}

.dt-button-collection.columns .dt-button.buttons-colvisRestore {
  background: #0056b3;
  color: #FFFFFF;
  border-radius: 3px;
}

.dt-button-collection.columns .dt-button.buttons-colvisRestore:active:not(.disabled) {
  background-color: #2176ab;
  color: #FFFFFF;
  border-radius: 3px;
}

.dt-button-collection.columns .dt-button.buttons-columnVisibility {
  background: #0056b3;
  color: #FFFFFF;
  border-radius: 3px;
}

.dt-button-collection.columns:active .dt-button.buttons-colvisRestore:active {
  background-color: #0056b3;
  color: #FFFFFF;
  border-radius: 3px;
}

div.dt-button-collection button.dt-button:active:not(.disabled),
div.dt-button-collection button.dt-button.active:not(.disabled),
div.dt-button-collection div.dt-button:active:not(.disabled),
div.dt-button-collection div.dt-button.active:not(.disabled),
div.dt-button-collection a.dt-button:active:not(.disabled),
div.dt-button-collection a.dt-button.active:not(.disabled) {
  box-shadow: none;
}

div.dt-buttons {
  float: left;
}

.dt-button-collection.columns {
  height: 300px;
  overflow-y: auto !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: #2176ab;
  background-color: #2176ab;
  color: #FFFFFF !important;
  border-radius: 3px;
  border-color: #2176ab;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #0056b3;
  background-color: #0056b3;
  color: #FFFFFF !important;
  border-radius: 3px;
  border-color: #0056b3;
}

.color-transparent {
  color: transparent;
}

/* ------------------------------------------------------------------------ */
/*                                                           Custom layouts */
/* ------------------------------------------------------------------------ */

/* A line of things distributed uniformly */
.distributed {
  display: flex;
  justify-content: space-between;
}

/* A line of controls aligned horizontally */
.control-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ------------------------------------------------------------------------ */
/*                                                              Positioning */
/* ------------------------------------------------------------------------ */

.w-18rem {
  width: 18rem;
}

.px-15pct {
  padding-left: 15%;
  padding-right: 15%;
}

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