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

@use '../../styles/theming' as *;

@mixin nb-calendar-theme() {
  nb-base-calendar {
    nb-card {
      background-color: nb-theme(calendar-background-color);
      border: nb-theme(calendar-border-width) nb-theme(calendar-border-style) nb-theme(calendar-border-color);
      box-shadow: none;
      margin: 0;
      width: nb-theme(calendar-width);
      overflow: hidden;
    }

    nb-card-body {
      padding: 0;
    }

    .calendar-navigation {
      border: none;
      display: flex;

      padding: nb-theme(calendar-navigation-padding);
      color: nb-theme(calendar-navigation-text-color);
      font-family: nb-theme(calendar-navigation-text-font-family);
      font-size: nb-theme(calendar-navigation-title-text-font-size);
      font-weight: nb-theme(calendar-navigation-title-text-font-weight);
      line-height: nb-theme(calendar-navigation-title-text-line-height);
    }

    &:not(.has-navigation) {
      nb-calendar-week-numbers .sign-container,
      nb-calendar-days-names {
        border-top: 0;
      }
    }

    &.has-week-number {
      nb-card {
        $calendar-width: nb-theme(calendar-width);
        $week-col-width: nb-theme(calendar-weeknumber-width);
        $divider-width: nb-theme(calendar-weeknumber-divider-width);
        width: calc(#{$calendar-width} + #{$week-col-width} + #{$divider-width});
      }

      .month-cell,
      .year-cell {
        flex: 1 0 auto;
      }
    }

    &.size-large {
      nb-card {
        width: nb-theme(calendar-large-width);
      }

      &.has-week-number nb-card {
        $week-column-width: nb-theme(calendar-weeknumber-large-width);
        $divider-width: nb-theme(calendar-weeknumber-divider-width);
        $large-cal-width: nb-theme(calendar-large-width);
        width: calc(#{$large-cal-width} + #{$week-column-width} + #{$divider-width});
      }
    }
  }
}
