@import 'admin/globals/variables';
@import 'admin/globals/mixins';
@import 'admin/plugins/font-awesome';

.date-range-filter {
  .range-divider {
    padding: 0;
  }
  input.datepicker {
    width: 96px !important;
  }
}

#ui-datepicker-div {
  @include border-radius($border-radius);
  border-color: $color-3;
  padding: 0;
  margin-top: 10px;

  &:before {
    content: '';
    position: absolute;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid $color-3;
    top: 0px;
    margin-top: -10px;
    left: 25px;
    z-index: 1;
  }

  .ui-datepicker-header {
    padding: 0;
    background-image: none;
    background-color: $color-3;
    border: none;
    border-bottom: none;
    border-radius: 0;
    height: 32px;

    .ui-datepicker-prev, .ui-datepicker-next {
      border-radius: 0;      
      top: 0;
      height: 32px;

      &:hover {
        border: none;
        background-image: none;
        background-color: $color-3;
        cursor: pointer;
      }

      .ui-icon {
        background-image: none;
        text-indent: 0;
        color: $color-1;
        width: 10px;
        margin-left: -5px;
        @extend [class^="icon-"]:before;

        &:hover {
          color: very-light($color-2, 25);
        }
      }
    }
    .ui-datepicker-prev {
      left: 0;

      .ui-icon {
        @extend .icon-arrow-left;        
      }
    }
    .ui-datepicker-next {
      right: 0;

      .ui-icon {
        @extend .icon-arrow-right;
      }

      &:hover {
        .ui-icon {
          margin-left: -5px;
        }        
      }
    }

    .ui-datepicker-title {
      color: $color-1;
      text-transform: uppercase;
      font-size: 85% !important;
      padding: 6px 10px;
    }
  }

  table.ui-datepicker-calendar {
    border: none;

    thead {
      th { 
        border-bottom: 1px solid $color-border;
        border-right: 1px solid $color-border;
        color: $color-body-text;
        width: 33px;

        &:last-child {
          border-right: none;
        }
      }
    }
    tbody {
      tr:hover {
        td {
          background-color: transparent !important;
        }
      }
      &:last-child tr:last-child td {
        border-bottom: none;
      }
      td {
        a {
          border: 1px solid transparent;
          background-color: $color-1;
          background-image: none;
          font-size: 85%;
          color: $color-body-text;

          &.ui-state-active {
            background-color: $color-2;
            color: $color-1;
          }

          &:hover {
            background-color: $color-2;
            color: $color-1;
            border-color: darken($color-2, 5);

          }
        }

        &.ui-state-disabled {
          .ui-state-default {
            border: none;
            background-image: none;
            background-color: transparent;
          }
        }

        &.ui-datepicker-today {
          a {
            background-color: $color-6;
            color: $color-1;
            border: 1px solid darken($color-6, 5);
          }
        }
      }      
    }
  }
}
