/**
 * @license
 * Copyright Akveo. All Rights Reserved.
 * Licensed under the MIT License. See License.txt in the project root for license information.
 */

@mixin nb-calendar-kit-theme() {

  nb-calendar-header {
    .header {
      display: flex;
      flex-direction: column;
    }

    .title {
      display: flex;
      align-items: center;
      color: nb-theme(calendar-fg);
      font-weight: nb-theme(calendar-header-title-font-weight);
      font-size: nb-theme(calendar-header-title-font-size);

      .nb-arrow-dropright {
        margin-left: 0.5rem;
      }

      .nb-arrow-dropleft {
        margin-right: 0.5rem;
      }

      &:hover {
        color: nb-theme(calendar-hover-item-bg);
        cursor: pointer;
      }

      &:active {
        color: nb-theme(calendar-active-item-bg);
      }
    }

    .sub-title {
      color: nb-theme(calendar-weekday-fg);
      font-weight: nb-theme(calendar-header-sub-title-font-weight);
      font-size: nb-theme(calendar-header-sub-title-font-size);
    }
  }

  nb-calendar-navigation button[nbButton] {
    width: nb-theme(calendar-navigation-button-width);

    @include nb-for-theme(default) {
      @include btn-success();
    }
  }

  nb-calendar-day-picker .day-cell,
  nb-calendar-month-picker .month-cell,
  nb-calendar-year-picker .year-cell {
    color: nb-theme(calendar-fg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1px;

    &:not(.empty):not(.disabled) {
      cursor: pointer;
    }
  }

  nb-calendar-year-picker {
    &.medium .year-cell {
      width: nb-theme(calendar-year-cell-width);
      height: nb-theme(calendar-year-cell-height);
    }

    &.large .year-cell {
      width: nb-theme(calendar-year-cell-large-width);
      height: nb-theme(calendar-year-cell-large-height);
    }
  }

  nb-calendar-year-picker .year-cell {
    border-radius: nb-theme(calendar-border-radius);

    &.disabled {
      background: nb-theme(calendar-today-item-bg);
      opacity: nb-theme(calendar-disabled-opacity);
    }

    &.today {
      background: nb-theme(calendar-today-item-bg);
      font-weight: nb-theme(font-weight-bold);
      color: nb-theme(calendar-today-fg);
    }

    &.selected {
      background: nb-theme(calendar-selected-item-bg);
      color: nb-theme(calendar-selected-fg);
      font-weight: nb-theme(font-weight-bold);
    }

    &:hover, &:hover:active {
      background: nb-theme(calendar-hover-item-bg);
      color: nb-theme(calendar-selected-fg);
      font-weight: nb-theme(font-weight-bold);

      @include nb-for-theme(cosmic) {
        @include btn-hero-success-gradient();
      }
    }

    &:active {
      background: nb-theme(calendar-active-item-bg);
      color: nb-theme(calendar-selected-fg);
      font-weight: nb-theme(font-weight-bold);
    }
  }

  nb-calendar-month-picker {
    &.medium .month-cell {
      width: nb-theme(calendar-month-cell-width);
      height: nb-theme(calendar-month-cell-height);
    }

    &.large .month-cell {
      width: nb-theme(calendar-month-cell-large-width);
      height: nb-theme(calendar-month-cell-large-height);
    }
  }

  nb-calendar-month-picker .month-cell {
    border-radius: nb-theme(calendar-border-radius);

    &.disabled {
      background: nb-theme(calendar-today-item-bg);
      opacity: nb-theme(calendar-disabled-opacity);
    }

    &.today {
      background: nb-theme(calendar-today-item-bg);
      font-weight: nb-theme(font-weight-bold);
      color: nb-theme(calendar-today-fg);
    }

    &.selected {
      background: nb-theme(calendar-selected-item-bg);
      color: nb-theme(calendar-selected-fg);
      font-weight: nb-theme(font-weight-bold);
    }

    &:hover, &:hover:active {
      background: nb-theme(calendar-hover-item-bg);
      color: nb-theme(calendar-selected-fg);
      font-weight: nb-theme(font-weight-bold);

      @include nb-for-theme(cosmic) {
        @include btn-hero-success-gradient();
      }
    }

    &:active {
      background: nb-theme(calendar-active-item-bg);
      color: nb-theme(calendar-selected-fg);
      font-weight: nb-theme(font-weight-bold);
    }
  }

  nb-calendar-day-picker {
    &.medium .day-cell {
      width: nb-theme(calendar-day-cell-width);
      height: nb-theme(calendar-day-cell-height);
    }

    &.large .day-cell {
      width: nb-theme(calendar-day-cell-large-width);
      height: nb-theme(calendar-day-cell-large-height);
    }
  }

  nb-calendar-day-picker .day-cell {
    border-radius: nb-theme(calendar-border-radius);

    &.today {
      background: nb-theme(calendar-today-item-bg);
      font-weight: nb-theme(font-weight-bold);
      color: nb-theme(calendar-today-fg);
    }

    &.bounding-month {
      opacity: nb-theme(calendar-inactive-opacity);
    }

    &.disabled {
      background: nb-theme(calendar-today-item-bg);
      opacity: nb-theme(calendar-disabled-opacity);
    }

    &:not(.disabled):not(.empty):hover {
      background: nb-theme(calendar-hover-item-bg);
      color: nb-theme(calendar-selected-fg);
      font-weight: nb-theme(font-weight-bold);

      @include nb-for-theme(cosmic) {
        @include btn-hero-success-gradient();
      }
    }

    &.selected {
      background: nb-theme(calendar-active-item-bg);
      color: nb-theme(calendar-selected-fg);
      font-weight: nb-theme(font-weight-bold);
    }
  }

  nb-calendar-days-names .day {
    width: nb-theme(calendar-weekday-width);
    height: nb-theme(calendar-weekday-height);
    font-size: nb-theme(calendar-weekday-font-size);
    font-weight: nb-theme(calendar-weekday-font-weight);
    color: nb-theme(calendar-weekday-fg);

    &.holiday {
      color: nb-theme(calendar-weekday-holiday-fg);
    }
  }
}
