// (C) Copyright 2020 Hewlett-Packard Enterprise Company, L.P.

.hp-timestamp {
  color: $secondary-color;
  white-space: nowrap;
  
  html.hp-high-contrast & {
    color: $projection-secondary-color;
  }
}

// datepicker

div.ui-datepicker {
  padding: 10px;
  line-height: normal;
  background-color: $primary-background;
  color: $secondary-color;
  border: 1px solid $dropdown-outline;
  z-index: $drop-menu-z-index;
  @include drop-menu-border();
  
  .ui-datepicker-header {
    background-image: none;
    border: none;
    border-radius: 0px;
    margin-bottom: 10px;
    text-align: center;
    
    .ui-datepicker-prev, .ui-datepicker-next {
      display: block;
      width: 12px;
      height: 12px;
      background-image: url($img-file);
      background-repeat: no-repeat;
      .ui-icon {
        display: none;
      }
    }
    
    .ui-datepicker-prev {
      float: left;
      margin-left: 5px;
      background-position: -200px -20px;
      &:hover {
        background-position: -200px 0px;
      }
    }
    
    .ui-datepicker-next {
      float: right;
      margin-right: 5px;
      background-position: -200px -60px;
      &:hover {
        background-position: -200px -40px;
      }
    }
  }
  
  .ui-datepicker-buttonpane {
    text-align: right;
    button {
      margin-left: 5px;
    }
  }
}

table.ui-datepicker-calendar {
  thead th {
    padding: 3px 7px 3px 3px;
    border-left: none;
    text-align: right;
  }
  tbody tr {
    background-image: none;
    td {
      padding: 2px;
      text-align: right;
      a {
        display: block;
        padding: 5px;
        border: 1px solid transparent;
        &:hover {
          background-color: $secondary-background;
          text-decoration: none;
        }
        &.ui-state-active {
          background-color: $selected-background;
          font-weight: bold;
        }
      }
    }
  }
  .ui-state-default {
    background-image: none;
    color: $primary-color;
    
    &:hover {
      text-decoration: none;
    }
  }
}

div.hp-date-range {
  position: relative;
  padding: 10px;
  white-space: nowrap;
  
  div.hp-select & {
    > label {
      position: absolute;
      top: 0px;
    }
    > div.hp-date {
      display: inline-block;
      margin-right: -3px;
      line-height: normal;
      padding-top: 15px;
      
      div.ui-datepicker {
        border: none;
        padding: 0px;
        table.ui-datepicker-calendar {
          thead th {
            padding: 2px;
          }
          tbody tr td a {
            padding: 2px 1px;
          }
        }
      }
      
      div.hp-master-filter & {
        display: block;
      }
    }
    div.hp-date-range-from {
      border-right: 1px solid $secondary-divider;
      padding-right: 10px;
      div.hp-master-filter & {
        border: none;
        padding-right: 0px;
        margin-left: -10px;
      }
    }
    div.hp-date-range-to {
      padding-left: 10px;
      div.hp-master-filter & {
        padding-left: 0px;
        margin-left: -10px;
      }
    }
  }
}
