/* Mode Toggle Styles - Link Version */
.mode-toggle-container {
  display: flex;
  justify-content: flex-end;
  max-width: 250px;
}

.mode-toggle-wrapper {
  position: relative;
  display: flex;
  background-color: #f0f0f0;
  border-radius: 20px;
  padding: 4px;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mode-toggle-option {
  flex: 1;
  text-align: center;
  padding: 8px 16px;
  z-index: 1;
  transition: color 0.3s ease;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  font-size: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 80px;
}

.mode-toggle-option.active {
  color: #fff;
}

.mode-toggle-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 2px);
  height: calc(100% - 8px);
  background-color: #d75626;
  border-radius: 16px;
  transition: transform 0.3s ease;
}

.mode-toggle-slider.slide-right {
  transform: translateX(calc(100% - 4px));
}

.mode-toggle-option:hover {
  text-decoration: none;
  color: #d75626;
}

.mode-toggle-option.active:hover {
  color: #fff;
}

/* Mode Toggle Styles - Radio Version */
/* Main container for the radio toggle switch */
.mode-toggle {
  position: relative;
  display: flex;
  background-color: #f0f0f0;
  border-radius: 4px;
  border: 1px solid #cbd5e0;
  height: 100%;
  overflow: hidden;
  min-width: 170px;
}

/* Disable transition effects when no-transition class is applied */
.mode-toggle.no-transition .toggle-indicator {
  transition: none !important;
}

/* Hide radio inputs visually while keeping them accessible to screen readers and keyboard navigation */
.mode-toggle input[type="radio"] {
  opacity: 0;
  position: absolute;
  width: 0;
  height: 0;
}

/* Style for the clickable labels that appear as toggle buttons */
.mode-toggle .mode-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color 0.3s;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  min-width: 80px;
  text-align: center;
}

/* Remove individual label focus styling */
.mode-toggle input[type="radio"]:focus-visible + .mode-label {
  outline: none;
}

/* Add focus style to the entire toggle container when any radio input is focused */
.mode-toggle:has(input[type="radio"]:focus-visible) {
  outline: 2px solid #4d90fe;
  outline-offset: 1px;
}

/* Moving background element that highlights the selected option */
.mode-toggle .toggle-indicator {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 4px);
  height: calc(100% - 4px);
  background-color: #d75626;
  transition: transform 0.3s ease;
  border-radius: 3px;
}

/* Move the indicator to the right when Clubs option is selected */
#search-mode-clubs:checked ~ .toggle-indicator {
  transform: translateX(105%);
}

/* Change text color to white for the selected option */
#search-mode-courses:checked ~ .mode-label[for="search-mode-courses"],
#search-mode-clubs:checked ~ .mode-label[for="search-mode-clubs"] {
  color: white;
}

/* Searchbar specific mode toggle adjustments */
.search-mode-toggle .mode-toggle {
  height: 100%;
  display: flex;
  align-items: stretch;
}

/* Disabled state for filter button */
#filter-button.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}
