//
// Bootstrap material datetimepicker
// --------------------------------------------------

.dtp {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba($black, 0.3);
  z-index: 2000;

  > .dtp-content {
    position: relative;
    overflow: hidden;
    left: 50%;
    max-width: 320px;
    margin: 0 auto;
    background: $white;
    border-radius: $input-border-radius;
    box-shadow: $shadow-area-sm;

    @include media-breakpoint-down(sm) {
      max-width: 300px;
      max-height: 90vh;
      overflow-y: auto;
    }
  }

  &-header {
    position: relative;
    background: $white;
    color: $gray-darker;
    padding: 8px 15px;
    text-align: center;
  }
  &-date,
  &-time {
    background: $white;
    text-align: center;
    color: $headings-color;
    padding: 10px;
  }
  &-date > div {
    padding: 0;
    margin: 0;
    vertical-align: middle;
  }
  &-actual-month,
  &-actual-num,
  &-actual-year {
    font-family: $headings-font-family;
    font-weight: $headings-font-weight;
    letter-spacing: $spacing-md;
    text-transform: uppercase;
    color: $headings-color;
  }

  &-actual-month,
  &-actual-year {
  }

  &-actual-month {
    font-size: 1.3em;
  }

  &-actual-num,
  &-actual-maxtime {
    font-size: 2.8em;
    line-height: 1;
  }

  &-date &-actual-num {
    padding: 5px 0;
  }

  &-actual-year {
    font-size: 1.5em;
    color: $headings-color;
  }
  &-picker {
    padding: 0.625rem;
    text-align: center;
  }
  &-picker-month, &-actual-time {
    text-align: center;
  }

  &-close {
    position: absolute;
    top: 5px;
    bottom: 0;
    right: 2rem;
    > a {
      display: inline-block;
      vertical-align: middle;
      color: $gray-darker;

      &:hover {
        color: $primary;
      }
    }
  }
  table.dtp-picker-days {
    margin: 0;
    border: none;
    tr {
      border: none;
      > td {
        border: none;
        font-weight: 300;
        font-size: 16px;
        text-align: center;
        vertical-align: middle;
        padding: 0.7rem 0.3rem;
        color: $gray-1;

        > {
          span.dtp-select-day {
            color: #bdbdbd !important;
          }
          a {
            display: inline-block;
            color: $gray-darker;
            width: 32px;
            height: 32px;
            text-align: center;
            line-height: 30px;
            border-radius: 50%;
            transition: .3s all ease;
          }
        }
      }
    }
  }
  .dtp-picker-time > a {
    color: $black;
    padding: .25rem .3125rem .3125rem .375rem;
    border-radius: 50% !important;
  }
  table.dtp-picker-days tr > {
    td > a {
      border: 1px solid transparent;
    }

    td > a.selected {
      background: $secondary;
      border-color: $secondary;
      color: $white;
    }

    td > a:hover {
      border-color: $secondary;
    }
    th {
      color: $gray;
      text-align: center;
      font-weight: 300;
      padding: 0.4rem 0.3rem 0.6rem;
      border-bottom: 1px solid $gray-2;
    }
  }
  .p10, .p20, .p60, .p80 {
    display: inline-block;
    vertical-align: middle;
  }
  .p10 {
    width: 10%;

    > a {
      color: $secondary;
      font-size: 36px;
      line-height: 1.1;
      transition: .3s all ease;
      &:hover {
        color: $primary;
      }
    }
  }
  .p20 { width: 20%; }
  .p60 { width: 60%; }
  .p80 { width: 80%; }

  &-picker-month {
    display: none !important;
  }

  &-meridien-am, &-meridien-pm {
    position: relative;
    top: 10px;
    color: $black;
    font-weight: 500;
    padding: 0.5rem;
    border-radius: 50% !important;
    text-decoration: none;
    background: #eee;
    font-size: 1rem;
  }

  &-actual-meridien a.selected {
    background: $primary;
    color: $white;
  }
  &-picker-time {
    > a {
      display: block;
      line-height: 21px;
      padding: 0.3rem 0.3rem 0.3rem 0.3rem;
      &.dtp-select-hour {
        &.selected {
          background: $primary;
          color: $white;
        }
        &.disabled {
          color: $gray-dark;
        }
      }
      &.dtp-select-minute {
        &.disabled {
          color: $gray-dark;
        }
        &.selected {
          background: $primary;
          color: $white;
        }
      }
    }
    position: absolute;
    width: 30px;
    height: 30px;
    font-size: 1em;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 500;
    text-align: center !important;
  }
  &-picker-clock {
    margin: .625rem 1.25rem 0 1.25rem;
    padding: .625rem;
    border-radius: 50% !important;
    background: lighten($primary, 50%);
  }
  &-clock-center {
    width: 15px;
    height: 15px;
    background: $gray-dark;
    border-radius: 50%;
    position: absolute;
    z-index: 50;
    html[class*="ie"] & {
      display: none;
    }
  }
  &-hand, &-hour-hand {
    position: absolute;
    width: 4px;
    margin-left: -2px;
    background: $gray-dark;
    transform: rotate(0deg);
    transform-origin: bottom;
    z-index: 1;
    html[class*="ie"] & {
      display: none;
    }
  }

  &-minute-hand {
    width: 2px;
    margin-left: -1px;
  }
  &-hand.on {
    background: $primary;
  }
  &-buttons {
    padding: 0 1rem 1rem 1rem;
    text-align: right;
  }
  .invisible {
    visibility: hidden;
  }
}

.dtp-buttons.group {
	padding-top: 10px;
  @include group(10px, 10px);
}

.btn {
  cursor: pointer;

  &:focus {
    outline: none;
    box-shadow: none;
  }
  
  &:active,
  &:hover {
    color: $white;
    background: darken($primary, 5%);
    border-color: darken($primary, 5%);
  }
}