<template>
  <input type="range" :style="component.style" class="rendered-slider" />
</template>

<script setup>
import { defineProps } from 'vue';

const props = defineProps({
  component: Object,
});
</script>

<style scoped>
.rendered-slider {
  width: 100%;
  height: 100%;
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  background: transparent;
  cursor: pointer;
}

/* For Webkit browsers (Chrome, Safari, Edge) */
.rendered-slider::-webkit-slider-runnable-track {
  background: #ddd;
  border-radius: 4px;
  height: 8px;
}

.rendered-slider::-webkit-slider-thumb {
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  margin-top: -6px; /* Center thumb on track */
  background-color: #007bff;
  height: 20px;
  width: 20px;
  border-radius: 50%;
}

/* For Firefox */
.rendered-slider::-moz-range-track {
  background: #ddd;
  border-radius: 4px;
  height: 8px;
}

.rendered-slider::-moz-range-thumb {
  background-color: #007bff;
  height: 20px;
  width: 20px;
  border-radius: 50%;
}
</style>
