.filters-section {
  margin-top: 6px;
}
.filters-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  padding: 6px 4px;
  cursor: pointer;
}
.filters-toggle:hover {
  background: #f7f7f7;
  border-radius: 6px;
}
.filters-toggle-arrow {
  font-size: 12px;
  color: #666;
  transition: transform 0.2s;
}
.filters-section.collapsed .filters-toggle-arrow {
  transform: rotate(-90deg);
}
.filters-section.collapsed .filters-content {
  display: none;
}
.filters-header {
  margin-top: 6px;
}
.filters-title {
  font-size: 14px;
  font-weight: 700;
}
body {
  margin: 0;
  font-family: Arial, sans-serif;
}
#error {
  position: absolute;
  top: 10px; /* restore default position */
  right: 10px;
  background: #ff4444;
  color: white;
  padding: 10px;
  border-radius: 8px;
  display: none;
  z-index: 1000;
}

/* Controls header with inline GitHub link */
.controls-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.controls-header h3 {
  margin: 0;
  font-size: 18px;
}
.github-link {
  color: #24292e;
  text-decoration: none;
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.github-link:hover {
  background: #f5f5f5;
}
#loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}
#controls {
  position: absolute;
  top: 10px;
  left: 10px;
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  width: 320px;
  max-height: calc(100vh - 20px);
  overflow: hidden;
}
.filter-section {
  margin-bottom: 10px;
}
/* Indent each block within a filter section */
.filter-section {
  padding-left: 8px;
}
/* Make filter labels less prominent */
.filter-section > label,
.filter-section > .filter-label {
  display: block;
  font-size: 12px;
  color: #555;
  margin-bottom: 4px;
}
select,
input {
  width: 100%;
  padding: 5px;
  margin: 5px 0;
  box-sizing: border-box;
  font-size: 13px;
}

select[multiple] {
  min-height: 100px;
  background-color: white;
}

/* Custom dropdown styles */
.dropdown {
  position: relative;
  width: 100%;
}

.dropdown-button {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  background: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  margin: 5px 0;
  font-size: 13px;
}

.dropdown-button:hover {
  background-color: #f5f5f5;
}

.dropdown-arrow {
  transition: transform 0.2s;
}

.dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-sizing: border-box;
}

.dropdown.open .dropdown-content {
  display: block;
}

.checkbox-item {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.checkbox-item:hover {
  background-color: #f5f5f5;
}

.checkbox-item input[type="checkbox"] {
  margin-right: 8px;
  width: auto;
  margin-top: 0;
  margin-bottom: 0;
}

.checkbox-item input[type="radio"] {
  margin-right: 8px;
  width: auto;
  margin-top: 0;
  margin-bottom: 0;
}

.checkbox-item label {
  cursor: pointer;
  flex: 1;
  margin: 0;
  font-size: 13px;
}

.optgroup-label {
  padding: 8px 12px;
  font-weight: bold;
  background-color: #f0f0f0;
  border-bottom: 1px solid #ddd;
  font-size: 12px;
  color: #666;
}
#stats {
  font-size: 12px;
  color: #666;
  margin-top: 10px;
}

.tour-list {
  margin-top: 10px;
  border-top: 1px solid #eee;
  padding-top: 10px;
  overflow-y: auto;
  max-height: 45vh;
}
.tour-list-section {
  margin-top: 6px;
}
.tour-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 6px 4px;
  cursor: pointer;
}
.tour-list-header:hover {
  background: #f7f7f7;
  border-radius: 6px;
}
.tour-header-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tour-title {
  font-size: 14px;
  font-weight: 700;
}
.tour-count {
  font-size: 12px;
  color: #666;
}
.tour-toggle-arrow {
  font-size: 12px;
  color: #666;
  transition: transform 0.2s;
}
.tour-list-section.collapsed .tour-toggle-arrow {
  transform: rotate(-90deg);
}
.tour-list-section.collapsed .tour-list {
  display: none;
}
.tour-item {
  padding: 8px 6px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
}
.tour-item:hover {
  background: #f9f9f9;
  border-color: #eee;
}
.tour-item .title {
  font-weight: 600;
  font-size: 13px;
}
.tour-item .meta {
  font-size: 12px;
  color: #666;
}
