* {
  box-sizing: border-box;
}

.datetime-picker {
  position: relative;
  border: 1px solid #dbdbdb;
  background-color: #fff;
  border-radius: 4px;
  font-family: Tahoma, sans-serif;
  font-size: 14px;
  color: #4a4a4a;
  width: 250px;
  box-sizing: content-box;
  z-index: 100;

  .calendar {

    .calendar-nav {
      display: flex;
      justify-content: space-between;
      border-bottom: 1px solid #efefef;
      min-height: 32px;
      padding: 4px;

      button {
        background: none;
        border: 0;
        width: 32px;
        height: 32px;
        border-radius: 4px;
        outline: none;
        cursor: pointer;

        .fa {
          font-size: 18px;
        }

        &:hover {
          background-color: #f0f0f0;
        }
      }

      .current-date {
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        padding: 0 8px;
        cursor: pointer;

        &:hover {
          background-color: #f0f0f0;
        }

        &.disabled {
          cursor: default;
        }
      }
    }

    table {
      display: block;
      margin: 4px;

      th, td {
        padding: 0;
      }

      thead {
        display: block;
        margin: 8px 0 3px;

        tr {
          display: flex;
          flex-wrap: wrap;
        }

        th {
          color: #FF9A19;
          display: flex;
          align-items: center;
          justify-content: center;
          flex: 1;
          text-align: center;
          text-transform: uppercase;
          font-size: .8em;
          font-weight: 400;
        }
      }

      tbody {
        display: block;

        tr {
          display: flex;
          flex-wrap: wrap;

          td {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 32px;
            border-radius: 4px;
            cursor: pointer;

            &:hover {
              background-color: #f0f0f0;
            }

            &.prev,
            &.next,
            &.disabled {
              color: #dedede;

              &:hover {
                color: #c5c5c5;
              }
            }

            &.disabled {
              &:hover {
                color: #dedede;
                background-color: transparent;
                cursor: not-allowed;
              }
            }

            &.now {
              color: #5cc4ef;
              font-weight: 400;
            }

            &.selected {
              background-color: #5cc4ef;
              color: #fff;
              font-weight: 400;

              &:hover {
                background-color: darken(#5cc4ef, 2%);
                color: #fff;
              }

              &.start {
                border-top-right-radius: 0;
                border-bottom-right-radius: 0;
              }

              &.end {
                border-top-left-radius: 0;
                border-bottom-left-radius: 0;
              }

              &.start.end {
                border-radius: 4px;
              }
            }

            &.between {
              background-color: lighten(#5cc4ef, 33%);
              border-radius: 0;
            }
          }
        }
      }
    }

    .calendar-days table tbody tr td {
      width: 100% / 7;
    }

    .calendar-months table tbody tr td {
      width: 100% / 3;
      height: 40px;
    }

    .calendar-years table tbody tr td {
      width: 100% / 4;
      height: 60px;
    }

  }

  .time {
    border-top: 1px solid #efefef;
    padding: 4px;
    display: flex;
    align-items: center;
    position: relative;

    .show-time {
      display: flex;
      align-items: center;
      flex: 1;
      font-size: 14px;
      text-align: center;
      margin: 0 0 0 10px;

      .text {
        line-height: 1;
        font-size: 19px;
        font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
        position: relative;
        z-index: 1;
      }

      .separater {
        margin: 0 2px 3px;
        line-height: 1;
      }
    }

    .sliders {
      flex: 0 1 153px;
      margin-right: 10px;
      max-width: 153px;

      .slider-text {
        display: none;
      }

      .slider {
        display: flex;
        align-items: center;
        font-size: 11px;
        height: 17px;
        background-image: linear-gradient(to right, #dedede, #dedede);
        background-position: 0 50%;
        background-size: 100% 1px;
        background-repeat: no-repeat;

        .handle {
          width: 12px;
          height: 12px;
          background-color: #fff;
          border: 1px solid #dedede;
          border-radius: 3px;
          cursor: pointer;

          &:hover {
            border-color: #b8b8b8;
          }

          &:focus,
          &:active {
            background-color: #5cc4ef;
            border-color: #5cc4ef;
          }
        }
      }
    }

  }

  .shortcuts-bar {
    border-bottom: 1px solid #efefef;
    padding: 8px;

    .btn {
      border: 0;
      background: none;
      cursor: pointer;
      border-radius: 2px;
      padding: 2px 4px;
      outline: none;

      &:hover {
        background-color: #f0f0f0;
      }

      &:last-child {
        float: right;
      }

      &:not(:first-child) {
        margin-left: 5px;
      }
    }
  }
}

.datetime-range-picker {
  border: 1px solid #dbdbdb;
  background-color: #fff;
  border-radius: 4px;
  box-sizing: content-box;
  z-index: 100;
}

.datetime-trigger {
  position: relative;

  .datetime-picker {
    position: absolute;
    top: 100%;
  }
}

.datetime-range-trigger {
  position: relative;

  .datetime-range-picker {
    position: absolute;
    top: 100%;
  }
}

.datetime-picker-popup,
.datetime-range-picker-popup {
  margin-top: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);

  &:before {
    content: "";
    position: absolute;
    background: #fff;
    border-top: 1px solid #dbdbdb;
    border-right: 1px solid #dbdbdb;
    width: 10px;
    height: 10px;
    z-index: -1;
    left: 10px;
    top: -6px;
    transform: rotate(315deg);
  }
}