/* Theme switcher - connected segmented control */
.theme-switcher {
  display: flex;
  background: rgb(229 231 235); /* gray-200 */
  border-radius: 0.5rem;
  padding: 0.25rem;
}

.theme-switcher__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  flex: 1;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgb(107 114 128); /* gray-500 */
}

.theme-switcher__btn:hover {
  color: rgb(55 65 81); /* gray-700 */
}

/* Active state when radio is checked */
.theme-switcher__btn:has(input:checked) {
  background: white;
  color: rgb(17 24 39); /* gray-900 */
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

/* Hide the actual radio buttons */
.theme-switcher__btn input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Icon styling */
.theme-switcher__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Dark mode styles */
.dark .theme-switcher {
  background: rgb(55 65 81); /* gray-700 */
}

.dark .theme-switcher__btn {
  color: rgb(156 163 175); /* gray-400 */
}

.dark .theme-switcher__btn:hover {
  color: rgb(209 213 219); /* gray-300 */
}

.dark .theme-switcher__btn:has(input:checked) {
  background: rgb(75 85 99); /* gray-600 */
  color: white;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.2);
}

.dark .theme-switcher__icon {
  stroke: currentColor;
}
