 .date-range-panel {

  position: absolute;
  top: 100%;
  left: 2px;
  font-family: $klavika;

  &--right {
    right: 2px;
    left: auto;
  }
  &--relative {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    right: auto;
    .date-range-panel__scrim {
      display: none;
    }
  }
  &--no-scrim {
    .date-range-panel__scrim {
      opacity: 0;
    }
  }

  &__panel {
    position: relative;
    z-index: $content-z-index;
    background: $ui-3-color;
    @include border($panel-border-color);
    box-shadow: 0 0 40px $subtle-shadow-color;
    overflow: hidden;
  }

  &__body {
    display: flex;
  }
  &__footer {
    padding: em-calc(20px);
  }
  &__scrim {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: $scrim-color;
    z-index: $content-z-index;
  }
  &__presets {
    position: relative;
    display: block;
    border: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    list-style: none;
    max-height: 300px;

    &::before {
      content: "";
      position: absolute;
      top: 0;
      bottom: 0;
      width: em-calc(1px);
      background-image: linear-gradient(to bottom, $panel-border-color 0px, transparent 90%);
    }

    li {
      color: $unselected-text;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
      min-width: 140px;
      font-size: rem-calc(13px);
      text-transform: uppercase;
      letter-spacing: em-calc(1.25px);
      line-height: 1;
      cursor: pointer;
      padding: em-calc(16px);

      &:hover {
        color: $selected-text;
      }
    }

  }

  &__inputs {
    font-size: rem-calc(13px);
    padding-top: em-calc(20px);
    border-top: 1px solid lighten($ui-3-color, 5);
    .input-wrap {
      display: inline-block;
      margin-right: em-calc(20px);
    }
    .actions-wrap {
      float: right;
      position: relative;
      top: em-calc(22px);
      .button {
        padding: em-calc(13px) em-calc(16px);
      }
    }
    label {
      display: block;
      color: $ui-5-color;
      line-height: 1.45;
    }
    input {
      text-align: center;
      width: em-calc(120px);
    }
  }
}


.DateRangePicker {
  $arrow-size: 10px;
  $selection-radius: $global-border-radius;
  $selection-margin: em-calc(5px);

  margin: em-calc(10px) 0;
  background: transparent;
  display: flex;
  padding: 0;
  position: relative;
  color: $ui-5-color;

  &__Legend {
    color: $date-range-picker-legend-color;
    line-height: 16px;
    list-style-type: none;
    margin: 20px 0;
    padding: 0;
  }

  &__LegendItem {
    display: inline-block;
    margin: 0 20px;
  }

  &__LegendItemColor {
    border-radius: 50%;
    display: inline-block;
    height: 14px;
    margin-right: 6px;
    vertical-align: text-bottom;
    width: 14px;
    @include border($overlay-color);

    &--selection {
      background-color: darken($brand-color, 5);
    }
  }

  &__PaginationArrow {
    border: 0;
    cursor: pointer;
    display: block;
    height: 35px;
    outline: none;
    overflow: hidden;
    padding: 0;
    position: absolute;
    text-align: center;
    top: 0;
    white-space: nowrap;
    width: 35px;
    z-index: $content-z-index;

    &--previous {
      left: 20px;
    }

    &--next {
      right: -5px;
    }

    &:hover {
      background-color: transparent;
    }
  }

  &__PaginationArrowIcon {
    height: $arrow-size;
    position: absolute;
    top: 13px;
    width: $arrow-size;

    &--is-disabled {
      opacity: .25;
    }

    &--previous {
      background: transparent url("#{$cdn-base-url}/images/arrow-left.svg") center center no-repeat;
    }

    &--next {
      background: transparent url("#{$cdn-base-url}/images/arrow-right.svg") center center no-repeat;
    }
  }

  &__Month {
    color: $ui-5-color;
    display: inline-block;
    margin: 0 20px;
    position: relative;
    user-select: none;
    width: 275px;
  }

  &__MonthHeader {
    color: $brand-color;
    font-size: em-calc(14px);
    font-weight: bold;
    height: 35px;
    line-height: 35px;
    position: relative;
    text-align: center;
  }

  &__MonthHeaderLabel {
    display: inline-block;
    position: relative;

    &::after {
      content: "";
      display: inline-block;
      margin-left: em-calc(2px);
      width: 10px;
      height: 10px;
      background: url("#{$cdn-base-url}#{$dropdown-icon-path}") center center no-repeat;
    }

    &--year {
      margin-left: em-calc(10px);
    }
  }

  &__MonthHeaderSelect {
    background: $month-header-select-color;
    border: 0;
    cursor: pointer;
    display: inline-block;
    height: 100%;
    left: 0;
    margin: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: $content-z-index;
  }

  &__MonthDates {
    border-bottom: 0;
    border-collapse: separate;
    border-spacing: 0 1px;
    margin: 0;
    width: 100%;
  }

  &__WeekdayHeading,
  &__Date {
    font-size: em-calc(13px);
    line-height: 1;
    padding: 10px 0;
    text-align: center;
    width: 14.285714285714286%;
  }

  &__WeekdayHeading {
    border-bottom: 0;
    text-align: center;

    abbr[title] {
      border-bottom-width: 0;
      color: $unselected-text;
      cursor: pointer;
      font-size: inherit;
      text-decoration: none;
      font-weight: 300;
    }
  }

  &__Date {
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border: 0;

    &:first-child {
      border-left-width: 0;
    }

    &--weekend {
      background-color: rgba($ui-5-color, 0.05);
    }

    &--otherMonth {
      opacity: 0.5;
    }

    &--is-disabled {
      opacity: 0.5;
      color: $unselected-text;
      cursor: default;
    }

    &--is-selected {
      color: $ui-5-color;
    }

    &--is-highlighted {
      color: $accent-color;
    }
  }

  &__CalendarDatePeriod {
    bottom: 0;
    position: absolute;
    top: 0;

    &--am {
      left: 0;
      right: 50%;
    }

    &--pm {
      left: 50%;
      right: 0;
    }
  }

  &__CalendarSelection {
    background-color: rgba($brand-color, 0.3);
    @include border;
    bottom: $selection-margin;
    box-shadow: 0 0 3px rgba($brand-color, 1);
    left: 0;
    position: absolute;
    right: 0;
    top: $selection-margin;

    &--inOtherMonth {
      opacity: .5;
    }

    &--start {
      border-bottom-left-radius: $selection-radius;
      border-right-width: 0;
      border-top-left-radius: $selection-radius;
      left: $selection-margin;
    }

    &--end {
      border-bottom-right-radius: $selection-radius;
      border-left-width: 0;
      border-top-right-radius: $selection-radius;
      right: $selection-margin;
    }

    &--segment {
      border-left-width: 0;
      border-right-width: 0;
    }

    &--single {
      border-radius: $selection-radius;
      left: $selection-margin;
      right: $selection-margin;
    }

    &--is-pending {
      background-color: rgba($brand-color, 0.1);
      box-shadow: none
    }
  }

  &__CalendarHighlight {
    background-color: $calendar-highlight-color;
    @include border($overlay-color);
    bottom: $selection-margin;
    left: 0;
    position: absolute;
    right: 0;
    top: $selection-margin;

    &--inOtherMonth {
      opacity: .5;
    }

    &--start {
      border-bottom-left-radius: $selection-radius;
      border-right-width: 0;
      border-top-left-radius: $selection-radius;
      left: $selection-margin;
    }

    &--end {
      border-bottom-right-radius: $selection-radius;
      border-left-width: 0;
      border-top-right-radius: $selection-radius;
      right: $selection-margin;
    }

    &--segment {
      border-left-width: 0;
      border-right-width: 0;
    }

    &--single {
      background-color: rgba($accent-color, 0.2);
      color: $accent-color;
      @include border($accent-color);
      border-radius: $selection-radius;
      left: $selection-margin;
      right: $selection-margin;
      box-shadow: 0 0 4px rgba($accent-color, 1);
    }
  }

  &__HalfDateStates {
    bottom: -50px;
    left: -50px;
    position: absolute;
    right: -50px;
    top: -50px;
    transform: rotate(30deg);
  }

  &__FullDateStates {
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
  }

  &__DateLabel {
    display: block;
    position: relative;
    text-align: center;
    width: 100%;
    z-index: $content-z-index;
  }
}
