@import '~@angular/material/theming';

$mat-calendar-body-font-size: 13px ! default;
$mat-calendar-body-header-font-size: 14px ! default;
$mat-calendar-body-label-padding-start: 5% ! default;
$mat-calendar-body-label-translation: -6px ! default;
$mat-calendar-body-cell-min-size: 32px ! default;
$mat-calendar-body-cell-size: 100% / 7 ! default;
$mat-calendar-body-cell-content-margin: 5% ! default;
$mat-calendar-body-cell-content-border-width: 1px ! default;

$mat-calendar-body-min-size: 7 * $mat-calendar-body-cell-min-size ! default;
$mat-calendar-body-cell-padding: $mat-calendar-body-cell-size / 2 ! default;
$mat-calendar-body-cell-content-size: 100% - $mat-calendar-body-cell-content-margin * 2 ! default;

.mat-datetimepicker-calendar-body {
  font-size: $mat-calendar-body-font-size;
  min-width: $mat-calendar-body-min-size;
}

.mat-datetimepicker-calendar-body-label {
  padding: $mat-calendar-body-cell-padding 0 $mat-calendar-body-cell-padding $mat-calendar-body-cell-padding;
  height: 0;
  line-height: 0;
  color: rgba(black, 0.54);
  transform: translateX($mat-calendar-body-label-translation);
  text-align: left;
}

.mat-datetimepicker-calendar-body-cell {
  position: relative;
  width: $mat-calendar-body-cell-size;
  height: 0;
  line-height: 0;
  padding: $mat-calendar-body-cell-padding 0;
  text-align: center;
  outline: none;
  cursor: pointer;
}

.mat-datetimepicker-calendar-body-disabled {
  cursor: default;
  pointer-events: none;
}

.mat-datetimepicker-calendar-body-cell-content {
  position: absolute;
  top: $mat-calendar-body-cell-content-margin;
  left: $mat-calendar-body-cell-content-margin;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: $mat-calendar-body-cell-content-size;
  height: $mat-calendar-body-cell-content-size;
  color: rgba(black, 0.87);
  border: $mat-calendar-body-cell-content-border-width solid transparent;
  border-radius: 50px;

  .mat-datetimepicker-calendar-body-disabled > &:not(.mat-datetimepicker-calendar-body-selected) {
    color: rgba(black, 0.38);
  }
}

:not(.mat-datetimepicker-calendar-body-disabled):hover,
.mat-datetimepicker-calendar-body-active {
  & > .mat-datetimepicker-calendar-body-cell-content:not(.mat-datetimepicker-calendar-body-selected) {
    background-color: rgba(black, 0.12);
  }
}

.mat-datetimepicker-calendar-body-disabled > .mat-datetimepicker-calendar-body-today:not(.mat-datetimepicker-calendar-body-selected) {
  border-color: rgba(black, 0.18);
}

[dir='rtl'] {
  .mat-datetimepicker-calendar-body-label {
    padding: 0 $mat-calendar-body-cell-padding 0 0;
    transform: translateX(-$mat-calendar-body-label-translation);
    text-align: right;
  }
}
