@use '../mixins/mixins' as *;
@use '../common/var' as *;

@include b(year-table) {
  font-size: 12px;
  margin: -1px;
  border-collapse: collapse;

  .#{$namespace}-icon {
    color: getCssVar('datepicker', 'icon-color');
  }

  td {
    text-align: center;
    padding: 20px 0;
    cursor: pointer;

    &.today {
      .cell {
        color: getCssVar('color', 'primary');
      }
    }

    &.disabled .cell {
      background-color: getCssVar('fill-color', 'light');
      cursor: not-allowed;
      color: getCssVar('text-color', 'placeholder');

      &:hover {
        color: getCssVar('text-color', 'placeholder');
      }
    }

    .cell {
      width: 75px;
      height: 32px;
      display: block;
      line-height: 36px;
      color: getCssVar('datepicker-text-color');
      border-radius: 18px;
      margin: 0 auto;

      &:hover {
        background-color: getCssVar('bg-color-hover');
      }
    }

    &.current:not(.disabled) .cell {
      color: $color-white;
      background-color: getCssVar('datepicker-active-color');
      border-radius: getCssVar('border-radius', 'small');
    }

    &:focus-visible {
      outline: none;
      .cell {
        outline: 2px solid getCssVar('datepicker-active-color');
      }
    }

    &:focus-visible {
      outline: none;
      .cell {
        outline: 2px solid getCssVar('datepicker-active-color');
      }
    }
  }
}
