.dateRangeInput {
  position: relative;
  display: inline-block;
}

.dateRangeInput__input {
  color: $light-grey;
  height: 24px;
  margin-bottom: 10px;
  font-size: 0.8em;
  border: 1px solid $light-grey;
  cursor: pointer;

  display: inline-block;
  background-color: white;
  user-select: none;
  box-sizing: border-box;
  height: 42px;
  padding: 8px 8px 8px 34px;

  @include respond-to(wide-screens) {
    font-size: 1.3em;
    font-weight: 300;
    height: 50px;
    padding: 10px 15px 10px 44px;
    background-position: 5px 10px;
    background-size: 30px 30px;
  }

  &:hover,
  &:focus {
    border: 1px solid $selectionColor;
    outline: none;
  }

  .calendar-icon {
    fill: #9d9d9d;
    display: inline-block;
    position: absolute;
    width: 20px;
    left: 8px;
    bottom: 21px;

    @include respond-to(wide-screens) {
      width: 26px;
      left: 12px;
    }
  }
}

.dateRangeInput__dropdown {
  position: absolute;
  top: 44px;
  left: 0px;
  z-index: 10;
  width: 300px;
  border: 1px solid $dropdownBorder;
  padding: 8px;
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 6px 12px rgba(black, 0.175);

  @include respond-to(wide-screens) {
    top: 52px;
    width: auto;
  }

  &:before {
    position: absolute;
    top: -7px;
    left: 9px;
    display: inline-block;
    border-right: 7px solid transparent;
    border-bottom: 7px solid $dropdownBorder;
    border-left: 7px solid transparent;
    border-bottom-color: rgba(0, 0, 0, 0.2);
    content: '';
  }

  &:after {
    position: absolute;
    top: -5px;
    left: 10px;
    display: inline-block;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #fff;
    border-left: 6px solid transparent;
    content: '';
  }

  &--calendar-open {
    @include respond-to(wide-screens) {
      top: 52px;
    }
  }
}

.dateRangeInput__defined-ranges {
  float: left;
  list-style-type: none;
  margin: 0 0 10px;
  padding: 0;

  @include respond-to(wide-screens) {
    margin: 0;
  }

  > li {
    margin: 0 1% 10px;
    width: 48%;
    float: left;

    @include respond-to(wide-screens) {
      margin: 0 0 6px;
      width: auto;
      float: none;
    }

    &:last-of-type {
      margin-bottom: 0;
    }
  }
}

.dateRangeInput__rangeButton {
  display: inline-block;
  width: 100%;
  padding: 4px 10px;
  cursor: pointer;

  font-weight: 300;
  background-color: $rangeButtonBackground;
  color: $rangeButtonText;
  text-align: left;

  border: 0;
  border-radius: 6px;

  &:hover,
  &:focus,
  &--active {
    background-color: $rangeButtonBackgroundHover;
    color: white;
  }
}

.dateRangeInput__calendarWrapper {
  float: left;

  @include respond-to(wide-screens) {
    float: right;
  }
}

.dateRangeInput__dropdown--has-ranges {
  @include respond-to(wide-screens) {
    width: 695px;

    .DateRangeInput__dropdown--calendar-open {
      width: 695px;
    }

    .dateRangeInput__calendarWrapper {
      float: right;
    }
  }
}
