/* A small, shared edit affordance: quiet enough for CrossBank, clear enough at a glance. */
.pencil-icon {
  display: inline-block;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  vertical-align: -3px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.edit-button-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.row-edit,
.category-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--forest-2);
  font: 700 9px/1 'DM Mono', monospace;
  text-decoration: none;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.row-edit:hover,
.row-edit:focus-visible,
.category-edit:hover,
.category-edit:focus-visible {
  border-color: rgba(45, 107, 85, .16);
  background: var(--mint);
  color: var(--forest);
  transform: translateY(-1px);
}

.row-edit:active,
.category-edit:active {
  background: var(--peach-pale);
  color: #a76552;
  transform: translateY(0);
}

.row-edit .edit-button-label,
.category-edit .edit-button-label,
.row-edit .edit-button-content > span:last-child,
.category-edit .edit-button-content > span:last-child {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.money-row .row-edit {
  width: 36px;
  padding-right: 0;
  padding-left: 0;
  text-align: center;
}

.edit-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.edit-control:hover .pencil-icon,
.edit-control:focus-visible .pencil-icon,
.row-edit:hover .pencil-icon,
.row-edit:focus-visible .pencil-icon,
.category-edit:hover .pencil-icon,
.category-edit:focus-visible .pencil-icon {
  color: var(--peach);
}

@media (prefers-reduced-motion: reduce) {
  .row-edit,
  .category-edit { transition: none; }
}
