/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Custom Bootstrap primary color (#1E1E2D). Overrides the prebuilt CDN build. */
:root {
  --bs-primary: #1E1E2D;
  --bs-primary-rgb: 30, 30, 45;
  --bs-primary-text-emphasis: #0c0c12;
  --bs-primary-bg-subtle: #d2d2d5;
  --bs-primary-border-subtle: #a5a5ab;
  --bs-link-color: #1E1E2D;
  --bs-link-color-rgb: 30, 30, 45;
  --bs-link-hover-color: #16161f;
  --bs-link-hover-color-rgb: 22, 22, 31;
}

.btn-primary {
  --bs-btn-bg: #1E1E2D;
  --bs-btn-border-color: #1E1E2D;
  --bs-btn-hover-bg: #2B2B40;
  --bs-btn-hover-border-color: #2B2B40;
  --bs-btn-active-bg: #16161F;
  --bs-btn-active-border-color: #16161F;
  --bs-btn-disabled-bg: #1E1E2D;
  --bs-btn-disabled-border-color: #1E1E2D;
}

.btn-outline-primary {
  --bs-btn-color: #1E1E2D;
  --bs-btn-border-color: #1E1E2D;
  --bs-btn-hover-bg: #1E1E2D;
  --bs-btn-hover-border-color: #1E1E2D;
  --bs-btn-active-bg: #1E1E2D;
  --bs-btn-active-border-color: #1E1E2D;
  --bs-btn-disabled-color: #1E1E2D;
  --bs-btn-disabled-border-color: #1E1E2D;
}

.list-group {
  --bs-list-group-active-bg: #1E1E2D;
  --bs-list-group-active-border-color: #1E1E2D;
}

#display-external-switch:checked {
  background-color: #1E1E2D;
  border-color: #1E1E2D;
}

#display-external-switch:focus {
  border-color: #2B2B40;
  box-shadow: 0 0 0 0.25rem rgba(30, 30, 45, 0.25);
}

/* Sortable index headers (Ransack-backed tri_sort_link) + per-column filters. */
th.sortable {
  user-select: none;
  white-space: nowrap;
}

th.sortable a.sort-link {
  cursor: pointer;
}

th.sortable a.sort-link .bi {
  opacity: 0;
  transition: opacity 120ms ease;
}

th.sortable a.sort-link:hover .bi,
th.sortable a.sort-link:focus .bi {
  opacity: 0.45;
}

th.sortable a.sort-link.asc .bi,
th.sortable a.sort-link.desc .bi {
  opacity: 1;
}

tr.filter-row th {
  background: var(--bs-light, #f8f9fa);
}

/* Index action column: keep it a real table-cell so it follows the row height
   (.align-middle centers the buttons), restoring the spacing flex `gap-1` gave. */
td.actions > * + * {
  margin-left: 0.25rem;
}
