@image-directory: if(@use-relative-paths, '../img/', 'img/');

.c8y-radial-gauge {
  width: 99%;
  height: 99%;
  position: relative;
  display: block;
  &--square {
    height: auto;
    aspect-ratio: 1;
  }
  &__preset {
    .btn-clean();
    padding: @margin-base!important;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.25s linear;
    outline: 0;
    &:hover, &.selected{
      outline: 1px solid @component-brand-primary;
      outline-offset: -2px;
      border-radius: 4px;
    }

    &.preset-custom::before {
      content: '';
      display: block;
      aspect-ratio: 1;
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      min-width: 100%;
      background-image: url('@{image-directory}gauge-presets/custom.webp');
      .c8y-dark-theme & {
        background-image: url('@{image-directory}gauge-presets/custom-dark.webp');
      }
    }

    .c8y-radial-gauge--square{
      pointer-events: none;
    }
  }
}
