/* Copyright 2017 Esri
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

/* Range slider overrides */

input[type=range] {
  -webkit-appearance: none; /* Hides the slider so that custom slider can be made */
  width: 100%; /* Specific width is required for Firefox. */
  background: transparent; /* Otherwise white in Chrome */
  border: none;
  box-shadow: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
}

input[type=range]:focus,
input[type=range]::-moz-focus-outer {
  outline: none;
  box-shadow: none;
  border: 0;
}

input[type=range]::-ms-track {
  width: 100%;
  cursor: pointer;

  /* Hides the slider so custom styles can be added */
  background: transparent;
  border-color: transparent;
  color: transparent;
}

/* Special styling for WebKit/Blink */
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  margin-top: -8px;
  border: 1px solid #0079c1;
  height: 21px;
  width: 21px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

input[type=range]:hover::-webkit-slider-thumb {
  background: #0079c1;
}

/* All the same stuff for Firefox */
input[type=range]::-moz-range-thumb {
  border: 1px solid #0079c1;
  height: 21px;
  width: 21px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* All the same stuff for IE */
input[type=range]::-ms-thumb {
  border: 1px solid #0079c1;
  height: 21px;
  width: 21px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  background-color: #f8f8f8;
  border: 1px solid #efefef;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  border-radius: 2px;
}

input[type=range]::-moz-range-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  background-color: #f8f8f8;
  border: 1px solid #efefef;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  border-radius: 2px;
}

/* more IE stuff */

input[type=range]::-ms-track {
  width: 100%;
  height: 8.4px;
  cursor: pointer;
  background: transparent;
  border-color: transparent;
  border-width: 16px 0;
  color: transparent;
}
input[type=range]::-ms-fill-lower {
  background: #2a6495;
  border: 0.2px solid #010101;
  border-radius: 2.6px;
  box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
}
input[type=range]:focus::-ms-fill-lower {
  background: #3071a9;
}
input[type=range]::-ms-fill-upper {
  background: #3071a9;
  border: 0.2px solid #010101;
  border-radius: 2.6px;
  box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
}
input[type=range]:focus::-ms-fill-upper {
  background: #367ebd;
}

/**
 * Time Range Slider
 */

input[type=range].time-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  border: 1px solid #ffcc00;
  height: 21px;
  width: 21px;
  border-radius: 50%;
  background: #FFEEAC;
  cursor: pointer;
  margin-top: -8px; /* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 10px #ffcc00;
}

input[type=range].time-range-slider:hover::-webkit-slider-thumb {
  background: #FFDC52;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 10px 3px #ffcc00;
}

input[type=range].time-range-slider::-moz-range-thumb {
  border: 1px solid #ffcc00;
  height: 21px;
  width: 21px;
  border-radius: 50%;
  background: #FFEEAC;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 10px #ffcc00;
}

input[type=range].time-range-slider:hover::-moz-range-thumb {
  background: #FFDC52;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 10px 3px #ffcc00;
}
