/* custom css for progress bar */
.shiny-notification {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  width: 450px !important;
  font-size: 16px;
  z-index: 10000;
}

/* inputs */
.shiny-input-container {
  display: inline-block;
}

.selectize-input {
  height: 100%;
  width: 100%;
}

/* Style adjustments for headings */
h5 {
  margin-bottom: -1.5rem;
}

.fluidRow {
  margin-top: -0.25rem;
}

.shiny-input-container {
  margin-bottom: 0;
}

.nca-numeric-container {
  display: flex;
  align-items: center;
  margin-right: 5px;
}

/* buttons */
.input-group-btn {
  width: auto;
}

.btn-help-icon {
  font-size: 20px;
  /* Increase font size */
  padding: 10px 20px;
  /* Increase padding */
}

/* modals */
.modal-dialog {
  max-width: 800px;
}

.modal-header {
  border-bottom: 1px solid #e5e5e5;
  background-color: #3f8abf;
  /* Blue header background */
  text-align: center;
}

.modal-title {
  font-family: "Arial", sans-serif;
  font-size: 32px;
  /* Larger title font size */
  font-weight: bold;
  color: #ffffff;
  /* White title color */
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  font-family: "Arial", sans-serif;
  font-size: 16px;
  background-color: #f5f5f5;
  /* Light grey body background */
  padding: 20px;
  text-align: center;
}

.modal-intro {
  font-family: "Georgia", serif;
  /* Elegant font type for intro text */
  font-size: 18px;
  margin-bottom: 20px;
  color: #333;
  /* Dark text color */
}

/* modal for handling data duplicates */
.modal-dialog:has(.modal-duplicates) {
  width: 90vw;
  max-width: 95vw;
}

.modal-dialog:has(.modal-duplicates) .modal-body {
  max-height: 90vh;
  overflow: auto;
}

.modal-dialog:has(.modal-duplicates) .modal-body > div {
  overflow-x: auto;
  white-space: nowrap;
  border: 1px solid #ddd;
  padding: 1em;
}

/* custom-modal.css: Make Shiny modalDialog extra large (units table) */
.modal-xl {
  max-width: 65vw !important;
  width: 65vw !important;
}

.modal-xl .modal-body {
  max-height: 75vh;
  overflow-y: auto;
}

/* gifs */
.gif-container {
  text-align: center;
  border-radius: 1em;
  box-shadow: 0 0 1em rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-in-out;
  background-color: #ffffff;
}

.gif-container img {
  width: calc(100% - 2em);
  border: 1px solid #ddd;
  border-radius: 1em;
  margin: 1em;
}

.gif-container h1 {
  margin-bottom: 0px;
  margin-top: 0px;
  font-weight: bold;
  font-size: 24px;
  /* Larger font size for titles */
  color: #0056b3;
  /* More vibrant color */
  text-align: center;
  /* Center the title */
  font-family: "Arial", sans-serif;
  /* Use a more attractive font */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  /* Add a subtle text shadow */
}

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

/* general reactable rules */
.rt-table input {
  width: 100%;
  text-align: center;
}

.rt-table .rt-select-input[type="checkbox"] {
  position: relative;
  top: 3px;
}

/* custom inline selection module */
.inline-select-input > div,
.inline-select-input > div > div {
  width: 5em !important;
  text-align: left !important;
  display: inline-block !important;
}

/* parameter selection gird */
.nca-pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.nca-pill {
  background-color: #e0ecff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.9em;
  text-align: center;
}

.tlg-module {
  margin-top: 1em;
  /* Well containing tabs for each tlg */
  /* tlg tab */
}

.tlg-module div.well {
  height: min-content;
}

.tlg-module .sw-dropdown {
  font-size: 1em;
  display: block;
  position: relative;
  top: -2.5em;
  right: -0.5em;
  margin-bottom: -1.25em;
  height: 2em;
  width: 2em;
  float: right;
}

.tlg-module .sw-dropdown-in {
  width: 200px;
}

.tlg-module .tlg-widgets-container {
  display: flex;
  justify-content: space-around;
  align-items: baseline;
  margin-bottom: 1em;
}

.tlg-module h1.tlg-group-label {
  font-weight: bold;
  font-size: 2rem;
  border-bottom: thin solid #337ab7;
  border-radius: 0 0 0.25em 0;
  margin-top: 0.75em;
}

.tlg-module .tlg-options-container > button {
  width: 90%;
  margin-left: 5%;
  margin-top: 1em;
  padding: 0.75em 0 0.75em 0;
}

.tlg-module .tlg-options-container .form-group.shiny-input-container {
  margin-bottom: 0.5em;
}

.tlg-module .tlg-options-container .form-group.shiny-input-container label {
  margin: 0;
}

.modal-dialog:has(.tlg-option-table) {
  max-width: none;
  margin-left: 1em;
  margin-right: 1em;
}

/* styling for widgets at the top of the Settings page */
div[data-value="Settings"] > div.row {
  margin: 1em;
}

div[data-value="Settings"] > div.row div:has(a) {
  text-align: center;
}

div[data-value="Settings"] > div.row a {
  margin-top: 2em;
}

.content-container {
  height: 100%;
}

.page-container {
  height: 100%;
}

.bslib-sidebar-layout > .main {
  padding: 0;
}

.bslib-sidebar-layout {
  --_sidebar-width: 170px !important;
}

.sidebar .sidebar-content {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.sidebar .sidebar-content .row > :nth-child(2) {
  display: none;
}

.sidebar .sidebar-content .row > :first-child {
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.sidebar .sidebar-content .row > :first-child > ul > li > a {
  padding-left: 30px;
  padding-right: 30px;
  color: #21201f;
}

.sidebar .sidebar-content .row > :first-child > ul > li > a.active {
  background-color: #E7ECFA;
  color: #21201f;
}

.sidebar .sidebar-content .row > :first-child > ul > li > a.disabled {
  color: #c0c0c0;
}

.slope-selector-module {
  padding: 1em;
  height: calc(100vh - 150px);
  max-height: calc(100vh - 150px);
  /* Style each group of widgets */
}

.slope-selector-module .sw-dropdown {
  float: right;
}

.slope-selector-module .sw-dropdown-content {
  width: 50em;
}

.slope-selector-module .sw-dropdown-content h1 {
  text-align: center;
}

.slope-selector-module .sw-dropdown-content p {
  text-align: justify;
}

.slope-selector-module .sw-dropdown-content .gif-grid {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 2em;
  row-gap: 2em;
}

.slope-selector-module .reactable {
  padding: 1em;
  margin-bottom: 2em;
}

.slope-selector-module .slope-widgets-container {
  display: flex;
  align-items: left;
  justify-content: space-around;
  gap: 1rem;
  width: 100%;
  max-width: 100vw;
}

.slope-selector-module .plot-widgets-container {
  display: flex;
  align-items: baseline;
  justify-content: space-around;
  wrap: nowrap;
  gap: 1rem;
  width: 100%;
  max-width: 100vw;
}

.slope-selector-module .plot-widgets-container-2 {
  position: fixed;
  bottom: 0;
  width: 75%;
  background: #ffffff;
  padding: 10px;
  z-index: 1000;
  border-top: 1px solid #dadada;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.slope-selector-module .plot-widget-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 12rem;
}

.slope-selector-module .inline-select-input > div {
  width: 5em !important;
  text-align: left !important;
}

.slope-selector-module .slope-plots-container {
  margin-top: 2em;
  height: calc(100vh - 220px);
  margin-bottom: 2em;
}

.slope-selector-module .slope-plots-container.multiple {
  margin-top: 2em;
  margin-bottom: 2em;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(33em, 1fr));
  height: calc(100vh - 220px);
  gap: 1rem;
}

.data-tab-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.data-tab-content-container {
  flex: 1;
  overflow-y: auto;
  margin-top: 10px;
  margin-bottom: 0px;
  padding: 20px;
}

/* data tab styling */
.data-tab-content {
  /* filters on data page */
  /* column mapping UI */
}

.data-tab-content > .tabbable > ul {
  display: none !important;
}

.data-tab-content .card {
  margin-top: 1em;
  margin-bottom: 0em;
}

.data-tab-content .card .card-body > div {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.data-tab-content .error-string {
  color: var(--bs-danger);
  font-weight: bold;
}

.data-tab-content .filters-buttons-container {
  display: grid;
  grid-template-columns: 49% 49%;
  gap: 2%;
}

.data-tab-content .filter-widget-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 10px;
  background-color: var(--bs-gray-200);
  border: 1px solid #c3c3c3;
  border-radius: 4px;
}

.data-tab-content .filter-widget-container .btn-danger {
  align-self: flex-end;
  width: 100%;
  height: 2.5em;
  padding: 0;
  margin-top: 1.5em;
}

.data-tab-content .reactable {
  margin-top: 1em;
}

.data-tab-content .data-mapping-container .column-mapping-row {
  display: flex;
  align-items: center;
  margin: -0.75rem 0 0.25em 1em;
}

.data-tab-content .data-mapping-container .column-mapping-output {
  margin: 1.25rem 0 0 0.625rem;
  color: #000000;
}

.data-tab-content .data-mapping-container .column-mapping-label {
  margin: 1.25rem 0 0 0.625rem;
  color: #a7a7a7;
}

.data-tab-content .data-mapping-container h5 {
  font-weight: bold;
  margin-top: 0.75em;
  margin-bottom: 0;
}

.data-tab-content .data-mapping-container button {
  margin-top: 1em;
}

.data-tab-btns-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid #dadada;
}

.data-tab-btns-container .nav-btns {
  display: flex;
  gap: 16px;
}

.upload-container {
  padding: 0px 4px !important;
  margin: 0 !important;
  border: none !important;
  margin-bottom: 0em !important;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.upload-container.dragover {
  background-color: rgba(0, 123, 194, 0.05);
  border-color: #005b8f;
}

.upload-container .shiny-input-container .input-group .input-group-btn .btn,
.upload-container .shiny-input-container .input-group .form-control {
  border: 1px solid #007bc2;
  color: #007bc2;
}

.upload-container .shiny-input-container .input-group .input-group-btn .btn:hover {
  background-color: #007bc2;
  color: #ffffff;
}

.data-filtering-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
  max-width: 100%;
}

.filtered-table-container {
  flex: 1 1 0;
  min-width: 300px;
  overflow-x: auto;
}

.filters-container {
  width: 300px;
  background-color: white;
  flex-shrink: 0;
  padding: 20px;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  height: 70vh;
  overflow-y: auto;
}

.filters-container .accordion-header > button {
  padding: 0.75em 1.25em;
}

.filters-inputs {
  display: flex;
  flex-direction: column;
  margin-top: 15px;
}

.reactable-table .rt-search {
  width: 100%;
}

.reactable-table .rt-table .rt-thead .rt-tr .rt-th {
  border-bottom: 2px solid #007bc2;
}

.reactable-table .rt-table .rt-tbody .rt-tr-group .rt-tr-highlight:hover {
  background-color: #E7ECFA;
}

.bslib-sidebar-layout {
  --_sidebar-width: 170px !important;
}

.sidebar .sidebar-content {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.sidebar .sidebar-content .row > :nth-child(2) {
  display: none;
}

.sidebar .sidebar-content .row > :first-child {
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.sidebar .sidebar-content .row > :first-child > ul > li > a {
  padding-left: 30px;
  padding-right: 30px;
  color: #21201f;
}

.sidebar .sidebar-content .row > :first-child > ul > li > a.active {
  background-color: #E7ECFA;
  color: #21201f;
}

.sidebar .sidebar-content .row > :first-child > ul > li > a.disabled {
  color: #c0c0c0;
}

.stepper-wrapper {
  max-width: 100%;
  margin-bottom: 40px;
  --circle-size: 24px;
  --spacing: 8px;
}

.stepper-wrapper > ol {
  padding-left: 0px;
  padding-right: 2rem;
}

.c-stepper {
  display: flex;
  counter-reset: step;
}

.c-stepper__item {
  display: flex;
  gap: var(--spacing);
  align-items: center;
}

.c-stepper__item:before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  justify-content: center;
  align-items: center;
  width: var(--circle-size);
  height: var(--circle-size);
  border-radius: 50%;
  font-size: 12px;
  background-color: #dadada;
  color: #ffffff;
}

.c-stepper__item.active:before {
  background-color: #007bc2;
  color: #ffffff;
}

.c-stepper__item:not(:last-child) {
  flex: 1;
}

.c-stepper__item:not(:last-child):after {
  content: "";
  position: relative;
  z-index: -1;
  height: 2px;
  background-color: #dadada;
  flex: 1;
  margin-right: 0.5rem;
}

.c-stepper__title {
  font-size: 16px;
  margin: 0px;
}

*,
*:before,
*:after {
  box-sizing: border-box;
}

.excretion-section-container {
  position: relative;
}

.excretion-section-container .excretion-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.9);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  color: #5b5b5b;
  border: 2px solid #cfe2f3;
  padding: 20px;
  border-radius: 8px;
}

.loading-spinner-container {
  height: 4em;
}

#loading-spinner {
  color: #007bc2;
  position: relative;
  font-size: 0.5em;
  background: #007bc2;
  animation: escaleY 1s infinite ease-in-out;
  width: 1em;
  height: 1em;
  animation-delay: -0.16s;
  top: 2em;
}

#loading-spinner:before,
#loading-spinner:after {
  content: '';
  position: absolute;
  top: 0;
  left: 2em;
  background: #3f8abf;
  width: 1em;
  height: 1em;
  animation: escaleY 1s infinite ease-in-out;
}

#loading-spinner:before {
  left: -2em;
  animation-delay: -0.32s;
}

@keyframes escaleY {
  0%, 80%, 100% {
    box-shadow: 0 0;
    height: 4em;
  }
  40% {
    box-shadow: 0 -2em;
    height: 5em;
  }
}

h4.modal-title:has(#loading-title) {
  width: 100%;
}

.add-pair-btn {
  background-color: #007bc2;
  border-color: #007bc2;
  color: #ffffff;
}

.add-pair-btn:hover {
  background-color: #005b8f;
  border-color: #005b8f;
}

.ratio-pair-row {
  background-color: #E7ECFA;
  border: 1px solid #cdcdcd;
  border-radius: 5px;
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
}

.ratio-pair-row .form-group.shiny-input-container {
  flex: 1 1 250px;
  margin-bottom: 0;
}

.ratio-pair-row .ratio-remove-btn-wrapper {
  margin-bottom: 0;
}

.ratio-pair-row .ratio-remove-btn-wrapper .btn {
  background-color: #b4b4b4;
  border-color: #b4b4b4;
  color: #21201f;
}

.ratio-pair-row .ratio-remove-btn-wrapper .btn:hover {
  background-color: #9b9b9b;
  border-color: #9b9b9b;
}
