/* Summary Table Styles */
#summaryTable {
  font-size: 0.875rem;
  border-collapse: separate;
  border-spacing: 0;
}

#summaryTable thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#summaryTable tbody tr {
  transition: all 0.2s ease;
}

#summaryTable tbody tr:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

#summaryTable td,
#summaryTable th {
  border-bottom: 1px solid #e5e7eb;
}

/* Scrollbar styling for table container */
.overflow-x-auto::-webkit-scrollbar {
  height: 8px;
}

.overflow-x-auto::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Sort indicator animation */
#summaryTable thead th .fa-sort,
#summaryTable thead th .fa-sort-up,
#summaryTable thead th .fa-sort-down {
  transition: transform 0.2s ease;
}

#summaryTable thead th:hover .fa-sort,
#summaryTable thead th:hover .fa-sort-up,
#summaryTable thead th:hover .fa-sort-down {
  transform: scale(1.2);
}

/* Badge animations */
.inline-flex {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive table */
@media (max-width: 1024px) {
  #summaryTable {
    font-size: 0.75rem;
  }

  #summaryTable th,
  #summaryTable td {
    padding: 0.5rem;
  }
}

/* District Dropdown Styles */
#districtDropdown {
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#districtDropdown::-webkit-scrollbar {
  width: 8px;
}

#districtDropdown::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

#districtDropdown::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

#districtDropdown::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.district-option {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.district-option:hover {
  background: linear-gradient(to right, #dbeafe, #eff6ff);
  transform: translateX(4px);
}

.district-option.active {
  background: linear-gradient(to right, #3b82f6, #2563eb);
  color: white;
}

.district-option-name {
  font-weight: 500;
  font-size: 0.875rem;
}

.district-option-badge {
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: #e0e7ff;
  color: #4f46e5;
  font-weight: 600;
}

.district-option:hover .district-option-badge {
  background: #c7d2fe;
}

.district-option.active .district-option-badge {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Card Dropdown Styling */
select[id$="DistrictSelect"] {
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.75rem;
  padding: 0.375rem 0.5rem;
}

select[id$="DistrictSelect"]:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

select[id$="DistrictSelect"]:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

select[id$="DistrictSelect"] option {
  padding: 0.5rem;
  font-size: 0.875rem;
}
