/* Main Filter horizontal layout and responsive styles */
.mf-container {
  margin: 10px 0 20px;
}

.mf-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (max-width: 1100px) {
  .mf-sections { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .mf-sections { grid-template-columns: 1fr; }
}

.mf-section {
  border: 1px solid #e2e6ea;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.mf-section-title {
  font-weight: 600;
  color: #577;
  margin-bottom: 8px;
font-size: 18px;
}

.mf-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mf-term-item { display: inline-block; }

.mf-term {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid #ccd2d7;
  border-radius: 999px;
  background: #f7f9fb;
  color: #334;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  font-size: 0.9rem;
}

.mf-term.is-active {
  background: #e4eef9;
  border-color: #7aa2d6;
  color: #234;
}

.mf-term.mf-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mf-icon { width: 22px; height: 22px; display: inline-block; }
.mf-term-name { font-size: 0.95em; }
.mf-count {
  font-size: 0.85em;
  color: #556;
  background: #eef2f7;
  border-radius: 12px;
  padding: 3px 8px;
}

/* Search + Reset alignment */
.mf-search { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.mf-search .rlf-searchbar-wrap { flex: 1; }

.mf-actions { margin: 10px 0; }
.mf-reset-btn {
  border: 1px solid #7aa2d6;
  background: #e4eef9;
  color: #234;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.mf-reset-btn:hover {
  background: #d1e3f5;
  border-color: #6b94c7;
}

.mf-results-header {
  color: #577;
  font-size: 1.6em;
  font-weight: 600;
  margin: 20px 0 10px;
  padding-top:20px;
  border-bottom: 2px solid #e2e6ea;
  padding-bottom: 8px;
}

.mf-sortbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.mf-sort-label { color: #577; font-weight: 500; }

/* Results table: reuse existing table styles by matching IDs/classes */
#mf-results table.resources-table, #mf-results table.mf-table {
  width: 100%;
  border-collapse: collapse;
}
#mf-results table.resources-table th,
#mf-results table.resources-table td,
#mf-results table.mf-table th,
#mf-results table.mf-table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
}

#mf-results tbody tr.resource-row:hover { background: #f7f9fb; }

#mf-pagination { text-align: center; margin-top: 20px; }
#mf-pagination .rlf-page-btn {
  border: 1px solid #ccd2d7;
  background: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  margin: 0 3px 6px;
  cursor: pointer;
}
#mf-pagination .rlf-page-btn[style*="font-weight:bold"] {
  background: #eef2f7;
}

.mf-loading { color: #999; font-size: 0.95em; }