$cal_grey: #545A5C;
$cal_lightgrey: #CBD1D2;
$cal_blue: #6691CC;
$cal_red: #D61643;
$cal_green: #8BBF43;
.calendar {
  position: relative;
  overflow: hidden;
  text-transform: capitalize;
  text-align: center;
  font: 15px/1em inherit;
  color: $cal_grey;
  a {
    text-decoration: none;
    color: inherit;
  }
  header {
    .btn {
      display: inline-block;
      position: absolute;
      width: 30px;
      height: 30px;
      text-align: center;
      line-height: 30px;
      color: $cal_lightgrey;
      border-radius: 50%;
      border: 2px solid $cal_lightgrey;
    }
    .btn:hover {
      background: $cal_lightgrey;
      color: white;
    }
    .btn:before {
      content: '';
      position: absolute;
      top: 9px;
      left: 8px;
      width: 8px;
      height: 8px;
      border-style: solid;
      border-width: 3px 3px 0 0;
      transform: rotate(45deg);
      transform-origin: center center;
    }
    .btn-prev {
      top: 0;
      left: 0;
      transform: rotate(-180deg);
    }
    .btn-next {
      top: 0;
      right: 0;
      &:before {
        transform: rotate(45deg);
      }
    }
    .month {
      padding: 0;
      margin: 0;
      .year {
        font-size: 0.6em;
        font-weight: 100;
      }
    }
  }
  table {
    width: 100%;
    margin: 20px 0;
    border-spacing: 0px;
  }
  thead {
    font-size: 1.2em;
    font-weight: 600;
  }
  td {
    padding: .8em .1em;
  }
  .day {
    position: relative;
    display: inline-block;
    width: 2.5em;
    height: 2.5em;
    line-height: 2.5em;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    &:hover {
      border: 2px solid $cal_blue;
    }
    &.today {
      background: $cal_blue;
      color: white;
      &.has-event:after {
        background: white;
      }
    }
    &.wrong-month {
      color: $cal_lightgrey;
    }
    &.wrong-month:hover {
      border: 2px solid transparent;
    }
    &.has-event {
      &:after {
        content: '';
        position: absolute;
        top: calc(50% + .6em);
        left: calc(50% - 2px);
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: $cal_blue;
      }
    }
    &.disabled{
      cursor: default;
      &:hover {
        border: 2px solid transparent;
      }
    }
  }
  .event-container {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 70px;
    background: $cal_grey;
    box-sizing: border-box;
    .event-wrapper{
      overflow-y: auto;
      max-height: 100%;
    }
    .close{
      position: absolute;
      width:30px;
      height: 30px;
      top: 20px;
      right:20px;
      cursor: pointer;
      &:before, &:after {
        content: '';
        position: absolute;
        top:0;
        left: 50%;
        width: 2px;
        height: 100%;
        background-color: $cal_lightgrey;
      }
      &:before {
        transform: rotate(45deg);
      }
      &:after {
        transform: rotate(-45deg);
      }
    }
    .event{
      position: relative;
      width:100%;
      padding: 1em;
      margin-bottom: 1em;
      background: $cal_blue;
      border-radius: 4px;
      box-sizing: border-box;
      box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.12);
      text-align: left;
      color:white;
      &-date{
        margin-bottom: 1em;
      }
      &-hour{
        float:right;
      }
      &-summary{
        font-weight: 600;
      }
    }
  }
  .filler {
    position: absolute;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: $cal_grey;
    transform: translate(-50%, -50%);
  }
}
