/* BOOTSTRAP FIXES AND OVERRIDES */

/* Recolor checkboxes/switches from Bootstrap's blue primary to the app's
   selected-state chrome (matches the active nav pill). */
.form-check-input:checked {
  background-color: var(--app-chrome);
  border-color: var(--app-chrome);
}

.form-check-input:focus {
  border-color: var(--app-chrome);
  box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--app-chrome) 25%, transparent);
}

/* Bootstrap swaps the switch knob to light blue while focused-but-unchecked;
   keep the default gray knob so focusing only changes the (chrome) ring. */
.form-switch .form-check-input:focus:not(:checked) {
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");
}

.text-small {
  font-size: 0.7rem;
}

/* Bootstrap's .text-right class doesn't work in tables */
table .text-right {
  text-align: right;
}

/* Custom sidebar toggle button styling */
.header .sidebar-toggle-btn {
  font-size: 32px;
  padding-left: 10px;
  cursor: pointer;
  color: #012970;
}

/* CSS-only tooltips */
.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.tooltip-wrapper:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 5px;
}

.tooltip-wrapper:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.8);
  margin-bottom: -5px;
}

/* Prevent link underline on button-styled links (overrides generic a:hover) */
a.btn:hover,
a.btn:focus,
a.btn:active {
  text-decoration: none;
}

/* Slightly reduce default button size app-wide */
.btn:not(.btn-sm):not(.btn-lg) {
  --bs-btn-padding-x: 0.6rem;
  --bs-btn-padding-y: 0.3rem;
  --bs-btn-font-size: 0.9375rem;
}