.priority-list__item {
  position: relative;
  grid-template-columns: 27px minmax(0, 1fr) 32px auto;
  min-height: 46px;
  transition: transform 150ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
  will-change: transform;
}

.priority-list.is-reordering .priority-list__item {
  user-select: none;
}

.priority-list__item.is-dragging {
  z-index: 4;
  border-color: var(--leaf);
  background: #fbfffc;
  box-shadow: 0 12px 28px rgba(28, 83, 45, 0.18);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.priority-list__item.is-just-moved {
  animation: priority-item-confirm 620ms ease;
}

@keyframes priority-item-confirm {
  0%, 100% {
    border-color: #d7e3d9;
    box-shadow: none;
  }

  35% {
    border-color: var(--leaf);
    background: #f4fbf5;
    box-shadow: 0 0 0 4px rgba(35, 109, 60, 0.12);
  }
}

.priority-list__label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.priority-list__drag-handle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #718076;
  font-size: 18px;
  line-height: 1;
  cursor: grab;
  touch-action: none;
}

.priority-list__drag-handle:hover,
.priority-list__drag-handle:focus-visible {
  border-color: #bfd1c2;
  background: #f7fbf8;
  color: var(--forest);
}

.priority-list__item.is-dragging .priority-list__drag-handle {
  cursor: grabbing;
}

.priority-list__button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #bfd1c2;
  border-radius: 9px;
  background: #fff;
  color: var(--forest);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.priority-list__button:hover:not(:disabled) {
  border-color: var(--leaf);
  background: #f7fbf8;
}

.priority-list__button:disabled {
  cursor: default;
  opacity: 0.35;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  .priority-list__item {
    transition: none;
  }

  .priority-list__item.is-just-moved {
    animation: none;
    border-color: var(--leaf);
    background: #f4fbf5;
  }
}

@media (max-width: 480px) {
  .priority-list__item {
    grid-template-columns: 27px minmax(0, 1fr) 30px auto;
    gap: 6px;
  }

  .priority-list__drag-handle,
  .priority-list__button {
    width: 30px;
    height: 30px;
  }
}
