// This file is part of Indico.
// Copyright (C) 2002 - 2026 CERN
//
// Indico is free software; you can redistribute it and/or
// modify it under the terms of the MIT License; see the
// LICENSE file for more details.

@use 'base/palette' as *;

@mixin editing-state($state, $color) {
  &:global(.#{$state}) {
    background-color: $color;

    &:global(.active),
    &:global(.active:hover) {
      background-color: darken($color, 10%);
    }

    &:hover {
      background-color: lighten($color, 10%);
    }
  }
}

@mixin editing-states-bg {
  @include editing-state('accepted', $pastel-green);
  @include editing-state('rejected', $pastel-red);
  @include editing-state('needs-submitter-confirmation', $yellow);
  @include editing-state('needs-submitter-changes', $orange);
}
