/* SDR brand theme override for DualShock Calibration GUI */

:root {
  --bs-body-bg: #0c0e15;
  --bs-body-color: #E8EAF6;
  --bs-body-tertiary-bg: #14171f;
  --bs-border-color: #1f2330;
  --bs-secondary-bg: #14171f;
  --bs-tertiary-bg: #14171f;
  --bs-primary: #DC143C;
  --bs-primary-rgb: 220, 20, 60;
  --bs-link-color: #DC143C;
  --bs-link-hover-color: #ff3358;
  --bs-link-color-rgb: 220, 20, 60;
}

body {
  background: #07090F !important;
  color: #E8EAF6 !important;
  font-family: 'Barlow', system-ui, -apple-system, sans-serif !important;
}

/* Navbar */
.navbar.bg-body-tertiary {
  background: #14171f !important;
  border-bottom: 1px solid #1f2330 !important;
}
.navbar .nav-link, .navbar .text-secondary {
  color: #B0B5CC !important;
}
.navbar .nav-link:hover {
  color: #E8EAF6 !important;
}

/* Cards */
.card, .card.text-bg-light {
  background: #14171f !important;
  color: #E8EAF6 !important;
  border: 1px solid #1f2330 !important;
}
.card-header {
  background: #1a1d28 !important;
  color: #E8EAF6 !important;
  border-bottom: 1px solid #1f2330 !important;
  font-family: 'Exo 2', system-ui, sans-serif !important;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Modals */
.modal-content {
  background: #14171f !important;
  color: #E8EAF6 !important;
  border: 1px solid #1f2330 !important;
}
.modal-header {
  border-bottom: 1px solid #1f2330 !important;
  background: #1a1d28 !important;
}
.modal-footer {
  border-top: 1px solid #1f2330 !important;
  background: #14171f !important;
}
.modal-title {
  font-family: 'Exo 2', system-ui, sans-serif !important;
  font-weight: 700;
  color: #E8EAF6 !important;
}
.btn-close {
  filter: invert(1) brightness(0.8);
}

/* Buttons */
.btn-primary {
  background: #DC143C !important;
  border-color: #DC143C !important;
  color: white !important;
  font-family: 'Exo 2', system-ui, sans-serif !important;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.btn-primary:hover, .btn-primary:focus {
  background: #ff3358 !important;
  border-color: #ff3358 !important;
}
.btn-outline-primary {
  color: #DC143C !important;
  border-color: #DC143C !important;
  font-family: 'Exo 2', system-ui, sans-serif !important;
  font-weight: 700;
}
.btn-outline-primary:hover {
  background: #DC143C !important;
  color: white !important;
}
.btn-secondary, .btn-outline-secondary {
  background: transparent !important;
  border-color: #2a2f3d !important;
  color: #B0B5CC !important;
}
.btn-secondary:hover, .btn-outline-secondary:hover {
  background: #1f2330 !important;
  color: #E8EAF6 !important;
  border-color: #2a2f3d !important;
}
.btn-success {
  background: #00C853 !important;
  border-color: #00C853 !important;
  color: white !important;
}
.btn-success:hover {
  background: #00E676 !important;
  border-color: #00E676 !important;
}
.btn-danger {
  background: #DC143C !important;
  border-color: #DC143C !important;
}

/* Form controls */
.form-control, .form-select {
  background: #0c0e15 !important;
  border-color: #2a2f3d !important;
  color: #E8EAF6 !important;
}
.form-control:focus, .form-select:focus {
  background: #0c0e15 !important;
  border-color: #DC143C !important;
  color: #E8EAF6 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 20, 60, 0.2) !important;
}
.form-check-input {
  background-color: #0c0e15;
  border-color: #2a2f3d;
}
.form-check-input:checked {
  background-color: #DC143C;
  border-color: #DC143C;
}

/* Tabs */
.nav-tabs {
  border-bottom: 1px solid #1f2330 !important;
}
.nav-tabs .nav-link {
  color: #B0B5CC !important;
  border-color: transparent !important;
  background: transparent !important;
  font-family: 'Exo 2', system-ui, sans-serif !important;
  font-weight: 600;
}
.nav-tabs .nav-link:hover {
  color: #E8EAF6 !important;
  border-color: transparent !important;
}
.nav-tabs .nav-link.active {
  background: transparent !important;
  color: #DC143C !important;
  border-color: transparent transparent #DC143C !important;
  border-bottom-width: 2px !important;
}

/* Alerts */
.alert {
  border-radius: 10px !important;
}
.alert-info {
  background: rgba(0, 212, 255, 0.08) !important;
  border-color: rgba(0, 212, 255, 0.3) !important;
  color: #80E0FF !important;
}
.alert-warning {
  background: rgba(255, 184, 0, 0.08) !important;
  border-color: rgba(255, 184, 0, 0.3) !important;
  color: #FFD580 !important;
}
.alert-success {
  background: rgba(0, 230, 118, 0.08) !important;
  border-color: rgba(0, 230, 118, 0.3) !important;
  color: #80F0B5 !important;
}
.alert-danger {
  background: rgba(220, 20, 60, 0.08) !important;
  border-color: rgba(220, 20, 60, 0.3) !important;
  color: #FF8FA3 !important;
}

/* List groups */
.list-group-item {
  background: #14171f !important;
  border-color: #1f2330 !important;
  color: #E8EAF6 !important;
}
.list-group-item.active, .list-group-item-action.active {
  background: #DC143C !important;
  border-color: #DC143C !important;
  color: white !important;
}
.list-group-item-action:hover {
  background: #1f2330 !important;
  color: #E8EAF6 !important;
}

/* Accordion (FAQ) */
.accordion-item {
  background: #14171f !important;
  border-color: #1f2330 !important;
  color: #E8EAF6 !important;
}
.accordion-button {
  background: #14171f !important;
  color: #E8EAF6 !important;
  font-family: 'Exo 2', system-ui, sans-serif !important;
  font-weight: 600;
}
.accordion-button:not(.collapsed) {
  background: #1a1d28 !important;
  color: #DC143C !important;
  box-shadow: none !important;
}
.accordion-button::after {
  filter: invert(1) brightness(0.8);
}
.accordion-body {
  background: #0c0e15 !important;
  color: #B0B5CC !important;
}

/* Progress bars */
.progress {
  background: #0c0e15 !important;
}
.progress-bar {
  background: #DC143C !important;
}

/* Dropdowns */
.dropdown-menu {
  background: #14171f !important;
  border: 1px solid #1f2330 !important;
}
.dropdown-item {
  color: #E8EAF6 !important;
}
.dropdown-item:hover, .dropdown-item:focus {
  background: #1f2330 !important;
  color: #E8EAF6 !important;
}

/* Footer */
footer.bg-body-tertiary {
  background: #14171f !important;
  border-top: 1px solid #1f2330 !important;
}
footer a {
  color: #B0B5CC !important;
}
footer a:hover {
  color: #DC143C !important;
}
footer .text-dark {
  color: #B0B5CC !important;
}

/* Text utilities */
.text-muted {
  color: #6B7180 !important;
}
.text-secondary, .text-bg-light {
  color: #B0B5CC !important;
}

/* Code/monospace bits (raw stick values) */
pre, code {
  color: #00E676 !important;
  background: #0c0e15 !important;
}

/* Stick visualisation cards */
#left-stick-card.stick-card-active,
#right-stick-card.stick-card-active {
  border: 1px solid #DC143C !important;
  box-shadow: 0 0 12px rgba(220, 20, 60, 0.4) !important;
}
.stick-card-active .card-header {
  background: #DC143C !important;
  color: white !important;
}

/* "About drift" warning panel */
#aboutdrift > div > div {
  background: #14171f !important;
  border-color: #DC143C !important;
  color: #E8EAF6 !important;
}
#missinghid > div > div {
  background: #14171f !important;
  border-color: #DC143C !important;
  color: #E8EAF6 !important;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Exo 2', system-ui, sans-serif !important;
  color: #E8EAF6 !important;
}

/* Hide donate / time-back / discord icons we don't want */
footer a[href*="paypal"],
footer a[href*="ds_history"],
footer a[onclick*="show_donate_modal"] {
  display: none !important;
}

/* Hide the donate-related "Support this project" inline link */
footer .ds-i18n[onclick*="show_donate_modal"] {
  display: none !important;
}
