/* Filter Controls Container */
.filter-container {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.filter-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
  position: relative;
  z-index: 20;
}

@media (min-width: 768px) {
  .filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));  /* Updated to 3 columns for category */
  }
}

.filter-grid-three {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
  position: relative;
  z-index: 10;
}

@media (min-width: 768px) {
  .filter-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Labels and Values */
.filter-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.filter-value {
  font-size: 0.875rem;
  color: #6b7280;
}

.range-header {
  display: flex;
  justify-content: space-between;
}

/* Range Slider Container */
.range-slider-container {
  position: relative;
  margin-bottom: 30px;
}

/* Range Values Display */
.range-values {
  position: absolute;
  bottom: -25px;
  width: calc(100% - 20px);
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #666;
  margin: 0 10px;
}

/* Select Container */
.select-container {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 30;
}

/* Multi-Range Slider Customization */
.multi-range-slider {
  border: none !important;
  box-shadow: none !important;
  padding: 10px 0 !important;
}

.multi-range-slider .bar-inner {
  background-color: #0082CA !important;  /* Changed from #3b82f6 to match resources button */
  height: 6px !important;
  box-shadow: #0082CA !important;
  border-color: #0082CA !important;
}

.multi-range-slider .thumb::before {
  border: none !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.3) !important;
  width: 20px !important;
  height: 20px !important;
}

.multi-range-slider .thumb:hover::before {

}

.multi-range-slider .bar-left,
.multi-range-slider .bar-right {
  background-color: white !important;  /* Changed from #e5e7eb to white */
  height: 6px !important;
}

/* Active Filters */
.active-filters-container {
  padding-top: 1rem;
  border-top-width: 1px;
}

.active-filters-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.active-filters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Category badge */
.filter-badge-category {
  background-color: #f3e8ff;
  color: #6b21a8;
}

.filter-badge-risk {
  background-color: #dbeafe;
  color: #1e40af;
}

.filter-badge-outcome {
  background-color: #dcfce7;
  color: #166534;
}

.filter-badge-button {
  flex-shrink: 0;
  margin-left: 0.25rem;
}

/* Category badge button */
.filter-badge-button-category {
  color: #7c3aed;
}

.filter-badge-button-category:hover {
  color: #6b21a8;
}

.filter-badge-button-risk {
  color: #2563eb;
}

.filter-badge-button-risk:hover {
  color: #1e40af;
}

.filter-badge-button-outcome {
  color: #16a34a;
}

.filter-badge-button-outcome:hover {
  color: #166534;
}

/* Reset Filters Buttons*/
.reset-filters-button {
  position: absolute;
  top: 24px;
  right: 24px;
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  padding: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.2s;
}

.reset-filters-button:hover {
  background-color: #f9fafb;
  transform: rotate(-180deg);
}

.range-reset {
  margin-left: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 9999px;
  transition: all 0.2s;
  color: #6b7280;
}

.range-reset:hover {
  transform: rotate(-180deg);
}

/* Data Explorer Layout */
.data-explorer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Table Styles */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table-container {
  overflow-x: auto;
}

/* Table Header */
.table-header {
  background-color: #f3f4f6;
}

.header-cell {
  padding: 0.5rem;
  text-align: left;
  cursor: pointer;
}

.header-cell:hover {
  background-color: #e5e7eb;
}

.header-cell-content {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-cell-right .header-cell-content {
  justify-content: flex-end;
}

.sort-indicator {
  color: #6b7280;
}

/* Table Body */
.table-row {
  border-top-width: 1px;
}

.table-row:hover {
  background-color: #f9fafb;
}

.table-cell {
  padding: 0.5rem;
}

.table-cell-right {
  text-align: right;
}

/* Expand Button */
.expand-button {
  padding: 0.25rem;
  border-radius: 0.25rem;
}

.expand-button:hover {
  background-color: #e5e7eb;
}

/* Expanded Content */
.expanded-row {
  background-color: #f9fafb;
}

.expanded-content {
  padding: 1rem;
}

/* Loading State */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.spinner {
  height: 1.5rem;
  width: 1.5rem;
  border-radius: 9999px;
  border-width: 2px;
  border-bottom-color: #111827;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error State */
.error-state {
  padding: 1rem;
  color: #dc2626;
}