/* Copyright 2025 The Forgejo Authors. All rights reserved.
 * SPDX-License-Identifier: GPL-3.0-or-later */

.archived-label-filter:has(#archived-label-filter:not(:checked))
[data-is-archived] {
  display: none !important;
}

.menu .item:has(> .label-filter-item) .label-exclude-item-btn {
  opacity: 0;
  position: absolute;
  right: 0;
  height: 100%;
  width: 40px;
  background: none;
  color: var(--color-secondary-dark-5);

  @media (any-hover: none) {
    opacity: 1;
  }

  &.active {
    color: var(--color-secondary-dark-10);
  }

  &:is(:hover, :focus-visible),
  &.selected {
    background: var(--color-secondary);
    color: var(--color-secondary-dark-7);
  }
}

.ui.menu .ui.dropdown .menu > .item:has(> .label-filter-item) {
  max-width: 288px;

  @media (any-hover: none) {
    padding-right: 50px !important;
  }

  &:hover,
  &.selected,
  &:has(.label-exclude-item-btn.active) {
    padding-right: 50px !important;

    .label-exclude-item-btn {
      opacity: 1;
    }
  }
}

.menu:has(> .item[data-selected])
.item:not([data-selected])
> .label-filter-item {
  padding-left: 27px;
}

.menu .item .label-filter-item {
  width: 100%;
  min-width: 0;
}

.menu .item .label-filter-item > .label {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  display: block;
}

.menu .item .archived-label-indicator {
  margin: 0 0 0 10px !important;

  @media (prefers-reduced-motion: no-preference) {
    transition: transform 200ms ease;
  }
}
