.reviewed-btn {
  transition: background-color 120ms ease, color 120ms ease;
}

.reviewed-btn.btn-outline-primary {
  background-color: transparent !important;
  color: #0d6efd !important;
  border-color: #0d6efd !important;
}

.reviewed-btn[title] {
  position: relative;
}

.reviewed-btn[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 12px;
  z-index: 1000;
}

/* Keep button width constant by layering two spans and toggling opacity */
/* Use inline-grid so both texts occupy the same grid cell and the
   button width becomes the max of both contents. Opacity swap then
   does not change layout. */
.reviewed-btn {
  display: inline-grid;
  align-items: center;
  justify-items: center;
  grid-template-areas: "label";
}
.reviewed-btn .default-text,
.reviewed-btn .hover-text {
  grid-area: label;
  transition: opacity 120ms ease;
  white-space: nowrap;
}
.reviewed-btn .hover-text {
  opacity: 0;
}
.reviewed-btn .default-text {
  opacity: 1;
}
.reviewed-btn:hover .default-text {
  opacity: 0;
}
.reviewed-btn:hover .hover-text {
  opacity: 1;
}

/* Line item delete button styling */
button.line-item-delete-btn {
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0 !important;
  margin: 0;
  font-size: 14px;
  line-height: 16px;
  color: #6c757d;
  background: none !important;
  background-color: transparent !important;
  border: 0 !important;
  border-width: 0 !important;
  border-style: none !important;
  border-radius: 0;
  outline: 0 !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

button.line-item-delete-btn:hover,
button.line-item-delete-btn:focus,
button.line-item-delete-btn:active {
  color: #dc3545;
  background: none !important;
  background-color: transparent !important;
  border: 0 !important;
  border-width: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* Ensure the delete button column aligns properly */
div[name="line-item-row"] .col-auto {
  flex: 0 0 auto;
  width: auto;
  padding-right: 0.25rem;
  padding-left: 0;
}
