@use "sb-element/core/theming";
/*****************************************************************************
Calendar-Date / Theme
******************************************************************************/

@mixin mark($background, $color) {
  .mark {
    background: $background
  }
  span {
    color: $color;
  }
}

// THEME
@mixin theme($theme) {
  .sb-calendar-date {

    &:hover {
      @include mark(
        theming.get-accent($theme),
        theming.get-accent-text($theme)
      );
    }

    @include theming.for-each-color($theme) using ($color) {
      &.sb--#{$color} {
        &.marked, &.marked:hover, &.marked.disabled:hover {
          @include mark(
            theming.get-color($theme, $color),
            theming.get-text($theme, $color)
          );
        }

        &.not-in-month {
          @include mark(
            none,
            theming.get-color-inverted($theme, $color)
          );

          &.marked {
            @include mark(
              theming.get-color-inverted($theme, $color),
              theming.get-text-inverted($theme, $color)
            );
          }
        }
      }
    }
  }
}
