.no-ride {
  background-color: #fff;
  color: #000;
}

.main {
  background-color: #3b7a57;
  color: #fff;
}

.challenge {
  background-color: #26428b;
  color: #fff;
}

.challenge-crew {
  background-color: #987456;
  color: #fff;
}

.main-crew {
  background-color: #cfb53b;
  color: #fff;
}

.refund-defer {
  background-color: #fff;
  color: #cfb53b;
}

.refund-donate {
  background-color: #fff;
  color: #3b7a57;
}

.refund-refund {
  background-color: #fff;
  color: #c41e3a;
}

.withdrew {
  background-color: #000;
  color: #fff;
}

.unknown {
  background-color: #fff;
  color: #acacac;
}

.new-rider {
  background-color: #ab274f;
  color: #fff;
}

.rider {
  background-color: #914e75;
  color: #fff;
}

.banned {
  background-color: #c41e3a;
  color: #fff;
}

.wrapper {
  width: 70%;
}

.panel-heading {
  border-width: 0;
  padding: 0;
}

.panel-title > a {
  color: #555;
  display: block;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 15px;
  text-decoration: none;
  text-transform: uppercase;
  word-spacing: 3px;
}

.panel-title > a:active {
  color: #555;
  display: block;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 15px;
  text-decoration: none;
  text-transform: uppercase;
  word-spacing: 3px;
}

.panel-heading a::before {
  content: "\e114";
  float: right;
  font-family: "Glyphicons Halflings", serif;
  transition: all 0.5s;
}

.panel-heading.active a::before {
  transform: rotate(180deg);
  transform: rotate(180deg);
  transform: rotate(180deg);
}

.select2-container {
  display: none;
}

#rideList {
  display: block;
}

/* Accessibility: Improved contrast for muted text */
.text-muted {
  color: #6c757d !important; /* Darker than default Bootstrap for better contrast */
}

.text-secondary {
  color: #6c757d !important;
}

/* Ensure small text has better contrast */
small.text-muted {
  color: #495057 !important; /* Even darker for smaller text */
}

/* Fix form labels contrast */
.form-label,
label {
  color: #212529 !important;
  font-weight: 500;
}

.form-hint,
.form-text {
  color: #6c757d !important;
}

/* Improve placeholder text contrast */
::placeholder {
  color: #6c757d !important;
  opacity: 1;
}

/* Fix disabled input contrast */
.form-control:disabled,
.form-select:disabled {
  background-color: #e9ecef !important;
  color: #495057 !important;
}

/* Improve link contrast */
a.text-muted:hover,
a.text-muted:focus {
  color: #495057 !important;
}

/* Better contrast for secondary badges */
.badge.bg-secondary {
  background-color: #6c757d !important;
  color: #fff !important;
}

/* Ensure table text has good contrast */
.table .text-muted {
  color: #6c757d !important;
}

/* Fix breadcrumb and navbar muted text */
.breadcrumb .text-muted,
.navbar .text-muted {
  color: #6c757d !important;
}

/* Improve subheader contrast */
.subheader {
  color: #495057 !important;
  font-weight: 500;
}

/* ===== BADGE CONTRAST FIXES ===== */
/* Ensure all badges have proper WCAG AA contrast (4.5:1 minimum) */

/* Primary badge - Blue background with white text */
.badge.bg-primary {
  background-color: #206bc4 !important; /* Tabler blue */
  color: #fff !important;
}

/* Secondary badge - Gray background with white text */
.badge.bg-secondary {
  background-color: #6c757d !important; /* Darker gray */
  color: #fff !important;
}

/* Success badge - Green background with white text */
.badge.bg-success {
  background-color: #2fb344 !important; /* Tabler green */
  color: #fff !important;
}

/* Danger badge - Red background with white text */
.badge.bg-danger {
  background-color: #d63939 !important; /* Tabler red */
  color: #fff !important;
}

/* Warning badge - Orange background with white text (NOT yellow) */
.badge.bg-warning {
  background-color: #f59f00 !important; /* Darker orange/amber for better contrast */
  color: #fff !important;
}

/* Override any text-dark on warning badges */
.badge.bg-warning.text-dark {
  color: #fff !important;
}

/* Info badge - Cyan/Blue background with white text */
.badge.bg-info {
  background-color: #4299e1 !important; /* Bright blue */
  color: #fff !important;
}

/* Dark badge - Dark background with white text */
.badge.bg-dark {
  background-color: #1e293b !important;
  color: #fff !important;
}

/* Light badge - Light background with dark text */
.badge.bg-light {
  background-color: #f8f9fa !important;
  color: #1e293b !important;
}

/* Custom color badges */
.badge.bg-blue {
  background-color: #206bc4 !important;
  color: #fff !important;
}

.badge.bg-red {
  background-color: #d63939 !important;
  color: #fff !important;
}

.badge.bg-green {
  background-color: #2fb344 !important;
  color: #fff !important;
}

.badge.bg-yellow {
  background-color: #f59f00 !important; /* Use orange instead of yellow */
  color: #fff !important;
}

/* Override text-dark on yellow badges */
.badge.bg-yellow.text-dark {
  color: #fff !important;
}

.badge.bg-purple {
  background-color: #ae3ec9 !important;
  color: #fff !important;
}

/* Ensure all badges with explicit text-white stay white */
.badge.text-white {
  color: #fff !important;
}

/* Force white text on all colored backgrounds for consistency */
.badge.bg-primary,
.badge.bg-secondary,
.badge.bg-success,
.badge.bg-danger,
.badge.bg-warning,
.badge.bg-info,
.badge.bg-dark,
.badge.bg-blue,
.badge.bg-red,
.badge.bg-green,
.badge.bg-yellow,
.badge.bg-purple {
  color: #fff !important;
}

/* ===== CONTRAST IMPROVEMENTS ===== */

/* Improve text-success contrast */
.text-success {
  color: #1a7f37 !important; /* Darker green for better contrast (7.4:1) */
}

/* Improve alert-info contrast */
.alert.alert-info {
  background-color: #cfe2ff !important; /* Lighter blue background */
  border-color: #9ec5fe !important;
  color: #052c65 !important; /* Dark blue text for better contrast (11.8:1) */
}

.alert-info .alert-link {
  color: #04233f !important; /* Even darker for links */
}

/* Improve body text contrast (should be black on white) */
body {
  color: #1e293b !important; /* Very dark gray, almost black (15.5:1 contrast) */
  background-color: #fff !important;
}

/* List controls */
.list-scroll-controls {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1030;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.list-scroll-controls .btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
}

.table-sortable th.js-sortable {
  cursor: pointer;
  user-select: none;
}

.table-sortable th.js-sortable.sort-asc::after {
  content: " ▲";
  color: #6c757d;
  font-size: 0.7rem;
}

.table-sortable th.js-sortable.sort-desc::after {
  content: " ▼";
  color: #6c757d;
  font-size: 0.7rem;
}

/* Improve text-muted contrast for better readability */
.text-muted,
div.text-muted,
span.text-muted,
small.text-muted {
  color: #495057 !important; /* Darker muted text (9.7:1 contrast) */
}

/* ===== ACCESSIBILITY: BUTTON LABELS ===== */

/* Ensure all btn-close buttons have accessible names via CSS content */
.btn-close::before {
  content: "Close";
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ===== HIGH CONTRAST: BLACK/WHITE TEXT ONLY ===== */

/* Default readable text for core UI copy */
body,
p,
li,
td,
th,
label,
.form-label,
.subheader,
.card-title,
.page-title,
.breadcrumb-item,
.table,
.alert,
.list-group-item {
  color: #000 !important;
}

/* Headings and section labels */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  color: #000 !important;
}

/* Keep muted text compliant with black/white requirement */
.text-muted,
small.text-muted,
span.text-muted,
div.text-muted {
  color: #000 !important;
}

/* Light backgrounds -> black text */
.bg-light,
.bg-white,
.bg-warning,
.bg-yellow,
.bg-orange,
.bg-lime,
.badge.bg-warning,
.badge.bg-yellow,
.badge.bg-orange,
.badge.bg-lime,
.badge[class*="-lt"] {
  color: #000 !important;
}

/* Dark/strong color backgrounds -> white text */
.bg-primary,
.bg-secondary,
.bg-success,
.bg-danger,
.bg-info,
.bg-dark,
.bg-blue,
.bg-indigo,
.bg-purple,
.bg-pink,
.bg-red,
.bg-green,
.bg-teal,
.bg-cyan,
.bg-gray,
.bg-gray-600,
.bg-gray-700,
.bg-gray-800,
.bg-gray-900,
.badge.bg-primary,
.badge.bg-secondary,
.badge.bg-success,
.badge.bg-danger,
.badge.bg-info,
.badge.bg-dark,
.badge.bg-blue,
.badge.bg-indigo,
.badge.bg-purple,
.badge.bg-pink,
.badge.bg-red,
.badge.bg-green,
.badge.bg-teal,
.badge.bg-cyan,
.badge.bg-gray {
  color: #fff !important;
}

/* Alert contrast: enforce black/white text, including honours pages */
.alert.alert-primary,
.alert.alert-secondary,
.alert.alert-success,
.alert.alert-danger,
.alert.alert-dark {
  color: #fff !important;
}

.alert.alert-info,
.alert.alert-warning,
.alert.alert-light {
  color: #000 !important;
}

.alert .alert-link,
.alert a {
  color: inherit !important;
  text-decoration: underline;
}

/* Alert typography: bold all alert text/content */
.alert,
.alert *,
.alert .alert-link,
.alert a {
  font-weight: 700 !important;
}
