/* =========================================
   Filter row – base styling
   ========================================= */

.filter-row th {
  background: #f9f9f9;
  vertical-align: middle;
  padding: 6px;
  color: #333;
}

/* Active filter / search state */
.filter-icon.active,
.filter-search.active {
  color: rgb(236 94 68);
}

/* =========================================
   ICON FILTERS (Font Awesome)
   ========================================= */

.filter-icon {
  position: relative;
  width: 100%;
  height: 28px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

/* Font Awesome icon */
.filter-icon i.fa {
  font-size: 18px;
  pointer-events: none; /* click handled by container */
}

/* =========================================
   TEXT SEARCH (description / standard)
   ========================================= */

.filter-search {
  width: 100%;
  padding: 6px 8px;

  border: 1px solid #ddd;
  background: #fff;

  font: inherit;
  color: #333;
  box-sizing: border-box;
}

/* Remove native search clear (Chrome) */
.filter-search::-webkit-search-cancel-button {
  display: none;
}

/* =========================================
   DROPDOWN OVERLAY
   ========================================= */

.multi-select {
  position: relative;
}

/* Dropdown sizing fix */
.multi-select .dropdown {
  position: absolute;
  top: 100%;
  left: 0;

  min-width: 220px;
  width: max-content;
  max-width: 320px;

  background: #fff;
  border: 1px solid #ddd;
  border-top: none;

  max-height: 240px;
  overflow-y: auto;

  display: none;
  z-index: 1000;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* Show dropdown */
.multi-select.open .dropdown {
  display: block;
}

.dropdown {
  color: #333;
}

/* =========================================
   DROPDOWN OPTIONS
   ========================================= */

.multi-select label {
  display: flex;
  align-items: flex-start;
  gap: 6px;

  padding: 6px 8px;
  cursor: pointer;
}

.multi-select label:hover {
  background: #f2f2f2;
}

/* Checkbox standardisation only */
.multi-select input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  accent-color: #555;
}

/* Dropdown option text inherits table style */
.table .filter-row .multi-select span {
  font: inherit;
  color: #333;
}

/* =========================================
   COLUMN WEIGHTING
   ========================================= */

/* Description column wider */
.table th:nth-child(5),
.table td:nth-child(5) {
  width: 40%;
  white-space: normal;
}

/* Keep other columns compact */
/* .table th:not(:nth-child(5)),
.table td:not(:nth-child(5)) {
  white-space: nowrap;
} */

/* =========================================
   META UI
   ========================================= */

.no-results {
  text-align: center;
  padding: 2rem;
  color: #666;
}

#resultCount {
  margin: 0.5rem 0;
  font-size: 0.9em;
  color: #555;
}

#clearAllFilters {
  margin-bottom: 0.5rem;
}

.text-multiselect {
  position: relative;
}

.text-multiselect input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ddd;
  box-sizing: border-box;
}

.text-multiselect.active input {
  border-color: rgb(236 94 68);
}

.text-multiselect .dropdown {
  position: absolute;
  top: 100%;
  left: 0;

  min-width: 260px;
  max-height: 260px;
  overflow-y: auto;

  background: #fff;
  border: 1px solid #ddd;
  border-top: none;

  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  z-index: 1000;

  display: none;
}

.text-multiselect.open .dropdown {
  display: block;
}

/* One row per option */
.dropdown label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-weight: normal;
}

/* Fixed-width checkbox column */
.dropdown input[type="checkbox"],
.dropdown input[type="radio"] {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;       /* critical */
  margin-top: 3px;
}

/* Text column that wraps cleanly */
.dropdown label span {
  display: block;
  flex: 1 1 auto;
  min-width: 0;         /* critical: prevents wrapping under checkbox */
  white-space: normal;
  line-height: 1.3;
  font-weight: normal;
}

#footer {
  display: flex;
  justify-content: center; /* horizontal centring */
  align-items: center;     /* vertical centring */
}

#header {
  display: flex;
  align-items: center;
  justify-content: space-between; /* title left, icon right */
}

/* Remove default h1 spacing issues */
#header h1 {
  margin: 0;
}

/* Home icon styling */
#header a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0 1.25rem;
}

#header i.fa-home {
  font-size: 40px;
}
