@import "../mixins";

.rc-daterangepicker {

  $input-border-width: 1px;

  position: relative;
  background-color: $input-bg;
  border-radius: $input-border-radius;

  .rc-icon {
    position: absolute;
    top: $padding-base-vertical + $input-border-width;
    right: $padding-base-horizontal + $input-border-width;
    color: $primaryColor;
  }

  &.rc-datepicker-disabled {
    background-color: $input-bg-disabled;
    cursor: $cursor-disabled;
  }

  .rdt {

    .form-control {
      padding-right: 30px;
      &, &[readonly], &[disabled] {
        background: transparent;
      }
    }

    .rdtPicker {
      top: 40px;
      z-index: 10000;
      width: $component-offset-horizontal * 4.1;
      padding: 10px;
      background: $whiteColor;
      border: 1px solid $mediumGrayColor;
      border-radius: $input-border-radius;
      display: block;
      box-sizing: border-box;

      // window arrow
      &:before {
        content: "";
        transform: rotate(45deg);
        position: absolute;
        top: -5px;
        left: 16px;
        border: 1px solid $mediumGrayColor;
        background-color: $whiteColor;
        width: 10px;
        height: 10px;
        z-index: -1;
      }
      &:after {
        content: "";
        position: absolute;
        background-color: $whiteColor;
        top: 0;
        left: 11px;
        height: 9px;
        width: 20px;
        z-index: -1;
      }


      .rdr-MonthAndYear-button {
        border-radius: 0;
        line-height: 1;
        border: 0 none;
        display: block;
        color: $link-color;
        font-weight: normal;
        font-size: $font-size-base;
        background-color: transparent;
        font-family: 'rc-font' !important;
        i {
          display: none;
        }
        &.prev {
          float: left;
          &:before {
            content: getIcoMoonContent($rc-icon-chevron-left-small);
          }
        }
        &.next {
          float: right;
          &:before {
            content: getIcoMoonContent($rc-icon-chevron-right-small);
          }
        }
      }
    }

    .rdr-Day {

      box-sizing: border-box;
      display: inline-block;
      letter-spacing: initial;
      text-align: center;
      font-size: 12px;
      cursor: pointer;
      transition: transform .1s ease;
      width: 25px;
      height: 25px;
      line-height: 25px;

      &:hover {
        background: #bdc3c7;
      }

    }

    .is-selected {
      color: $whiteColor !important;
      background: $primaryColor !important;
    }

    .is-passive {
      opacity: 0.4;
      cursor: default;
    }

    .is-inRange {
      background: $secondaryColorAlt;
      color: $primaryColorAlt;
    }

    .rdr-PredefinedRanges {

      width: 140px;
      display: inline-block;
      vertical-align: top;
      margin-left: 10px;
      margin-top: 10px;

      .rdr-PredefinedRangesItem {
        display: block;
        font-size: 12px;
        color: $menuLinkColor;
        padding: 10px 14px;
        border-radius: 2px;
        background: $menuBackgroundColor;
        text-decoration: none;
        margin-bottom: 6px;
      }

      .rdr-PredefinedRangesItemActive {
        color: $menuActiveLinkColor;
        background: $menuActiveLinkBackgroundColor;
      }

    }

    .rdr-Calendar {
      width: 200px;
      padding: 10px;
      background: $whiteColor;
      border-radius: 2px;
      display: inline-block;
      box-sizing: border-box;
      letter-spacing: 0;
      color: $blackColor;
    }

    .rdr-MonthAndYear-innerWrapper {
      text-align: center;
      box-sizing: border-box;
      font-size: 12px;
      padding: 10px 0;
      height: 38px;
      line-height: 18px;
    }

    .rdr-DayToday {
    }

    .rdr-DaySunday {
    }

    .rdr-DaySpecialDay {
    }

    .rdr-DayActive {
      background: #95a5a6;
      color: #ffffff;
      transform: scale(0.9);
    }

    .rdr-DayStartEdge {
    }

    .rdr-DayEndEdge {
    }

    .rdr-WeekDay {
      box-sizing: border-box;
      display: inline-block;
      letter-spacing: initial;
      text-align: center;
      font-size: 12px;
      font-weight: 600;
      margin-bottom: 1px;
      width: 25px;
      height: 25px;
      line-height: 25px;
    }

  }
}