body {
  font-family: Arial, sans-serif;
  margin: 20px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px; /* Increased from 12px */
}

th,
td {
  border: 1px solid #ddd;
  padding: 8px; /* Increased from 4px */
  text-align: left;
}

th {
  background-color: #f2f2f2;
  position: sticky;
  top: 0;
  font-size: 15px; /* Added specific size for headers */
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

.sort-link {
  color: #000;
  text-decoration: none;
  display: block;
  font-weight: bold; /* Added to make headers more prominent */
}

.sort-link:hover {
  text-decoration: underline;
}

.sort-indicator {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  margin-left: 5px;
}

.sort-asc .sort-indicator {
  border-bottom: 5px solid #000;
}

.sort-desc .sort-indicator {
  border-top: 5px solid #000;
}

.county-link {
  text-decoration: none;
  color: inherit;
}

.county-link.disabled {
  color: #999;
  cursor: not-allowed;
}

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

.filter-form select {
  padding: 5px;
  margin-right: 10px;
}

.filter-form button {
  padding: 5px 10px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #0066cc;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.campaign-indicator {
  margin: 10px 0;
  padding: 5px 10px;
  background-color: #f0f8ff;
  border-radius: 4px;
  display: inline-block;
}

.campaign-badge {
  background-color: #007bff;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.9em;
}

.clear-filter {
  margin-left: 10px;
  color: #dc3545;
  text-decoration: none;
  font-size: 0.9em;
}

.clear-filter:hover {
  text-decoration: underline;
}

.clickable {
  cursor: pointer;
  color: #0066cc;
  text-decoration: none;
}

.clickable:hover {
  text-decoration: underline;
}

/* Tab Navigation Styles */
.tab-navigation {
  display: flex;
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 20px;
}

.tab-button {
  background: none;
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #6c757d;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.tab-button:hover {
  color: #495057;
  background-color: #f8f9fa;
}

.tab-button.active {
  color: #007bff;
  border-bottom-color: #007bff;
  background-color: #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Chart Styles */
.time-filter-controls {
  margin-bottom: 20px;
  text-align: center;
}

.filter-buttons {
  display: inline-block;
  border: 1px solid #ddd;
  border-radius: 5px;
  overflow: hidden;
}

.filter-btn {
  padding: 8px 16px;
  border: none;
  background-color: #f8f9fa;
  color: #495057;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background-color: #e9ecef;
}

.filter-btn.active {
  background-color: #007bff;
  color: white;
}

.chart-section {
  margin-bottom: 40px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 20px;
}

.chart-section h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
  font-size: 18px;
}

.chart-container {
  position: relative;
  height: 400px;
  width: 100%;
}

/* Table Scrolling */
.table-container {
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Market Indicator Color Coding */
.dom-excellent, .moi-excellent {
  background-color: #d4edda !important;
  color: #155724 !important;
  font-weight: bold;
}

.dom-good, .moi-good {
  background-color: #fff3cd !important;
  color: #856404 !important;
  font-weight: bold;
}

.dom-fair, .moi-fair {
  background-color: #ffeaa7 !important;
  color: #856404 !important;
  font-weight: bold;
}

.dom-poor, .moi-poor {
  background-color: #f8d7da !important;
  color: #721c24 !important;
  font-weight: bold;
}

/* Scrollable Table Containers - Match States Styling */
.table-container {
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-top: 15px;
}

.table-container table {
  margin-top: 0;
  position: relative;
}

/* Sticky Table Headers */
.table-container table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.table-container table thead th {
  background-color: #f2f2f2;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  padding: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Custom Scrollbar Styling */
.table-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .table-container {
    max-height: 60vh;
  }
  
  .table-container table thead th {
    font-size: 12px;
    padding: 8px 4px;
  }
  
  .table-container table td {
    font-size: 12px;
    padding: 6px 4px;
  }
}

/* Page Notice for Market Selection */
.page-notice {
  background: #e7f3ff;
  border: 2px solid #007bff;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.page-notice p {
  margin: 0;
  font-size: 1.125rem;
}

.page-notice .btn {
  margin-left: 1rem;
  padding: 0.75rem 1.5rem;
  background: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
}

.page-notice .btn:hover {
  background: #0056b3;
}