@include export-module('cc-calendar-layout') {
  .co-calendar {

    .date-picker-container {
      position: fixed;
      z-index: $cc-co-calendar-z-index;
    }
  }

  .calendar-template {
    font-family: $cc-co-calendar-font-family;

    .calendar {
      width: $cc-co-calendar-width;
      height: inherit;
      padding: $cc-co-calendar-padding;
      background-color: $cc-co-calendar-background-color;
      border-radius: $cc-co-calendar-border-radius;
      border: $cc-co-calendar-border;
    }

    .calendar-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: $cc-co-calendar-header-margin-bottom;
      user-select: none;
      padding: 10px 15px;

      .calendar-change-month-button {
        cursor: pointer;
        border-radius: $cc-co-calendar-change-month-button-border-radius;
        border: $cc-co-calendar-change-month-button-border;
        padding: $cc-co-calendar-change-month-button-padding;
      }

      .calendar-header-title-wrapper {
        cursor: pointer;
        height: 100%;

        .calendar-header-title {
          font-size: $cc-co-calendar-header-title-font-size;
          font-weight: 500;
        }
      }
    }
    .calendar-wrapper {
      display: flex;
      padding: 0 15px;
      .week-wrapper {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 1px;
      }
      .week-number {
        height: $cc-co-calendar-week-number-height;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: $cc-co-calendar-week-number-margin;
        font-size: $cc-co-calendar-week-number-font-size;
        width: $cc-co-calendar-week-number-width;
        background: $cc-co-calendar-week-number-background;
        &:first-child {
          height: $cc-co-calendar-week-number-first-height;
          margin: $cc-co-calendar-week-number-first-margin;
          color: $cc-co-calendar-week-number-first-color;
        }
      }
    }
    .calendar-body {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
    }

    .calendar-day {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      position: relative;
      height: $cc-co-calendar-day-height;
      margin: $cc-co-calendar-day-margin;
      cursor: pointer;
      .week-number {
        display: none;
      }

      &:hover {
        &:before {
          background-color: $cc-co-calendar-day-hover-background-color;
          border-radius: $cc-co-calendar-selected-day-start-border-radius;
          position: absolute;
          top: -2px;
          left: -2px;
          width: 34px;
          height: 34px;
          content: '';
          z-index: 0;
        }

      }

      &.selected {
        background-color: $cc-co-calendar-day-selected-background-color;
        color: $cc-co-calendar-day-selected-color;
      }
    }

    .calendar-month-or-year {
      padding: $cc-co-calendar-month-or-year-padding;

      &:hover {
        background-color: $cc-co-calendar-month-or-year-hover-background-color;
        padding: $cc-co-calendar-month-or-year-hover-padding;
      }
    }

    .day-names {
      display: contents;
    }

    .weekday {
      font-size: $cc-co-calendar-weekday-font-size;
      height: $cc-co-calendar-weekday-height;
      width: $cc-co-calendar-weekday-width;
      color: $cc-co-calendar-weekday-color;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: $cc-co-calendar-weekday-margin;
      background: $cc-co-calendar-weekday-background;
    }

    .day-number {
      font-size: $cc-co-calendar-day-number-font-size;
      font-weight: $cc-co-calendar-day-number-font-weight;
      position: relative;
      z-index: 2;
    }

    .highlighted-day {
      background-color: $cc-co-calendar-highlighted-day-background-color;
      color: $cc-co-calendar-highlighted-day-color;
      .day-number {
        font-weight: $cc-co-calendar-highlighted-day-font-weight;
      }
    }
    .highlighted-day + .selected-day {
      border-radius: $cc-co-calendar-selected-day-end-border-radius;
    }
    .selected-day {
      color: $cc-co-calendar-selected-day-color;
      &:before {
        background-color: $cc-co-calendar-selected-day-background-color;
        border-radius: $cc-co-calendar-selected-day-start-border-radius;
        position: absolute;
        top: -2px;
        left: -2px;
        width: 34px;
        height: 34px;
        content: '';
        z-index: 1;
      }
      &:hover {
        &:before {
          background-color: $cc-co-calendar-selected-day-background-color;
          border-radius: $cc-co-calendar-selected-day-start-border-radius;
        }
      }
    }

    .selection-grid {
      display: grid;
      grid-gap: $cc-co-calendar-selection-grid-gap;
      cursor: pointer;
      text-align: center;

      &.month {
        grid-template-columns: repeat(4, 1fr);

      }

      &.year {
        grid-template-columns: repeat(3, 1fr);
        padding: $cc-co-calendar-selection-grid-padding;
      }
    }
  }
  .selected-date-display {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: $cc-co-calendar-selected-day-background-color;
    color: #FFF;
    font-size: 14px;
    min-height: 65px;
    .selected-date-day {
      font-size: 24px;
    }
  }
  .calendar-action-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    padding: 10px 20px 15px 20px;
    font-size: 12px;
    color: $cc-co-calendar-selected-day-background-color;
    cursor: pointer;
  }
}
