.clearfix {
  &::after {
    content: "";
    display: table;
    clear: right;
  }

  &::before {
    content: "";
    display: table;
  }
}

strong {
  font-weight: 700 !important;
}

.font-default(@size: 13px, @line: 16px) {
  font-size: @size;
  line-height: @line;
}

.matomo-icon() {
  /* copied from icons.css */
  font-family: 'matomo' !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.border-radius (@radius: 6px) {
  -webkit-border-radius: @radius;
  -moz-border-radius: @radius;
  border-radius: @radius;
  -moz-background-clip: padding;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
}

#gradient {
  .horizontal(@start-color: #555, @end-color: #333, @start-percent: 0%, @end-percent: 100%) {
    background-image: -webkit-gradient(linear, @start-percent top, @end-percent top, from(@start-color), to(@end-color)); // Safari 4+, Chrome 2+
    background-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent)); // Safari 5.1+, Chrome 10+
    background-image: -moz-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // FF 3.6+
    background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10
    background-repeat: repeat-x;
    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)", @start-color, @end-color)); // IE9 and down
  }

  .vertical(@start-color: #555, @end-color: #333, @start-percent: 0%, @end-percent: 100%) {
    background-image: -webkit-gradient(linear, left @start-percent, left @end-percent, from(@start-color), to(@end-color)); // Safari 4+, Chrome 2+
    background-image: -webkit-linear-gradient(top, @start-color, @start-percent, @end-color, @end-percent); // Safari 5.1+, Chrome 10+
    background-image: -moz-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // FF 3.6+
    background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10
    background-repeat: repeat-x;
    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)", @start-color, @end-color)); // IE9 and down
  }
}

.vertical-scroll-shadows(@bg-color: @color-white) {
  background: linear-gradient(@bg-color 30%, transparent) center top no-repeat local,
    linear-gradient(transparent, @bg-color 70%) center bottom no-repeat local,
    radial-gradient(farthest-side at 50% 0, fade(@color-silver, 60%), fade(@color-silver, 0%) ) center top no-repeat scroll,
    radial-gradient(farthest-side at 50% 100%, fade(@color-silver, 60%), fade(@color-silver, 0%) ) center bottom no-repeat scroll;
  background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
}

.remove-vertical-scroll-shadows() {
  background: none;
}

.box-sizing(@boxmodel) {
  -webkit-box-sizing: @boxmodel;
  -moz-box-sizing: @boxmodel;
  box-sizing: @boxmodel;
}

.opacity(@opacity) {
  opacity: @opacity;
}

.inAlternativeThemeMode(@themeMode, @rules) {
  [data-theme-mode="@{themeMode}"]:root & {
    @rules();
  }
}

.inDarkMode(@rules) {
  .inAlternativeThemeMode("dark", @rules);
  .inAlternativeThemeMode("auto", {
    @media (prefers-color-scheme: dark) {
      @rules();
    }
  });
}
