/*************************************
noUiSliderInput FORMATTING & STYLING
**************************************/

/* not entirely sure what this does, but if removed (or moved after other slider code) the sliders will not be blue */
.pagination > .active > span:focus {
  z-index: 3;
  color: #ffffff;
  background-color: #2a537f;
  border-color: #2a537f;
  cursor: default;
}

/* height of base bar below main slider */
.noUi-base {
  height: 9px !important;
}

/* main slider bar */
.noUi-connect {
  background: #013857 !important;
}

.noUi-target {
  margin-top: 30px !important; /* increase top margin */
  height: auto !important;
  width: 96% !important; /* aligns slider margins with other UI elements in sidebar */
  margin-left: 10px; /* aligns slider margins with other UI elements in sidebar */
}

/* tooltips */
.noUi-tooltip {
  font-size: 12px; /* Smaller font size */
  font-weight: bold;
  padding: 4px !important; /* Compact padding */
  line-height: 0.8; /* Adjust line spacing */
  background: #013857 !important;
  color: white !important;
  border-radius: 4px !important; /* Rounded corners */
}

/* pips (ticks and labels below slider) */
.noUi-pips {
  color: black !important;
  font-size: 12px !important;
}

.noUi-pips-horizontal {
  padding: 2px !important;
}

/* ticks */
.noUi-marker-horizontal.noUi-marker {
  width: 1px !important;
  height: 7px !important;
}

/* rounded handles */
.noUi-horizontal .noUi-handle { /* use: .class-name .noUi-horizontal .noUi-handle {} if applying to a style class */
  width: 24px !important;
  height: 24px !important;
  right: -12px !important;
  top: -8px !important;
  border-radius: 11px;
  border-color: #cdcdcd;
  background: #FFF;
  /* box-shadow: none; */
}

/* increase to make rounded/smaller handles easier to click */
.noUi-touch-area { /* use: .class-name .noUi-touch-area {} if applying to a style class */
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  width: auto;
  height: auto;
}

/* center 2 vertical lines insisde rouded handles */
.noUi-handle:before, .noUi-handle:after {
  margin-left: -5px;
  margin-top: -2px;
}

/*************************************
TABLE FORMATTING & STYLING
**************************************/

.table-title {
  text-align: center;
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 8px;
}

.table-export-button {
  text-align: right;
  margin-right: 20px;
  margin-top: 10px;
}

/*************************************
SELECT/SELECTIZE FORMATTING & STYLING
**************************************/

/* Style standard select to look more like selectize */
/* select.form-select:not([multiple]) {
  background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"%3E%3Cpath fill="none" stroke="%23343a40" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2 5l6 6 6-6"/%3E%3C/svg%3E');
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  padding-right: 2.25rem;
  padding-left: 1rem;  /* Add left padding to the select box itself */
  /* border: 1px solid #ced4da;
  border-radius: 0.375rem;
  font-size: 1.3rem !important;
  line-height: 1.5;
  color: #495057;
  background-color: #ffffff !important;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
} */

/* select.form-control:not([multiple]) {
  background-color: #ffffff !important;
  background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"%3E%3Cpath fill="none" stroke="%23343a40" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2 5l6 6 6-6"/%3E%3C/svg%3E');
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  padding-right: 2.25rem;
  padding-left: 1rem;  /* Add left padding to the select box itself */
  /* border: 1px solid #ced4da;
  border-radius: 0.375rem;
  font-size: 1.3rem !important;
  line-height: 1.5;
  color: #495057;
} */

/* Style the dropdown options with increased left padding */
/* select.form-select:not([multiple]) option,
select.form-control:not([multiple]) option {
  font-size: 1.3rem !important;
  padding: 0.5rem;
  padding-left: 1.5rem !important;  /* Increase left padding for options */
/* } */

/* select.form-select:focus,
select.form-control:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  background-color: #ffffff !important;
}

select.form-select:hover,
select.form-control:hover {
  border-color: #adb5bd;
  background-color: #ffffff !important;
}

select.form-select:disabled,
select.form-control:disabled {
  background-color: #e9ecef !important;
  opacity: 1;
} */

/*************************************
ACCESSIBILITY FORMATTING & STYLING
**************************************/

.shiny-output-error-validation {
  text-align: center;
  font-size: 25px;
  position: relative;
  width: 100%;
  top: 15px;
}
/* suppresses horizontal scrollbar */
html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

.row {
  margin-left: 0;
  margin-right: 0;
}

/* Force consistent popover positioning */
[data-bs-toggle='popover'] {
  display: inline-block !important;
  position: relative !important;
  z-index: 1000 !important;
}

/* Ensure popover triggers have proper spacing */
.popover-trigger {
  white-space: nowrap;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}

/* Fix for Bootstrap popovers in flexbox containers */
.popover {
  z-index: 1060 !important;
}

/* Adds focus indicator box for radio buttons */
input[type='radio']:focus {
  outline: 3px solid #000000 !important;
  outline-offset: 2px;
}

/* changes color/darkens navbar focus indicator box around tabs when using keyboard */
/* TODO: add to brand.yml? */
.nav-link:focus-visible {
  outline: 3px solid #17274F;
  outline-offset: 2px;
  box-shadow: none;
}

/* Button focus indicator */
.btn:focus,
.btn:focus-visible {
  outline: 3px solid #000000 !important;
  outline-offset: 2px;
  box-shadow: none !important;
  border-color: inherit !important;
}

/* SelectInput focus indicator */
select:focus {
  outline: 3px solid #000000 !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
  border-color: inherit !important;
}

/* Make the colored tab bar extend all the way to the edge of the page */
/* header .navbar {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
} */

/* Making the points/labels along noUiSliderInput() black for WCAG contrast */
.noUi-marker {
  background: #000000;
  opacity: 0.7;
}

.noUi-value {
  color: #000000;
}

/* Making the noUiSliderInput() slider (toggles) black for WCAG contrast */
.noUi-handle {
  border: 2px solid #000000 !important;
  box-shadow: none !important;
}

/* Making the noUiSliderInput() slider (toggles) black for WCAG contrast when handle is focused/active */
.noUi-handle:focus {
  border-color: #000000 !important;
  outline: 2px solid #000000 !important;
}

/* Making the noUiSliderInput() slider (toggles) black for WCAG contrast when being dragged */
.noUi-active {
  border-color: #000000 !important;
}

/* Making the noUiSliderInput() pip tick lines black */
.noUi-marker {
  background: #000000 !important;
  height: 10px !important;
  width: 2px !important;
}

/* WCAG-compliant focus indicator for download buttons */
.download-btn:focus {
  outline: 3px solid #000000;
  outline-offset: 2px;
}

/* Also make download button right aligned */
.download-btn {
  text-align: right;
}

/* Add focus indicator to Reactable column headers */
.reactable .rt-th:focus-within {
  outline: 3px solid #000000 !important;
  outline-offset: -3px !important;
}

/* Rotate the pip value labels for noUiSliderInput() */
/* .noUi-value-horizontal {
  -webkit-transform: translate(-50%, 25px);
  transform: translate(-50%, 25px);
  writing-mode: vertical-lr;
} */

/* Adding more space below the slider for vertical labels for noUiSliderInput() */
/* .noUi-target.noUi-horizontal {
  margin-bottom: 20px;
} */

/* Modal suppression warning styling */
.modal-title {
  color: #000000 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 10px;
}

.modal-body {
  color: #000000 !important;
  text-align: center;
}

.modal-footer {
  justify-content: center;
}

/* Modal suppression warning button styling */
.modal-footer .btn-default {
  background-color: #0e3f75;
  border-color: #0e3f75;
  color: #ffffff;
}

/* Fix leaflet NA placement in legend */
div.info.legend.leaflet-control br {
  clear: both;
}