/* Layout overrides */
.primary:has(.custom-search-page) {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
  padding: 0 !important;
}

#content:has(.custom-search-page) {
  width: 100%;
  max-width: none;
  padding: 0;
}

.row:has(.custom-search-page) {
  margin: 0;
  width: 100%;
}

/* Custom Search Layout */
.custom-search-layout {
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Filters Sidebar */
.filters-sidebar {
  width: 280px;
  flex-shrink: 0;
}

.modern-filters {
  background: white;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.filters-content {
  margin-bottom: 20px;
}

.filters-content h2 {
  font-size: 1.1em;
  margin: 0 0 10px 0;
  padding: 0 0 10px 0;
  border-bottom: 1px solid #ddd;
}

/* Main Content Area */
.custom-search-wrapper {
  flex: 1;
}

.custom-search-page {
  width: 100%;
}

/* Override toolbar completely */
.toolbar.custom-toolbar {
  display: none;
}

/* Reports-style header and layout */
.reports-header {
  background-color: #164CAE;
  background: linear-gradient(90deg,#0b50d4 0%, #093cac 40%, #091F48 100%);
  color: white;
  padding: 15px 0;
  margin-bottom: 20px;
}

.reports-title {
  font-size: 24px;
  font-weight: bold;
  margin: 0;
}

.reports-breadcrumb {
  color: rgba(255, 255, 255, 0.8);
  margin-top: 5px;
}

.reports-breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.reports-container {
  padding: 0 0 20px 0;
}

.search-bar {
  margin-bottom: 20px;
}

/* Filters container - reports style */
.filters-container {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 20px;
}

.filters-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-title {
  font-weight: bold;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

.filter-title .title-text {
  flex-grow: 1;
}

.filter-title .count {
  color: #666;
  font-size: 0.9em;
}

/* Style CKAN facet lists to look like report filters */
.filter-group .nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.filter-group .nav-item {
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-group .nav-link {
  padding: 0;
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
  flex-grow: 1;
  margin-bottom: 0;
  cursor: pointer;
}

.filter-group .nav-link:hover {
  color: #164CAE;
  text-decoration: none;
}

.filter-group .nav-link.active {
  color: #164CAE;
  font-weight: 600;
}

.filter-group .badge {
  background-color: #eee;
  color: #666;
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 0.85em;
  min-width: 25px;
  text-align: center;
}

/* Report card styling for datasets */
.report-card {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.1s ease-in-out;
}

.report-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.report-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #164CAE;
}

.report-title a {
  color: #164CAE;
  text-decoration: none;
}

.report-title a:hover {
  text-decoration: underline;
}

.report-description {
  color: #555;
  margin-bottom: 15px;
  line-height: 1.5;
}

.report-meta {
  color: #777;
  font-size: 12px;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-meta-item {
  display: flex;
  align-items: center;
}

.report-meta-item i {
  margin-right: 4px;
}

.report-tag {
  display: inline-block;
  background-color: #f0f0f0;
  color: #666;
  border-radius: 12px;
  padding: 2px 8px;
  margin-right: 5px;
  margin-bottom: 5px;
  font-size: 11px;
}

.report-action {
  text-align: right;
  margin-top: 10px;
}

.view-report-btn {
  background-color: #164CAE;
  border-color: #164CAE;
  color: white;
}

.view-report-btn:hover {
  background-color: #0f3a87;
  border-color: #0f3a87;
  color: white;
}

/* List controls - reports style */
.list-controls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  align-items: center;
}

.list-info {
  color: #666;
  margin-bottom: 10px;
}

.sort-control {
  display: flex;
  align-items: center;
}

.sort-label {
  margin-right: 10px;
}

.view-control {
  display: flex;
  align-items: center;
}

.view-label {
  margin-right: 10px;
}

.view-options {
  display: flex;
}

.view-option {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background-color: #f9f9f9;
  cursor: pointer;
  text-decoration: none;
  color: #333;
}

.view-option:first-child {
  border-radius: 4px 0 0 4px;
}

.view-option:last-child {
  border-radius: 0 4px 4px 0;
}

.view-option.active {
  background-color: #164CAE;
  color: white;
  border-color: #164CAE;
}

.view-option:hover {
  text-decoration: none;
  background-color: #f5f5f5;
}

.view-option.active:hover {
  background-color: #0f3a87;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

/* No reports message */
.no-reports {
  padding: 30px;
  text-align: center;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 20px;
}

.add-report-btn {
  margin-top: 15px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px 0;
  border-bottom: 1px solid #e9ecef;
}

.results-info {
  font-size: 16px;
  color: #333;
}

.results-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.sort-control, .view-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label, .view-label {
  font-weight: 500;
  color: #666;
}

.add-dataset-control .btn {
  background: #28a745;
  border-color: #28a745;
  color: white;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 4px;
}

.add-dataset-control .btn:hover {
  background: #218838;
  border-color: #1e7e34;
}