//colors
$color_tropical_blue_approx: lighten(#4466f2 ,33%);
$color_cerulean_25_approx: lighten(#4466f2 ,35%);
@import "../theme/variables";

%function-1 {
  position: absolute;
  display: block;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
  overflow: visible;
  margin: 0;
  padding: 0;
  z-index: auto;
  background-color: transparent;
  box-shadow: none;
  bottom: auto;
  left: auto;
  right: auto;
  top: auto;
  transform: none;
}
%function-2 {
  background-image: none;
  outline: 0;
  box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
}
%function-3 {
  color: #333;
  background-color: #ebebeb;
  border-color: #adadad;
}

%function-4 {
  width: 200px;
  height: 200px;
  position: absolute;
  left: -1px;
  top: -1px;
}


.popover {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1010;
  display: none;
  max-width: 276px;
  text-align: left;
  white-space: normal;
  background-color: #ffffff;
  background-clip: padding-box;
  border-radius: 6px;
  box-shadow: 1px 1px 2px 1px #e2e2e2;
  border: 0px solid transparent;
  &.top {
    margin-top: -10px;
    > .arrow {
      bottom: -11px;
      left: 50%;
      margin-left: -11px;
      border-top-color: #e6e6e6;
      border-bottom-width: 0;
      &:after {
        bottom: 1px;
        margin-left: -10px;
        content: " ";
        border-top-color: #ffffff;
        border-bottom-width: 0;
      }
    }
  }
  &.right {
    margin-left: 10px;
    > .arrow {
      top: 50%;
      left: -11px;
      margin-top: -11px;
      border-right-color: rgba(0,0,0,.25);
      border-left-width: 0;
      &:after {
        bottom: -10px;
        left: 1px;
        content: " ";
        border-right-color: #ffffff;
        border-left-width: 0;
      }
    }
  }
  &.bottom {
    margin-top: 10px;
    > .arrow {
      top: -11px;
      left: 50%;
      margin-left: -11px;
      border-top-width: 0;
      border-bottom-color: rgb(230, 230, 230);
      &:after {
        top: 1px;
        margin-left: -10px;
        content: " ";
        border-top-width: 0;
        border-bottom-color: #ffffff;
      }
    }
  }
  &.left {
    margin-left: -10px;
    > .arrow {
      top: 50%;
      right: -22px;
      margin-top: -11px;
      border-right-width: 0;
      border-left-color: #e6e6e6;
      &:after {
        right: 7px;
        bottom: -10px;
        content: " ";
        border-right-width: 0;
        border-left-color: #ffffff;
      }
    }
  }
  > .arrow {
    @extend %function-1;
    border-width: 11px;
    &:after {
      @extend %function-1;
      content: "";
      border-width: 10px;
    }
  }
}
.popover-title {
  padding: 8px 14px;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  background-color: #f7f7f7;
  border-bottom: 1px solid #ebebeb;
  border-radius: 5px 5px 0 0;
}
.popover-content {
  padding: 9px 14px;
  &:last-child {
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
  }
}
.btn {
  cursor: pointer;
  user-select: none;
  background-image: none;
  border: 1px solid transparent;
  &.active {
    @extend %function-2;
    &:focus {
      outline: dotted thin;
      outline-offset: -2px;
    }
  }
  &:active {
    @extend %function-2;
    &:focus {
      outline: dotted thin;
      outline-offset: -2px;
    }
  }
  &:focus {
    outline: dotted thin;
    outline-offset: -2px;
    color: #333;
    text-decoration: none;
  }
  &:hover {
    color: #333;
    text-decoration: none;
  }
}
.btn-default {
  color: #333;
  background-color: #ffffff;
  border-color: #ccc;
  &.active {
    @extend %function-3;
    background-image: none;
  }
  &:active {
    @extend %function-3;
    background-image: none;
  }
  &:focus {
    @extend %function-3;
  }
  &:hover {
    @extend %function-3;
  }
}
.btn-block {
  display: block;
  width: 100%;
}
.clockpicker-moving {
  cursor: move;
}
.clockpicker-popover {
  .popover-title {
    background-color:$white;
    color:#999;   
    font-size:24px;
    font-weight:700;
    line-height:30px;
    text-align:center;
    span {
      cursor: pointer;
    }
  }
  .popover-content {     
    padding:12px;   
  }
}
.clockpicker-plate{
  background-color:#ffffff; 
  border-radius: 50%;
  width: 200px;
  height: 200px;
  overflow: visible;
  position: relative;
  user-select: none;
}
.clockpicker-canvas {
  @extend %function-4;
  transition: opacity 175ms;
  line {
    stroke: #4466f2;
    stroke-width: 1;
    stroke-linecap: round;
  }
}
.clockpicker-dial {
  @extend %function-4;
  transition: transform 350ms,opacity 350ms;
}
.clockpicker-minutes {
  visibility: hidden;
  &.clockpicker-dial-out {
    transform: scale(.8,.8);
  }
}
.clockpicker-tick {
  border-radius: 50%;
  color: #666;
  line-height: 26px;
  text-align: center;
  width: 26px;
  height: 26px;
  position: absolute;
  cursor: pointer;
  &.active {
    background-color: $color_tropical_blue_approx;   
    color: #fff;
  }
  &:hover {
    color: #fff;
    background-color: $color_tropical_blue_approx;
  }
}
.clockpicker-button {
  background-image: none;
  background-color: #ffffff;
  border-width: 1px 0 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin: 0;
  padding: 10px 0;
  &:hover {
    background-image: none;
    background-color: #ebebeb;
  }
  &:focus {
    outline: 0!important;
  }
  &.am-button {
    margin: 1px;
    padding: 5px;
    border: 1px solid rgba(0,0,0,.2);
    border-radius: 4px;
  }
  &.pm-button {
    margin: 1px 1px 1px 136px;
    padding: 5px;
    border: 1px solid rgba(0,0,0,.2);
    border-radius: 4px;
  }
}
.clockpicker-dial-out {
  opacity: 0;
}
.clockpicker-canvas-out {
  opacity: .25;
}
.clockpicker-canvas-bearing {
  stroke: none;
  fill: #4466f2;
}
.clockpicker-canvas-fg {
  stroke: none;
  fill: #4466f2;
}
.clockpicker-canvas-bg {
  stroke: none;
  fill: $color_tropical_blue_approx;
}
.clockpicker-canvas-bg-trans {
  fill: $color_cerulean_25_approx;
}
.open .dropdown-toggle.btn-default {
  @extend %function-3;
  background-image: none;
}
.clockpicker .input-group-addon {
  cursor: pointer;
}
.clockpicker-align-left.popover > .arrow {
  left: 25px;
}
.clockpicker-align-top.popover > .arrow {
  top: 17px;
}
.clockpicker-align-right.popover > .arrow {
  left: auto;
  right: 25px;
}
.clockpicker-align-bottom.popover > .arrow {
  top: auto;
  bottom: 6px;
}
.clockpicker-hours.clockpicker-dial-out {
  transform: scale(1.2,1.2);
}